diff --git a/crate_info.md b/crate_info.md index e53bfb4e6..e0a539faa 100644 --- a/crate_info.md +++ b/crate_info.md @@ -1,105 +1,105 @@ -| Name | Crate | Feature Gate | -|--------------------------------|-----------------|-----------------------------------| -| BillingPortalConfiguration | stripe_billing | billing_portal_configuration | -| BillingPortalSession | stripe_billing | billing_portal_session | -| CreditNote | stripe_billing | credit_note | -| CreditNoteLineItem | stripe_billing | credit_note_line_item | -| Invoice | stripe_billing | invoice | -| InvoiceItem | stripe_billing | invoice_item | -| InvoiceLineItem | stripe_billing | invoice_line_item | -| Plan | stripe_billing | plan | -| Quote | stripe_billing | quote | -| Subscription | stripe_billing | subscription | -| SubscriptionItem | stripe_billing | subscription_item | -| SubscriptionSchedule | stripe_billing | subscription_schedule | -| TaxId | stripe_billing | tax_id | -| TestHelpersTestClock | stripe_billing | test_helpers_test_clock | -| UsageRecord | stripe_billing | usage_record | -| UsageRecordSummary | stripe_billing | usage_record_summary | -| CheckoutSession | stripe_checkout | checkout_session | -| Account | stripe_connect | account | -| AccountLink | stripe_connect | account_link | -| AccountSession | stripe_connect | account_session | -| ApplicationFee | stripe_connect | application_fee | -| ApplicationFeeRefund | stripe_connect | application_fee_refund | -| AppsSecret | stripe_connect | apps_secret | -| Capability | stripe_connect | capability | -| CountrySpec | stripe_connect | country_spec | -| ExternalAccount | stripe_connect | external_account | -| LoginLink | stripe_connect | login_link | -| Person | stripe_connect | person | -| Topup | stripe_connect | topup | -| Transfer | stripe_connect | transfer | -| TransferReversal | stripe_connect | transfer_reversal | -| Balance | stripe_core | balance | -| BalanceTransaction | stripe_core | balance_transaction | -| CashBalance | stripe_core | cash_balance | -| Charge | stripe_core | charge | -| Customer | stripe_core | customer | -| CustomerBalanceTransaction | stripe_core | customer_balance_transaction | -| CustomerCashBalanceTransaction | stripe_core | customer_cash_balance_transaction | -| Dispute | stripe_core | dispute | -| Event | stripe_core | event | -| File | stripe_core | file | -| FileLink | stripe_core | file_link | -| Mandate | stripe_core | mandate | -| PaymentIntent | stripe_core | payment_intent | -| PaymentSource | stripe_core | payment_source | -| Payout | stripe_core | payout | -| Refund | stripe_core | refund | -| SetupAttempt | stripe_core | setup_attempt | -| SetupIntent | stripe_core | setup_intent | -| Token | stripe_core | token | -| RadarEarlyFraudWarning | stripe_fraud | radar_early_fraud_warning | -| RadarValueList | stripe_fraud | radar_value_list | -| RadarValueListItem | stripe_fraud | radar_value_list_item | -| Review | stripe_fraud | review | -| IssuingAuthorization | stripe_issuing | issuing_authorization | -| IssuingCard | stripe_issuing | issuing_card | -| IssuingCardholder | stripe_issuing | issuing_cardholder | -| IssuingDispute | stripe_issuing | issuing_dispute | -| IssuingToken | stripe_issuing | issuing_token | -| IssuingTransaction | stripe_issuing | issuing_transaction | -| ApplePayDomain | stripe_misc | apple_pay_domain | -| EphemeralKey | stripe_misc | ephemeral_key | -| ExchangeRate | stripe_misc | exchange_rate | -| FinancialConnectionsAccount | stripe_misc | financial_connections_account | -| FinancialConnectionsSession | stripe_misc | financial_connections_session | -| IdentityVerificationReport | stripe_misc | identity_verification_report | -| IdentityVerificationSession | stripe_misc | identity_verification_session | -| ReportingReportRun | stripe_misc | reporting_report_run | -| ReportingReportType | stripe_misc | reporting_report_type | -| ScheduledQueryRun | stripe_misc | scheduled_query_run | -| TaxCalculation | stripe_misc | tax_calculation | -| TaxRegistration | stripe_misc | tax_registration | -| TaxSettings | stripe_misc | tax_settings | -| TaxTransaction | stripe_misc | tax_transaction | -| WebhookEndpoint | stripe_misc | webhook_endpoint | -| BankAccount | stripe_payment | bank_account | -| Card | stripe_payment | card | -| PaymentLink | stripe_payment | payment_link | -| PaymentMethod | stripe_payment | payment_method | -| PaymentMethodConfiguration | stripe_payment | payment_method_configuration | -| PaymentMethodDomain | stripe_payment | payment_method_domain | -| Source | stripe_payment | source | -| Coupon | stripe_product | coupon | -| Price | stripe_product | price | -| Product | stripe_product | product | -| PromotionCode | stripe_product | promotion_code | -| ShippingRate | stripe_product | shipping_rate | -| TaxCode | stripe_product | tax_code | -| TaxRate | stripe_product | tax_rate | -| TerminalConfiguration | stripe_terminal | terminal_configuration | -| TerminalConnectionToken | stripe_terminal | terminal_connection_token | -| TerminalLocation | stripe_terminal | terminal_location | -| TerminalReader | stripe_terminal | terminal_reader | -| TreasuryCreditReversal | stripe_treasury | treasury_credit_reversal | -| TreasuryDebitReversal | stripe_treasury | treasury_debit_reversal | -| TreasuryFinancialAccount | stripe_treasury | treasury_financial_account | -| TreasuryInboundTransfer | stripe_treasury | treasury_inbound_transfer | -| TreasuryOutboundPayment | stripe_treasury | treasury_outbound_payment | -| TreasuryOutboundTransfer | stripe_treasury | treasury_outbound_transfer | -| TreasuryReceivedCredit | stripe_treasury | treasury_received_credit | -| TreasuryReceivedDebit | stripe_treasury | treasury_received_debit | -| TreasuryTransaction | stripe_treasury | treasury_transaction | -| TreasuryTransactionEntry | stripe_treasury | treasury_transaction_entry | \ No newline at end of file +| Name | Crate | Feature Gate | +|--------------------------------------------------------------------------------------------------|-----------------|-----------------------------------| +| BillingPortalConfiguration | stripe_billing | billing_portal_configuration | +| BillingPortalSession | stripe_billing | billing_portal_session | +| InvoiceLineItem | stripe_billing | invoice_line_item | +| TestHelpersTestClock | stripe_billing | test_helpers_test_clock | +| UsageRecordSummary | stripe_billing | usage_record_summary | +| [CreditNoteLineItem](https://stripe.com/docs/api/credit_notes/line_item) | stripe_billing | credit_note_line_item | +| [CreditNote](https://stripe.com/docs/api/credit_notes/object) | stripe_billing | credit_note | +| [InvoiceItem](https://stripe.com/docs/api/invoiceitems/object) | stripe_billing | invoice_item | +| [Invoice](https://stripe.com/docs/api/invoices/object) | stripe_billing | invoice | +| [Plan](https://stripe.com/docs/api/plans/object) | stripe_billing | plan | +| [Quote](https://stripe.com/docs/api/quotes/object) | stripe_billing | quote | +| [SubscriptionItem](https://stripe.com/docs/api/subscription_items/object) | stripe_billing | subscription_item | +| [SubscriptionSchedule](https://stripe.com/docs/api/subscription_schedules/object) | stripe_billing | subscription_schedule | +| [Subscription](https://stripe.com/docs/api/subscriptions/object) | stripe_billing | subscription | +| [TaxId](https://stripe.com/docs/api/tax_ids/object) | stripe_billing | tax_id | +| [UsageRecord](https://stripe.com/docs/api/usage_records/object) | stripe_billing | usage_record | +| [CheckoutSession](https://stripe.com/docs/api/checkout/sessions/object) | stripe_checkout | checkout_session | +| AppsSecret | stripe_connect | apps_secret | +| ExternalAccount | stripe_connect | external_account | +| [AccountLink](https://stripe.com/docs/api/account_links/object) | stripe_connect | account_link | +| [AccountSession](https://stripe.com/docs/api/account_sessions/object) | stripe_connect | account_session | +| [Account](https://stripe.com/docs/api/accounts/object) | stripe_connect | account | +| [ApplicationFeeRefund](https://stripe.com/docs/api/fee_refunds/object) | stripe_connect | application_fee_refund | +| [ApplicationFee](https://stripe.com/docs/api/application_fees/object) | stripe_connect | application_fee | +| [Capability](https://stripe.com/docs/api/capabilities/object) | stripe_connect | capability | +| [CountrySpec](https://stripe.com/docs/api/country_specs/object) | stripe_connect | country_spec | +| [LoginLink](https://stripe.com/docs/api/account/login_link) | stripe_connect | login_link | +| [Person](https://stripe.com/docs/api/persons/object) | stripe_connect | person | +| [Topup](https://stripe.com/docs/api/topups/object) | stripe_connect | topup | +| [TransferReversal](https://stripe.com/docs/api/transfer_reversals/object) | stripe_connect | transfer_reversal | +| [Transfer](https://stripe.com/docs/api/transfers/object) | stripe_connect | transfer | +| PaymentSource | stripe_core | payment_source | +| [BalanceTransaction](https://stripe.com/docs/api/balance_transactions/object) | stripe_core | balance_transaction | +| [Balance](https://stripe.com/docs/api/balance/balance_object) | stripe_core | balance | +| [CashBalance](https://stripe.com/docs/api/cash_balance/object) | stripe_core | cash_balance | +| [Charge](https://stripe.com/docs/api/charges/object) | stripe_core | charge | +| [CustomerBalanceTransaction](https://stripe.com/docs/api/customer_balance_transactions/object) | stripe_core | customer_balance_transaction | +| [CustomerCashBalanceTransaction](https://stripe.com/docs/api/cash_balance_transactions/object) | stripe_core | customer_cash_balance_transaction | +| [Customer](https://stripe.com/docs/api/customers/object) | stripe_core | customer | +| [Dispute](https://stripe.com/docs/api/disputes/object) | stripe_core | dispute | +| [Event](https://stripe.com/docs/api/events/object) | stripe_core | event | +| [FileLink](https://stripe.com/docs/api/file_links/object) | stripe_core | file_link | +| [File](https://stripe.com/docs/api/files/object) | stripe_core | file | +| [Mandate](https://stripe.com/docs/api/mandates/object) | stripe_core | mandate | +| [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) | stripe_core | payment_intent | +| [Payout](https://stripe.com/docs/api/payouts/object) | stripe_core | payout | +| [Refund](https://stripe.com/docs/api/refunds/object) | stripe_core | refund | +| [SetupAttempt](https://stripe.com/docs/api/setup_attempts/object) | stripe_core | setup_attempt | +| [SetupIntent](https://stripe.com/docs/api/setup_intents/object) | stripe_core | setup_intent | +| [Token](https://stripe.com/docs/api/tokens/object) | stripe_core | token | +| RadarEarlyFraudWarning | stripe_fraud | radar_early_fraud_warning | +| [RadarValueListItem](https://stripe.com/docs/api/radar/value_list_items/object) | stripe_fraud | radar_value_list_item | +| [RadarValueList](https://stripe.com/docs/api/radar/value_lists/object) | stripe_fraud | radar_value_list | +| [Review](https://stripe.com/docs/api/radar/reviews/object) | stripe_fraud | review | +| [IssuingAuthorization](https://stripe.com/docs/api/issuing/authorizations/object) | stripe_issuing | issuing_authorization | +| [IssuingCard](https://stripe.com/docs/api/issuing/cards/object) | stripe_issuing | issuing_card | +| [IssuingCardholder](https://stripe.com/docs/api/issuing/cardholders/object) | stripe_issuing | issuing_cardholder | +| [IssuingDispute](https://stripe.com/docs/api/issuing/disputes/object) | stripe_issuing | issuing_dispute | +| [IssuingToken](https://stripe.com/docs/api/issuing/tokens/object) | stripe_issuing | issuing_token | +| [IssuingTransaction](https://stripe.com/docs/api/issuing/transactions/object) | stripe_issuing | issuing_transaction | +| ApplePayDomain | stripe_misc | apple_pay_domain | +| EphemeralKey | stripe_misc | ephemeral_key | +| ExchangeRate | stripe_misc | exchange_rate | +| TaxRegistration | stripe_misc | tax_registration | +| [FinancialConnectionsAccount](https://stripe.com/docs/api/financial_connections/accounts/object) | stripe_misc | financial_connections_account | +| [FinancialConnectionsSession](https://stripe.com/docs/api/financial_connections/sessions/object) | stripe_misc | financial_connections_session | +| [IdentityVerificationReport](https://stripe.com/docs/api/identity/verification_reports/object) | stripe_misc | identity_verification_report | +| [IdentityVerificationSession](https://stripe.com/docs/api/identity/verification_sessions/object) | stripe_misc | identity_verification_session | +| [ReportingReportRun](https://stripe.com/docs/api/reporting/report_run/object) | stripe_misc | reporting_report_run | +| [ReportingReportType](https://stripe.com/docs/api/reporting/report_type/object) | stripe_misc | reporting_report_type | +| [ScheduledQueryRun](https://stripe.com/docs/api/sigma/scheduled_queries/object) | stripe_misc | scheduled_query_run | +| [TaxCalculation](https://stripe.com/docs/api/tax/calculations/object) | stripe_misc | tax_calculation | +| [TaxSettings](https://stripe.com/docs/api/tax/settings/object) | stripe_misc | tax_settings | +| [TaxTransaction](https://stripe.com/docs/api/tax/transactions/object) | stripe_misc | tax_transaction | +| [WebhookEndpoint](https://stripe.com/docs/api/webhook_endpoints/object) | stripe_misc | webhook_endpoint | +| BankAccount | stripe_payment | bank_account | +| [Card](https://stripe.com/docs/api/cards/object) | stripe_payment | card | +| [PaymentLink](https://stripe.com/docs/api/payment_links/payment_links/object) | stripe_payment | payment_link | +| [PaymentMethodConfiguration](https://stripe.com/docs/api/payment_method_configurations/object) | stripe_payment | payment_method_configuration | +| [PaymentMethodDomain](https://stripe.com/docs/api/payment_method_domains/object) | stripe_payment | payment_method_domain | +| [PaymentMethod](https://stripe.com/docs/api/payment_methods/object) | stripe_payment | payment_method | +| [Source](https://stripe.com/docs/api/sources/object) | stripe_payment | source | +| [Coupon](https://stripe.com/docs/api/coupons/object) | stripe_product | coupon | +| [Price](https://stripe.com/docs/api/prices/object) | stripe_product | price | +| [Product](https://stripe.com/docs/api/products/object) | stripe_product | product | +| [PromotionCode](https://stripe.com/docs/api/promotion_codes/object) | stripe_product | promotion_code | +| [ShippingRate](https://stripe.com/docs/api/shipping_rates/object) | stripe_product | shipping_rate | +| [TaxCode](https://stripe.com/docs/api/tax_codes/object) | stripe_product | tax_code | +| [TaxRate](https://stripe.com/docs/api/tax_rates/object) | stripe_product | tax_rate | +| [TerminalConfiguration](https://stripe.com/docs/api/terminal/configuration/object) | stripe_terminal | terminal_configuration | +| [TerminalConnectionToken](https://stripe.com/docs/api/terminal/connection_tokens/object) | stripe_terminal | terminal_connection_token | +| [TerminalLocation](https://stripe.com/docs/api/terminal/locations/object) | stripe_terminal | terminal_location | +| [TerminalReader](https://stripe.com/docs/api/terminal/readers/object) | stripe_terminal | terminal_reader | +| TreasuryCreditReversal | stripe_treasury | treasury_credit_reversal | +| TreasuryDebitReversal | stripe_treasury | treasury_debit_reversal | +| TreasuryFinancialAccount | stripe_treasury | treasury_financial_account | +| TreasuryInboundTransfer | stripe_treasury | treasury_inbound_transfer | +| TreasuryOutboundPayment | stripe_treasury | treasury_outbound_payment | +| TreasuryOutboundTransfer | stripe_treasury | treasury_outbound_transfer | +| TreasuryReceivedCredit | stripe_treasury | treasury_received_credit | +| TreasuryReceivedDebit | stripe_treasury | treasury_received_debit | +| TreasuryTransaction | stripe_treasury | treasury_transaction | +| TreasuryTransactionEntry | stripe_treasury | treasury_transaction_entry | \ No newline at end of file diff --git a/generated/stripe_billing/src/usage_record/mod.rs b/generated/stripe_billing/src/usage_record/mod.rs index 8ba813708..5964a0f70 100644 --- a/generated/stripe_billing/src/usage_record/mod.rs +++ b/generated/stripe_billing/src/usage_record/mod.rs @@ -1,7 +1,9 @@ /// Usage records allow you to report customer usage and metrics to Stripe for /// metered billing of subscription prices. /// -/// Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing). +/// Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct UsageRecord { /// Unique identifier for the object. diff --git a/generated/stripe_checkout/src/checkout_session/mod.rs b/generated/stripe_checkout/src/checkout_session/mod.rs index a1d231b32..583e69809 100644 --- a/generated/stripe_checkout/src/checkout_session/mod.rs +++ b/generated/stripe_checkout/src/checkout_session/mod.rs @@ -2,7 +2,7 @@ /// one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) /// or [Payment Links](https://stripe.com/docs/payments/payment-links). /// -/// We recommend creating a new Session each time your customer attempts to pay. Once payment is successful, the Checkout Session will contain a reference to the [Customer](https://stripe.com/docs/api/customers), and either the successful [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active [Subscription](https://stripe.com/docs/api/subscriptions). You can create a Checkout Session on your server and redirect to its URL to begin Checkout. Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart). +/// We recommend creating a new Session each time your customer attempts to pay. Once payment is successful, the Checkout Session will contain a reference to the [Customer](https://stripe.com/docs/api/customers), and either the successful [PaymentIntent](https://stripe.com/docs/api/payment_intents) or an active [Subscription](https://stripe.com/docs/api/subscriptions). You can create a Checkout Session on your server and redirect to its URL to begin Checkout. Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct CheckoutSession { /// When set, provides configuration for actions to take if this Checkout Session expires. diff --git a/generated/stripe_connect/src/account_link/mod.rs b/generated/stripe_connect/src/account_link/mod.rs index 11c605c48..ce211e565 100644 --- a/generated/stripe_connect/src/account_link/mod.rs +++ b/generated/stripe_connect/src/account_link/mod.rs @@ -1,7 +1,9 @@ /// Account Links are the means by which a Connect platform grants a connected account permission to access /// Stripe-hosted applications, such as Connect Onboarding. /// -/// Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding). +/// Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct AccountLink { /// Time at which the object was created. diff --git a/generated/stripe_connect/src/account_session/mod.rs b/generated/stripe_connect/src/account_session/mod.rs index 1ae0e1e7e..7373452fc 100644 --- a/generated/stripe_connect/src/account_session/mod.rs +++ b/generated/stripe_connect/src/account_session/mod.rs @@ -3,7 +3,7 @@ /// We recommend that you create an AccountSession each time you need to display an embedded component /// to your user. /// -/// Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once. Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components). +/// Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once. Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct AccountSession { /// The ID of the account the AccountSession was created for. diff --git a/generated/stripe_connect/src/country_spec/mod.rs b/generated/stripe_connect/src/country_spec/mod.rs index 40ea5d454..bef0677ca 100644 --- a/generated/stripe_connect/src/country_spec/mod.rs +++ b/generated/stripe_connect/src/country_spec/mod.rs @@ -2,7 +2,7 @@ /// created. /// /// These requirements can differ depending on the account's country. -/// The Country Specs API makes these rules available to your integration. You can also view the information from this API call as [an online guide](/docs/connect/required-verification-information). +/// The Country Specs API makes these rules available to your integration. You can also view the information from this API call as [an online guide](/docs/connect/required-verification-information). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct CountrySpec { /// The default currency for this country. diff --git a/generated/stripe_connect/src/login_link/mod.rs b/generated/stripe_connect/src/login_link/mod.rs index 26cd0cfda..df23c9c60 100644 --- a/generated/stripe_connect/src/login_link/mod.rs +++ b/generated/stripe_connect/src/login_link/mod.rs @@ -1,4 +1,6 @@ /// Login Links are single-use login link for an Express account to access their Stripe dashboard. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct LoginLink { /// Time at which the object was created. diff --git a/generated/stripe_core/src/balance/mod.rs b/generated/stripe_core/src/balance/mod.rs index e90a8a469..97b035985 100644 --- a/generated/stripe_core/src/balance/mod.rs +++ b/generated/stripe_core/src/balance/mod.rs @@ -1,6 +1,6 @@ /// This is an object representing your Stripe balance. /// -/// You can retrieve it to see the balance currently on your Stripe account. You can also retrieve the balance history, which contains a list of [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance (charges, payouts, and so forth). The available and pending amounts for each currency are broken down further by payment source types. Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances). +/// You can retrieve it to see the balance currently on your Stripe account. You can also retrieve the balance history, which contains a list of [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance (charges, payouts, and so forth). The available and pending amounts for each currency are broken down further by payment source types. Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Balance { /// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). diff --git a/generated/stripe_core/src/token/mod.rs b/generated/stripe_core/src/token/mod.rs index 142bb5c62..8bc6bcefe 100644 --- a/generated/stripe_core/src/token/mod.rs +++ b/generated/stripe_core/src/token/mod.rs @@ -7,7 +7,7 @@ /// This guarantees that no sensitive card data touches your server, and allows your integration to operate in a PCI-compliant way. If you can't use client-side tokenization, you can also create tokens using the API with either your publishable or secret API key. /// If your integration uses this method, you're responsible for any PCI compliance that it might require, and you must keep your secret API key safe. /// Unlike with client-side tokenization, your customer's information isn't sent directly to Stripe, so we can't determine how it's handled or stored. You can't store or use tokens more than once. -/// To store card or bank account information for later use, create [Customer](https://stripe.com/docs/api#customers) objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization. +/// To store card or bank account information for later use, create [Customer](https://stripe.com/docs/api#customers) objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Token { #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/stripe_fraud/src/radar_value_list/mod.rs b/generated/stripe_fraud/src/radar_value_list/mod.rs index b5041571d..1b0fdad1d 100644 --- a/generated/stripe_fraud/src/radar_value_list/mod.rs +++ b/generated/stripe_fraud/src/radar_value_list/mod.rs @@ -1,6 +1,8 @@ /// Value lists allow you to group values together which can then be referenced in rules. /// -/// Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items). +/// Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct RadarValueList { /// The name of the value list for use in rules. diff --git a/generated/stripe_fraud/src/radar_value_list_item/mod.rs b/generated/stripe_fraud/src/radar_value_list_item/mod.rs index a4d793052..79fbbf8dc 100644 --- a/generated/stripe_fraud/src/radar_value_list_item/mod.rs +++ b/generated/stripe_fraud/src/radar_value_list_item/mod.rs @@ -1,6 +1,8 @@ /// Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. /// -/// Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items). +/// Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct RadarValueListItem { /// Time at which the object was created. diff --git a/generated/stripe_misc/src/financial_connections_account/mod.rs b/generated/stripe_misc/src/financial_connections_account/mod.rs index d27d7a74e..2e91611f5 100644 --- a/generated/stripe_misc/src/financial_connections_account/mod.rs +++ b/generated/stripe_misc/src/financial_connections_account/mod.rs @@ -1,4 +1,6 @@ /// A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct FinancialConnectionsAccount { /// The account holder that this account belongs to. diff --git a/generated/stripe_misc/src/financial_connections_session/mod.rs b/generated/stripe_misc/src/financial_connections_session/mod.rs index ebc69b071..6e99314f2 100644 --- a/generated/stripe_misc/src/financial_connections_session/mod.rs +++ b/generated/stripe_misc/src/financial_connections_session/mod.rs @@ -1,4 +1,6 @@ /// A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct FinancialConnectionsSession { /// The account holder for whom accounts are collected in this session. diff --git a/generated/stripe_misc/src/identity_verification_report/mod.rs b/generated/stripe_misc/src/identity_verification_report/mod.rs index 38825e932..dade25ad9 100644 --- a/generated/stripe_misc/src/identity_verification_report/mod.rs +++ b/generated/stripe_misc/src/identity_verification_report/mod.rs @@ -3,7 +3,7 @@ /// parameters used. /// /// You can find the result of each verification check performed in the appropriate sub-resource: `document`, `id_number`, `selfie`. Each VerificationReport contains a copy of any data collected by the user as well as reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) API. -/// To configure and create VerificationReports, use the [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). +/// To configure and create VerificationReports, use the [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API. Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IdentityVerificationReport { /// Time at which the object was created. diff --git a/generated/stripe_misc/src/identity_verification_session/mod.rs b/generated/stripe_misc/src/identity_verification_session/mod.rs index 16260969c..ddc85c5bc 100644 --- a/generated/stripe_misc/src/identity_verification_session/mod.rs +++ b/generated/stripe_misc/src/identity_verification_session/mod.rs @@ -3,7 +3,7 @@ /// /// It contains details about the type of verification, such as what [verification check](/docs/identity/verification-checks) to perform. /// Only create one VerificationSession for each verification in your system. A VerificationSession transitions through [multiple statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through the verification flow. -/// The VerificationSession contains the user's verified data after verification checks are complete. Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions). +/// The VerificationSession contains the user's verified data after verification checks are complete. Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IdentityVerificationSession { /// The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. diff --git a/generated/stripe_misc/src/reporting_report_run/mod.rs b/generated/stripe_misc/src/reporting_report_run/mod.rs index 15bb94891..5c50362c5 100644 --- a/generated/stripe_misc/src/reporting_report_run/mod.rs +++ b/generated/stripe_misc/src/reporting_report_run/mod.rs @@ -2,7 +2,7 @@ /// specific run parameters. /// /// Once the object is created, Stripe begins processing the report. When the report has finished running, it will give you a reference to a file where you can retrieve your results. -/// For an overview, see [API Access to Reports](https://stripe.com/docs/reporting/statements/api). Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). +/// For an overview, see [API Access to Reports](https://stripe.com/docs/reporting/statements/api). Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct ReportingReportRun { /// Time at which the object was created. diff --git a/generated/stripe_misc/src/reporting_report_type/mod.rs b/generated/stripe_misc/src/reporting_report_type/mod.rs index e01f4ad05..37273ac55 100644 --- a/generated/stripe_misc/src/reporting_report_type/mod.rs +++ b/generated/stripe_misc/src/reporting_report_type/mod.rs @@ -2,7 +2,7 @@ /// the "Activity summary" or "Itemized payouts" reports. /// /// These objects are identified by an ID belonging to a set of enumerated values. -/// See [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) for those Report Type IDs, along with required and optional parameters. Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). +/// See [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) for those Report Type IDs, along with required and optional parameters. Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct ReportingReportType { /// Most recent time for which this Report Type is available. diff --git a/generated/stripe_misc/src/scheduled_query_run/mod.rs b/generated/stripe_misc/src/scheduled_query_run/mod.rs index c4ea1ab42..b994a7274 100644 --- a/generated/stripe_misc/src/scheduled_query_run/mod.rs +++ b/generated/stripe_misc/src/scheduled_query_run/mod.rs @@ -2,7 +2,7 @@ /// receive a `sigma.scheduled_query_run.created` webhook each time the query /// runs. /// -/// The webhook contains a `ScheduledQueryRun` object, which you can use to retrieve the query results. +/// The webhook contains a `ScheduledQueryRun` object, which you can use to retrieve the query results. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct ScheduledQueryRun { /// Time at which the object was created. diff --git a/generated/stripe_misc/src/tax_calculation/mod.rs b/generated/stripe_misc/src/tax_calculation/mod.rs index ffd43a5dd..c3f71e779 100644 --- a/generated/stripe_misc/src/tax_calculation/mod.rs +++ b/generated/stripe_misc/src/tax_calculation/mod.rs @@ -1,6 +1,8 @@ /// A Tax Calculation allows you to calculate the tax to collect from your customer. /// -/// Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom). +/// Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TaxCalculation { /// Total after taxes. diff --git a/generated/stripe_misc/src/tax_settings/mod.rs b/generated/stripe_misc/src/tax_settings/mod.rs index 70fbb9b0b..854269441 100644 --- a/generated/stripe_misc/src/tax_settings/mod.rs +++ b/generated/stripe_misc/src/tax_settings/mod.rs @@ -1,6 +1,8 @@ /// You can use Tax `Settings` to manage configurations used by Stripe Tax calculations. /// -/// Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api). +/// Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TaxSettings { pub defaults: stripe_misc::TaxProductResourceTaxSettingsDefaults, diff --git a/generated/stripe_misc/src/tax_transaction/mod.rs b/generated/stripe_misc/src/tax_transaction/mod.rs index 816602aa1..5cc26c0d0 100644 --- a/generated/stripe_misc/src/tax_transaction/mod.rs +++ b/generated/stripe_misc/src/tax_transaction/mod.rs @@ -1,6 +1,8 @@ /// A Tax Transaction records the tax collected from or refunded to your customer. /// -/// Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction). +/// Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TaxTransaction { /// Time at which the object was created. diff --git a/generated/stripe_misc/src/webhook_endpoint/mod.rs b/generated/stripe_misc/src/webhook_endpoint/mod.rs index 486757e50..8ac42545f 100644 --- a/generated/stripe_misc/src/webhook_endpoint/mod.rs +++ b/generated/stripe_misc/src/webhook_endpoint/mod.rs @@ -4,7 +4,9 @@ /// /// Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. /// -/// Related guide: [Setting up webhooks](https://stripe.com/docs/webhooks/configure). +/// Related guide: [Setting up webhooks](https://stripe.com/docs/webhooks/configure) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct WebhookEndpoint { /// The API version events are rendered as for this webhook endpoint. diff --git a/generated/stripe_payment/src/payment_method_configuration/mod.rs b/generated/stripe_payment/src/payment_method_configuration/mod.rs index cf475fdcc..5a1fdb1c4 100644 --- a/generated/stripe_payment/src/payment_method_configuration/mod.rs +++ b/generated/stripe_payment/src/payment_method_configuration/mod.rs @@ -3,7 +3,7 @@ /// You can have multiple configurations with different sets of payment methods for different scenarios. There are two types of PaymentMethodConfigurations. /// Which is used depends on the [charge type](https://stripe.com/docs/connect/charges): **Direct** configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect. **Child** configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter. Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. /// You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account’s associated child configuration. -/// Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. Related guides: - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations). +/// Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. Related guides: - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct PaymentMethodConfiguration { #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/stripe_payment/src/payment_method_domain/mod.rs b/generated/stripe_payment/src/payment_method_domain/mod.rs index 2a6379882..d69760ce2 100644 --- a/generated/stripe_payment/src/payment_method_domain/mod.rs +++ b/generated/stripe_payment/src/payment_method_domain/mod.rs @@ -2,6 +2,8 @@ /// Stripe Elements use registered payment method domains to control where certain payment methods are shown. /// /// Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct PaymentMethodDomain { pub apple_pay: stripe_payment::PaymentMethodDomainResourcePaymentMethodStatus, diff --git a/generated/stripe_shared/src/account/mod.rs b/generated/stripe_shared/src/account/mod.rs index 4eaa55961..abea4f61b 100644 --- a/generated/stripe_shared/src/account/mod.rs +++ b/generated/stripe_shared/src/account/mod.rs @@ -4,7 +4,7 @@ /// For other accounts, some properties are returned until that account has started to go through Connect Onboarding. /// Once you create an [Account Link](https://stripe.com/docs/api/account_links) for a Standard or Express account, some parameters are no longer returned. /// These are marked as **Custom Only** or **Custom and Express** below. -/// Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts). +/// Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Account { /// Business information about the account. diff --git a/generated/stripe_shared/src/application_fee/mod.rs b/generated/stripe_shared/src/application_fee/mod.rs index 4b875eb7c..4c83d066a 100644 --- a/generated/stripe_shared/src/application_fee/mod.rs +++ b/generated/stripe_shared/src/application_fee/mod.rs @@ -1,3 +1,4 @@ +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct ApplicationFee { /// ID of the Stripe account this fee was taken from. diff --git a/generated/stripe_shared/src/application_fee_refund/mod.rs b/generated/stripe_shared/src/application_fee_refund/mod.rs index aa20c3b06..d409e0928 100644 --- a/generated/stripe_shared/src/application_fee_refund/mod.rs +++ b/generated/stripe_shared/src/application_fee_refund/mod.rs @@ -1,7 +1,7 @@ /// `Application Fee Refund` objects allow you to refund an application fee that /// has previously been created but not yet refunded. /// -/// Funds will be refunded to the Stripe account from which the fee was originally collected. Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee). +/// Funds will be refunded to the Stripe account from which the fee was originally collected. Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct ApplicationFeeRefund { /// Amount, in cents (or local equivalent). diff --git a/generated/stripe_shared/src/balance_transaction/mod.rs b/generated/stripe_shared/src/balance_transaction/mod.rs index e32ecf0f4..eb7aa3e26 100644 --- a/generated/stripe_shared/src/balance_transaction/mod.rs +++ b/generated/stripe_shared/src/balance_transaction/mod.rs @@ -1,7 +1,9 @@ /// Balance transactions represent funds moving through your Stripe account. /// Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. /// -/// Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types). +/// Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct BalanceTransaction { /// Gross amount of this transaction (in cents (or local equivalent)). diff --git a/generated/stripe_shared/src/capability/mod.rs b/generated/stripe_shared/src/capability/mod.rs index 007c233d4..848bd19c7 100644 --- a/generated/stripe_shared/src/capability/mod.rs +++ b/generated/stripe_shared/src/capability/mod.rs @@ -1,6 +1,8 @@ /// This is an object representing a capability for a Stripe account. /// -/// Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities). +/// Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Capability { /// The account for which the capability enables functionality. diff --git a/generated/stripe_shared/src/card/mod.rs b/generated/stripe_shared/src/card/mod.rs index 4fb014cc5..daf852412 100644 --- a/generated/stripe_shared/src/card/mod.rs +++ b/generated/stripe_shared/src/card/mod.rs @@ -1,7 +1,7 @@ /// You can store multiple cards on a customer in order to charge the customer /// later. /// -/// You can also store multiple debit cards on a recipient in order to transfer to those cards later. Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards). +/// You can also store multiple debit cards on a recipient in order to transfer to those cards later. Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Card { /// The account this card belongs to. diff --git a/generated/stripe_shared/src/cash_balance/mod.rs b/generated/stripe_shared/src/cash_balance/mod.rs index d766715e1..b3b2c9286 100644 --- a/generated/stripe_shared/src/cash_balance/mod.rs +++ b/generated/stripe_shared/src/cash_balance/mod.rs @@ -1,7 +1,7 @@ /// A customer's `Cash balance` represents real funds. /// /// Customers can add funds to their cash balance by sending a bank transfer. -/// These funds can be used for payment and can eventually be paid out to your bank account. +/// These funds can be used for payment and can eventually be paid out to your bank account. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct CashBalance { /// A hash of all cash balances available to this customer. diff --git a/generated/stripe_shared/src/charge/mod.rs b/generated/stripe_shared/src/charge/mod.rs index b6b2ba051..e2d8efd96 100644 --- a/generated/stripe_shared/src/charge/mod.rs +++ b/generated/stripe_shared/src/charge/mod.rs @@ -2,6 +2,8 @@ /// PaymentIntent confirmation is the most common way to create Charges, but transferring /// money to a different Stripe account through Connect also creates Charges. /// Some legacy payment flows create Charges directly, which is not recommended for new integrations. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Charge { /// Amount intended to be collected by this payment. diff --git a/generated/stripe_shared/src/coupon/mod.rs b/generated/stripe_shared/src/coupon/mod.rs index 6b02f84e6..c9ceb6ebb 100644 --- a/generated/stripe_shared/src/coupon/mod.rs +++ b/generated/stripe_shared/src/coupon/mod.rs @@ -2,7 +2,7 @@ /// might want to apply to a customer. /// /// Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. -/// Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). +/// Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Coupon { /// Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. diff --git a/generated/stripe_shared/src/credit_note/mod.rs b/generated/stripe_shared/src/credit_note/mod.rs index e0aebd71e..67b239f69 100644 --- a/generated/stripe_shared/src/credit_note/mod.rs +++ b/generated/stripe_shared/src/credit_note/mod.rs @@ -1,6 +1,8 @@ /// Issue a credit note to adjust an invoice's amount after the invoice is finalized. /// -/// Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes). +/// Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct CreditNote { /// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. diff --git a/generated/stripe_shared/src/credit_note_line_item/mod.rs b/generated/stripe_shared/src/credit_note_line_item/mod.rs index c53b3f846..92ac76d1b 100644 --- a/generated/stripe_shared/src/credit_note_line_item/mod.rs +++ b/generated/stripe_shared/src/credit_note_line_item/mod.rs @@ -1,4 +1,6 @@ -/// The credit note line item object. +/// The credit note line item object +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct CreditNoteLineItem { /// The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. diff --git a/generated/stripe_shared/src/customer/mod.rs b/generated/stripe_shared/src/customer/mod.rs index 98b1db6be..9d1e0d6f0 100644 --- a/generated/stripe_shared/src/customer/mod.rs +++ b/generated/stripe_shared/src/customer/mod.rs @@ -1,6 +1,6 @@ /// This object represents a customer of your business. /// -/// Use it to create recurring charges and track payments that belong to the same customer. Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment). +/// Use it to create recurring charges and track payments that belong to the same customer. Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Customer { /// The customer's address. diff --git a/generated/stripe_shared/src/customer_balance_transaction/mod.rs b/generated/stripe_shared/src/customer_balance_transaction/mod.rs index 3fb8b8702..2f3e870cd 100644 --- a/generated/stripe_shared/src/customer_balance_transaction/mod.rs +++ b/generated/stripe_shared/src/customer_balance_transaction/mod.rs @@ -3,7 +3,9 @@ /// You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), /// or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. /// -/// Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance). +/// Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct CustomerBalanceTransaction { /// The amount of the transaction. diff --git a/generated/stripe_shared/src/customer_cash_balance_transaction/mod.rs b/generated/stripe_shared/src/customer_cash_balance_transaction/mod.rs index 75eafa459..c83be9ba0 100644 --- a/generated/stripe_shared/src/customer_cash_balance_transaction/mod.rs +++ b/generated/stripe_shared/src/customer_cash_balance_transaction/mod.rs @@ -2,7 +2,7 @@ /// by the customer to a merchant, but have not yet been allocated to a payment. /// /// Cash Balance Transactions represent when funds are moved into or out of this balance. -/// This includes funding by the customer, allocation to payments, and refunds to the customer. +/// This includes funding by the customer, allocation to payments, and refunds to the customer. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct CustomerCashBalanceTransaction { #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/stripe_shared/src/discount/mod.rs b/generated/stripe_shared/src/discount/mod.rs index 43e9f8a82..1bac6c61c 100644 --- a/generated/stripe_shared/src/discount/mod.rs +++ b/generated/stripe_shared/src/discount/mod.rs @@ -1,7 +1,9 @@ /// A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). /// It contains information about when the discount began, when it will end, and what it is applied to. /// -/// Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). +/// Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Discount { /// The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. diff --git a/generated/stripe_shared/src/dispute/mod.rs b/generated/stripe_shared/src/dispute/mod.rs index ee9fb7be7..ff70c9209 100644 --- a/generated/stripe_shared/src/dispute/mod.rs +++ b/generated/stripe_shared/src/dispute/mod.rs @@ -2,7 +2,9 @@ /// When this happens, you have the opportunity to respond to the dispute with /// evidence that shows that the charge is legitimate. /// -/// Related guide: [Disputes and fraud](https://stripe.com/docs/disputes). +/// Related guide: [Disputes and fraud](https://stripe.com/docs/disputes) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Dispute { /// Disputed amount. diff --git a/generated/stripe_shared/src/dispute_evidence/mod.rs b/generated/stripe_shared/src/dispute_evidence/mod.rs index 37179c690..0ead08bd6 100644 --- a/generated/stripe_shared/src/dispute_evidence/mod.rs +++ b/generated/stripe_shared/src/dispute_evidence/mod.rs @@ -1,3 +1,4 @@ +/// For more details see <>. #[derive(Clone, Debug, Default, serde::Serialize, serde::Deserialize)] pub struct DisputeEvidence { /// Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. diff --git a/generated/stripe_shared/src/event/mod.rs b/generated/stripe_shared/src/event/mod.rs index fb6993afe..40878603e 100644 --- a/generated/stripe_shared/src/event/mod.rs +++ b/generated/stripe_shared/src/event/mod.rs @@ -10,7 +10,7 @@ /// We also have a separate [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the `Event` objects directly to an endpoint on your server. /// You can manage webhooks in your [account settings](https://dashboard.stripe.com/account/webhooks). /// Learn how to [listen for events](https://stripe.com/docs/webhooks) so that your integration can automatically trigger reactions. When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications that occur in connected accounts. -/// For these events, there's an additional `account` attribute in the received `Event` object. We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) for 30 days. +/// For these events, there's an additional `account` attribute in the received `Event` object. We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) for 30 days. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Event { /// The connected account that originates the event. diff --git a/generated/stripe_shared/src/file/mod.rs b/generated/stripe_shared/src/file/mod.rs index 7070975ed..44b1de8f5 100644 --- a/generated/stripe_shared/src/file/mod.rs +++ b/generated/stripe_shared/src/file/mod.rs @@ -1,7 +1,7 @@ /// This object represents files hosted on Stripe's servers. /// /// You can upload files with the [create file](https://stripe.com/docs/api#create_file) request (for example, when uploading dispute evidence). -/// Stripe also creates files independetly (for example, the results of a [Sigma scheduled query](#scheduled_queries)). Related guide: [File upload guide](https://stripe.com/docs/file-upload). +/// Stripe also creates files independetly (for example, the results of a [Sigma scheduled query](#scheduled_queries)). Related guide: [File upload guide](https://stripe.com/docs/file-upload) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct File { /// Time at which the object was created. diff --git a/generated/stripe_shared/src/file_link/mod.rs b/generated/stripe_shared/src/file_link/mod.rs index 0da544d46..8b756f8cd 100644 --- a/generated/stripe_shared/src/file_link/mod.rs +++ b/generated/stripe_shared/src/file_link/mod.rs @@ -1,7 +1,7 @@ /// To share the contents of a `File` object with non-Stripe users, you can /// create a `FileLink`. /// -/// `FileLink`s contain a URL that you can use to retrieve the contents of the file without authentication. +/// `FileLink`s contain a URL that you can use to retrieve the contents of the file without authentication. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct FileLink { /// Time at which the object was created. diff --git a/generated/stripe_shared/src/invoice/mod.rs b/generated/stripe_shared/src/invoice/mod.rs index 8419a576c..154edf403 100644 --- a/generated/stripe_shared/src/invoice/mod.rs +++ b/generated/stripe_shared/src/invoice/mod.rs @@ -11,7 +11,7 @@ /// Stripe waits until one hour after the last webhook was successfully sent (or the last webhook timed out after failing). /// If you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one hour after creation to finalize the invoice. If your invoice is configured to be billed by sending an email, then based on your [email settings](https://dashboard.stripe.com/account/billing/automatic), Stripe will email the invoice to your customer and await payment. /// These emails can contain a link to a hosted page to pay the invoice. Stripe applies any customer credit on the account before determining the amount due for the invoice (i.e., the amount that will be actually charged). -/// If the amount due for the invoice is less than Stripe's [minimum allowed charge per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the invoice is automatically marked paid, and we add the amount due to the customer's credit balance which is applied to the next invoice. More details on the customer's credit balance are [here](https://stripe.com/docs/billing/customer/balance). Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending). +/// If the amount due for the invoice is less than Stripe's [minimum allowed charge per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the invoice is automatically marked paid, and we add the amount due to the customer's credit balance which is applied to the next invoice. More details on the customer's credit balance are [here](https://stripe.com/docs/billing/customer/balance). Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Invoice { /// The country of the business associated with this invoice, most often the business creating the invoice. diff --git a/generated/stripe_shared/src/invoice_item/mod.rs b/generated/stripe_shared/src/invoice_item/mod.rs index 321b09a2c..65295dd13 100644 --- a/generated/stripe_shared/src/invoice_item/mod.rs +++ b/generated/stripe_shared/src/invoice_item/mod.rs @@ -3,7 +3,7 @@ /// An invoice item is added to an invoice by creating or updating it with an `invoice` field, at which point it will be included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). Invoice Items can be created before you are ready to actually send the invoice. /// This can be particularly useful when combined with a [subscription](https://stripe.com/docs/api/subscriptions). /// Sometimes you want to add a charge or credit to a customer, but actually charge or credit the customer’s card only at the end of a regular billing cycle. -/// This is useful for combining several charges (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). +/// This is useful for combining several charges (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct InvoiceItem { /// Amount (in the `currency` specified) of the invoice item. diff --git a/generated/stripe_shared/src/issuing_authorization/mod.rs b/generated/stripe_shared/src/issuing_authorization/mod.rs index e6fa13716..517a5f64c 100644 --- a/generated/stripe_shared/src/issuing_authorization/mod.rs +++ b/generated/stripe_shared/src/issuing_authorization/mod.rs @@ -1,7 +1,7 @@ /// When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` /// object is created. /// -/// [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the purchase to be completed successfully. Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations). +/// [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the purchase to be completed successfully. Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IssuingAuthorization { /// The total amount that was authorized or rejected. diff --git a/generated/stripe_shared/src/issuing_card/mod.rs b/generated/stripe_shared/src/issuing_card/mod.rs index 5b4975458..2ccd05e45 100644 --- a/generated/stripe_shared/src/issuing_card/mod.rs +++ b/generated/stripe_shared/src/issuing_card/mod.rs @@ -1,4 +1,6 @@ /// You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IssuingCard { /// The brand of the card. diff --git a/generated/stripe_shared/src/issuing_cardholder/mod.rs b/generated/stripe_shared/src/issuing_cardholder/mod.rs index a3ae2329f..86857423c 100644 --- a/generated/stripe_shared/src/issuing_cardholder/mod.rs +++ b/generated/stripe_shared/src/issuing_cardholder/mod.rs @@ -1,6 +1,8 @@ /// An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. /// -/// Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder). +/// Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IssuingCardholder { pub billing: stripe_shared::IssuingCardholderAddress, diff --git a/generated/stripe_shared/src/issuing_dispute/mod.rs b/generated/stripe_shared/src/issuing_dispute/mod.rs index 9b071db9c..689c46a3b 100644 --- a/generated/stripe_shared/src/issuing_dispute/mod.rs +++ b/generated/stripe_shared/src/issuing_dispute/mod.rs @@ -1,6 +1,8 @@ /// As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with. /// -/// Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes). +/// Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IssuingDispute { /// Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). diff --git a/generated/stripe_shared/src/issuing_token/mod.rs b/generated/stripe_shared/src/issuing_token/mod.rs index f3ed77505..a9f086b2e 100644 --- a/generated/stripe_shared/src/issuing_token/mod.rs +++ b/generated/stripe_shared/src/issuing_token/mod.rs @@ -1,6 +1,6 @@ /// An issuing token object is created when an issued card is added to a digital wallet. /// -/// As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe. +/// As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IssuingToken { /// Card associated with this token. diff --git a/generated/stripe_shared/src/issuing_transaction/mod.rs b/generated/stripe_shared/src/issuing_transaction/mod.rs index a583cadd0..f7b10e54e 100644 --- a/generated/stripe_shared/src/issuing_transaction/mod.rs +++ b/generated/stripe_shared/src/issuing_transaction/mod.rs @@ -2,7 +2,9 @@ /// your Stripe account, such as a completed purchase or refund, is represented by an Issuing /// `Transaction` object. /// -/// Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions). +/// Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IssuingTransaction { /// The transaction amount, which will be reflected in your balance. diff --git a/generated/stripe_shared/src/mandate/mod.rs b/generated/stripe_shared/src/mandate/mod.rs index b72377971..296ab675d 100644 --- a/generated/stripe_shared/src/mandate/mod.rs +++ b/generated/stripe_shared/src/mandate/mod.rs @@ -1,4 +1,6 @@ /// A Mandate is a record of the permission that your customer gives you to debit their payment method. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Mandate { pub customer_acceptance: stripe_shared::CustomerAcceptance, diff --git a/generated/stripe_shared/src/payment_intent/mod.rs b/generated/stripe_shared/src/payment_intent/mod.rs index d5e1730ff..b66648bdb 100644 --- a/generated/stripe_shared/src/payment_intent/mod.rs +++ b/generated/stripe_shared/src/payment_intent/mod.rs @@ -2,7 +2,7 @@ /// We recommend that you create exactly one PaymentIntent for each order or /// customer session in your system. /// -/// You can reference the PaymentIntent later to see the history of payment attempts for a particular session. A PaymentIntent transitions through [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge. Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents). +/// You can reference the PaymentIntent later to see the history of payment attempts for a particular session. A PaymentIntent transitions through [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge. Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct PaymentIntent { /// Amount intended to be collected by this PaymentIntent. diff --git a/generated/stripe_shared/src/payment_link/mod.rs b/generated/stripe_shared/src/payment_link/mod.rs index 5baff54ab..a06115edc 100644 --- a/generated/stripe_shared/src/payment_link/mod.rs +++ b/generated/stripe_shared/src/payment_link/mod.rs @@ -1,7 +1,7 @@ /// A payment link is a shareable URL that will take your customers to a hosted payment page. /// /// A payment link can be shared and used multiple times. When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. -/// You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. Related guide: [Payment Links API](https://stripe.com/docs/payment-links). +/// You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. Related guide: [Payment Links API](https://stripe.com/docs/payment-links) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct PaymentLink { /// Whether the payment link's `url` is active. diff --git a/generated/stripe_shared/src/payment_method/mod.rs b/generated/stripe_shared/src/payment_method/mod.rs index c0ea1508a..7a96255e4 100644 --- a/generated/stripe_shared/src/payment_method/mod.rs +++ b/generated/stripe_shared/src/payment_method/mod.rs @@ -3,6 +3,8 @@ /// Customer objects to store instrument details for future payments. /// /// Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct PaymentMethod { #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/stripe_shared/src/payout/mod.rs b/generated/stripe_shared/src/payout/mod.rs index b5af70005..2bd291f51 100644 --- a/generated/stripe_shared/src/payout/mod.rs +++ b/generated/stripe_shared/src/payout/mod.rs @@ -3,7 +3,7 @@ /// Stripe account](/docs/connect/bank-debit-card-payouts). /// /// You can retrieve individual payouts, and list all payouts. -/// Payouts are made on [varying schedules](/docs/connect/manage-payout-schedule), depending on your country and industry. Related guide: [Receiving payouts](https://stripe.com/docs/payouts). +/// Payouts are made on [varying schedules](/docs/connect/manage-payout-schedule), depending on your country and industry. Related guide: [Receiving payouts](https://stripe.com/docs/payouts) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Payout { /// The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. diff --git a/generated/stripe_shared/src/person/mod.rs b/generated/stripe_shared/src/person/mod.rs index ba83bca11..aa11e3161 100644 --- a/generated/stripe_shared/src/person/mod.rs +++ b/generated/stripe_shared/src/person/mod.rs @@ -3,7 +3,9 @@ /// A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. /// See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps. /// -/// Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information). +/// Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Person { /// The account the person is associated with. diff --git a/generated/stripe_shared/src/plan/mod.rs b/generated/stripe_shared/src/plan/mod.rs index d2890e5e6..b3377c5a3 100644 --- a/generated/stripe_shared/src/plan/mod.rs +++ b/generated/stripe_shared/src/plan/mod.rs @@ -2,7 +2,7 @@ /// /// It replaces the Plans API and is backwards compatible to simplify your migration. Plans define the base price, currency, and billing cycle for recurring purchases of products. [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. /// Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. -/// This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). +/// This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Plan { /// Whether the plan can be used for new purchases. diff --git a/generated/stripe_shared/src/price/mod.rs b/generated/stripe_shared/src/price/mod.rs index 7767f207b..a87d93dea 100644 --- a/generated/stripe_shared/src/price/mod.rs +++ b/generated/stripe_shared/src/price/mod.rs @@ -2,7 +2,7 @@ /// [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. /// /// Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. -/// This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). +/// This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Price { /// Whether the price can be used for new purchases. diff --git a/generated/stripe_shared/src/product/mod.rs b/generated/stripe_shared/src/product/mod.rs index beb7a4527..16e233f13 100644 --- a/generated/stripe_shared/src/product/mod.rs +++ b/generated/stripe_shared/src/product/mod.rs @@ -5,7 +5,9 @@ /// Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), /// [share a Payment Link](https://stripe.com/docs/payment-links), /// [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), -/// and more about [Products and Prices](https://stripe.com/docs/products-prices/overview). +/// and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Product { /// Whether the product is currently available for purchase. diff --git a/generated/stripe_shared/src/promotion_code/mod.rs b/generated/stripe_shared/src/promotion_code/mod.rs index 42c461e7e..7a33fce2d 100644 --- a/generated/stripe_shared/src/promotion_code/mod.rs +++ b/generated/stripe_shared/src/promotion_code/mod.rs @@ -1,6 +1,6 @@ /// A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). /// -/// It can be used to create multiple codes for a single coupon. +/// It can be used to create multiple codes for a single coupon. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct PromotionCode { /// Whether the promotion code is currently active. diff --git a/generated/stripe_shared/src/quote/mod.rs b/generated/stripe_shared/src/quote/mod.rs index b4f2559c9..d80809163 100644 --- a/generated/stripe_shared/src/quote/mod.rs +++ b/generated/stripe_shared/src/quote/mod.rs @@ -1,5 +1,7 @@ /// A Quote is a way to model prices that you'd like to provide to a customer. /// Once accepted, it will automatically create an invoice, subscription or subscription schedule. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Quote { /// Total before any discounts or taxes are applied. diff --git a/generated/stripe_shared/src/refund/mod.rs b/generated/stripe_shared/src/refund/mod.rs index 5c2914ed8..7c20c7c7e 100644 --- a/generated/stripe_shared/src/refund/mod.rs +++ b/generated/stripe_shared/src/refund/mod.rs @@ -1,7 +1,7 @@ /// Refund objects allow you to refund a previously created charge that isn't /// refunded yet. /// -/// Funds are refunded to the credit or debit card that's initially charged. Related guide: [Refunds](https://stripe.com/docs/refunds). +/// Funds are refunded to the credit or debit card that's initially charged. Related guide: [Refunds](https://stripe.com/docs/refunds) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Refund { /// Amount, in cents (or local equivalent). diff --git a/generated/stripe_shared/src/review/mod.rs b/generated/stripe_shared/src/review/mod.rs index 76c383242..a4ed69b2e 100644 --- a/generated/stripe_shared/src/review/mod.rs +++ b/generated/stripe_shared/src/review/mod.rs @@ -2,6 +2,8 @@ /// /// Learn more about [Radar](/radar) and reviewing payments /// [here](https://stripe.com/docs/radar/reviews). +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Review { /// The ZIP or postal code of the card used, if applicable. diff --git a/generated/stripe_shared/src/setup_attempt/mod.rs b/generated/stripe_shared/src/setup_attempt/mod.rs index f904a3d7f..38e971581 100644 --- a/generated/stripe_shared/src/setup_attempt/mod.rs +++ b/generated/stripe_shared/src/setup_attempt/mod.rs @@ -1,7 +1,7 @@ /// A SetupAttempt describes one attempted confirmation of a SetupIntent, /// whether that confirmation is successful or unsuccessful. /// -/// You can use SetupAttempts to inspect details of a specific attempt at setting up a payment method using a SetupIntent. +/// You can use SetupAttempts to inspect details of a specific attempt at setting up a payment method using a SetupIntent. For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct SetupAttempt { /// The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. diff --git a/generated/stripe_shared/src/setup_intent/mod.rs b/generated/stripe_shared/src/setup_intent/mod.rs index b7ff8b91b..0ee1b68ff 100644 --- a/generated/stripe_shared/src/setup_intent/mod.rs +++ b/generated/stripe_shared/src/setup_intent/mod.rs @@ -18,7 +18,9 @@ /// /// By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. /// -/// Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents). +/// Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct SetupIntent { /// ID of the Connect application that created the SetupIntent. diff --git a/generated/stripe_shared/src/shipping_rate/mod.rs b/generated/stripe_shared/src/shipping_rate/mod.rs index 5e3932efe..a8dad0c5c 100644 --- a/generated/stripe_shared/src/shipping_rate/mod.rs +++ b/generated/stripe_shared/src/shipping_rate/mod.rs @@ -1,7 +1,7 @@ /// Shipping rates describe the price of shipping presented to your customers and /// applied to a purchase. /// -/// For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). +/// For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct ShippingRate { /// Whether the shipping rate can be used for new purchases. diff --git a/generated/stripe_shared/src/source/mod.rs b/generated/stripe_shared/src/source/mod.rs index 2b63de21f..5ee0d89fe 100644 --- a/generated/stripe_shared/src/source/mod.rs +++ b/generated/stripe_shared/src/source/mod.rs @@ -1,6 +1,6 @@ /// `Source` objects allow you to accept a variety of payment methods. /// -/// They represent a customer's payment instrument, and can be used with the Stripe API just like a `Card` object: once chargeable, they can be charged, or can be attached to customers. Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). This newer API provides access to our latest features and payment method types. Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). +/// They represent a customer's payment instrument, and can be used with the Stripe API just like a `Card` object: once chargeable, they can be charged, or can be attached to customers. Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources). We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods). This newer API provides access to our latest features and payment method types. Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Source { #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/stripe_shared/src/subscription/mod.rs b/generated/stripe_shared/src/subscription/mod.rs index dce1cbca1..487d65eb4 100644 --- a/generated/stripe_shared/src/subscription/mod.rs +++ b/generated/stripe_shared/src/subscription/mod.rs @@ -1,6 +1,8 @@ /// Subscriptions allow you to charge a customer on a recurring basis. /// -/// Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating). +/// Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Subscription { /// ID of the Connect Application that created the subscription. diff --git a/generated/stripe_shared/src/subscription_item/mod.rs b/generated/stripe_shared/src/subscription_item/mod.rs index a4b78dd2e..f0af2a467 100644 --- a/generated/stripe_shared/src/subscription_item/mod.rs +++ b/generated/stripe_shared/src/subscription_item/mod.rs @@ -1,5 +1,7 @@ /// Subscription items allow you to create customer subscriptions with more than /// one plan, making it easy to represent complex billing relationships. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct SubscriptionItem { /// Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period. diff --git a/generated/stripe_shared/src/subscription_schedule/mod.rs b/generated/stripe_shared/src/subscription_schedule/mod.rs index a52ad00c6..3485cf84f 100644 --- a/generated/stripe_shared/src/subscription_schedule/mod.rs +++ b/generated/stripe_shared/src/subscription_schedule/mod.rs @@ -1,6 +1,8 @@ /// A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. /// -/// Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). +/// Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct SubscriptionSchedule { /// ID of the Connect Application that created the schedule. diff --git a/generated/stripe_shared/src/tax_code/mod.rs b/generated/stripe_shared/src/tax_code/mod.rs index e6c6017e0..15c4f980f 100644 --- a/generated/stripe_shared/src/tax_code/mod.rs +++ b/generated/stripe_shared/src/tax_code/mod.rs @@ -1,4 +1,6 @@ /// [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TaxCode { /// A detailed description of which types of products the tax code represents. diff --git a/generated/stripe_shared/src/tax_id/mod.rs b/generated/stripe_shared/src/tax_id/mod.rs index d97cc45b6..e0b29a9f9 100644 --- a/generated/stripe_shared/src/tax_id/mod.rs +++ b/generated/stripe_shared/src/tax_id/mod.rs @@ -1,7 +1,9 @@ /// You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account. /// Customer and account tax IDs get displayed on related invoices and credit notes. /// -/// Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids). +/// Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TaxId { /// Two-letter ISO code representing the country of the tax ID. diff --git a/generated/stripe_shared/src/tax_rate/mod.rs b/generated/stripe_shared/src/tax_rate/mod.rs index b5fce6382..4f60b3396 100644 --- a/generated/stripe_shared/src/tax_rate/mod.rs +++ b/generated/stripe_shared/src/tax_rate/mod.rs @@ -1,6 +1,8 @@ /// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. /// -/// Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates). +/// Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TaxRate { /// Defaults to `true`. diff --git a/generated/stripe_shared/src/topup/mod.rs b/generated/stripe_shared/src/topup/mod.rs index 5a34f092a..9384a5c34 100644 --- a/generated/stripe_shared/src/topup/mod.rs +++ b/generated/stripe_shared/src/topup/mod.rs @@ -1,7 +1,7 @@ /// To top up your Stripe balance, you create a top-up object. /// /// You can retrieve individual top-ups, as well as list all top-ups. -/// Top-ups are identified by a unique, random ID. Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups). +/// Top-ups are identified by a unique, random ID. Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Topup { /// Amount transferred. diff --git a/generated/stripe_shared/src/transfer/mod.rs b/generated/stripe_shared/src/transfer/mod.rs index 4721c7e9a..dc164c5ed 100644 --- a/generated/stripe_shared/src/transfer/mod.rs +++ b/generated/stripe_shared/src/transfer/mod.rs @@ -5,7 +5,7 @@ /// Stripe account to a card or bank account. /// /// This behavior has since been split out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. -/// For more information, read about the [transfer/payout split](https://stripe.com/docs/transfer-payout-split). Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers). +/// For more information, read about the [transfer/payout split](https://stripe.com/docs/transfer-payout-split). Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct Transfer { /// Amount in cents (or local equivalent) to be transferred. diff --git a/generated/stripe_shared/src/transfer_reversal/mod.rs b/generated/stripe_shared/src/transfer_reversal/mod.rs index 0b0c5c3f1..304abc4fe 100644 --- a/generated/stripe_shared/src/transfer_reversal/mod.rs +++ b/generated/stripe_shared/src/transfer_reversal/mod.rs @@ -3,7 +3,7 @@ /// to refund any related application fees. /// /// Transfer reversals add to the platform's balance and subtract from the destination account's balance. Reversing a transfer that was made for a [destination charge](/docs/connect/destination-charges) is allowed only up to the amount of the charge. -/// It is possible to reverse a [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) transfer only if the destination account has enough balance to cover the reversal. Related guide: [Reversing transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reversing-transfers). +/// It is possible to reverse a [transfer_group](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) transfer only if the destination account has enough balance to cover the reversal. Related guide: [Reversing transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reversing-transfers) For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TransferReversal { /// Amount, in cents (or local equivalent). diff --git a/generated/stripe_terminal/src/terminal_configuration/mod.rs b/generated/stripe_terminal/src/terminal_configuration/mod.rs index cbf66c7c9..99fa2be36 100644 --- a/generated/stripe_terminal/src/terminal_configuration/mod.rs +++ b/generated/stripe_terminal/src/terminal_configuration/mod.rs @@ -1,4 +1,6 @@ /// A Configurations object represents how features should be configured for terminal readers. +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TerminalConfiguration { #[serde(skip_serializing_if = "Option::is_none")] diff --git a/generated/stripe_terminal/src/terminal_connection_token/mod.rs b/generated/stripe_terminal/src/terminal_connection_token/mod.rs index ca6ea8474..066568e5f 100644 --- a/generated/stripe_terminal/src/terminal_connection_token/mod.rs +++ b/generated/stripe_terminal/src/terminal_connection_token/mod.rs @@ -1,6 +1,8 @@ /// A Connection Token is used by the Stripe Terminal SDK to connect to a reader. /// -/// Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations). +/// Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TerminalConnectionToken { /// The id of the location that this connection token is scoped to. diff --git a/generated/stripe_terminal/src/terminal_location/mod.rs b/generated/stripe_terminal/src/terminal_location/mod.rs index 8d129028e..0de898d3e 100644 --- a/generated/stripe_terminal/src/terminal_location/mod.rs +++ b/generated/stripe_terminal/src/terminal_location/mod.rs @@ -1,6 +1,8 @@ /// A Location represents a grouping of readers. /// -/// Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations). +/// Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TerminalLocation { pub address: stripe_shared::Address, diff --git a/generated/stripe_terminal/src/terminal_reader/mod.rs b/generated/stripe_terminal/src/terminal_reader/mod.rs index bc5d416c2..da8167aa5 100644 --- a/generated/stripe_terminal/src/terminal_reader/mod.rs +++ b/generated/stripe_terminal/src/terminal_reader/mod.rs @@ -1,6 +1,8 @@ /// A Reader represents a physical device for accepting payment details. /// -/// Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader). +/// Related guide: [Connecting to a reader](https://stripe.com/docs/terminal/payments/connect-reader) +/// +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct TerminalReader { /// The most recent action performed by the reader. diff --git a/generated/stripe_treasury/src/inbound_transfers/mod.rs b/generated/stripe_treasury/src/inbound_transfers/mod.rs index c2fc82d09..5a71b75f5 100644 --- a/generated/stripe_treasury/src/inbound_transfers/mod.rs +++ b/generated/stripe_treasury/src/inbound_transfers/mod.rs @@ -1,3 +1,4 @@ +/// For more details see <>. #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct InboundTransfers { pub billing_details: stripe_treasury::TreasurySharedResourceBillingDetails, diff --git a/openapi/README.md b/openapi/README.md index 8cedc531c..9013d486b 100644 --- a/openapi/README.md +++ b/openapi/README.md @@ -14,9 +14,6 @@ Skipping the `--fetch` argument expects an already downloaded spec, useful for q - `crate_graph.txt`: Map of crate dependencies - `component_graph.txt`: Map of OpenAPI component dependencies -- `--stub-url-finder`: Skips fetching Stripe API documentation, which are used to construct - more informative doc comments. This flag is meant for development only since it avoids a network request. - `openapi` uses `clap`, so running `cargo run -- --help` will print the documentation of each argument. ## Generated Files diff --git a/openapi/doc_urls.json b/openapi/doc_urls.json new file mode 100644 index 000000000..2840f22f0 --- /dev/null +++ b/openapi/doc_urls.json @@ -0,0 +1,84 @@ +{ + "tax_rate": "/tax_rates/object", + "scheduled_query_run": "/sigma/scheduled_queries/object", + "cash_balance": "/cash_balance/object", + "customer": "/customers/object", + "account_session": "/account_sessions/object", + "discount": "/discounts/object", + "transfer_reversal": "/transfer_reversals/object", + "price": "/prices/object", + "subscription": "/subscriptions/object", + "payout": "/payouts/object", + "payment_method_configuration": "/payment_method_configurations/object", + "dispute": "/disputes/object", + "subscription_item": "/subscription_items/object", + "identity.verification_report": "/identity/verification_reports/object", + "identity.verification_session": "/identity/verification_sessions/object", + "issuing.transaction": "/issuing/transactions/object", + "login_link": "/account/login_link", + "review": "/radar/reviews/object", + "tax.calculation": "/tax/calculations/object", + "terminal.reader": "/terminal/readers/object", + "payment_link": "/payment_links/payment_links/object", + "customer_balance_transaction": "/customer_balance_transactions/object", + "issuing.authorization": "/issuing/authorizations/object", + "product": "/products/object", + "coupon": "/coupons/object", + "setup_intent": "/setup_intents/object", + "subscription_schedule": "/subscription_schedules/object", + "application_fee": "/application_fees/object", + "terminal.connection_token": "/terminal/connection_tokens/object", + "capability": "/capabilities/object", + "radar.value_list_item": "/radar/value_list_items/object", + "refund": "/refunds/object", + "source": "/sources/object", + "reporting.report_run": "/reporting/report_run/object", + "file_link": "/file_links/object", + "payment_method_domain": "/payment_method_domains/object", + "usage_record": "/usage_records/object", + "financial_connections.session": "/financial_connections/sessions/object", + "file": "/files/object", + "inbound_transfers": "/treasury/inbound_transfers", + "tax.settings": "/tax/settings/object", + "credit_note": "/credit_notes/object", + "charge": "/charges/object", + "customer_cash_balance_transaction": "/cash_balance_transactions/object", + "fee_refund": "/fee_refunds/object", + "tax_id": "/tax_ids/object", + "plan": "/plans/object", + "issuing.dispute": "/issuing/disputes/object", + "quote": "/quotes/object", + "terminal.location": "/terminal/locations/object", + "checkout.session": "/checkout/sessions/object", + "issuing.cardholder": "/issuing/cardholders/object", + "topup": "/topups/object", + "balance": "/balance/balance_object", + "financial_connections.account": "/financial_connections/accounts/object", + "shipping_rate": "/shipping_rates/object", + "payment_intent": "/payment_intents/object", + "payment_method": "/payment_methods/object", + "tax.transaction": "/tax/transactions/object", + "promotion_code": "/promotion_codes/object", + "radar.value_list": "/radar/value_lists/object", + "account": "/accounts/object", + "webhook_endpoint": "/webhook_endpoints/object", + "credit_note_line_item": "/credit_notes/line_item", + "card": "/cards/object", + "terminal.configuration": "/terminal/configuration/object", + "reporting.report_type": "/reporting/report_type/object", + "token": "/tokens/object", + "country_spec": "/country_specs/object", + "person": "/persons/object", + "invoice": "/invoices/object", + "invoiceitem": "/invoiceitems/object", + "transfer": "/transfers/object", + "event": "/events/object", + "balance_transaction": "/balance_transactions/object", + "dispute_evidence": "/disputes/evidence_object", + "issuing.card": "/issuing/cards/object", + "mandate": "/mandates/object", + "account_link": "/account_links/object", + "setup_attempt": "/setup_attempts/object", + "issuing.token": "/issuing/tokens/object", + "tax_code": "/tax_codes/object" +} \ No newline at end of file diff --git a/openapi/src/main.rs b/openapi/src/main.rs index 42a91c619..50586bfe9 100644 --- a/openapi/src/main.rs +++ b/openapi/src/main.rs @@ -11,7 +11,7 @@ use stripe_openapi_codegen::crates::ALL_CRATES; use stripe_openapi_codegen::spec::Spec; use stripe_openapi_codegen::spec_fetch; use stripe_openapi_codegen::spec_fetch::fetch_spec; -use stripe_openapi_codegen::url_finder::UrlFinder; +use stripe_openapi_codegen::url_finder::{update_api_doc_data, UrlFinder}; use stripe_openapi_codegen::utils::write_to_file; use tracing::info; @@ -32,11 +32,12 @@ struct Command { /// to `graph.txt` #[arg(long)] graph: bool, - /// Stub the `UrlFinder` instead of making a request to `Stripe`. Meant for use in local - /// testing to avoid network requirement / fetch time. Will mean that no `doc_url`'s will - /// be found. + /// Update the Stripe API docs instead of using the existing data in the repo #[arg(long)] - stub_url_finder: bool, + update_api_docs: bool, + /// The URL to target for the stripe docs. + #[arg(long, default_value = "https://stripe.com/docs/api")] + api_docs_url: String, /// Skip the step of copying the generated code from `out` to `generated/`. #[arg(long)] dry_run: bool, @@ -64,15 +65,14 @@ fn main() -> Result<()> { }; info!("Finished parsing spec"); - let url_finder = if !args.stub_url_finder { - UrlFinder::new().context("couldn't initialize url finder")? - } else { - UrlFinder::stub() - }; - info!("Initialized URL finder"); - + let url_finder = UrlFinder::new().context("couldn't initialize url finder")?; let codegen = CodeGen::new(spec, url_finder)?; + if args.update_api_docs { + update_api_doc_data(&args.api_docs_url, &codegen.components)?; + return Ok(()); + } + if args.graph { let comp_graph = codegen.components.gen_component_dep_graph(); let graph_txt = format!("{:?}", Dot::with_config(&comp_graph, &[Config::EdgeNoLabel])); diff --git a/openapi/src/url_finder.rs b/openapi/src/url_finder.rs index 96dff874c..fd4ee695b 100644 --- a/openapi/src/url_finder.rs +++ b/openapi/src/url_finder.rs @@ -1,67 +1,86 @@ -use anyhow::{anyhow, Result}; +use std::collections::HashMap; +use std::fs::File; + +use anyhow::{anyhow, bail, Result}; use heck::ToSnakeCase; use reqwest::blocking::Client; -use tracing::warn; +use tracing::{info, warn}; + +use crate::components::Components; // we use a common user agent, otherwise stripe rejects the connection const APP_USER_AGENT: &str = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36"; #[derive(Debug)] pub struct UrlFinder { - flattened_api_sections: serde_json::Map, + /// Map of object name to stripe URL path (unprefixed) + doc_links: HashMap, } impl UrlFinder { pub fn new() -> Result { - let client = Client::builder().user_agent(APP_USER_AGENT).build()?; - let resp = client.get("https://stripe.com/docs/api").send()?; - - if resp.status().is_success() { - let text = resp.text()?; - if let Some(line) = text.lines().find(|l| l.contains("flattenedAPISections: {")) { - Ok(Self { - flattened_api_sections: serde_json::from_str( - line.trim() - .trim_start_matches("flattenedAPISections: ") - .trim_end_matches(','), - ) - .expect("should be valid json"), - }) - } else { - warn!("Stripe API returned unexpected document, not collecting doc URL's"); - Ok(Self { flattened_api_sections: serde_json::Map::new() }) - } - } else { - tracing::error!("{}", resp.text()?); - Err(anyhow!("request to stripe api returned non-200 status code")) - } + let doc_links = serde_json::from_reader(File::open("doc_urls.json")?)?; + Ok(Self { doc_links }) } - /// Create a stub `UrlFinder` which does not require a network request. Only meant to - /// be used for testing since no `doc_url`'s will be found. - pub fn stub() -> Self { - Self { flattened_api_sections: serde_json::Map::new() } + pub fn url_for_object(&self, object: &str) -> Option { + let Some(unprefixed_link) = self.doc_links.get(object) else { + return None; + }; + Some(format!("https://stripe.com/docs/api{}", unprefixed_link)) } +} - pub fn url_for_object(&self, object: &str) -> Option { - let object_name = object.replace('.', "_").to_snake_case(); - let object_names = [format!("{}_object", object_name), object_name]; - for name in object_names { - if let Some(path) = self - .flattened_api_sections - .get(&name) - .and_then(|o| o.as_object().expect("this should be an object").get("path")) - .and_then(|s| s.as_str()) - { - return Some(format!("https://stripe.com/docs/api{}", path)); - } +fn url_for_object( + object: &str, + raw_data: &serde_json::Map, +) -> Option { + let object_name = object.replace('.', "_").to_snake_case(); + let object_names = [format!("{}_object", object_name), object_name]; + for name in object_names { + if let Some(path) = raw_data + .get(&name) + .and_then(|o| o.as_object().expect("this should be an object").get("path")) + .and_then(|s| s.as_str()) + { + return Some(path.to_string()); } + } + None +} - // Only warn if not the stub `UrlFinder` - if !self.flattened_api_sections.is_empty() { - tracing::debug!("{} not in html", object); +pub fn update_api_doc_data(api_url: &str, components: &Components) -> Result<()> { + let flattened = fetch_flattened_api_data(api_url)?; + + let mut new_doc_data: HashMap = HashMap::new(); + for path in components.components.keys() { + if let Some(doc_url) = url_for_object(path.as_ref(), &flattened) { + new_doc_data.insert(path.to_string(), doc_url); + } else { + warn!("No doc url found for path `{path}`"); } + } + + serde_json::to_writer_pretty(File::create("doc_urls.json")?, &new_doc_data)?; + info!("Wrote updated data to `doc_urls.json`"); + Ok(()) +} + +fn fetch_flattened_api_data(api_url: &str) -> Result> { + let client = Client::builder().user_agent(APP_USER_AGENT).build()?; + let resp = client.get(api_url).send()?; - None + if resp.status().is_success() { + let text = resp.text()?; + let Some(line) = text.lines().find(|l| l.contains("flattenedAPISections: {")) else { + bail!("Unexpected Stripe API doc format") + }; + let api_sections = serde_json::from_str( + line.trim().trim_start_matches("flattenedAPISections: ").trim_end_matches(','), + )?; + Ok(api_sections) + } else { + tracing::error!("{}", resp.text()?); + Err(anyhow!("request to stripe api returned non-200 status code")) } }