diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8d9af222c..e66169e1a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v309 \ No newline at end of file +v344 \ No newline at end of file diff --git a/stripe/api_resources/account.py b/stripe/api_resources/account.py index 334ce044d..08bf8458e 100644 --- a/stripe/api_resources/account.py +++ b/stripe/api_resources/account.py @@ -22,7 +22,10 @@ operations=["retrieve", "update", "list"], resource_plural="capabilities", ) -@nested_resource_class_methods("login_link", operations=["create"]) +@nested_resource_class_methods( + "login_link", + operations=["create"], +) @nested_resource_class_methods( "person", operations=["create", "retrieve", "update", "delete", "list"], diff --git a/stripe/api_resources/account_link.py b/stripe/api_resources/account_link.py index 7441cc7ad..64f6eb8b5 100644 --- a/stripe/api_resources/account_link.py +++ b/stripe/api_resources/account_link.py @@ -10,7 +10,7 @@ class AccountLink(CreateableAPIResource): 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/connect-onboarding). + Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding) """ OBJECT_NAME = "account_link" diff --git a/stripe/api_resources/application_fee_refund.py b/stripe/api_resources/application_fee_refund.py index 9e996c8f5..92aefa113 100644 --- a/stripe/api_resources/application_fee_refund.py +++ b/stripe/api_resources/application_fee_refund.py @@ -14,7 +14,7 @@ class ApplicationFeeRefund(UpdateableAPIResource): 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). + Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) """ OBJECT_NAME = "fee_refund" diff --git a/stripe/api_resources/apps/secret.py b/stripe/api_resources/apps/secret.py index fb6ff3fdf..554df52bc 100644 --- a/stripe/api_resources/apps/secret.py +++ b/stripe/api_resources/apps/secret.py @@ -16,7 +16,7 @@ class Secret(CreateableAPIResource, ListableAPIResource): A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. - Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). + Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects) """ OBJECT_NAME = "apps.secret" diff --git a/stripe/api_resources/balance.py b/stripe/api_resources/balance.py index a8e8ee28c..c5002191f 100644 --- a/stripe/api_resources/balance.py +++ b/stripe/api_resources/balance.py @@ -17,7 +17,7 @@ class Balance(SingletonAPIResource): 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). + Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances) """ OBJECT_NAME = "balance" diff --git a/stripe/api_resources/balance_transaction.py b/stripe/api_resources/balance_transaction.py index 340e42aa8..00ecb8e1d 100644 --- a/stripe/api_resources/balance_transaction.py +++ b/stripe/api_resources/balance_transaction.py @@ -10,7 +10,7 @@ class BalanceTransaction(ListableAPIResource): Balance transactions represent funds moving through your Stripe account. They're created for every type of transaction that comes into or flows out of 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) """ OBJECT_NAME = "balance_transaction" diff --git a/stripe/api_resources/bank_account.py b/stripe/api_resources/bank_account.py index 61a4358ca..d23713aff 100644 --- a/stripe/api_resources/bank_account.py +++ b/stripe/api_resources/bank_account.py @@ -20,7 +20,7 @@ class BankAccount(DeletableAPIResource, UpdateableAPIResource, VerifyMixin): destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). They can be bank accounts or debit cards as well, and are documented in the links above. - Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers). + Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers) """ OBJECT_NAME = "bank_account" diff --git a/stripe/api_resources/capability.py b/stripe/api_resources/capability.py index 7b6dbd4cb..9dda9c4d4 100644 --- a/stripe/api_resources/capability.py +++ b/stripe/api_resources/capability.py @@ -12,7 +12,7 @@ class Capability(UpdateableAPIResource): """ 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) """ OBJECT_NAME = "capability" diff --git a/stripe/api_resources/card.py b/stripe/api_resources/card.py index 3b8fb2bb2..7aa85844c 100644 --- a/stripe/api_resources/card.py +++ b/stripe/api_resources/card.py @@ -17,7 +17,7 @@ class Card(DeletableAPIResource, UpdateableAPIResource): 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). + Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) """ OBJECT_NAME = "card" diff --git a/stripe/api_resources/charge.py b/stripe/api_resources/charge.py index d0252f379..e82b0d446 100644 --- a/stripe/api_resources/charge.py +++ b/stripe/api_resources/charge.py @@ -20,7 +20,7 @@ class Charge( retrieve and refund individual charges as well as list all charges. Charges are identified by a unique, random ID. - Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges). + Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges) """ OBJECT_NAME = "charge" diff --git a/stripe/api_resources/checkout/session.py b/stripe/api_resources/checkout/session.py index ab88020ab..f9cef348f 100644 --- a/stripe/api_resources/checkout/session.py +++ b/stripe/api_resources/checkout/session.py @@ -22,7 +22,7 @@ class Session(CreateableAPIResource, ListableAPIResource): 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). + Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) """ OBJECT_NAME = "checkout.session" diff --git a/stripe/api_resources/credit_note.py b/stripe/api_resources/credit_note.py index 5554ef34b..f4ea69384 100644 --- a/stripe/api_resources/credit_note.py +++ b/stripe/api_resources/credit_note.py @@ -16,7 +16,7 @@ class CreditNote( """ 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) """ OBJECT_NAME = "credit_note" diff --git a/stripe/api_resources/customer.py b/stripe/api_resources/customer.py index 979341c8b..629dd1e10 100644 --- a/stripe/api_resources/customer.py +++ b/stripe/api_resources/customer.py @@ -40,7 +40,7 @@ class Customer( """ This object represents a customer of your business. It lets you 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). + Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment) """ OBJECT_NAME = "customer" diff --git a/stripe/api_resources/customer_balance_transaction.py b/stripe/api_resources/customer_balance_transaction.py index 7ee0ba2ef..148d4ed5d 100644 --- a/stripe/api_resources/customer_balance_transaction.py +++ b/stripe/api_resources/customer_balance_transaction.py @@ -10,12 +10,12 @@ class CustomerBalanceTransaction(APIResource): """ - Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + Each customer has a [Balance](https://stripe.com/docs/api/customers/object#customer_object-balance) value, which denotes a debit or credit that's automatically applied to their next invoice upon finalization. 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) to learn more. + Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) """ OBJECT_NAME = "customer_balance_transaction" diff --git a/stripe/api_resources/dispute.py b/stripe/api_resources/dispute.py index 116514e96..ca788120d 100644 --- a/stripe/api_resources/dispute.py +++ b/stripe/api_resources/dispute.py @@ -15,7 +15,7 @@ class Dispute(ListableAPIResource, UpdateableAPIResource): information about the dispute process in our [Disputes and Fraud](https://stripe.com/docs/disputes) documentation. - Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes). + Related guide: [Disputes and fraud](https://stripe.com/docs/disputes) """ OBJECT_NAME = "dispute" diff --git a/stripe/api_resources/file.py b/stripe/api_resources/file.py index 584b5f2a8..452bcc86d 100644 --- a/stripe/api_resources/file.py +++ b/stripe/api_resources/file.py @@ -16,7 +16,7 @@ class File(ListableAPIResource): been created by Stripe (for example, the results of a [Sigma scheduled query](https://stripe.com/docs/api#scheduled_queries)). - Related guide: [File Upload Guide](https://stripe.com/docs/file-upload). + Related guide: [File upload guide](https://stripe.com/docs/file-upload) """ OBJECT_NAME = "file" diff --git a/stripe/api_resources/funding_instructions.py b/stripe/api_resources/funding_instructions.py index 9332b3e93..5c05ad3f9 100644 --- a/stripe/api_resources/funding_instructions.py +++ b/stripe/api_resources/funding_instructions.py @@ -11,7 +11,7 @@ class FundingInstructions(StripeObject): automatically applied to future invoices and payments using the `customer_balance` payment method. Customers can fund this balance by initiating a bank transfer to any account in the `financial_addresses` field. - Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more + Related guide: [Customer balance funding instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) """ OBJECT_NAME = "funding_instructions" diff --git a/stripe/api_resources/invoice.py b/stripe/api_resources/invoice.py index 2e8c523ba..2f8c4cf58 100644 --- a/stripe/api_resources/invoice.py +++ b/stripe/api_resources/invoice.py @@ -49,7 +49,7 @@ class 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). + Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) """ OBJECT_NAME = "invoice" diff --git a/stripe/api_resources/issuing/authorization.py b/stripe/api_resources/issuing/authorization.py index 826ce5a44..68f96536d 100644 --- a/stripe/api_resources/issuing/authorization.py +++ b/stripe/api_resources/issuing/authorization.py @@ -13,7 +13,7 @@ class Authorization(ListableAPIResource, UpdateableAPIResource): 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). + Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) """ OBJECT_NAME = "issuing.authorization" diff --git a/stripe/api_resources/issuing/cardholder.py b/stripe/api_resources/issuing/cardholder.py index 5b2ab481c..eb34b541b 100644 --- a/stripe/api_resources/issuing/cardholder.py +++ b/stripe/api_resources/issuing/cardholder.py @@ -15,7 +15,7 @@ class Cardholder( """ 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) """ OBJECT_NAME = "issuing.cardholder" diff --git a/stripe/api_resources/issuing/dispute.py b/stripe/api_resources/issuing/dispute.py index a1e938df7..ec96f9795 100644 --- a/stripe/api_resources/issuing/dispute.py +++ b/stripe/api_resources/issuing/dispute.py @@ -16,7 +16,7 @@ class Dispute( """ 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: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) + Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes) """ OBJECT_NAME = "issuing.dispute" diff --git a/stripe/api_resources/issuing/transaction.py b/stripe/api_resources/issuing/transaction.py index bcfaa4e4e..1bf159eba 100644 --- a/stripe/api_resources/issuing/transaction.py +++ b/stripe/api_resources/issuing/transaction.py @@ -12,7 +12,7 @@ class Transaction(ListableAPIResource, UpdateableAPIResource): 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) """ OBJECT_NAME = "issuing.transaction" diff --git a/stripe/api_resources/payment_intent.py b/stripe/api_resources/payment_intent.py index 0e873fb55..226a5bae6 100644 --- a/stripe/api_resources/payment_intent.py +++ b/stripe/api_resources/payment_intent.py @@ -26,7 +26,7 @@ class PaymentIntent( 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). + Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) """ OBJECT_NAME = "payment_intent" diff --git a/stripe/api_resources/payout.py b/stripe/api_resources/payout.py index 447cf06ef..9f329aa2f 100644 --- a/stripe/api_resources/payout.py +++ b/stripe/api_resources/payout.py @@ -19,7 +19,7 @@ class Payout( schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and industry. - Related guide: [Receiving Payouts](https://stripe.com/docs/payouts). + Related guide: [Receiving payouts](https://stripe.com/docs/payouts) """ OBJECT_NAME = "payout" diff --git a/stripe/api_resources/person.py b/stripe/api_resources/person.py index ad636892c..e31e21293 100644 --- a/stripe/api_resources/person.py +++ b/stripe/api_resources/person.py @@ -15,7 +15,7 @@ class Person(UpdateableAPIResource): 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 pre-filling and account onboarding steps. - Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). + Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information) """ OBJECT_NAME = "person" diff --git a/stripe/api_resources/radar/early_fraud_warning.py b/stripe/api_resources/radar/early_fraud_warning.py index b625efacf..8d5bada6e 100644 --- a/stripe/api_resources/radar/early_fraud_warning.py +++ b/stripe/api_resources/radar/early_fraud_warning.py @@ -10,7 +10,7 @@ class EarlyFraudWarning(ListableAPIResource): An early fraud warning indicates that the card issuer has notified us that a charge may be fraudulent. - Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings). + Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) """ OBJECT_NAME = "radar.early_fraud_warning" diff --git a/stripe/api_resources/radar/value_list.py b/stripe/api_resources/radar/value_list.py index f837059cb..d7a871eb6 100644 --- a/stripe/api_resources/radar/value_list.py +++ b/stripe/api_resources/radar/value_list.py @@ -17,7 +17,7 @@ class ValueList( """ 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) """ OBJECT_NAME = "radar.value_list" diff --git a/stripe/api_resources/radar/value_list_item.py b/stripe/api_resources/radar/value_list_item.py index 03fac2712..c3adc5f3d 100644 --- a/stripe/api_resources/radar/value_list_item.py +++ b/stripe/api_resources/radar/value_list_item.py @@ -15,7 +15,7 @@ class ValueListItem( """ 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) """ OBJECT_NAME = "radar.value_list_item" diff --git a/stripe/api_resources/refund.py b/stripe/api_resources/refund.py index da1fbda9f..03d4dc291 100644 --- a/stripe/api_resources/refund.py +++ b/stripe/api_resources/refund.py @@ -19,7 +19,7 @@ class Refund( but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. - Related guide: [Refunds](https://stripe.com/docs/refunds). + Related guide: [Refunds](https://stripe.com/docs/refunds) """ OBJECT_NAME = "refund" diff --git a/stripe/api_resources/reversal.py b/stripe/api_resources/reversal.py index 1ce6bb878..b2dba1284 100644 --- a/stripe/api_resources/reversal.py +++ b/stripe/api_resources/reversal.py @@ -22,7 +22,7 @@ class Reversal(UpdateableAPIResource): transfer only if the destination account has enough balance to cover the reversal. - Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers). + Related guide: [Reversing transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers) """ OBJECT_NAME = "transfer_reversal" diff --git a/stripe/api_resources/setup_intent.py b/stripe/api_resources/setup_intent.py index 9fccf226a..c65b1deee 100644 --- a/stripe/api_resources/setup_intent.py +++ b/stripe/api_resources/setup_intent.py @@ -35,7 +35,7 @@ class SetupIntent( By using SetupIntents, you ensure that your customers experience the minimum set of required friction, 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) """ OBJECT_NAME = "setup_intent" diff --git a/stripe/api_resources/subscription.py b/stripe/api_resources/subscription.py index 2e57e4c4a..5447e9c93 100644 --- a/stripe/api_resources/subscription.py +++ b/stripe/api_resources/subscription.py @@ -20,7 +20,7 @@ class Subscription( """ 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) """ OBJECT_NAME = "subscription" diff --git a/stripe/api_resources/subscription_item.py b/stripe/api_resources/subscription_item.py index c3b7d9642..c5d250f23 100644 --- a/stripe/api_resources/subscription_item.py +++ b/stripe/api_resources/subscription_item.py @@ -9,7 +9,10 @@ from stripe.api_resources.abstract import nested_resource_class_methods -@nested_resource_class_methods("usage_record", operations=["create"]) +@nested_resource_class_methods( + "usage_record", + operations=["create"], +) @nested_resource_class_methods( "usage_record_summary", operations=["list"], diff --git a/stripe/api_resources/subscription_schedule.py b/stripe/api_resources/subscription_schedule.py index 9f30e48ab..17feff238 100644 --- a/stripe/api_resources/subscription_schedule.py +++ b/stripe/api_resources/subscription_schedule.py @@ -16,7 +16,7 @@ class SubscriptionSchedule( """ 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) """ OBJECT_NAME = "subscription_schedule" diff --git a/stripe/api_resources/tax/calculation.py b/stripe/api_resources/tax/calculation.py index 634783557..a102a950f 100644 --- a/stripe/api_resources/tax/calculation.py +++ b/stripe/api_resources/tax/calculation.py @@ -10,7 +10,7 @@ class Calculation(CreateableAPIResource): """ 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) """ OBJECT_NAME = "tax.calculation" diff --git a/stripe/api_resources/tax/transaction.py b/stripe/api_resources/tax/transaction.py index 1e75bb1e6..b3f3aed78 100644 --- a/stripe/api_resources/tax/transaction.py +++ b/stripe/api_resources/tax/transaction.py @@ -10,7 +10,7 @@ class Transaction(APIResource): """ 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) """ OBJECT_NAME = "tax.transaction" diff --git a/stripe/api_resources/tax_id.py b/stripe/api_resources/tax_id.py index 3a6f2aff2..553834971 100644 --- a/stripe/api_resources/tax_id.py +++ b/stripe/api_resources/tax_id.py @@ -13,7 +13,7 @@ class TaxId(APIResource): You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). A customer's tax IDs are displayed on invoices and credit notes issued for the customer. - Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids). + Related guide: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids) """ OBJECT_NAME = "tax_id" diff --git a/stripe/api_resources/tax_rate.py b/stripe/api_resources/tax_rate.py index 3cc6dd350..47424ded0 100644 --- a/stripe/api_resources/tax_rate.py +++ b/stripe/api_resources/tax_rate.py @@ -15,7 +15,7 @@ class TaxRate( """ 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) """ OBJECT_NAME = "tax_rate" diff --git a/stripe/api_resources/terminal/connection_token.py b/stripe/api_resources/terminal/connection_token.py index 3b25ac76b..4a2bd3b31 100644 --- a/stripe/api_resources/terminal/connection_token.py +++ b/stripe/api_resources/terminal/connection_token.py @@ -9,7 +9,7 @@ class ConnectionToken(CreateableAPIResource): """ 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) """ OBJECT_NAME = "terminal.connection_token" diff --git a/stripe/api_resources/terminal/location.py b/stripe/api_resources/terminal/location.py index cfd7de20a..0dc1c092c 100644 --- a/stripe/api_resources/terminal/location.py +++ b/stripe/api_resources/terminal/location.py @@ -17,7 +17,7 @@ class Location( """ 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) """ OBJECT_NAME = "terminal.location" diff --git a/stripe/api_resources/terminal/reader.py b/stripe/api_resources/terminal/reader.py index 5b96a2a9a..528e3da2e 100644 --- a/stripe/api_resources/terminal/reader.py +++ b/stripe/api_resources/terminal/reader.py @@ -21,7 +21,7 @@ class Reader( """ 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) """ OBJECT_NAME = "terminal.reader" diff --git a/stripe/api_resources/token.py b/stripe/api_resources/token.py index 26af5d4a8..719355d7e 100644 --- a/stripe/api_resources/token.py +++ b/stripe/api_resources/token.py @@ -28,7 +28,7 @@ class Token(CreateableAPIResource): [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization. - Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token) + Related guide: [Accept a payment with Charges and Tokens](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token) """ OBJECT_NAME = "token" diff --git a/stripe/api_resources/topup.py b/stripe/api_resources/topup.py index a294ec600..456eafee0 100644 --- a/stripe/api_resources/topup.py +++ b/stripe/api_resources/topup.py @@ -14,7 +14,7 @@ class Topup(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource): 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). + Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) """ OBJECT_NAME = "topup" diff --git a/stripe/api_resources/transfer.py b/stripe/api_resources/transfer.py index 0c18ab3a2..fcb65b2fc 100644 --- a/stripe/api_resources/transfer.py +++ b/stripe/api_resources/transfer.py @@ -27,7 +27,7 @@ class Transfer( 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/charges-transfers). + Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/charges-transfers) """ OBJECT_NAME = "transfer" diff --git a/stripe/api_resources/usage_record.py b/stripe/api_resources/usage_record.py index 8a67355d3..4e22298b1 100644 --- a/stripe/api_resources/usage_record.py +++ b/stripe/api_resources/usage_record.py @@ -11,7 +11,7 @@ class UsageRecord(APIResource): 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) """ OBJECT_NAME = "usage_record" diff --git a/stripe/api_resources/webhook_endpoint.py b/stripe/api_resources/webhook_endpoint.py index 26045e974..c6a0a9797 100644 --- a/stripe/api_resources/webhook_endpoint.py +++ b/stripe/api_resources/webhook_endpoint.py @@ -21,7 +21,7 @@ class WebhookEndpoint( 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) """ OBJECT_NAME = "webhook_endpoint" diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 4fe5ce206..38f9b31e5 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -5,8 +5,14 @@ class TestGeneratedExamples(object): def test_apps_secret_list(self, request_mock): - stripe.apps.Secret.list(scope={"type": "account"}, limit=2) - request_mock.assert_requested("get", "/v1/apps/secrets") + stripe.apps.Secret.list( + scope={"type": "account"}, + limit=2, + ) + request_mock.assert_requested( + "get", + "/v1/apps/secrets", + ) def test_apps_secret_create(self, request_mock): stripe.apps.Secret.create( @@ -14,18 +20,30 @@ def test_apps_secret_create(self, request_mock): payload="very secret string", scope={"type": "account"}, ) - request_mock.assert_requested("post", "/v1/apps/secrets") + request_mock.assert_requested( + "post", + "/v1/apps/secrets", + ) def test_apps_secret_delete_where(self, request_mock): stripe.apps.Secret.delete_where( name="my-api-key", scope={"type": "account"}, ) - request_mock.assert_requested("post", "/v1/apps/secrets/delete") + request_mock.assert_requested( + "post", + "/v1/apps/secrets/delete", + ) def test_apps_secret_find(self, request_mock): - stripe.apps.Secret.find(name="sec_123", scope={"type": "account"}) - request_mock.assert_requested("get", "/v1/apps/secrets/find") + stripe.apps.Secret.find( + name="sec_123", + scope={"type": "account"}, + ) + request_mock.assert_requested( + "get", + "/v1/apps/secrets/find", + ) def test_checkout_session_create(self, request_mock): stripe.checkout.Session.create( @@ -45,7 +63,10 @@ def test_checkout_session_create(self, request_mock): }, ], ) - request_mock.assert_requested("post", "/v1/checkout/sessions") + request_mock.assert_requested( + "post", + "/v1/checkout/sessions", + ) def test_checkout_session_expire(self, request_mock): stripe.checkout.Session.expire("sess_xyz") @@ -64,7 +85,8 @@ def test_checkout_session_list_line_items(self, request_mock): def test_customer_cashbalance_retrieve(self, request_mock): stripe.Customer.retrieve_cash_balance("cus_123") request_mock.assert_requested( - "get", "/v1/customers/cus_123/cash_balance" + "get", + "/v1/customers/cus_123/cash_balance", ) def test_customer_cashbalance_update(self, request_mock): @@ -73,7 +95,8 @@ def test_customer_cashbalance_update(self, request_mock): settings={"reconciliation_mode": "manual"}, ) request_mock.assert_requested( - "post", "/v1/customers/cus_123/cash_balance" + "post", + "/v1/customers/cus_123/cash_balance", ) def test_customer_create_funding_instructions(self, request_mock): @@ -92,7 +115,10 @@ def test_customer_create_funding_instructions(self, request_mock): ) def test_customer_list_payment_methods(self, request_mock): - stripe.Customer.list_payment_methods("cus_xyz", type="card") + stripe.Customer.list_payment_methods( + "cus_xyz", + type="card", + ) request_mock.assert_requested( "get", "/v1/customers/cus_xyz/payment_methods", @@ -101,7 +127,8 @@ def test_customer_list_payment_methods(self, request_mock): def test_financial_connections_account_list(self, request_mock): stripe.financial_connections.Account.list() request_mock.assert_requested( - "get", "/v1/financial_connections/accounts" + "get", + "/v1/financial_connections/accounts", ) def test_financial_connections_account_retrieve(self, request_mock): @@ -144,7 +171,8 @@ def test_financial_connections_session_create(self, request_mock): permissions=["balances"], ) request_mock.assert_requested( - "post", "/v1/financial_connections/sessions" + "post", + "/v1/financial_connections/sessions", ) def test_financial_connections_session_retrieve(self, request_mock): @@ -156,7 +184,10 @@ def test_financial_connections_session_retrieve(self, request_mock): def test_invoice_upcoming(self, request_mock): stripe.Invoice.upcoming(customer="cus_9utnxg47pWjV1e") - request_mock.assert_requested("get", "/v1/invoices/upcoming") + request_mock.assert_requested( + "get", + "/v1/invoices/upcoming", + ) def test_paymentintent_create(self, request_mock): stripe.PaymentIntent.create( @@ -164,7 +195,10 @@ def test_paymentintent_create(self, request_mock): currency="eur", automatic_payment_methods={"enabled": True}, ) - request_mock.assert_requested("post", "/v1/payment_intents") + request_mock.assert_requested( + "post", + "/v1/payment_intents", + ) def test_paymentintent_verify_microdeposits(self, request_mock): stripe.PaymentIntent.verify_microdeposits("pi_xxxxxxxxxxxxx") @@ -177,16 +211,23 @@ def test_paymentlink_create(self, request_mock): stripe.PaymentLink.create( line_items=[{"price": "price_xxxxxxxxxxxxx", "quantity": 1}], ) - request_mock.assert_requested("post", "/v1/payment_links") + request_mock.assert_requested( + "post", + "/v1/payment_links", + ) def test_paymentlink_retrieve(self, request_mock): stripe.PaymentLink.retrieve("pl_xyz") - request_mock.assert_requested("get", "/v1/payment_links/pl_xyz") + request_mock.assert_requested( + "get", + "/v1/payment_links/pl_xyz", + ) def test_paymentlink_list_line_items(self, request_mock): stripe.PaymentLink.list_line_items("pl_xyz") request_mock.assert_requested( - "get", "/v1/payment_links/pl_xyz/line_items" + "get", + "/v1/payment_links/pl_xyz/line_items", ) def test_price_create(self, request_mock): @@ -200,11 +241,20 @@ def test_price_create(self, request_mock): recurring={"interval": "month"}, product="prod_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/prices") + request_mock.assert_requested( + "post", + "/v1/prices", + ) def test_setupattempt_list(self, request_mock): - stripe.SetupAttempt.list(limit=3, setup_intent="si_xyz") - request_mock.assert_requested("get", "/v1/setup_attempts") + stripe.SetupAttempt.list( + limit=3, + setup_intent="si_xyz", + ) + request_mock.assert_requested( + "get", + "/v1/setup_attempts", + ) def test_setupintent_verify_microdeposits(self, request_mock): stripe.SetupIntent.verify_microdeposits("seti_xxxxxxxxxxxxx") @@ -215,7 +265,10 @@ def test_setupintent_verify_microdeposits(self, request_mock): def test_shippingrate_list(self, request_mock): stripe.ShippingRate.list() - request_mock.assert_requested("get", "/v1/shipping_rates") + request_mock.assert_requested( + "get", + "/v1/shipping_rates", + ) def test_shippingrate_create(self, request_mock): stripe.ShippingRate.create( @@ -223,15 +276,24 @@ def test_shippingrate_create(self, request_mock): fixed_amount={"currency": "usd", "amount": 400}, type="fixed_amount", ) - request_mock.assert_requested("post", "/v1/shipping_rates") + request_mock.assert_requested( + "post", + "/v1/shipping_rates", + ) def test_terminal_configuration_list(self, request_mock): stripe.terminal.Configuration.list() - request_mock.assert_requested("get", "/v1/terminal/configurations") + request_mock.assert_requested( + "get", + "/v1/terminal/configurations", + ) def test_terminal_configuration_create(self, request_mock): stripe.terminal.Configuration.create() - request_mock.assert_requested("post", "/v1/terminal/configurations") + request_mock.assert_requested( + "post", + "/v1/terminal/configurations", + ) def test_terminal_configuration_delete(self, request_mock): stripe.terminal.Configuration.delete("uc_123") @@ -243,7 +305,8 @@ def test_terminal_configuration_delete(self, request_mock): def test_terminal_configuration_retrieve(self, request_mock): stripe.terminal.Configuration.retrieve("uc_123") request_mock.assert_requested( - "get", "/v1/terminal/configurations/uc_123" + "get", + "/v1/terminal/configurations/uc_123", ) def test_terminal_configuration_update(self, request_mock): @@ -252,7 +315,8 @@ def test_terminal_configuration_update(self, request_mock): tipping={"usd": {"fixed_amounts": [10]}}, ) request_mock.assert_requested( - "post", "/v1/terminal/configurations/uc_123" + "post", + "/v1/terminal/configurations/uc_123", ) def test_customer_fund_cash_balance(self, request_mock): @@ -303,11 +367,20 @@ def test_refund_expire(self, request_mock): def test_test_helpers_testclock_list(self, request_mock): stripe.test_helpers.TestClock.list() - request_mock.assert_requested("get", "/v1/test_helpers/test_clocks") + request_mock.assert_requested( + "get", + "/v1/test_helpers/test_clocks", + ) def test_test_helpers_testclock_create(self, request_mock): - stripe.test_helpers.TestClock.create(frozen_time=123, name="cogsworth") - request_mock.assert_requested("post", "/v1/test_helpers/test_clocks") + stripe.test_helpers.TestClock.create( + frozen_time=123, + name="cogsworth", + ) + request_mock.assert_requested( + "post", + "/v1/test_helpers/test_clocks", + ) def test_test_helpers_testclock_delete(self, request_mock): stripe.test_helpers.TestClock.delete("clock_xyz") @@ -324,7 +397,10 @@ def test_test_helpers_testclock_retrieve(self, request_mock): ) def test_test_helpers_testclock_advance(self, request_mock): - stripe.test_helpers.TestClock.advance("clock_xyz", frozen_time=142) + stripe.test_helpers.TestClock.advance( + "clock_xyz", + frozen_time=142, + ) request_mock.assert_requested( "post", "/v1/test_helpers/test_clocks/clock_xyz/advance", @@ -417,7 +493,10 @@ def test_token_create(self, request_mock): "cvc": "314", }, ) - request_mock.assert_requested("post", "/v1/tokens") + request_mock.assert_requested( + "post", + "/v1/tokens", + ) def test_accountlink_create(self, request_mock): stripe.AccountLink.create( @@ -426,11 +505,17 @@ def test_accountlink_create(self, request_mock): return_url="https://example.com/return", type="account_onboarding", ) - request_mock.assert_requested("post", "/v1/account_links") + request_mock.assert_requested( + "post", + "/v1/account_links", + ) def test_account_list(self, request_mock): stripe.Account.list(limit=3) - request_mock.assert_requested("get", "/v1/accounts") + request_mock.assert_requested( + "get", + "/v1/accounts", + ) def test_account_create(self, request_mock): stripe.Account.create( @@ -442,28 +527,40 @@ def test_account_create(self, request_mock): "transfers": {"requested": True}, }, ) - request_mock.assert_requested("post", "/v1/accounts") + request_mock.assert_requested( + "post", + "/v1/accounts", + ) def test_account_delete(self, request_mock): stripe.Account.delete("acct_xxxxxxxxxxxxx") request_mock.assert_requested( - "delete", "/v1/accounts/acct_xxxxxxxxxxxxx" + "delete", + "/v1/accounts/acct_xxxxxxxxxxxxx", ) def test_account_retrieve(self, request_mock): stripe.Account.retrieve("acct_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/accounts/acct_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/accounts/acct_xxxxxxxxxxxxx", + ) def test_account_update(self, request_mock): stripe.Account.modify( - "acct_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "acct_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, ) request_mock.assert_requested( - "post", "/v1/accounts/acct_xxxxxxxxxxxxx" + "post", + "/v1/accounts/acct_xxxxxxxxxxxxx", ) def test_account_reject(self, request_mock): - stripe.Account.reject("acct_xxxxxxxxxxxxx", reason="fraud") + stripe.Account.reject( + "acct_xxxxxxxxxxxxx", + reason="fraud", + ) request_mock.assert_requested( "post", "/v1/accounts/acct_xxxxxxxxxxxxx/reject", @@ -471,7 +568,8 @@ def test_account_reject(self, request_mock): def test_account_capability_retrieve(self, request_mock): stripe.Account.retrieve_capability( - "acct_xxxxxxxxxxxxx", "card_payments" + "acct_xxxxxxxxxxxxx", + "card_payments", ) request_mock.assert_requested( "get", @@ -491,7 +589,8 @@ def test_account_capability_update(self, request_mock): def test_account_person_retrieve(self, request_mock): stripe.Account.retrieve_person( - "acct_xxxxxxxxxxxxx", "person_xxxxxxxxxxxxx" + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx", ) request_mock.assert_requested( "get", @@ -511,7 +610,10 @@ def test_account_person_update(self, request_mock): def test_applicationfee_list(self, request_mock): stripe.ApplicationFee.list(limit=3) - request_mock.assert_requested("get", "/v1/application_fees") + request_mock.assert_requested( + "get", + "/v1/application_fees", + ) def test_applicationfee_retrieve(self, request_mock): stripe.ApplicationFee.retrieve("fee_xxxxxxxxxxxxx") @@ -542,8 +644,14 @@ def test_applicationfee_feerefund_update(self, request_mock): ) def test_apps_secret_list2(self, request_mock): - stripe.apps.Secret.list(scope={"type": "account"}, limit=2) - request_mock.assert_requested("get", "/v1/apps/secrets") + stripe.apps.Secret.list( + scope={"type": "account"}, + limit=2, + ) + request_mock.assert_requested( + "get", + "/v1/apps/secrets", + ) def test_apps_secret_create2(self, request_mock): stripe.apps.Secret.create( @@ -551,11 +659,17 @@ def test_apps_secret_create2(self, request_mock): payload="secret_key_xxxxxx", scope={"type": "account"}, ) - request_mock.assert_requested("post", "/v1/apps/secrets") + request_mock.assert_requested( + "post", + "/v1/apps/secrets", + ) def test_balancetransaction_list(self, request_mock): stripe.BalanceTransaction.list(limit=3) - request_mock.assert_requested("get", "/v1/balance_transactions") + request_mock.assert_requested( + "get", + "/v1/balance_transactions", + ) def test_balancetransaction_retrieve(self, request_mock): stripe.BalanceTransaction.retrieve("txn_xxxxxxxxxxxxx") @@ -567,7 +681,8 @@ def test_balancetransaction_retrieve(self, request_mock): def test_billing_portal_configuration_list(self, request_mock): stripe.billing_portal.Configuration.list(limit=3) request_mock.assert_requested( - "get", "/v1/billing_portal/configurations" + "get", + "/v1/billing_portal/configurations", ) def test_billing_portal_configuration_create(self, request_mock): @@ -585,7 +700,8 @@ def test_billing_portal_configuration_create(self, request_mock): }, ) request_mock.assert_requested( - "post", "/v1/billing_portal/configurations" + "post", + "/v1/billing_portal/configurations", ) def test_billing_portal_configuration_retrieve(self, request_mock): @@ -613,11 +729,17 @@ def test_billing_portal_session_create(self, request_mock): customer="cus_xxxxxxxxxxxxx", return_url="https://example.com/account", ) - request_mock.assert_requested("post", "/v1/billing_portal/sessions") + request_mock.assert_requested( + "post", + "/v1/billing_portal/sessions", + ) def test_charge_list(self, request_mock): stripe.Charge.list(limit=3) - request_mock.assert_requested("get", "/v1/charges") + request_mock.assert_requested( + "get", + "/v1/charges", + ) def test_charge_create(self, request_mock): stripe.Charge.create( @@ -626,15 +748,27 @@ def test_charge_create(self, request_mock): source="tok_xxxx", description="My First Test Charge (created for API docs at https://www.stripe.com/docs/api)", ) - request_mock.assert_requested("post", "/v1/charges") + request_mock.assert_requested( + "post", + "/v1/charges", + ) def test_charge_retrieve(self, request_mock): stripe.Charge.retrieve("ch_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/charges/ch_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/charges/ch_xxxxxxxxxxxxx", + ) def test_charge_update(self, request_mock): - stripe.Charge.modify("ch_xxxxxxxxxxxxx", metadata={"order_id": "6735"}) - request_mock.assert_requested("post", "/v1/charges/ch_xxxxxxxxxxxxx") + stripe.Charge.modify( + "ch_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/charges/ch_xxxxxxxxxxxxx", + ) def test_charge_capture(self, request_mock): stripe.Charge.capture("ch_xxxxxxxxxxxxx") @@ -647,11 +781,17 @@ def test_charge_search(self, request_mock): stripe.Charge.search( query="amount>999 AND metadata['order_id']:'6735'" ) - request_mock.assert_requested("get", "/v1/charges/search") + request_mock.assert_requested( + "get", + "/v1/charges/search", + ) def test_checkout_session_list(self, request_mock): stripe.checkout.Session.list(limit=3) - request_mock.assert_requested("get", "/v1/checkout/sessions") + request_mock.assert_requested( + "get", + "/v1/checkout/sessions", + ) def test_checkout_session_create2(self, request_mock): stripe.checkout.Session.create( @@ -659,7 +799,10 @@ def test_checkout_session_create2(self, request_mock): line_items=[{"price": "price_xxxxxxxxxxxxx", "quantity": 2}], mode="payment", ) - request_mock.assert_requested("post", "/v1/checkout/sessions") + request_mock.assert_requested( + "post", + "/v1/checkout/sessions", + ) def test_checkout_session_retrieve(self, request_mock): stripe.checkout.Session.retrieve("cs_test_xxxxxxxxxxxxx") @@ -677,15 +820,24 @@ def test_checkout_session_expire2(self, request_mock): def test_countryspec_list(self, request_mock): stripe.CountrySpec.list(limit=3) - request_mock.assert_requested("get", "/v1/country_specs") + request_mock.assert_requested( + "get", + "/v1/country_specs", + ) def test_countryspec_retrieve(self, request_mock): stripe.CountrySpec.retrieve("US") - request_mock.assert_requested("get", "/v1/country_specs/US") + request_mock.assert_requested( + "get", + "/v1/country_specs/US", + ) def test_coupon_list(self, request_mock): stripe.Coupon.list(limit=3) - request_mock.assert_requested("get", "/v1/coupons") + request_mock.assert_requested( + "get", + "/v1/coupons", + ) def test_coupon_create(self, request_mock): stripe.Coupon.create( @@ -693,23 +845,41 @@ def test_coupon_create(self, request_mock): duration="repeating", duration_in_months=3, ) - request_mock.assert_requested("post", "/v1/coupons") + request_mock.assert_requested( + "post", + "/v1/coupons", + ) def test_coupon_delete(self, request_mock): stripe.Coupon.delete("Z4OV52SU") - request_mock.assert_requested("delete", "/v1/coupons/Z4OV52SU") + request_mock.assert_requested( + "delete", + "/v1/coupons/Z4OV52SU", + ) def test_coupon_retrieve(self, request_mock): stripe.Coupon.retrieve("Z4OV52SU") - request_mock.assert_requested("get", "/v1/coupons/Z4OV52SU") + request_mock.assert_requested( + "get", + "/v1/coupons/Z4OV52SU", + ) def test_coupon_update(self, request_mock): - stripe.Coupon.modify("Z4OV52SU", metadata={"order_id": "6735"}) - request_mock.assert_requested("post", "/v1/coupons/Z4OV52SU") + stripe.Coupon.modify( + "Z4OV52SU", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/coupons/Z4OV52SU", + ) def test_creditnote_list(self, request_mock): stripe.CreditNote.list(limit=3) - request_mock.assert_requested("get", "/v1/credit_notes") + request_mock.assert_requested( + "get", + "/v1/credit_notes", + ) def test_creditnote_create(self, request_mock): stripe.CreditNote.create( @@ -722,7 +892,10 @@ def test_creditnote_create(self, request_mock): }, ], ) - request_mock.assert_requested("post", "/v1/credit_notes") + request_mock.assert_requested( + "post", + "/v1/credit_notes", + ) def test_creditnote_void_credit_note(self, request_mock): stripe.CreditNote.void_credit_note("cn_xxxxxxxxxxxxx") @@ -742,38 +915,56 @@ def test_creditnote_preview(self, request_mock): }, ], ) - request_mock.assert_requested("get", "/v1/credit_notes/preview") + request_mock.assert_requested( + "get", + "/v1/credit_notes/preview", + ) def test_customer_list(self, request_mock): stripe.Customer.list(limit=3) - request_mock.assert_requested("get", "/v1/customers") + request_mock.assert_requested( + "get", + "/v1/customers", + ) def test_customer_list2(self, request_mock): stripe.Customer.list(limit=3) - request_mock.assert_requested("get", "/v1/customers") + request_mock.assert_requested( + "get", + "/v1/customers", + ) def test_customer_create(self, request_mock): stripe.Customer.create( description="My First Test Customer (created for API docs at https://www.stripe.com/docs/api)", ) - request_mock.assert_requested("post", "/v1/customers") + request_mock.assert_requested( + "post", + "/v1/customers", + ) def test_customer_delete(self, request_mock): stripe.Customer.delete("cus_xxxxxxxxxxxxx") request_mock.assert_requested( - "delete", "/v1/customers/cus_xxxxxxxxxxxxx" + "delete", + "/v1/customers/cus_xxxxxxxxxxxxx", ) def test_customer_retrieve(self, request_mock): stripe.Customer.retrieve("cus_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/customers/cus_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/customers/cus_xxxxxxxxxxxxx", + ) def test_customer_update(self, request_mock): stripe.Customer.modify( - "cus_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "cus_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, ) request_mock.assert_requested( - "post", "/v1/customers/cus_xxxxxxxxxxxxx" + "post", + "/v1/customers/cus_xxxxxxxxxxxxx", ) def test_customer_customerbalancetransaction_retrieve(self, request_mock): @@ -787,7 +978,10 @@ def test_customer_customerbalancetransaction_retrieve(self, request_mock): ) def test_customer_list_payment_methods2(self, request_mock): - stripe.Customer.list_payment_methods("cus_xxxxxxxxxxxxx", type="card") + stripe.Customer.list_payment_methods( + "cus_xxxxxxxxxxxxx", + type="card", + ) request_mock.assert_requested( "get", "/v1/customers/cus_xxxxxxxxxxxxx/payment_methods", @@ -795,7 +989,8 @@ def test_customer_list_payment_methods2(self, request_mock): def test_customer_taxid_retrieve(self, request_mock): stripe.Customer.retrieve_tax_id( - "cus_xxxxxxxxxxxxx", "txi_xxxxxxxxxxxxx" + "cus_xxxxxxxxxxxxx", + "txi_xxxxxxxxxxxxx", ) request_mock.assert_requested( "get", @@ -806,78 +1001,117 @@ def test_customer_search(self, request_mock): stripe.Customer.search( query="name:'fakename' AND metadata['foo']:'bar'" ) - request_mock.assert_requested("get", "/v1/customers/search") + request_mock.assert_requested( + "get", + "/v1/customers/search", + ) def test_customer_search2(self, request_mock): stripe.Customer.search( query="name:'fakename' AND metadata['foo']:'bar'" ) - request_mock.assert_requested("get", "/v1/customers/search") + request_mock.assert_requested( + "get", + "/v1/customers/search", + ) def test_dispute_list(self, request_mock): stripe.Dispute.list(limit=3) - request_mock.assert_requested("get", "/v1/disputes") + request_mock.assert_requested( + "get", + "/v1/disputes", + ) def test_dispute_retrieve(self, request_mock): stripe.Dispute.retrieve("dp_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/disputes/dp_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/disputes/dp_xxxxxxxxxxxxx", + ) def test_dispute_update(self, request_mock): stripe.Dispute.modify( - "dp_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "dp_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/disputes/dp_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/disputes/dp_xxxxxxxxxxxxx") def test_dispute_close(self, request_mock): stripe.Dispute.close("dp_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/disputes/dp_xxxxxxxxxxxxx/close" + "post", + "/v1/disputes/dp_xxxxxxxxxxxxx/close", ) def test_event_list(self, request_mock): stripe.Event.list(limit=3) - request_mock.assert_requested("get", "/v1/events") + request_mock.assert_requested( + "get", + "/v1/events", + ) def test_event_retrieve(self, request_mock): stripe.Event.retrieve("evt_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/events/evt_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/events/evt_xxxxxxxxxxxxx", + ) def test_filelink_list(self, request_mock): stripe.FileLink.list(limit=3) - request_mock.assert_requested("get", "/v1/file_links") + request_mock.assert_requested( + "get", + "/v1/file_links", + ) def test_filelink_create(self, request_mock): stripe.FileLink.create(file="file_xxxxxxxxxxxxx") - request_mock.assert_requested("post", "/v1/file_links") + request_mock.assert_requested( + "post", + "/v1/file_links", + ) def test_filelink_retrieve(self, request_mock): stripe.FileLink.retrieve("link_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/file_links/link_xxxxxxxxxxxxx" + "get", + "/v1/file_links/link_xxxxxxxxxxxxx", ) def test_filelink_update(self, request_mock): stripe.FileLink.modify( - "link_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "link_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, ) request_mock.assert_requested( - "post", "/v1/file_links/link_xxxxxxxxxxxxx" + "post", + "/v1/file_links/link_xxxxxxxxxxxxx", ) def test_file_list(self, request_mock): stripe.File.list(limit=3) - request_mock.assert_requested("get", "/v1/files") + request_mock.assert_requested( + "get", + "/v1/files", + ) def test_file_retrieve(self, request_mock): stripe.File.retrieve("file_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/files/file_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/files/file_xxxxxxxxxxxxx", + ) def test_financial_connections_account_list2(self, request_mock): stripe.financial_connections.Account.list( account_holder={"customer": "cus_xxxxxxxxxxxxx"}, ) request_mock.assert_requested( - "get", "/v1/financial_connections/accounts" + "get", + "/v1/financial_connections/accounts", ) def test_financial_connections_account_retrieve2(self, request_mock): @@ -915,7 +1149,8 @@ def test_financial_connections_session_create2(self, request_mock): filters={"countries": ["US"]}, ) request_mock.assert_requested( - "post", "/v1/financial_connections/sessions" + "post", + "/v1/financial_connections/sessions", ) def test_financial_connections_session_retrieve2(self, request_mock): @@ -928,7 +1163,8 @@ def test_financial_connections_session_retrieve2(self, request_mock): def test_identity_verificationreport_list(self, request_mock): stripe.identity.VerificationReport.list(limit=3) request_mock.assert_requested( - "get", "/v1/identity/verification_reports" + "get", + "/v1/identity/verification_reports", ) def test_identity_verificationreport_retrieve(self, request_mock): @@ -941,13 +1177,15 @@ def test_identity_verificationreport_retrieve(self, request_mock): def test_identity_verificationsession_list(self, request_mock): stripe.identity.VerificationSession.list(limit=3) request_mock.assert_requested( - "get", "/v1/identity/verification_sessions" + "get", + "/v1/identity/verification_sessions", ) def test_identity_verificationsession_create(self, request_mock): stripe.identity.VerificationSession.create(type="document") request_mock.assert_requested( - "post", "/v1/identity/verification_sessions" + "post", + "/v1/identity/verification_sessions", ) def test_identity_verificationsession_retrieve(self, request_mock): @@ -983,62 +1221,92 @@ def test_identity_verificationsession_redact(self, request_mock): def test_invoiceitem_list(self, request_mock): stripe.InvoiceItem.list(limit=3) - request_mock.assert_requested("get", "/v1/invoiceitems") + request_mock.assert_requested( + "get", + "/v1/invoiceitems", + ) def test_invoiceitem_create(self, request_mock): stripe.InvoiceItem.create( customer="cus_xxxxxxxxxxxxx", price="price_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/invoiceitems") + request_mock.assert_requested( + "post", + "/v1/invoiceitems", + ) def test_invoiceitem_delete(self, request_mock): stripe.InvoiceItem.delete("ii_xxxxxxxxxxxxx") request_mock.assert_requested( - "delete", "/v1/invoiceitems/ii_xxxxxxxxxxxxx" + "delete", + "/v1/invoiceitems/ii_xxxxxxxxxxxxx", ) def test_invoiceitem_retrieve(self, request_mock): stripe.InvoiceItem.retrieve("ii_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/invoiceitems/ii_xxxxxxxxxxxxx" + "get", + "/v1/invoiceitems/ii_xxxxxxxxxxxxx", ) def test_invoiceitem_update(self, request_mock): stripe.InvoiceItem.modify( - "ii_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "ii_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, ) request_mock.assert_requested( - "post", "/v1/invoiceitems/ii_xxxxxxxxxxxxx" + "post", + "/v1/invoiceitems/ii_xxxxxxxxxxxxx", ) def test_invoice_list(self, request_mock): stripe.Invoice.list(limit=3) - request_mock.assert_requested("get", "/v1/invoices") + request_mock.assert_requested( + "get", + "/v1/invoices", + ) def test_invoice_create(self, request_mock): stripe.Invoice.create(customer="cus_xxxxxxxxxxxxx") - request_mock.assert_requested("post", "/v1/invoices") + request_mock.assert_requested( + "post", + "/v1/invoices", + ) def test_invoice_delete(self, request_mock): stripe.Invoice.delete("in_xxxxxxxxxxxxx") request_mock.assert_requested( - "delete", "/v1/invoices/in_xxxxxxxxxxxxx" + "delete", + "/v1/invoices/in_xxxxxxxxxxxxx", ) def test_invoice_retrieve(self, request_mock): stripe.Invoice.retrieve("in_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/invoices/in_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/invoices/in_xxxxxxxxxxxxx", + ) def test_invoice_retrieve2(self, request_mock): - stripe.Invoice.retrieve("in_xxxxxxxxxxxxx", expand=["customer"]) - request_mock.assert_requested("get", "/v1/invoices/in_xxxxxxxxxxxxx") - - def test_invoice_update(self, request_mock): + stripe.Invoice.retrieve( + "in_xxxxxxxxxxxxx", + expand=["customer"], + ) + request_mock.assert_requested( + "get", + "/v1/invoices/in_xxxxxxxxxxxxx", + ) + + def test_invoice_update(self, request_mock): stripe.Invoice.modify( - "in_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "in_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/invoices/in_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/invoices/in_xxxxxxxxxxxxx") def test_invoice_finalize_invoice(self, request_mock): stripe.Invoice.finalize_invoice("in_xxxxxxxxxxxxx") @@ -1057,30 +1325,39 @@ def test_invoice_mark_uncollectible(self, request_mock): def test_invoice_pay(self, request_mock): stripe.Invoice.pay("in_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/invoices/in_xxxxxxxxxxxxx/pay" + "post", + "/v1/invoices/in_xxxxxxxxxxxxx/pay", ) def test_invoice_send_invoice(self, request_mock): stripe.Invoice.send_invoice("in_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/invoices/in_xxxxxxxxxxxxx/send" + "post", + "/v1/invoices/in_xxxxxxxxxxxxx/send", ) def test_invoice_void_invoice(self, request_mock): stripe.Invoice.void_invoice("in_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/invoices/in_xxxxxxxxxxxxx/void" + "post", + "/v1/invoices/in_xxxxxxxxxxxxx/void", ) def test_invoice_search(self, request_mock): stripe.Invoice.search( query="total>999 AND metadata['order_id']:'6735'" ) - request_mock.assert_requested("get", "/v1/invoices/search") + request_mock.assert_requested( + "get", + "/v1/invoices/search", + ) def test_issuing_authorization_list(self, request_mock): stripe.issuing.Authorization.list(limit=3) - request_mock.assert_requested("get", "/v1/issuing/authorizations") + request_mock.assert_requested( + "get", + "/v1/issuing/authorizations", + ) def test_issuing_authorization_retrieve(self, request_mock): stripe.issuing.Authorization.retrieve("iauth_xxxxxxxxxxxxx") @@ -1115,7 +1392,10 @@ def test_issuing_authorization_decline(self, request_mock): def test_issuing_cardholder_list(self, request_mock): stripe.issuing.Cardholder.list(limit=3) - request_mock.assert_requested("get", "/v1/issuing/cardholders") + request_mock.assert_requested( + "get", + "/v1/issuing/cardholders", + ) def test_issuing_cardholder_create(self, request_mock): stripe.issuing.Cardholder.create( @@ -1133,7 +1413,10 @@ def test_issuing_cardholder_create(self, request_mock): }, }, ) - request_mock.assert_requested("post", "/v1/issuing/cardholders") + request_mock.assert_requested( + "post", + "/v1/issuing/cardholders", + ) def test_issuing_cardholder_retrieve(self, request_mock): stripe.issuing.Cardholder.retrieve("ich_xxxxxxxxxxxxx") @@ -1154,7 +1437,10 @@ def test_issuing_cardholder_update(self, request_mock): def test_issuing_card_list(self, request_mock): stripe.issuing.Card.list(limit=3) - request_mock.assert_requested("get", "/v1/issuing/cards") + request_mock.assert_requested( + "get", + "/v1/issuing/cards", + ) def test_issuing_card_create(self, request_mock): stripe.issuing.Card.create( @@ -1162,12 +1448,16 @@ def test_issuing_card_create(self, request_mock): currency="usd", type="virtual", ) - request_mock.assert_requested("post", "/v1/issuing/cards") + request_mock.assert_requested( + "post", + "/v1/issuing/cards", + ) def test_issuing_card_retrieve(self, request_mock): stripe.issuing.Card.retrieve("ic_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/issuing/cards/ic_xxxxxxxxxxxxx" + "get", + "/v1/issuing/cards/ic_xxxxxxxxxxxxx", ) def test_issuing_card_update(self, request_mock): @@ -1176,12 +1466,16 @@ def test_issuing_card_update(self, request_mock): metadata={"order_id": "6735"}, ) request_mock.assert_requested( - "post", "/v1/issuing/cards/ic_xxxxxxxxxxxxx" + "post", + "/v1/issuing/cards/ic_xxxxxxxxxxxxx", ) def test_issuing_dispute_list(self, request_mock): stripe.issuing.Dispute.list(limit=3) - request_mock.assert_requested("get", "/v1/issuing/disputes") + request_mock.assert_requested( + "get", + "/v1/issuing/disputes", + ) def test_issuing_dispute_create(self, request_mock): stripe.issuing.Dispute.create( @@ -1191,7 +1485,10 @@ def test_issuing_dispute_create(self, request_mock): "fraudulent": {"explanation": "Purchase was unrecognized."}, }, ) - request_mock.assert_requested("post", "/v1/issuing/disputes") + request_mock.assert_requested( + "post", + "/v1/issuing/disputes", + ) def test_issuing_dispute_retrieve(self, request_mock): stripe.issuing.Dispute.retrieve("idp_xxxxxxxxxxxxx") @@ -1209,7 +1506,10 @@ def test_issuing_dispute_submit(self, request_mock): def test_issuing_transaction_list(self, request_mock): stripe.issuing.Transaction.list(limit=3) - request_mock.assert_requested("get", "/v1/issuing/transactions") + request_mock.assert_requested( + "get", + "/v1/issuing/transactions", + ) def test_issuing_transaction_retrieve(self, request_mock): stripe.issuing.Transaction.retrieve("ipi_xxxxxxxxxxxxx") @@ -1231,12 +1531,16 @@ def test_issuing_transaction_update(self, request_mock): def test_mandate_retrieve(self, request_mock): stripe.Mandate.retrieve("mandate_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/mandates/mandate_xxxxxxxxxxxxx" + "get", + "/v1/mandates/mandate_xxxxxxxxxxxxx", ) def test_paymentintent_list(self, request_mock): stripe.PaymentIntent.list(limit=3) - request_mock.assert_requested("get", "/v1/payment_intents") + request_mock.assert_requested( + "get", + "/v1/payment_intents", + ) def test_paymentintent_create2(self, request_mock): stripe.PaymentIntent.create( @@ -1244,12 +1548,16 @@ def test_paymentintent_create2(self, request_mock): currency="usd", automatic_payment_methods={"enabled": True}, ) - request_mock.assert_requested("post", "/v1/payment_intents") + request_mock.assert_requested( + "post", + "/v1/payment_intents", + ) def test_paymentintent_retrieve(self, request_mock): stripe.PaymentIntent.retrieve("pi_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/payment_intents/pi_xxxxxxxxxxxxx" + "get", + "/v1/payment_intents/pi_xxxxxxxxxxxxx", ) def test_paymentintent_update(self, request_mock): @@ -1317,17 +1625,26 @@ def test_paymentintent_search(self, request_mock): stripe.PaymentIntent.search( query="status:'succeeded' AND metadata['order_id']:'6735'", ) - request_mock.assert_requested("get", "/v1/payment_intents/search") + request_mock.assert_requested( + "get", + "/v1/payment_intents/search", + ) def test_paymentlink_list(self, request_mock): stripe.PaymentLink.list(limit=3) - request_mock.assert_requested("get", "/v1/payment_links") + request_mock.assert_requested( + "get", + "/v1/payment_links", + ) def test_paymentlink_create2(self, request_mock): stripe.PaymentLink.create( line_items=[{"price": "price_xxxxxxxxxxxxx", "quantity": 1}], ) - request_mock.assert_requested("post", "/v1/payment_links") + request_mock.assert_requested( + "post", + "/v1/payment_links", + ) def test_paymentlink_retrieve2(self, request_mock): stripe.PaymentLink.retrieve("plink_xxxxxxxxxxxxx") @@ -1337,15 +1654,24 @@ def test_paymentlink_retrieve2(self, request_mock): ) def test_paymentlink_update(self, request_mock): - stripe.PaymentLink.modify("plink_xxxxxxxxxxxxx", active=False) + stripe.PaymentLink.modify( + "plink_xxxxxxxxxxxxx", + active=False, + ) request_mock.assert_requested( "post", "/v1/payment_links/plink_xxxxxxxxxxxxx", ) def test_paymentmethod_list(self, request_mock): - stripe.PaymentMethod.list(customer="cus_xxxxxxxxxxxxx", type="card") - request_mock.assert_requested("get", "/v1/payment_methods") + stripe.PaymentMethod.list( + customer="cus_xxxxxxxxxxxxx", + type="card", + ) + request_mock.assert_requested( + "get", + "/v1/payment_methods", + ) def test_paymentmethod_create(self, request_mock): stripe.PaymentMethod.create( @@ -1357,12 +1683,16 @@ def test_paymentmethod_create(self, request_mock): "cvc": "314", }, ) - request_mock.assert_requested("post", "/v1/payment_methods") + request_mock.assert_requested( + "post", + "/v1/payment_methods", + ) def test_paymentmethod_retrieve(self, request_mock): stripe.PaymentMethod.retrieve("pm_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/payment_methods/pm_xxxxxxxxxxxxx" + "get", + "/v1/payment_methods/pm_xxxxxxxxxxxxx", ) def test_paymentmethod_update(self, request_mock): @@ -1394,24 +1724,43 @@ def test_paymentmethod_detach(self, request_mock): def test_payout_list(self, request_mock): stripe.Payout.list(limit=3) - request_mock.assert_requested("get", "/v1/payouts") + request_mock.assert_requested( + "get", + "/v1/payouts", + ) def test_payout_create(self, request_mock): - stripe.Payout.create(amount=1100, currency="usd") - request_mock.assert_requested("post", "/v1/payouts") + stripe.Payout.create( + amount=1100, + currency="usd", + ) + request_mock.assert_requested( + "post", + "/v1/payouts", + ) def test_payout_retrieve(self, request_mock): stripe.Payout.retrieve("po_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/payouts/po_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/payouts/po_xxxxxxxxxxxxx", + ) def test_payout_update(self, request_mock): - stripe.Payout.modify("po_xxxxxxxxxxxxx", metadata={"order_id": "6735"}) - request_mock.assert_requested("post", "/v1/payouts/po_xxxxxxxxxxxxx") + stripe.Payout.modify( + "po_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/payouts/po_xxxxxxxxxxxxx", + ) def test_payout_cancel(self, request_mock): stripe.Payout.cancel("po_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/payouts/po_xxxxxxxxxxxxx/cancel" + "post", + "/v1/payouts/po_xxxxxxxxxxxxx/cancel", ) def test_payout_reverse(self, request_mock): @@ -1423,7 +1772,10 @@ def test_payout_reverse(self, request_mock): def test_plan_list(self, request_mock): stripe.Plan.list(limit=3) - request_mock.assert_requested("get", "/v1/plans") + request_mock.assert_requested( + "get", + "/v1/plans", + ) def test_plan_create(self, request_mock): stripe.Plan.create( @@ -1432,7 +1784,10 @@ def test_plan_create(self, request_mock): interval="month", product="prod_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/plans") + request_mock.assert_requested( + "post", + "/v1/plans", + ) def test_plan_create2(self, request_mock): stripe.Plan.create( @@ -1441,27 +1796,41 @@ def test_plan_create2(self, request_mock): interval="month", product={"name": "My product"}, ) - request_mock.assert_requested("post", "/v1/plans") + request_mock.assert_requested( + "post", + "/v1/plans", + ) def test_plan_delete(self, request_mock): stripe.Plan.delete("price_xxxxxxxxxxxxx") request_mock.assert_requested( - "delete", "/v1/plans/price_xxxxxxxxxxxxx" + "delete", + "/v1/plans/price_xxxxxxxxxxxxx", ) def test_plan_retrieve(self, request_mock): stripe.Plan.retrieve("price_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/plans/price_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/plans/price_xxxxxxxxxxxxx", + ) def test_plan_update(self, request_mock): stripe.Plan.modify( - "price_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "price_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/plans/price_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/plans/price_xxxxxxxxxxxxx") def test_price_list(self, request_mock): stripe.Price.list(limit=3) - request_mock.assert_requested("get", "/v1/prices") + request_mock.assert_requested( + "get", + "/v1/prices", + ) def test_price_create2(self, request_mock): stripe.Price.create( @@ -1470,63 +1839,97 @@ def test_price_create2(self, request_mock): recurring={"interval": "month"}, product="prod_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/prices") + request_mock.assert_requested( + "post", + "/v1/prices", + ) def test_price_retrieve(self, request_mock): stripe.Price.retrieve("price_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/prices/price_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/prices/price_xxxxxxxxxxxxx", + ) def test_price_update(self, request_mock): stripe.Price.modify( - "price_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "price_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/prices/price_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/prices/price_xxxxxxxxxxxxx") def test_price_search(self, request_mock): stripe.Price.search( query="active:'true' AND metadata['order_id']:'6735'" ) - request_mock.assert_requested("get", "/v1/prices/search") + request_mock.assert_requested( + "get", + "/v1/prices/search", + ) def test_product_list(self, request_mock): stripe.Product.list(limit=3) - request_mock.assert_requested("get", "/v1/products") + request_mock.assert_requested( + "get", + "/v1/products", + ) def test_product_create(self, request_mock): stripe.Product.create(name="Gold Special") - request_mock.assert_requested("post", "/v1/products") + request_mock.assert_requested( + "post", + "/v1/products", + ) def test_product_delete(self, request_mock): stripe.Product.delete("prod_xxxxxxxxxxxxx") request_mock.assert_requested( - "delete", "/v1/products/prod_xxxxxxxxxxxxx" + "delete", + "/v1/products/prod_xxxxxxxxxxxxx", ) def test_product_retrieve(self, request_mock): stripe.Product.retrieve("prod_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/products/prod_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/products/prod_xxxxxxxxxxxxx", + ) def test_product_update(self, request_mock): stripe.Product.modify( - "prod_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "prod_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, ) request_mock.assert_requested( - "post", "/v1/products/prod_xxxxxxxxxxxxx" + "post", + "/v1/products/prod_xxxxxxxxxxxxx", ) def test_product_search(self, request_mock): stripe.Product.search( query="active:'true' AND metadata['order_id']:'6735'" ) - request_mock.assert_requested("get", "/v1/products/search") + request_mock.assert_requested( + "get", + "/v1/products/search", + ) def test_promotioncode_list(self, request_mock): stripe.PromotionCode.list(limit=3) - request_mock.assert_requested("get", "/v1/promotion_codes") + request_mock.assert_requested( + "get", + "/v1/promotion_codes", + ) def test_promotioncode_create(self, request_mock): stripe.PromotionCode.create(coupon="Z4OV52SU") - request_mock.assert_requested("post", "/v1/promotion_codes") + request_mock.assert_requested( + "post", + "/v1/promotion_codes", + ) def test_promotioncode_retrieve(self, request_mock): stripe.PromotionCode.retrieve("promo_xxxxxxxxxxxxx") @@ -1547,33 +1950,50 @@ def test_promotioncode_update(self, request_mock): def test_quote_list(self, request_mock): stripe.Quote.list(limit=3) - request_mock.assert_requested("get", "/v1/quotes") + request_mock.assert_requested( + "get", + "/v1/quotes", + ) def test_quote_create(self, request_mock): stripe.Quote.create( customer="cus_xxxxxxxxxxxxx", line_items=[{"price": "price_xxxxxxxxxxxxx", "quantity": 2}], ) - request_mock.assert_requested("post", "/v1/quotes") + request_mock.assert_requested( + "post", + "/v1/quotes", + ) def test_quote_retrieve(self, request_mock): stripe.Quote.retrieve("qt_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/quotes/qt_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/quotes/qt_xxxxxxxxxxxxx", + ) def test_quote_update(self, request_mock): - stripe.Quote.modify("qt_xxxxxxxxxxxxx", metadata={"order_id": "6735"}) - request_mock.assert_requested("post", "/v1/quotes/qt_xxxxxxxxxxxxx") + stripe.Quote.modify( + "qt_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/quotes/qt_xxxxxxxxxxxxx", + ) def test_quote_accept(self, request_mock): stripe.Quote.accept("qt_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/quotes/qt_xxxxxxxxxxxxx/accept" + "post", + "/v1/quotes/qt_xxxxxxxxxxxxx/accept", ) def test_quote_cancel(self, request_mock): stripe.Quote.cancel("qt_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/quotes/qt_xxxxxxxxxxxxx/cancel" + "post", + "/v1/quotes/qt_xxxxxxxxxxxxx/cancel", ) def test_quote_finalize_quote(self, request_mock): @@ -1585,7 +2005,10 @@ def test_quote_finalize_quote(self, request_mock): def test_radar_earlyfraudwarning_list(self, request_mock): stripe.radar.EarlyFraudWarning.list(limit=3) - request_mock.assert_requested("get", "/v1/radar/early_fraud_warnings") + request_mock.assert_requested( + "get", + "/v1/radar/early_fraud_warnings", + ) def test_radar_earlyfraudwarning_retrieve(self, request_mock): stripe.radar.EarlyFraudWarning.retrieve("issfr_xxxxxxxxxxxxx") @@ -1596,16 +2019,23 @@ def test_radar_earlyfraudwarning_retrieve(self, request_mock): def test_radar_valuelistitem_list(self, request_mock): stripe.radar.ValueListItem.list( - limit=3, value_list="rsl_xxxxxxxxxxxxx" + limit=3, + value_list="rsl_xxxxxxxxxxxxx", + ) + request_mock.assert_requested( + "get", + "/v1/radar/value_list_items", ) - request_mock.assert_requested("get", "/v1/radar/value_list_items") def test_radar_valuelistitem_create(self, request_mock): stripe.radar.ValueListItem.create( value_list="rsl_xxxxxxxxxxxxx", value="1.2.3.4", ) - request_mock.assert_requested("post", "/v1/radar/value_list_items") + request_mock.assert_requested( + "post", + "/v1/radar/value_list_items", + ) def test_radar_valuelistitem_delete(self, request_mock): stripe.radar.ValueListItem.delete("rsli_xxxxxxxxxxxxx") @@ -1623,7 +2053,10 @@ def test_radar_valuelistitem_retrieve(self, request_mock): def test_radar_valuelist_list(self, request_mock): stripe.radar.ValueList.list(limit=3) - request_mock.assert_requested("get", "/v1/radar/value_lists") + request_mock.assert_requested( + "get", + "/v1/radar/value_lists", + ) def test_radar_valuelist_create(self, request_mock): stripe.radar.ValueList.create( @@ -1631,7 +2064,10 @@ def test_radar_valuelist_create(self, request_mock): name="Custom IP Blocklist", item_type="ip_address", ) - request_mock.assert_requested("post", "/v1/radar/value_lists") + request_mock.assert_requested( + "post", + "/v1/radar/value_lists", + ) def test_radar_valuelist_delete(self, request_mock): stripe.radar.ValueList.delete("rsl_xxxxxxxxxxxxx") @@ -1659,29 +2095,48 @@ def test_radar_valuelist_update(self, request_mock): def test_refund_list(self, request_mock): stripe.Refund.list(limit=3) - request_mock.assert_requested("get", "/v1/refunds") + request_mock.assert_requested( + "get", + "/v1/refunds", + ) def test_refund_create(self, request_mock): stripe.Refund.create(charge="ch_xxxxxxxxxxxxx") - request_mock.assert_requested("post", "/v1/refunds") + request_mock.assert_requested( + "post", + "/v1/refunds", + ) def test_refund_retrieve(self, request_mock): stripe.Refund.retrieve("re_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/refunds/re_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/refunds/re_xxxxxxxxxxxxx", + ) def test_refund_update(self, request_mock): - stripe.Refund.modify("re_xxxxxxxxxxxxx", metadata={"order_id": "6735"}) - request_mock.assert_requested("post", "/v1/refunds/re_xxxxxxxxxxxxx") + stripe.Refund.modify( + "re_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/refunds/re_xxxxxxxxxxxxx", + ) def test_refund_cancel(self, request_mock): stripe.Refund.cancel("re_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/refunds/re_xxxxxxxxxxxxx/cancel" + "post", + "/v1/refunds/re_xxxxxxxxxxxxx/cancel", ) def test_reporting_reportrun_list(self, request_mock): stripe.reporting.ReportRun.list(limit=3) - request_mock.assert_requested("get", "/v1/reporting/report_runs") + request_mock.assert_requested( + "get", + "/v1/reporting/report_runs", + ) def test_reporting_reportrun_create(self, request_mock): stripe.reporting.ReportRun.create( @@ -1691,7 +2146,10 @@ def test_reporting_reportrun_create(self, request_mock): "interval_end": 1525132800, }, ) - request_mock.assert_requested("post", "/v1/reporting/report_runs") + request_mock.assert_requested( + "post", + "/v1/reporting/report_runs", + ) def test_reporting_reportrun_retrieve(self, request_mock): stripe.reporting.ReportRun.retrieve("frr_xxxxxxxxxxxxx") @@ -1702,7 +2160,10 @@ def test_reporting_reportrun_retrieve(self, request_mock): def test_reporting_reporttype_list(self, request_mock): stripe.reporting.ReportType.list() - request_mock.assert_requested("get", "/v1/reporting/report_types") + request_mock.assert_requested( + "get", + "/v1/reporting/report_types", + ) def test_reporting_reporttype_retrieve(self, request_mock): stripe.reporting.ReportType.retrieve("balance.summary.1") @@ -1713,11 +2174,17 @@ def test_reporting_reporttype_retrieve(self, request_mock): def test_review_list(self, request_mock): stripe.Review.list(limit=3) - request_mock.assert_requested("get", "/v1/reviews") + request_mock.assert_requested( + "get", + "/v1/reviews", + ) def test_review_retrieve(self, request_mock): stripe.Review.retrieve("prv_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/reviews/prv_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/reviews/prv_xxxxxxxxxxxxx", + ) def test_review_approve(self, request_mock): stripe.Review.approve("prv_xxxxxxxxxxxxx") @@ -1728,16 +2195,23 @@ def test_review_approve(self, request_mock): def test_setupintent_list(self, request_mock): stripe.SetupIntent.list(limit=3) - request_mock.assert_requested("get", "/v1/setup_intents") + request_mock.assert_requested( + "get", + "/v1/setup_intents", + ) def test_setupintent_create(self, request_mock): stripe.SetupIntent.create(payment_method_types=["card"]) - request_mock.assert_requested("post", "/v1/setup_intents") + request_mock.assert_requested( + "post", + "/v1/setup_intents", + ) def test_setupintent_retrieve(self, request_mock): stripe.SetupIntent.retrieve("seti_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/setup_intents/seti_xxxxxxxxxxxxx" + "get", + "/v1/setup_intents/seti_xxxxxxxxxxxxx", ) def test_setupintent_update(self, request_mock): @@ -1779,7 +2253,10 @@ def test_setupintent_verify_microdeposits2(self, request_mock): def test_shippingrate_list2(self, request_mock): stripe.ShippingRate.list(limit=3) - request_mock.assert_requested("get", "/v1/shipping_rates") + request_mock.assert_requested( + "get", + "/v1/shipping_rates", + ) def test_shippingrate_create2(self, request_mock): stripe.ShippingRate.create( @@ -1787,12 +2264,16 @@ def test_shippingrate_create2(self, request_mock): type="fixed_amount", fixed_amount={"amount": 500, "currency": "usd"}, ) - request_mock.assert_requested("post", "/v1/shipping_rates") + request_mock.assert_requested( + "post", + "/v1/shipping_rates", + ) def test_shippingrate_retrieve(self, request_mock): stripe.ShippingRate.retrieve("shr_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/shipping_rates/shr_xxxxxxxxxxxxx" + "get", + "/v1/shipping_rates/shr_xxxxxxxxxxxxx", ) def test_shippingrate_update(self, request_mock): @@ -1807,7 +2288,10 @@ def test_shippingrate_update(self, request_mock): def test_sigma_scheduledqueryrun_list(self, request_mock): stripe.sigma.ScheduledQueryRun.list(limit=3) - request_mock.assert_requested("get", "/v1/sigma/scheduled_query_runs") + request_mock.assert_requested( + "get", + "/v1/sigma/scheduled_query_runs", + ) def test_sigma_scheduledqueryrun_retrieve(self, request_mock): stripe.sigma.ScheduledQueryRun.retrieve("sqr_xxxxxxxxxxxxx") @@ -1818,21 +2302,34 @@ def test_sigma_scheduledqueryrun_retrieve(self, request_mock): def test_source_retrieve(self, request_mock): stripe.Source.retrieve("src_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/sources/src_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/sources/src_xxxxxxxxxxxxx", + ) def test_source_retrieve2(self, request_mock): stripe.Source.retrieve("src_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/sources/src_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/sources/src_xxxxxxxxxxxxx", + ) def test_source_update(self, request_mock): stripe.Source.modify( - "src_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "src_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/sources/src_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/sources/src_xxxxxxxxxxxxx") def test_subscriptionitem_list(self, request_mock): stripe.SubscriptionItem.list(subscription="sub_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/subscription_items") + request_mock.assert_requested( + "get", + "/v1/subscription_items", + ) def test_subscriptionitem_create(self, request_mock): stripe.SubscriptionItem.create( @@ -1840,7 +2337,10 @@ def test_subscriptionitem_create(self, request_mock): price="price_xxxxxxxxxxxxx", quantity=2, ) - request_mock.assert_requested("post", "/v1/subscription_items") + request_mock.assert_requested( + "post", + "/v1/subscription_items", + ) def test_subscriptionitem_delete(self, request_mock): stripe.SubscriptionItem.delete("si_xxxxxxxxxxxxx") @@ -1868,7 +2368,10 @@ def test_subscriptionitem_update(self, request_mock): def test_subscriptionschedule_list(self, request_mock): stripe.SubscriptionSchedule.list(limit=3) - request_mock.assert_requested("get", "/v1/subscription_schedules") + request_mock.assert_requested( + "get", + "/v1/subscription_schedules", + ) def test_subscriptionschedule_create(self, request_mock): stripe.SubscriptionSchedule.create( @@ -1882,7 +2385,10 @@ def test_subscriptionschedule_create(self, request_mock): }, ], ) - request_mock.assert_requested("post", "/v1/subscription_schedules") + request_mock.assert_requested( + "post", + "/v1/subscription_schedules", + ) def test_subscriptionschedule_retrieve(self, request_mock): stripe.SubscriptionSchedule.retrieve("sub_sched_xxxxxxxxxxxxx") @@ -1917,19 +2423,26 @@ def test_subscriptionschedule_release(self, request_mock): def test_subscription_list(self, request_mock): stripe.Subscription.list(limit=3) - request_mock.assert_requested("get", "/v1/subscriptions") + request_mock.assert_requested( + "get", + "/v1/subscriptions", + ) def test_subscription_create(self, request_mock): stripe.Subscription.create( customer="cus_xxxxxxxxxxxxx", items=[{"price": "price_xxxxxxxxxxxxx"}], ) - request_mock.assert_requested("post", "/v1/subscriptions") + request_mock.assert_requested( + "post", + "/v1/subscriptions", + ) def test_subscription_retrieve(self, request_mock): stripe.Subscription.retrieve("sub_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/subscriptions/sub_xxxxxxxxxxxxx" + "get", + "/v1/subscriptions/sub_xxxxxxxxxxxxx", ) def test_subscription_update(self, request_mock): @@ -1938,28 +2451,39 @@ def test_subscription_update(self, request_mock): metadata={"order_id": "6735"}, ) request_mock.assert_requested( - "post", "/v1/subscriptions/sub_xxxxxxxxxxxxx" + "post", + "/v1/subscriptions/sub_xxxxxxxxxxxxx", ) def test_subscription_search(self, request_mock): stripe.Subscription.search( query="status:'active' AND metadata['order_id']:'6735'", ) - request_mock.assert_requested("get", "/v1/subscriptions/search") + request_mock.assert_requested( + "get", + "/v1/subscriptions/search", + ) def test_taxcode_list(self, request_mock): stripe.TaxCode.list(limit=3) - request_mock.assert_requested("get", "/v1/tax_codes") + request_mock.assert_requested( + "get", + "/v1/tax_codes", + ) def test_taxcode_retrieve(self, request_mock): stripe.TaxCode.retrieve("txcd_xxxxxxxxxxxxx") request_mock.assert_requested( - "get", "/v1/tax_codes/txcd_xxxxxxxxxxxxx" + "get", + "/v1/tax_codes/txcd_xxxxxxxxxxxxx", ) def test_taxrate_list(self, request_mock): stripe.TaxRate.list(limit=3) - request_mock.assert_requested("get", "/v1/tax_rates") + request_mock.assert_requested( + "get", + "/v1/tax_rates", + ) def test_taxrate_create(self, request_mock): stripe.TaxRate.create( @@ -1969,27 +2493,43 @@ def test_taxrate_create(self, request_mock): percentage=16, inclusive=False, ) - request_mock.assert_requested("post", "/v1/tax_rates") + request_mock.assert_requested( + "post", + "/v1/tax_rates", + ) def test_taxrate_retrieve(self, request_mock): stripe.TaxRate.retrieve("txr_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/tax_rates/txr_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/tax_rates/txr_xxxxxxxxxxxxx", + ) def test_taxrate_update(self, request_mock): - stripe.TaxRate.modify("txr_xxxxxxxxxxxxx", active=False) + stripe.TaxRate.modify( + "txr_xxxxxxxxxxxxx", + active=False, + ) request_mock.assert_requested( - "post", "/v1/tax_rates/txr_xxxxxxxxxxxxx" + "post", + "/v1/tax_rates/txr_xxxxxxxxxxxxx", ) def test_terminal_configuration_list2(self, request_mock): stripe.terminal.Configuration.list(limit=3) - request_mock.assert_requested("get", "/v1/terminal/configurations") + request_mock.assert_requested( + "get", + "/v1/terminal/configurations", + ) def test_terminal_configuration_create2(self, request_mock): stripe.terminal.Configuration.create( bbpos_wisepos_e={"splashscreen": "file_xxxxxxxxxxxxx"}, ) - request_mock.assert_requested("post", "/v1/terminal/configurations") + request_mock.assert_requested( + "post", + "/v1/terminal/configurations", + ) def test_terminal_configuration_delete2(self, request_mock): stripe.terminal.Configuration.delete("tmc_xxxxxxxxxxxxx") @@ -2017,11 +2557,17 @@ def test_terminal_configuration_update2(self, request_mock): def test_terminal_connectiontoken_create(self, request_mock): stripe.terminal.ConnectionToken.create() - request_mock.assert_requested("post", "/v1/terminal/connection_tokens") + request_mock.assert_requested( + "post", + "/v1/terminal/connection_tokens", + ) def test_terminal_location_list(self, request_mock): stripe.terminal.Location.list(limit=3) - request_mock.assert_requested("get", "/v1/terminal/locations") + request_mock.assert_requested( + "get", + "/v1/terminal/locations", + ) def test_terminal_location_create(self, request_mock): stripe.terminal.Location.create( @@ -2034,7 +2580,10 @@ def test_terminal_location_create(self, request_mock): "country": "US", }, ) - request_mock.assert_requested("post", "/v1/terminal/locations") + request_mock.assert_requested( + "post", + "/v1/terminal/locations", + ) def test_terminal_location_delete(self, request_mock): stripe.terminal.Location.delete("tml_xxxxxxxxxxxxx") @@ -2062,7 +2611,10 @@ def test_terminal_location_update(self, request_mock): def test_terminal_reader_list(self, request_mock): stripe.terminal.Reader.list(limit=3) - request_mock.assert_requested("get", "/v1/terminal/readers") + request_mock.assert_requested( + "get", + "/v1/terminal/readers", + ) def test_terminal_reader_create(self, request_mock): stripe.terminal.Reader.create( @@ -2070,7 +2622,10 @@ def test_terminal_reader_create(self, request_mock): label="Blue Rabbit", location="tml_1234", ) - request_mock.assert_requested("post", "/v1/terminal/readers") + request_mock.assert_requested( + "post", + "/v1/terminal/readers", + ) def test_terminal_reader_delete(self, request_mock): stripe.terminal.Reader.delete("tmr_xxxxxxxxxxxxx") @@ -2087,7 +2642,10 @@ def test_terminal_reader_retrieve(self, request_mock): ) def test_terminal_reader_update(self, request_mock): - stripe.terminal.Reader.modify("tmr_xxxxxxxxxxxxx", label="Blue Rabbit") + stripe.terminal.Reader.modify( + "tmr_xxxxxxxxxxxxx", + label="Blue Rabbit", + ) request_mock.assert_requested( "post", "/v1/terminal/readers/tmr_xxxxxxxxxxxxx", @@ -2123,11 +2681,17 @@ def test_terminal_reader_process_setup_intent(self, request_mock): def test_test_helpers_testclock_list2(self, request_mock): stripe.test_helpers.TestClock.list(limit=3) - request_mock.assert_requested("get", "/v1/test_helpers/test_clocks") + request_mock.assert_requested( + "get", + "/v1/test_helpers/test_clocks", + ) def test_test_helpers_testclock_create2(self, request_mock): stripe.test_helpers.TestClock.create(frozen_time=1577836800) - request_mock.assert_requested("post", "/v1/test_helpers/test_clocks") + request_mock.assert_requested( + "post", + "/v1/test_helpers/test_clocks", + ) def test_test_helpers_testclock_delete2(self, request_mock): stripe.test_helpers.TestClock.delete("clock_xxxxxxxxxxxxx") @@ -2164,11 +2728,17 @@ def test_token_create2(self, request_mock): "account_number": "000123456789", }, ) - request_mock.assert_requested("post", "/v1/tokens") + request_mock.assert_requested( + "post", + "/v1/tokens", + ) def test_token_create3(self, request_mock): stripe.Token.create(pii={"id_number": "000000000"}) - request_mock.assert_requested("post", "/v1/tokens") + request_mock.assert_requested( + "post", + "/v1/tokens", + ) def test_token_create4(self, request_mock): stripe.Token.create( @@ -2177,7 +2747,10 @@ def test_token_create4(self, request_mock): "tos_shown_and_accepted": True, }, ) - request_mock.assert_requested("post", "/v1/tokens") + request_mock.assert_requested( + "post", + "/v1/tokens", + ) def test_token_create5(self, request_mock): stripe.Token.create( @@ -2187,19 +2760,31 @@ def test_token_create5(self, request_mock): "relationship": {"owner": True}, }, ) - request_mock.assert_requested("post", "/v1/tokens") + request_mock.assert_requested( + "post", + "/v1/tokens", + ) def test_token_create6(self, request_mock): stripe.Token.create(cvc_update={"cvc": "123"}) - request_mock.assert_requested("post", "/v1/tokens") + request_mock.assert_requested( + "post", + "/v1/tokens", + ) def test_token_retrieve(self, request_mock): stripe.Token.retrieve("tok_xxxx") - request_mock.assert_requested("get", "/v1/tokens/tok_xxxx") + request_mock.assert_requested( + "get", + "/v1/tokens/tok_xxxx", + ) def test_topup_list(self, request_mock): stripe.Topup.list(limit=3) - request_mock.assert_requested("get", "/v1/topups") + request_mock.assert_requested( + "get", + "/v1/topups", + ) def test_topup_create(self, request_mock): stripe.Topup.create( @@ -2208,25 +2793,41 @@ def test_topup_create(self, request_mock): description="Top-up for Jenny Rosen", statement_descriptor="Top-up", ) - request_mock.assert_requested("post", "/v1/topups") + request_mock.assert_requested( + "post", + "/v1/topups", + ) def test_topup_retrieve(self, request_mock): stripe.Topup.retrieve("tu_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/topups/tu_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/topups/tu_xxxxxxxxxxxxx", + ) def test_topup_update(self, request_mock): - stripe.Topup.modify("tu_xxxxxxxxxxxxx", metadata={"order_id": "6735"}) - request_mock.assert_requested("post", "/v1/topups/tu_xxxxxxxxxxxxx") + stripe.Topup.modify( + "tu_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/topups/tu_xxxxxxxxxxxxx", + ) def test_topup_cancel(self, request_mock): stripe.Topup.cancel("tu_xxxxxxxxxxxxx") request_mock.assert_requested( - "post", "/v1/topups/tu_xxxxxxxxxxxxx/cancel" + "post", + "/v1/topups/tu_xxxxxxxxxxxxx/cancel", ) def test_transfer_list(self, request_mock): stripe.Transfer.list(limit=3) - request_mock.assert_requested("get", "/v1/transfers") + request_mock.assert_requested( + "get", + "/v1/transfers", + ) def test_transfer_create(self, request_mock): stripe.Transfer.create( @@ -2235,21 +2836,32 @@ def test_transfer_create(self, request_mock): destination="acct_xxxxxxxxxxxxx", transfer_group="ORDER_95", ) - request_mock.assert_requested("post", "/v1/transfers") + request_mock.assert_requested( + "post", + "/v1/transfers", + ) def test_transfer_retrieve(self, request_mock): stripe.Transfer.retrieve("tr_xxxxxxxxxxxxx") - request_mock.assert_requested("get", "/v1/transfers/tr_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/transfers/tr_xxxxxxxxxxxxx", + ) def test_transfer_update(self, request_mock): stripe.Transfer.modify( - "tr_xxxxxxxxxxxxx", metadata={"order_id": "6735"} + "tr_xxxxxxxxxxxxx", + metadata={"order_id": "6735"}, + ) + request_mock.assert_requested( + "post", + "/v1/transfers/tr_xxxxxxxxxxxxx", ) - request_mock.assert_requested("post", "/v1/transfers/tr_xxxxxxxxxxxxx") def test_transfer_transferreversal_retrieve(self, request_mock): stripe.Transfer.retrieve_reversal( - "tr_xxxxxxxxxxxxx", "trr_xxxxxxxxxxxxx" + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx", ) request_mock.assert_requested( "get", @@ -2272,13 +2884,19 @@ def test_treasury_creditreversal_list(self, request_mock): financial_account="fa_xxxxxxxxxxxxx", limit=3, ) - request_mock.assert_requested("get", "/v1/treasury/credit_reversals") + request_mock.assert_requested( + "get", + "/v1/treasury/credit_reversals", + ) def test_treasury_creditreversal_create(self, request_mock): stripe.treasury.CreditReversal.create( received_credit="rc_xxxxxxxxxxxxx" ) - request_mock.assert_requested("post", "/v1/treasury/credit_reversals") + request_mock.assert_requested( + "post", + "/v1/treasury/credit_reversals", + ) def test_treasury_creditreversal_retrieve(self, request_mock): stripe.treasury.CreditReversal.retrieve("credrev_xxxxxxxxxxxxx") @@ -2292,11 +2910,17 @@ def test_treasury_debitreversal_list(self, request_mock): financial_account="fa_xxxxxxxxxxxxx", limit=3, ) - request_mock.assert_requested("get", "/v1/treasury/debit_reversals") + request_mock.assert_requested( + "get", + "/v1/treasury/debit_reversals", + ) def test_treasury_debitreversal_create(self, request_mock): stripe.treasury.DebitReversal.create(received_debit="rd_xxxxxxxxxxxxx") - request_mock.assert_requested("post", "/v1/treasury/debit_reversals") + request_mock.assert_requested( + "post", + "/v1/treasury/debit_reversals", + ) def test_treasury_debitreversal_retrieve(self, request_mock): stripe.treasury.DebitReversal.retrieve("debrev_xxxxxxxxxxxxx") @@ -2307,7 +2931,10 @@ def test_treasury_debitreversal_retrieve(self, request_mock): def test_treasury_financialaccount_list(self, request_mock): stripe.treasury.FinancialAccount.list(limit=3) - request_mock.assert_requested("get", "/v1/treasury/financial_accounts") + request_mock.assert_requested( + "get", + "/v1/treasury/financial_accounts", + ) def test_treasury_financialaccount_create(self, request_mock): stripe.treasury.FinancialAccount.create( @@ -2315,7 +2942,8 @@ def test_treasury_financialaccount_create(self, request_mock): features={}, ) request_mock.assert_requested( - "post", "/v1/treasury/financial_accounts" + "post", + "/v1/treasury/financial_accounts", ) def test_treasury_financialaccount_retrieve(self, request_mock): @@ -2347,7 +2975,10 @@ def test_treasury_inboundtransfer_list(self, request_mock): financial_account="fa_xxxxxxxxxxxxx", limit=3, ) - request_mock.assert_requested("get", "/v1/treasury/inbound_transfers") + request_mock.assert_requested( + "get", + "/v1/treasury/inbound_transfers", + ) def test_treasury_inboundtransfer_create(self, request_mock): stripe.treasury.InboundTransfer.create( @@ -2357,7 +2988,10 @@ def test_treasury_inboundtransfer_create(self, request_mock): origin_payment_method="pm_xxxxxxxxxxxxx", description="InboundTransfer from my bank account", ) - request_mock.assert_requested("post", "/v1/treasury/inbound_transfers") + request_mock.assert_requested( + "post", + "/v1/treasury/inbound_transfers", + ) def test_treasury_inboundtransfer_retrieve(self, request_mock): stripe.treasury.InboundTransfer.retrieve("ibt_xxxxxxxxxxxxx") @@ -2378,7 +3012,10 @@ def test_treasury_outboundpayment_list(self, request_mock): financial_account="fa_xxxxxxxxxxxxx", limit=3, ) - request_mock.assert_requested("get", "/v1/treasury/outbound_payments") + request_mock.assert_requested( + "get", + "/v1/treasury/outbound_payments", + ) def test_treasury_outboundpayment_create(self, request_mock): stripe.treasury.OutboundPayment.create( @@ -2389,7 +3026,10 @@ def test_treasury_outboundpayment_create(self, request_mock): destination_payment_method="pm_xxxxxxxxxxxxx", description="OutboundPayment to a 3rd party", ) - request_mock.assert_requested("post", "/v1/treasury/outbound_payments") + request_mock.assert_requested( + "post", + "/v1/treasury/outbound_payments", + ) def test_treasury_outboundpayment_retrieve(self, request_mock): stripe.treasury.OutboundPayment.retrieve("bot_xxxxxxxxxxxxx") @@ -2410,7 +3050,10 @@ def test_treasury_outboundtransfer_list(self, request_mock): financial_account="fa_xxxxxxxxxxxxx", limit=3, ) - request_mock.assert_requested("get", "/v1/treasury/outbound_transfers") + request_mock.assert_requested( + "get", + "/v1/treasury/outbound_transfers", + ) def test_treasury_outboundtransfer_create(self, request_mock): stripe.treasury.OutboundTransfer.create( @@ -2421,7 +3064,8 @@ def test_treasury_outboundtransfer_create(self, request_mock): description="OutboundTransfer to my external bank account", ) request_mock.assert_requested( - "post", "/v1/treasury/outbound_transfers" + "post", + "/v1/treasury/outbound_transfers", ) def test_treasury_outboundtransfer_retrieve(self, request_mock): @@ -2443,7 +3087,10 @@ def test_treasury_receivedcredit_list(self, request_mock): financial_account="fa_xxxxxxxxxxxxx", limit=3, ) - request_mock.assert_requested("get", "/v1/treasury/received_credits") + request_mock.assert_requested( + "get", + "/v1/treasury/received_credits", + ) def test_treasury_receivedcredit_retrieve(self, request_mock): stripe.treasury.ReceivedCredit.retrieve("rc_xxxxxxxxxxxxx") @@ -2457,7 +3104,10 @@ def test_treasury_receiveddebit_list(self, request_mock): financial_account="fa_xxxxxxxxxxxxx", limit=3, ) - request_mock.assert_requested("get", "/v1/treasury/received_debits") + request_mock.assert_requested( + "get", + "/v1/treasury/received_debits", + ) def test_treasury_receiveddebit_retrieve(self, request_mock): stripe.treasury.ReceivedDebit.retrieve("rd_xxxxxxxxxxxxx") @@ -2472,7 +3122,8 @@ def test_treasury_transactionentry_list(self, request_mock): limit=3, ) request_mock.assert_requested( - "get", "/v1/treasury/transaction_entries" + "get", + "/v1/treasury/transaction_entries", ) def test_treasury_transactionentry_retrieve(self, request_mock): @@ -2487,7 +3138,10 @@ def test_treasury_transaction_list(self, request_mock): financial_account="fa_xxxxxxxxxxxxx", limit=3, ) - request_mock.assert_requested("get", "/v1/treasury/transactions") + request_mock.assert_requested( + "get", + "/v1/treasury/transactions", + ) def test_treasury_transaction_retrieve(self, request_mock): stripe.treasury.Transaction.retrieve("trxn_xxxxxxxxxxxxx") @@ -2498,14 +3152,20 @@ def test_treasury_transaction_retrieve(self, request_mock): def test_webhookendpoint_list(self, request_mock): stripe.WebhookEndpoint.list(limit=3) - request_mock.assert_requested("get", "/v1/webhook_endpoints") + request_mock.assert_requested( + "get", + "/v1/webhook_endpoints", + ) def test_webhookendpoint_create(self, request_mock): stripe.WebhookEndpoint.create( url="https://example.com/my/webhook/endpoint", enabled_events=["charge.failed", "charge.succeeded"], ) - request_mock.assert_requested("post", "/v1/webhook_endpoints") + request_mock.assert_requested( + "post", + "/v1/webhook_endpoints", + ) def test_webhookendpoint_delete(self, request_mock): stripe.WebhookEndpoint.delete("we_xxxxxxxxxxxxx") @@ -2544,7 +3204,8 @@ def test_tax_transaction_create_from_calculation(self, request_mock): def test_tax_calculation_list_line_items(self, request_mock): stripe.tax.Calculation.list_line_items("xxx") request_mock.assert_requested( - "get", "/v1/tax/calculations/xxx/line_items" + "get", + "/v1/tax/calculations/xxx/line_items", ) def test_paymentintent_create3(self, request_mock): @@ -2553,4 +3214,14 @@ def test_paymentintent_create3(self, request_mock): currency="usd", payment_method_data={"type": "p24", "p24": {"bank": "blik"}}, ) - request_mock.assert_requested("post", "/v1/payment_intents") + request_mock.assert_requested( + "post", + "/v1/payment_intents", + ) + + def test_quote_list_line_items(self, request_mock): + stripe.Quote.list_line_items("qt_xxxxxxxxxxxxx") + request_mock.assert_requested( + "get", + "/v1/quotes/qt_xxxxxxxxxxxxx/line_items", + )