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/lib/stripe/resources/account_link.rb b/lib/stripe/resources/account_link.rb index c61d960c4..071ad020f 100644 --- a/lib/stripe/resources/account_link.rb +++ b/lib/stripe/resources/account_link.rb @@ -5,7 +5,7 @@ module Stripe # 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) class AccountLink < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/resources/application_fee_refund.rb b/lib/stripe/resources/application_fee_refund.rb index 937ca4c1a..f2052d8be 100644 --- a/lib/stripe/resources/application_fee_refund.rb +++ b/lib/stripe/resources/application_fee_refund.rb @@ -6,7 +6,7 @@ module Stripe # 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) class ApplicationFeeRefund < APIResource extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/apps/secret.rb b/lib/stripe/resources/apps/secret.rb index dff71a051..28da6388f 100644 --- a/lib/stripe/resources/apps/secret.rb +++ b/lib/stripe/resources/apps/secret.rb @@ -11,7 +11,7 @@ module Apps # # 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) class Secret < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/balance.rb b/lib/stripe/resources/balance.rb index 403b2d78b..6dc68858c 100644 --- a/lib/stripe/resources/balance.rb +++ b/lib/stripe/resources/balance.rb @@ -12,7 +12,7 @@ module Stripe # 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) class Balance < SingletonAPIResource OBJECT_NAME = "balance" end diff --git a/lib/stripe/resources/balance_transaction.rb b/lib/stripe/resources/balance_transaction.rb index d321fe4d7..a1a5b1d07 100644 --- a/lib/stripe/resources/balance_transaction.rb +++ b/lib/stripe/resources/balance_transaction.rb @@ -5,7 +5,7 @@ module Stripe # 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) class BalanceTransaction < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index 2004a4150..db9431490 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -8,7 +8,7 @@ module Stripe # 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) class BankAccount < APIResource include Stripe::APIOperations::Delete extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/capability.rb b/lib/stripe/resources/capability.rb index 067013609..17835b08a 100644 --- a/lib/stripe/resources/capability.rb +++ b/lib/stripe/resources/capability.rb @@ -4,7 +4,7 @@ module Stripe # 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) class Capability < APIResource extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/card.rb b/lib/stripe/resources/card.rb index 4261f0b90..5ecb808f7 100644 --- a/lib/stripe/resources/card.rb +++ b/lib/stripe/resources/card.rb @@ -6,7 +6,7 @@ module Stripe # 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) class Card < APIResource include Stripe::APIOperations::Delete extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index de8caf720..ebdc74b55 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -6,7 +6,7 @@ module Stripe # 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) class Charge < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index e2c73ed56..0d8005447 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -16,7 +16,7 @@ module Checkout # 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) class Session < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb index 4e5e20a2e..6cc81b198 100644 --- a/lib/stripe/resources/credit_note.rb +++ b/lib/stripe/resources/credit_note.rb @@ -4,7 +4,7 @@ module Stripe # 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) class CreditNote < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/customer.rb b/lib/stripe/resources/customer.rb index 28eab6765..29a584a20 100644 --- a/lib/stripe/resources/customer.rb +++ b/lib/stripe/resources/customer.rb @@ -4,7 +4,7 @@ module Stripe # 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) class Customer < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete diff --git a/lib/stripe/resources/customer_balance_transaction.rb b/lib/stripe/resources/customer_balance_transaction.rb index 4984a4c87..597f6e37e 100644 --- a/lib/stripe/resources/customer_balance_transaction.rb +++ b/lib/stripe/resources/customer_balance_transaction.rb @@ -2,12 +2,12 @@ # frozen_string_literal: true module Stripe - # 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) class CustomerBalanceTransaction < APIResource extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/discount.rb b/lib/stripe/resources/discount.rb index c8f3e6e7b..0807a930f 100644 --- a/lib/stripe/resources/discount.rb +++ b/lib/stripe/resources/discount.rb @@ -5,7 +5,7 @@ module Stripe # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). # It contains information about when the discount began, when it will end, and what it is applied to. # - # Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) class Discount < StripeObject OBJECT_NAME = "discount" end diff --git a/lib/stripe/resources/dispute.rb b/lib/stripe/resources/dispute.rb index 226a405d5..8f761c4dc 100644 --- a/lib/stripe/resources/dispute.rb +++ b/lib/stripe/resources/dispute.rb @@ -8,7 +8,7 @@ module Stripe # 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) class Dispute < APIResource extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/file.rb b/lib/stripe/resources/file.rb index 4cd9d9325..44b5eee32 100644 --- a/lib/stripe/resources/file.rb +++ b/lib/stripe/resources/file.rb @@ -8,7 +8,7 @@ module Stripe # 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) class File < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/funding_instructions.rb b/lib/stripe/resources/funding_instructions.rb index e8aba9896..cd8b99d0b 100644 --- a/lib/stripe/resources/funding_instructions.rb +++ b/lib/stripe/resources/funding_instructions.rb @@ -6,7 +6,7 @@ module Stripe # 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) class FundingInstructions < APIResource OBJECT_NAME = "funding_instructions" diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index c931d0d1b..aaa290558 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -33,7 +33,7 @@ module Stripe # 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) class Invoice < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index aea539561..05a138375 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -7,7 +7,7 @@ module Issuing # 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) class Authorization < APIResource extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/issuing/cardholder.rb b/lib/stripe/resources/issuing/cardholder.rb index 8e2dc639b..0000eea0b 100644 --- a/lib/stripe/resources/issuing/cardholder.rb +++ b/lib/stripe/resources/issuing/cardholder.rb @@ -5,7 +5,7 @@ module Stripe module Issuing # 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) class Cardholder < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/issuing/dispute.rb b/lib/stripe/resources/issuing/dispute.rb index 45d43a77d..3b1e880d7 100644 --- a/lib/stripe/resources/issuing/dispute.rb +++ b/lib/stripe/resources/issuing/dispute.rb @@ -5,7 +5,7 @@ module Stripe module Issuing # 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) class Dispute < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/issuing/transaction.rb b/lib/stripe/resources/issuing/transaction.rb index 668fe4bb4..2b87d9991 100644 --- a/lib/stripe/resources/issuing/transaction.rb +++ b/lib/stripe/resources/issuing/transaction.rb @@ -7,7 +7,7 @@ module Issuing # 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) class Transaction < APIResource extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 9ad1449d0..723098e01 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -12,7 +12,7 @@ module Stripe # 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) class PaymentIntent < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/payout.rb b/lib/stripe/resources/payout.rb index 1446f5dd1..a714ceb5f 100644 --- a/lib/stripe/resources/payout.rb +++ b/lib/stripe/resources/payout.rb @@ -9,7 +9,7 @@ module Stripe # 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) class Payout < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/person.rb b/lib/stripe/resources/person.rb index 33162d69c..f25a785f1 100644 --- a/lib/stripe/resources/person.rb +++ b/lib/stripe/resources/person.rb @@ -7,7 +7,7 @@ module Stripe # 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) class Person < APIResource extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/radar/early_fraud_warning.rb b/lib/stripe/resources/radar/early_fraud_warning.rb index 1ff76afde..7e633b106 100644 --- a/lib/stripe/resources/radar/early_fraud_warning.rb +++ b/lib/stripe/resources/radar/early_fraud_warning.rb @@ -6,7 +6,7 @@ module Radar # 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) class EarlyFraudWarning < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/radar/value_list.rb b/lib/stripe/resources/radar/value_list.rb index ee0e6ca42..46580caf7 100644 --- a/lib/stripe/resources/radar/value_list.rb +++ b/lib/stripe/resources/radar/value_list.rb @@ -5,7 +5,7 @@ module Stripe module Radar # 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) class ValueList < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete diff --git a/lib/stripe/resources/radar/value_list_item.rb b/lib/stripe/resources/radar/value_list_item.rb index 1ef76de89..fbf08f2b8 100644 --- a/lib/stripe/resources/radar/value_list_item.rb +++ b/lib/stripe/resources/radar/value_list_item.rb @@ -5,7 +5,7 @@ module Stripe module Radar # 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) class ValueListItem < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index f7aa8a55c..847d0b45b 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -6,7 +6,7 @@ module Stripe # 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) class Refund < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/reversal.rb b/lib/stripe/resources/reversal.rb index 8d1de380d..ceef154aa 100644 --- a/lib/stripe/resources/reversal.rb +++ b/lib/stripe/resources/reversal.rb @@ -14,7 +14,7 @@ module Stripe # 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) class Reversal < APIResource extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb index 8293a67c5..9de4c88f1 100644 --- a/lib/stripe/resources/setup_intent.rb +++ b/lib/stripe/resources/setup_intent.rb @@ -23,7 +23,7 @@ module Stripe # 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) class SetupIntent < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index 62d11f053..3f56e2483 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -4,7 +4,7 @@ module Stripe # 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) class Subscription < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index 4b1ed4121..577a7ffc5 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -4,7 +4,7 @@ module Stripe # 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) class SubscriptionSchedule < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb index 57f5bc7c4..054218b57 100644 --- a/lib/stripe/resources/tax/calculation.rb +++ b/lib/stripe/resources/tax/calculation.rb @@ -5,7 +5,7 @@ module Stripe module Tax # 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) class Calculation < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/resources/tax/transaction.rb b/lib/stripe/resources/tax/transaction.rb index f66864fa7..e9469d7c1 100644 --- a/lib/stripe/resources/tax/transaction.rb +++ b/lib/stripe/resources/tax/transaction.rb @@ -5,7 +5,7 @@ module Stripe module Tax # 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) class Transaction < APIResource OBJECT_NAME = "tax.transaction" diff --git a/lib/stripe/resources/tax_id.rb b/lib/stripe/resources/tax_id.rb index 204f3c3ac..620ad62e4 100644 --- a/lib/stripe/resources/tax_id.rb +++ b/lib/stripe/resources/tax_id.rb @@ -5,7 +5,7 @@ module Stripe # 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) class TaxId < APIResource include Stripe::APIOperations::Delete extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/tax_rate.rb b/lib/stripe/resources/tax_rate.rb index 197988b6e..386efa124 100644 --- a/lib/stripe/resources/tax_rate.rb +++ b/lib/stripe/resources/tax_rate.rb @@ -4,7 +4,7 @@ module Stripe # 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) class TaxRate < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/terminal/connection_token.rb b/lib/stripe/resources/terminal/connection_token.rb index d39a8ae10..ec434df84 100644 --- a/lib/stripe/resources/terminal/connection_token.rb +++ b/lib/stripe/resources/terminal/connection_token.rb @@ -5,7 +5,7 @@ module Stripe module Terminal # 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) class ConnectionToken < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/resources/terminal/location.rb b/lib/stripe/resources/terminal/location.rb index 1fbcb6e96..ed656bbc1 100644 --- a/lib/stripe/resources/terminal/location.rb +++ b/lib/stripe/resources/terminal/location.rb @@ -5,7 +5,7 @@ module Stripe module Terminal # 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) class Location < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index 20b20601a..ad6b7f611 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -5,7 +5,7 @@ module Stripe module Terminal # 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) class Reader < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb index 9cf981697..0af31f334 100644 --- a/lib/stripe/resources/token.rb +++ b/lib/stripe/resources/token.rb @@ -23,7 +23,7 @@ module Stripe # [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) class Token < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/resources/topup.rb b/lib/stripe/resources/topup.rb index 17491878b..d3569bb31 100644 --- a/lib/stripe/resources/topup.rb +++ b/lib/stripe/resources/topup.rb @@ -6,7 +6,7 @@ module Stripe # 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) class Topup < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/transfer.rb b/lib/stripe/resources/transfer.rb index 6742ac9d5..73946ed71 100644 --- a/lib/stripe/resources/transfer.rb +++ b/lib/stripe/resources/transfer.rb @@ -11,7 +11,7 @@ module Stripe # 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) class Transfer < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/usage_record.rb b/lib/stripe/resources/usage_record.rb index 3ea3ce3a4..f75f769a1 100644 --- a/lib/stripe/resources/usage_record.rb +++ b/lib/stripe/resources/usage_record.rb @@ -5,7 +5,7 @@ module Stripe # 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) class UsageRecord < APIResource OBJECT_NAME = "usage_record" end diff --git a/lib/stripe/resources/webhook_endpoint.rb b/lib/stripe/resources/webhook_endpoint.rb index 77daef502..bd6811c2b 100644 --- a/lib/stripe/resources/webhook_endpoint.rb +++ b/lib/stripe/resources/webhook_endpoint.rb @@ -8,7 +8,7 @@ module Stripe # # 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) class WebhookEndpoint < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index 6298e2f08..889ba0e60 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -6,17 +6,15 @@ module Stripe class CodegennedExampleTest < Test::Unit::TestCase context "Account.create" do should "support requests with args: type, country, email, capabilities" do - Stripe::Account.create( - { - type: "custom", - country: "US", - email: "jenny.rosen@example.com", - capabilities: { - card_payments: { requested: true }, - transfers: { requested: true }, - }, - } - ) + Stripe::Account.create({ + type: "custom", + country: "US", + email: "jenny.rosen@example.com", + capabilities: { + card_payments: { requested: true }, + transfers: { requested: true }, + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/accounts" end end @@ -61,14 +59,12 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "AccountLink.create" do should "support requests with args: account, refresh_url, return_url, type" do - Stripe::AccountLink.create( - { - account: "acct_xxxxxxxxxxxxx", - refresh_url: "https://example.com/reauth", - return_url: "https://example.com/return", - type: "account_onboarding", - } - ) + Stripe::AccountLink.create({ + account: "acct_xxxxxxxxxxxxx", + refresh_url: "https://example.com/reauth", + return_url: "https://example.com/return", + type: "account_onboarding", + }) assert_requested :post, "#{Stripe.api_base}/v1/account_links" end end @@ -111,47 +107,53 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Apps.Secret.create" do should "support requests with args: name, payload, scope" do - Stripe::Apps::Secret.create( - { - name: "sec_123", - payload: "very secret string", - scope: { type: "account" }, - } - ) + Stripe::Apps::Secret.create({ + name: "sec_123", + payload: "very secret string", + scope: { type: "account" }, + }) assert_requested :post, "#{Stripe.api_base}/v1/apps/secrets" end should "support requests with args: name, payload, scope2" do - Stripe::Apps::Secret.create( - { - name: "my-api-key", - payload: "secret_key_xxxxxx", - scope: { type: "account" }, - } - ) + Stripe::Apps::Secret.create({ + name: "my-api-key", + payload: "secret_key_xxxxxx", + scope: { type: "account" }, + }) assert_requested :post, "#{Stripe.api_base}/v1/apps/secrets" end end context "Apps.Secret.delete_where" do should "support requests with args: name, scope" do - Stripe::Apps::Secret.delete_where( - { name: "my-api-key", scope: { type: "account" } } - ) + Stripe::Apps::Secret.delete_where({ + name: "my-api-key", + scope: { type: "account" }, + }) assert_requested :post, "#{Stripe.api_base}/v1/apps/secrets/delete" end end context "Apps.Secret.find" do should "support requests with args: name, scope" do - Stripe::Apps::Secret.find({ name: "sec_123", scope: { type: "account" } }) + Stripe::Apps::Secret.find({ + name: "sec_123", + scope: { type: "account" }, + }) assert_requested :get, "#{Stripe.api_base}/v1/apps/secrets/find?name=sec_123&scope[type]=account" end end context "Apps.Secret.list" do should "support requests with args: scope, limit" do - Stripe::Apps::Secret.list({ scope: { type: "account" }, limit: 2 }) + Stripe::Apps::Secret.list({ + scope: { type: "account" }, + limit: 2, + }) assert_requested :get, "#{Stripe.api_base}/v1/apps/secrets?scope[type]=account&limit=2" end should "support requests with args: scope, limit2" do - Stripe::Apps::Secret.list({ scope: { type: "account" }, limit: 2 }) + Stripe::Apps::Secret.list({ + scope: { type: "account" }, + limit: 2, + }) assert_requested :get, "#{Stripe.api_base}/v1/apps/secrets?scope[type]=account&limit=2" end end @@ -169,21 +171,19 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "BillingPortal.Configuration.create" do should "support requests with args: features, business_profile" do - Stripe::BillingPortal::Configuration.create( - { - features: { - customer_update: { - allowed_updates: %w[email tax_id], - enabled: true, - }, - invoice_history: { enabled: true }, - }, - business_profile: { - privacy_policy_url: "https://example.com/privacy", - terms_of_service_url: "https://example.com/terms", + Stripe::BillingPortal::Configuration.create({ + features: { + customer_update: { + allowed_updates: %w[email tax_id], + enabled: true, }, - } - ) + invoice_history: { enabled: true }, + }, + business_profile: { + privacy_policy_url: "https://example.com/privacy", + terms_of_service_url: "https://example.com/terms", + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/billing_portal/configurations" end end @@ -215,12 +215,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "BillingPortal.Session.create" do should "support requests with args: customer, return_url" do - Stripe::BillingPortal::Session.create( - { - customer: "cus_xxxxxxxxxxxxx", - return_url: "https://example.com/account", - } - ) + Stripe::BillingPortal::Session.create({ + customer: "cus_xxxxxxxxxxxxx", + return_url: "https://example.com/account", + }) assert_requested :post, "#{Stripe.api_base}/v1/billing_portal/sessions" end end @@ -272,14 +270,12 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Charge.create" do should "support requests with args: amount, currency, source, description" do - Stripe::Charge.create( - { - amount: 2000, - currency: "usd", - source: "tok_xxxx", - description: "My First Test Charge (created for API docs at https://www.stripe.com/docs/api)", - } - ) + Stripe::Charge.create({ + amount: 2000, + currency: "usd", + source: "tok_xxxx", + description: "My First Test Charge (created for API docs at https://www.stripe.com/docs/api)", + }) assert_requested :post, "#{Stripe.api_base}/v1/charges" end end @@ -297,9 +293,9 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Charge.search" do should "support requests with args: query" do - Stripe::Charge.search( - { query: "amount>999 AND metadata['order_id']:'6735'" } - ) + Stripe::Charge.search({ + query: "amount>999 AND metadata['order_id']:'6735'", + }) assert_requested :get, "#{Stripe.api_base}/v1/charges/search?query=amount>999 AND metadata['order_id']:'6735'" end end @@ -314,35 +310,42 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Checkout.Session.create" do should "support requests with args: success_url, cancel_url, mode, shipping_options" do - Stripe::Checkout::Session.create( - { - success_url: "https://example.com/success", - cancel_url: "https://example.com/cancel", - mode: "payment", - shipping_options: [ - { shipping_rate: "shr_standard" }, - { - shipping_rate_data: { - display_name: "Standard", - delivery_estimate: { - minimum: { unit: "day", value: 5 }, - maximum: { unit: "day", value: 7 }, + Stripe::Checkout::Session.create({ + success_url: "https://example.com/success", + cancel_url: "https://example.com/cancel", + mode: "payment", + shipping_options: [ + { shipping_rate: "shr_standard" }, + { + shipping_rate_data: { + display_name: "Standard", + delivery_estimate: { + minimum: { + unit: "day", + value: 5, + }, + maximum: { + unit: "day", + value: 7, }, }, }, - ], - } - ) + }, + ], + }) assert_requested :post, "#{Stripe.api_base}/v1/checkout/sessions" end should "support requests with args: success_url, line_items, mode" do - Stripe::Checkout::Session.create( - { - success_url: "https://example.com/success", - line_items: [{ price: "price_xxxxxxxxxxxxx", quantity: 2 }], - mode: "payment", - } - ) + Stripe::Checkout::Session.create({ + success_url: "https://example.com/success", + line_items: [ + { + price: "price_xxxxxxxxxxxxx", + quantity: 2, + }, + ], + mode: "payment", + }) assert_requested :post, "#{Stripe.api_base}/v1/checkout/sessions" end end @@ -388,9 +391,11 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Coupon.create" do should "support requests with args: percent_off, duration, duration_in_months" do - Stripe::Coupon.create( - { percent_off: 25.5, duration: "repeating", duration_in_months: 3 } - ) + Stripe::Coupon.create({ + percent_off: 25.5, + duration: "repeating", + duration_in_months: 3, + }) assert_requested :post, "#{Stripe.api_base}/v1/coupons" end end @@ -420,18 +425,16 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "CreditNote.create" do should "support requests with args: invoice, lines" do - Stripe::CreditNote.create( - { - invoice: "in_xxxxxxxxxxxxx", - lines: [ - { - type: "invoice_line_item", - invoice_line_item: "il_xxxxxxxxxxxxx", - quantity: 1, - }, - ], - } - ) + Stripe::CreditNote.create({ + invoice: "in_xxxxxxxxxxxxx", + lines: [ + { + type: "invoice_line_item", + invoice_line_item: "il_xxxxxxxxxxxxx", + quantity: 1, + }, + ], + }) assert_requested :post, "#{Stripe.api_base}/v1/credit_notes" end end @@ -449,11 +452,9 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Customer.create" do should "support requests with args: description" do - Stripe::Customer.create( - { - description: "My First Test Customer (created for API docs at https://www.stripe.com/docs/api)", - } - ) + Stripe::Customer.create({ + description: "My First Test Customer (created for API docs at https://www.stripe.com/docs/api)", + }) assert_requested :post, "#{Stripe.api_base}/v1/customers" end end @@ -483,7 +484,10 @@ class CodegennedExampleTest < Test::Unit::TestCase should "support requests with args: customer, amount, currency" do Stripe::Customer::TestHelpers.fund_cash_balance( "cus_123", - { amount: 30, currency: "eur" } + { + amount: 30, + currency: "eur", + } ) assert_requested :post, "#{Stripe.api_base}/v1/test_helpers/customers/cus_123/fund_cash_balance" end @@ -519,15 +523,15 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Customer.search" do should "support requests with args: query" do - Stripe::Customer.search( - { query: "name:'fakename' AND metadata['foo']:'bar'" } - ) + Stripe::Customer.search({ + query: "name:'fakename' AND metadata['foo']:'bar'", + }) assert_requested :get, "#{Stripe.api_base}/v1/customers/search?query=name:'fakename' AND metadata['foo']:'bar'" end should "support requests with args: query2" do - Stripe::Customer.search( - { query: "name:'fakename' AND metadata['foo']:'bar'" } - ) + Stripe::Customer.search({ + query: "name:'fakename' AND metadata['foo']:'bar'", + }) assert_requested :get, "#{Stripe.api_base}/v1/customers/search?query=name:'fakename' AND metadata['foo']:'bar'" end end @@ -662,9 +666,9 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/accounts?" end should "support requests with args: account_holder" do - Stripe::FinancialConnections::Account.list( - { account_holder: { customer: "cus_xxxxxxxxxxxxx" } } - ) + Stripe::FinancialConnections::Account.list({ + account_holder: { customer: "cus_xxxxxxxxxxxxx" }, + }) assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/accounts?account_holder[customer]=cus_xxxxxxxxxxxxx" end end @@ -679,7 +683,10 @@ class CodegennedExampleTest < Test::Unit::TestCase should "support requests with args: limit, ownership, parent_id" do Stripe::FinancialConnections::Account.list_owners( "fca_xxxxxxxxxxxxx", - { limit: 3, ownership: "fcaowns_xxxxxxxxxxxxx" } + { + limit: 3, + ownership: "fcaowns_xxxxxxxxxxxxx", + } ) assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners?limit=3&ownership=fcaowns_xxxxxxxxxxxxx" end @@ -705,22 +712,24 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "FinancialConnections.Session.create" do should "support requests with args: account_holder, permissions" do - Stripe::FinancialConnections::Session.create( - { - account_holder: { type: "customer", customer: "cus_123" }, - permissions: ["balances"], - } - ) + Stripe::FinancialConnections::Session.create({ + account_holder: { + type: "customer", + customer: "cus_123", + }, + permissions: ["balances"], + }) assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/sessions" end should "support requests with args: account_holder, permissions, filters" do - Stripe::FinancialConnections::Session.create( - { - account_holder: { type: "customer", customer: "cus_xxxxxxxxxxxxx" }, - permissions: %w[payment_method balances], - filters: { countries: ["US"] }, - } - ) + Stripe::FinancialConnections::Session.create({ + account_holder: { + type: "customer", + customer: "cus_xxxxxxxxxxxxx", + }, + permissions: %w[payment_method balances], + filters: { countries: ["US"] }, + }) assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/sessions" end end @@ -827,15 +836,18 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_requested :get, "#{Stripe.api_base}/v1/invoices/in_xxxxxxxxxxxxx?" end should "support requests with args: id, expand" do - Stripe::Invoice.retrieve({ expand: ["customer"], id: "in_xxxxxxxxxxxxx" }) + Stripe::Invoice.retrieve({ + expand: ["customer"], + id: "in_xxxxxxxxxxxxx", + }) assert_requested :get, "#{Stripe.api_base}/v1/invoices/in_xxxxxxxxxxxxx?expand[0]=customer" end end context "Invoice.search" do should "support requests with args: query" do - Stripe::Invoice.search( - { query: "total>999 AND metadata['order_id']:'6735'" } - ) + Stripe::Invoice.search({ + query: "total>999 AND metadata['order_id']:'6735'", + }) assert_requested :get, "#{Stripe.api_base}/v1/invoices/search?query=total>999 AND metadata['order_id']:'6735'" end end @@ -868,9 +880,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "InvoiceItem.create" do should "support requests with args: customer, price" do - Stripe::InvoiceItem.create( - { customer: "cus_xxxxxxxxxxxxx", price: "price_xxxxxxxxxxxxx" } - ) + Stripe::InvoiceItem.create({ + customer: "cus_xxxxxxxxxxxxx", + price: "price_xxxxxxxxxxxxx", + }) assert_requested :post, "#{Stripe.api_base}/v1/invoiceitems" end end @@ -936,9 +949,11 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Issuing.Card.create" do should "support requests with args: cardholder, currency, type" do - Stripe::Issuing::Card.create( - { cardholder: "ich_xxxxxxxxxxxxx", currency: "usd", type: "virtual" } - ) + Stripe::Issuing::Card.create({ + cardholder: "ich_xxxxxxxxxxxxx", + currency: "usd", + type: "virtual", + }) assert_requested :post, "#{Stripe.api_base}/v1/issuing/cards" end end @@ -989,23 +1004,21 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Issuing.Cardholder.create" do should "support requests with args: type, name, email, phone_number, billing" do - Stripe::Issuing::Cardholder.create( - { - type: "individual", - name: "Jenny Rosen", - email: "jenny.rosen@example.com", - phone_number: "+18888675309", - billing: { - address: { - line1: "1234 Main Street", - city: "San Francisco", - state: "CA", - country: "US", - postal_code: "94111", - }, + Stripe::Issuing::Cardholder.create({ + type: "individual", + name: "Jenny Rosen", + email: "jenny.rosen@example.com", + phone_number: "+18888675309", + billing: { + address: { + line1: "1234 Main Street", + city: "San Francisco", + state: "CA", + country: "US", + postal_code: "94111", }, - } - ) + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/issuing/cardholders" end end @@ -1032,15 +1045,13 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Issuing.Dispute.create" do should "support requests with args: transaction, evidence" do - Stripe::Issuing::Dispute.create( - { - transaction: "ipi_xxxxxxxxxxxxx", - evidence: { - reason: "fraudulent", - fraudulent: { explanation: "Purchase was unrecognized." }, - }, - } - ) + Stripe::Issuing::Dispute.create({ + transaction: "ipi_xxxxxxxxxxxxx", + evidence: { + reason: "fraudulent", + fraudulent: { explanation: "Purchase was unrecognized." }, + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/issuing/disputes" end end @@ -1118,33 +1129,30 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "PaymentIntent.create" do should "support requests with args: amount, currency, automatic_payment_methods" do - Stripe::PaymentIntent.create( - { - amount: 1099, - currency: "eur", - automatic_payment_methods: { enabled: true }, - } - ) + Stripe::PaymentIntent.create({ + amount: 1099, + currency: "eur", + automatic_payment_methods: { enabled: true }, + }) assert_requested :post, "#{Stripe.api_base}/v1/payment_intents" end should "support requests with args: amount, currency, automatic_payment_methods2" do - Stripe::PaymentIntent.create( - { - amount: 2000, - currency: "usd", - automatic_payment_methods: { enabled: true }, - } - ) + Stripe::PaymentIntent.create({ + amount: 2000, + currency: "usd", + automatic_payment_methods: { enabled: true }, + }) assert_requested :post, "#{Stripe.api_base}/v1/payment_intents" end should "support requests with args: amount, currency, payment_method_data" do - Stripe::PaymentIntent.create( - { - amount: 200, - currency: "usd", - payment_method_data: { type: "p24", p24: { bank: "blik" } }, - } - ) + Stripe::PaymentIntent.create({ + amount: 200, + currency: "usd", + payment_method_data: { + type: "p24", + p24: { bank: "blik" }, + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/payment_intents" end end @@ -1171,9 +1179,9 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "PaymentIntent.search" do should "support requests with args: query" do - Stripe::PaymentIntent.search( - { query: "status:'succeeded' AND metadata['order_id']:'6735'" } - ) + Stripe::PaymentIntent.search({ + query: "status:'succeeded' AND metadata['order_id']:'6735'", + }) assert_requested :get, "#{Stripe.api_base}/v1/payment_intents/search?query=status:'succeeded' AND metadata['order_id']:'6735'" end end @@ -1201,15 +1209,25 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "PaymentLink.create" do should "support requests with args: line_items" do - Stripe::PaymentLink.create( - { line_items: [{ price: "price_xxxxxxxxxxxxx", quantity: 1 }] } - ) + Stripe::PaymentLink.create({ + line_items: [ + { + price: "price_xxxxxxxxxxxxx", + quantity: 1, + }, + ], + }) assert_requested :post, "#{Stripe.api_base}/v1/payment_links" end should "support requests with args: line_items2" do - Stripe::PaymentLink.create( - { line_items: [{ price: "price_xxxxxxxxxxxxx", quantity: 1 }] } - ) + Stripe::PaymentLink.create({ + line_items: [ + { + price: "price_xxxxxxxxxxxxx", + quantity: 1, + }, + ], + }) assert_requested :post, "#{Stripe.api_base}/v1/payment_links" end end @@ -1252,17 +1270,15 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "PaymentMethod.create" do should "support requests with args: type, card" do - Stripe::PaymentMethod.create( - { - type: "card", - card: { - number: "4242424242424242", - exp_month: 8, - exp_year: 2024, - cvc: "314", - }, - } - ) + Stripe::PaymentMethod.create({ + type: "card", + card: { + number: "4242424242424242", + exp_month: 8, + exp_year: 2024, + cvc: "314", + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/payment_methods" end end @@ -1274,9 +1290,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "PaymentMethod.list" do should "support requests with args: customer, type" do - Stripe::PaymentMethod.list( - { customer: "cus_xxxxxxxxxxxxx", type: "card" } - ) + Stripe::PaymentMethod.list({ + customer: "cus_xxxxxxxxxxxxx", + type: "card", + }) assert_requested :get, "#{Stripe.api_base}/v1/payment_methods?customer=cus_xxxxxxxxxxxxx&type=card" end end @@ -1303,7 +1320,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Payout.create" do should "support requests with args: amount, currency" do - Stripe::Payout.create({ amount: 1100, currency: "usd" }) + Stripe::Payout.create({ + amount: 1100, + currency: "usd", + }) assert_requested :post, "#{Stripe.api_base}/v1/payouts" end end @@ -1355,25 +1375,21 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Plan.create" do should "support requests with args: amount, currency, interval, product" do - Stripe::Plan.create( - { - amount: 2000, - currency: "usd", - interval: "month", - product: "prod_xxxxxxxxxxxxx", - } - ) + Stripe::Plan.create({ + amount: 2000, + currency: "usd", + interval: "month", + product: "prod_xxxxxxxxxxxxx", + }) assert_requested :post, "#{Stripe.api_base}/v1/plans" end should "support requests with args: amount, currency, interval, product2" do - Stripe::Plan.create( - { - amount: 2000, - currency: "usd", - interval: "month", - product: { name: "My product" }, - } - ) + Stripe::Plan.create({ + amount: 2000, + currency: "usd", + interval: "month", + product: { name: "My product" }, + }) assert_requested :post, "#{Stripe.api_base}/v1/plans" end end @@ -1406,29 +1422,25 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Price.create" do should "support requests with args: unit_amount, currency, currency_options, recurring, product" do - Stripe::Price.create( - { - unit_amount: 2000, - currency: "usd", - currency_options: { - uah: { unit_amount: 5000 }, - eur: { unit_amount: 1800 }, - }, - recurring: { interval: "month" }, - product: "prod_xxxxxxxxxxxxx", - } - ) + Stripe::Price.create({ + unit_amount: 2000, + currency: "usd", + currency_options: { + uah: { unit_amount: 5000 }, + eur: { unit_amount: 1800 }, + }, + recurring: { interval: "month" }, + product: "prod_xxxxxxxxxxxxx", + }) assert_requested :post, "#{Stripe.api_base}/v1/prices" end should "support requests with args: unit_amount, currency, recurring, product" do - Stripe::Price.create( - { - unit_amount: 2000, - currency: "usd", - recurring: { interval: "month" }, - product: "prod_xxxxxxxxxxxxx", - } - ) + Stripe::Price.create({ + unit_amount: 2000, + currency: "usd", + recurring: { interval: "month" }, + product: "prod_xxxxxxxxxxxxx", + }) assert_requested :post, "#{Stripe.api_base}/v1/prices" end end @@ -1446,9 +1458,9 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Price.search" do should "support requests with args: query" do - Stripe::Price.search( - { query: "active:'true' AND metadata['order_id']:'6735'" } - ) + Stripe::Price.search({ + query: "active:'true' AND metadata['order_id']:'6735'", + }) assert_requested :get, "#{Stripe.api_base}/v1/prices/search?query=active:'true' AND metadata['order_id']:'6735'" end end @@ -1487,9 +1499,9 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Product.search" do should "support requests with args: query" do - Stripe::Product.search( - { query: "active:'true' AND metadata['order_id']:'6735'" } - ) + Stripe::Product.search({ + query: "active:'true' AND metadata['order_id']:'6735'", + }) assert_requested :get, "#{Stripe.api_base}/v1/products/search?query=active:'true' AND metadata['order_id']:'6735'" end end @@ -1543,12 +1555,15 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Quote.create" do should "support requests with args: customer, line_items" do - Stripe::Quote.create( - { - customer: "cus_xxxxxxxxxxxxx", - line_items: [{ price: "price_xxxxxxxxxxxxx", quantity: 2 }], - } - ) + Stripe::Quote.create({ + customer: "cus_xxxxxxxxxxxxx", + line_items: [ + { + price: "price_xxxxxxxxxxxxx", + quantity: 2, + }, + ], + }) assert_requested :post, "#{Stripe.api_base}/v1/quotes" end end @@ -1564,6 +1579,12 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_requested :get, "#{Stripe.api_base}/v1/quotes?limit=3" end end + context "Quote.list_line_items" do + should "support requests with args: id" do + Stripe::Quote.list_line_items("qt_xxxxxxxxxxxxx") + assert_requested :get, "#{Stripe.api_base}/v1/quotes/qt_xxxxxxxxxxxxx/line_items?" + end + end context "Quote.retrieve" do should "support requests with args: id" do Stripe::Quote.retrieve("qt_xxxxxxxxxxxxx") @@ -1590,13 +1611,11 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Radar.ValueList.create" do should "support requests with args: alias, name, item_type" do - Stripe::Radar::ValueList.create( - { - alias: "custom_ip_xxxxxxxxxxxxx", - name: "Custom IP Blocklist", - item_type: "ip_address", - } - ) + Stripe::Radar::ValueList.create({ + alias: "custom_ip_xxxxxxxxxxxxx", + name: "Custom IP Blocklist", + item_type: "ip_address", + }) assert_requested :post, "#{Stripe.api_base}/v1/radar/value_lists" end end @@ -1629,9 +1648,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Radar.ValueListItem.create" do should "support requests with args: value_list, value" do - Stripe::Radar::ValueListItem.create( - { value_list: "rsl_xxxxxxxxxxxxx", value: "1.2.3.4" } - ) + Stripe::Radar::ValueListItem.create({ + value_list: "rsl_xxxxxxxxxxxxx", + value: "1.2.3.4", + }) assert_requested :post, "#{Stripe.api_base}/v1/radar/value_list_items" end end @@ -1643,9 +1663,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Radar.ValueListItem.list" do should "support requests with args: limit, value_list" do - Stripe::Radar::ValueListItem.list( - { limit: 3, value_list: "rsl_xxxxxxxxxxxxx" } - ) + Stripe::Radar::ValueListItem.list({ + limit: 3, + value_list: "rsl_xxxxxxxxxxxxx", + }) assert_requested :get, "#{Stripe.api_base}/v1/radar/value_list_items?limit=3&value_list=rsl_xxxxxxxxxxxxx" end end @@ -1696,12 +1717,13 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Reporting.ReportRun.create" do should "support requests with args: report_type, parameters" do - Stripe::Reporting::ReportRun.create( - { - report_type: "balance.summary.1", - parameters: { interval_start: 1_522_540_800, interval_end: 1_525_132_800 }, - } - ) + Stripe::Reporting::ReportRun.create({ + report_type: "balance.summary.1", + parameters: { + interval_start: 1_522_540_800, + interval_end: 1_525_132_800, + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/reporting/report_runs" end end @@ -1774,7 +1796,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "SetupAttempt.list" do should "support requests with args: limit, setup_intent" do - Stripe::SetupAttempt.list({ limit: 3, setup_intent: "si_xyz" }) + Stripe::SetupAttempt.list({ + limit: 3, + setup_intent: "si_xyz", + }) assert_requested :get, "#{Stripe.api_base}/v1/setup_attempts?limit=3&setup_intent=si_xyz" end end @@ -1835,23 +1860,25 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "ShippingRate.create" do should "support requests with args: display_name, fixed_amount, type" do - Stripe::ShippingRate.create( - { - display_name: "Sample Shipper", - fixed_amount: { currency: "usd", amount: 400 }, - type: "fixed_amount", - } - ) + Stripe::ShippingRate.create({ + display_name: "Sample Shipper", + fixed_amount: { + currency: "usd", + amount: 400, + }, + type: "fixed_amount", + }) assert_requested :post, "#{Stripe.api_base}/v1/shipping_rates" end should "support requests with args: display_name, type, fixed_amount" do - Stripe::ShippingRate.create( - { - display_name: "Ground shipping", - type: "fixed_amount", - fixed_amount: { amount: 500, currency: "usd" }, - } - ) + Stripe::ShippingRate.create({ + display_name: "Ground shipping", + type: "fixed_amount", + fixed_amount: { + amount: 500, + currency: "usd", + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/shipping_rates" end end @@ -1913,12 +1940,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Subscription.create" do should "support requests with args: customer, items" do - Stripe::Subscription.create( - { - customer: "cus_xxxxxxxxxxxxx", - items: [{ price: "price_xxxxxxxxxxxxx" }], - } - ) + Stripe::Subscription.create({ + customer: "cus_xxxxxxxxxxxxx", + items: [{ price: "price_xxxxxxxxxxxxx" }], + }) assert_requested :post, "#{Stripe.api_base}/v1/subscriptions" end end @@ -1936,9 +1961,9 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Subscription.search" do should "support requests with args: query" do - Stripe::Subscription.search( - { query: "status:'active' AND metadata['order_id']:'6735'" } - ) + Stripe::Subscription.search({ + query: "status:'active' AND metadata['order_id']:'6735'", + }) assert_requested :get, "#{Stripe.api_base}/v1/subscriptions/search?query=status:'active' AND metadata['order_id']:'6735'" end end @@ -1953,13 +1978,11 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "SubscriptionItem.create" do should "support requests with args: subscription, price, quantity" do - Stripe::SubscriptionItem.create( - { - subscription: "sub_xxxxxxxxxxxxx", - price: "price_xxxxxxxxxxxxx", - quantity: 2, - } - ) + Stripe::SubscriptionItem.create({ + subscription: "sub_xxxxxxxxxxxxx", + price: "price_xxxxxxxxxxxxx", + quantity: 2, + }) assert_requested :post, "#{Stripe.api_base}/v1/subscription_items" end end @@ -1998,19 +2021,22 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "SubscriptionSchedule.create" do should "support requests with args: customer, start_date, end_behavior, phases" do - Stripe::SubscriptionSchedule.create( - { - customer: "cus_xxxxxxxxxxxxx", - start_date: 1_676_070_661, - end_behavior: "release", - phases: [ - { - items: [{ price: "price_xxxxxxxxxxxxx", quantity: 1 }], - iterations: 12, - }, - ], - } - ) + Stripe::SubscriptionSchedule.create({ + customer: "cus_xxxxxxxxxxxxx", + start_date: 1_676_070_661, + end_behavior: "release", + phases: [ + { + items: [ + { + price: "price_xxxxxxxxxxxxx", + quantity: 1, + }, + ], + iterations: 12, + }, + ], + }) assert_requested :post, "#{Stripe.api_base}/v1/subscription_schedules" end end @@ -2049,9 +2075,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Tax.Transaction.create_from_calculation" do should "support requests with args: calculation, reference" do - Stripe::Tax::Transaction.create_from_calculation( - { calculation: "xxx", reference: "yyy" } - ) + Stripe::Tax::Transaction.create_from_calculation({ + calculation: "xxx", + reference: "yyy", + }) assert_requested :post, "#{Stripe.api_base}/v1/tax/transactions/create_from_calculation" end end @@ -2090,15 +2117,13 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "TaxRate.create" do should "support requests with args: display_name, description, jurisdiction, percentage, inclusive" do - Stripe::TaxRate.create( - { - display_name: "VAT", - description: "VAT Germany", - jurisdiction: "DE", - percentage: 16, - inclusive: false, - } - ) + Stripe::TaxRate.create({ + display_name: "VAT", + description: "VAT Germany", + jurisdiction: "DE", + percentage: 16, + inclusive: false, + }) assert_requested :post, "#{Stripe.api_base}/v1/tax_rates" end end @@ -2126,9 +2151,9 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_requested :post, "#{Stripe.api_base}/v1/terminal/configurations?" end should "support requests with args: bbpos_wisepos_e" do - Stripe::Terminal::Configuration.create( - { bbpos_wisepos_e: { splashscreen: "file_xxxxxxxxxxxxx" } } - ) + Stripe::Terminal::Configuration.create({ + bbpos_wisepos_e: { splashscreen: "file_xxxxxxxxxxxxx" }, + }) assert_requested :post, "#{Stripe.api_base}/v1/terminal/configurations" end end @@ -2186,18 +2211,16 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Terminal.Location.create" do should "support requests with args: display_name, address" do - Stripe::Terminal::Location.create( - { - display_name: "My First Store", - address: { - line1: "1234 Main Street", - city: "San Francisco", - postal_code: "94111", - state: "CA", - country: "US", - }, - } - ) + Stripe::Terminal::Location.create({ + display_name: "My First Store", + address: { + line1: "1234 Main Street", + city: "San Francisco", + postal_code: "94111", + state: "CA", + country: "US", + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/terminal/locations" end end @@ -2236,13 +2259,11 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Terminal.Reader.create" do should "support requests with args: registration_code, label, location" do - Stripe::Terminal::Reader.create( - { - registration_code: "puppies-plug-could", - label: "Blue Rabbit", - location: "tml_1234", - } - ) + Stripe::Terminal::Reader.create({ + registration_code: "puppies-plug-could", + label: "Blue Rabbit", + location: "tml_1234", + }) assert_requested :post, "#{Stripe.api_base}/v1/terminal/readers" end end @@ -2309,9 +2330,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "TestHelpers.TestClock.create" do should "support requests with args: frozen_time, name" do - Stripe::TestHelpers::TestClock.create( - { frozen_time: 123, name: "cogsworth" } - ) + Stripe::TestHelpers::TestClock.create({ + frozen_time: 123, + name: "cogsworth", + }) assert_requested :post, "#{Stripe.api_base}/v1/test_helpers/test_clocks" end should "support requests with args: frozen_time" do @@ -2351,31 +2373,27 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Token.create" do should "support requests with args: card" do - Stripe::Token.create( - { - card: { - number: "4242424242424242", - exp_month: "5", - exp_year: "2023", - cvc: "314", - }, - } - ) + Stripe::Token.create({ + card: { + number: "4242424242424242", + exp_month: "5", + exp_year: "2023", + cvc: "314", + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/tokens" end should "support requests with args: bank_account" do - Stripe::Token.create( - { - bank_account: { - country: "US", - currency: "usd", - account_holder_name: "Jenny Rosen", - account_holder_type: "individual", - routing_number: "110000000", - account_number: "000123456789", - }, - } - ) + Stripe::Token.create({ + bank_account: { + country: "US", + currency: "usd", + account_holder_name: "Jenny Rosen", + account_holder_type: "individual", + routing_number: "110000000", + account_number: "000123456789", + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/tokens" end should "support requests with args: pii" do @@ -2383,26 +2401,25 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_requested :post, "#{Stripe.api_base}/v1/tokens" end should "support requests with args: account" do - Stripe::Token.create( - { - account: { - individual: { first_name: "Jane", last_name: "Doe" }, - tos_shown_and_accepted: true, + Stripe::Token.create({ + account: { + individual: { + first_name: "Jane", + last_name: "Doe", }, - } - ) + tos_shown_and_accepted: true, + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/tokens" end should "support requests with args: person" do - Stripe::Token.create( - { - person: { - first_name: "Jane", - last_name: "Doe", - relationship: { owner: true }, - }, - } - ) + Stripe::Token.create({ + person: { + first_name: "Jane", + last_name: "Doe", + relationship: { owner: true }, + }, + }) assert_requested :post, "#{Stripe.api_base}/v1/tokens" end should "support requests with args: cvc_update" do @@ -2424,14 +2441,12 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Topup.create" do should "support requests with args: amount, currency, description, statement_descriptor" do - Stripe::Topup.create( - { - amount: 2000, - currency: "usd", - description: "Top-up for Jenny Rosen", - statement_descriptor: "Top-up", - } - ) + Stripe::Topup.create({ + amount: 2000, + currency: "usd", + description: "Top-up for Jenny Rosen", + statement_descriptor: "Top-up", + }) assert_requested :post, "#{Stripe.api_base}/v1/topups" end end @@ -2455,14 +2470,12 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Transfer.create" do should "support requests with args: amount, currency, destination, transfer_group" do - Stripe::Transfer.create( - { - amount: 400, - currency: "usd", - destination: "acct_xxxxxxxxxxxxx", - transfer_group: "ORDER_95", - } - ) + Stripe::Transfer.create({ + amount: 400, + currency: "usd", + destination: "acct_xxxxxxxxxxxxx", + transfer_group: "ORDER_95", + }) assert_requested :post, "#{Stripe.api_base}/v1/transfers" end end @@ -2489,17 +2502,18 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.CreditReversal.create" do should "support requests with args: received_credit" do - Stripe::Treasury::CreditReversal.create( - { received_credit: "rc_xxxxxxxxxxxxx" } - ) + Stripe::Treasury::CreditReversal.create({ + received_credit: "rc_xxxxxxxxxxxxx", + }) assert_requested :post, "#{Stripe.api_base}/v1/treasury/credit_reversals" end end context "Treasury.CreditReversal.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::CreditReversal.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::CreditReversal.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/credit_reversals?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2511,17 +2525,18 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.DebitReversal.create" do should "support requests with args: received_debit" do - Stripe::Treasury::DebitReversal.create( - { received_debit: "rd_xxxxxxxxxxxxx" } - ) + Stripe::Treasury::DebitReversal.create({ + received_debit: "rd_xxxxxxxxxxxxx", + }) assert_requested :post, "#{Stripe.api_base}/v1/treasury/debit_reversals" end end context "Treasury.DebitReversal.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::DebitReversal.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::DebitReversal.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/debit_reversals?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2533,9 +2548,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.FinancialAccount.create" do should "support requests with args: supported_currencies, features" do - Stripe::Treasury::FinancialAccount.create( - { supported_currencies: ["usd"], features: {} } - ) + Stripe::Treasury::FinancialAccount.create({ + supported_currencies: ["usd"], + features: {}, + }) assert_requested :post, "#{Stripe.api_base}/v1/treasury/financial_accounts" end end @@ -2574,15 +2590,13 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.InboundTransfer.create" do should "support requests with args: financial_account, amount, currency, origin_payment_method, description" do - Stripe::Treasury::InboundTransfer.create( - { - financial_account: "fa_xxxxxxxxxxxxx", - amount: 10_000, - currency: "usd", - origin_payment_method: "pm_xxxxxxxxxxxxx", - description: "InboundTransfer from my bank account", - } - ) + Stripe::Treasury::InboundTransfer.create({ + financial_account: "fa_xxxxxxxxxxxxx", + amount: 10_000, + currency: "usd", + origin_payment_method: "pm_xxxxxxxxxxxxx", + description: "InboundTransfer from my bank account", + }) assert_requested :post, "#{Stripe.api_base}/v1/treasury/inbound_transfers" end end @@ -2597,9 +2611,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.InboundTransfer.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::InboundTransfer.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::InboundTransfer.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/inbound_transfers?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2611,9 +2626,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.InboundTransfer.return_inbound_transfer" do should "support requests with args: id" do - Stripe::Treasury::InboundTransfer::TestHelpers.return_inbound_transfer( - "ibt_123" - ) + Stripe::Treasury::InboundTransfer::TestHelpers.return_inbound_transfer("ibt_123") assert_requested :post, "#{Stripe.api_base}/v1/test_helpers/treasury/inbound_transfers/ibt_123/return?" end end @@ -2631,24 +2644,23 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.OutboundPayment.create" do should "support requests with args: financial_account, amount, currency, customer, destination_payment_method, description" do - Stripe::Treasury::OutboundPayment.create( - { - financial_account: "fa_xxxxxxxxxxxxx", - amount: 10_000, - currency: "usd", - customer: "cus_xxxxxxxxxxxxx", - destination_payment_method: "pm_xxxxxxxxxxxxx", - description: "OutboundPayment to a 3rd party", - } - ) + Stripe::Treasury::OutboundPayment.create({ + financial_account: "fa_xxxxxxxxxxxxx", + amount: 10_000, + currency: "usd", + customer: "cus_xxxxxxxxxxxxx", + destination_payment_method: "pm_xxxxxxxxxxxxx", + description: "OutboundPayment to a 3rd party", + }) assert_requested :post, "#{Stripe.api_base}/v1/treasury/outbound_payments" end end context "Treasury.OutboundPayment.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::OutboundPayment.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::OutboundPayment.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/outbound_payments?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2666,15 +2678,13 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.OutboundTransfer.create" do should "support requests with args: financial_account, destination_payment_method, amount, currency, description" do - Stripe::Treasury::OutboundTransfer.create( - { - financial_account: "fa_xxxxxxxxxxxxx", - destination_payment_method: "pm_xxxxxxxxxxxxx", - amount: 500, - currency: "usd", - description: "OutboundTransfer to my external bank account", - } - ) + Stripe::Treasury::OutboundTransfer.create({ + financial_account: "fa_xxxxxxxxxxxxx", + destination_payment_method: "pm_xxxxxxxxxxxxx", + amount: 500, + currency: "usd", + description: "OutboundTransfer to my external bank account", + }) assert_requested :post, "#{Stripe.api_base}/v1/treasury/outbound_transfers" end end @@ -2686,9 +2696,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.OutboundTransfer.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::OutboundTransfer.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::OutboundTransfer.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/outbound_transfers?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2715,22 +2726,21 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.ReceivedCredit.create" do should "support requests with args: financial_account, network, amount, currency" do - Stripe::Treasury::ReceivedCredit::TestHelpers.create( - { - financial_account: "fa_123", - network: "ach", - amount: 1234, - currency: "usd", - } - ) + Stripe::Treasury::ReceivedCredit::TestHelpers.create({ + financial_account: "fa_123", + network: "ach", + amount: 1234, + currency: "usd", + }) assert_requested :post, "#{Stripe.api_base}/v1/test_helpers/treasury/received_credits" end end context "Treasury.ReceivedCredit.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::ReceivedCredit.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::ReceivedCredit.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/received_credits?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2742,22 +2752,21 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.ReceivedDebit.create" do should "support requests with args: financial_account, network, amount, currency" do - Stripe::Treasury::ReceivedDebit::TestHelpers.create( - { - financial_account: "fa_123", - network: "ach", - amount: 1234, - currency: "usd", - } - ) + Stripe::Treasury::ReceivedDebit::TestHelpers.create({ + financial_account: "fa_123", + network: "ach", + amount: 1234, + currency: "usd", + }) assert_requested :post, "#{Stripe.api_base}/v1/test_helpers/treasury/received_debits" end end context "Treasury.ReceivedDebit.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::ReceivedDebit.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::ReceivedDebit.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/received_debits?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2769,9 +2778,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.Transaction.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::Transaction.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::Transaction.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/transactions?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2783,9 +2793,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "Treasury.TransactionEntry.list" do should "support requests with args: financial_account, limit" do - Stripe::Treasury::TransactionEntry.list( - { financial_account: "fa_xxxxxxxxxxxxx", limit: 3 } - ) + Stripe::Treasury::TransactionEntry.list({ + financial_account: "fa_xxxxxxxxxxxxx", + limit: 3, + }) assert_requested :get, "#{Stripe.api_base}/v1/treasury/transaction_entries?financial_account=fa_xxxxxxxxxxxxx&limit=3" end end @@ -2797,12 +2808,10 @@ class CodegennedExampleTest < Test::Unit::TestCase end context "WebhookEndpoint.create" do should "support requests with args: url, enabled_events" do - Stripe::WebhookEndpoint.create( - { - url: "https://example.com/my/webhook/endpoint", - enabled_events: ["charge.failed", "charge.succeeded"], - } - ) + Stripe::WebhookEndpoint.create({ + url: "https://example.com/my/webhook/endpoint", + enabled_events: ["charge.failed", "charge.succeeded"], + }) assert_requested :post, "#{Stripe.api_base}/v1/webhook_endpoints" end end