diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 038066775..ce44fb5bb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1370 \ No newline at end of file +v1381 \ No newline at end of file diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index 700487bc9..ada96dfee 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -36,682 +36,231 @@ def self.object_name class BusinessProfile < Stripe::StripeObject class AnnualRevenue < Stripe::StripeObject - # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. - attr_reader :fiscal_year_end + attr_reader :amount, :currency, :fiscal_year_end end class MonthlyEstimatedRevenue < Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency + attr_reader :amount, :currency end class SupportAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state - end - # The applicant's gross annual revenue for its preceding fiscal year. - attr_reader :annual_revenue - # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. - attr_reader :estimated_worker_count - # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. - attr_reader :mcc - # Attribute for field monthly_estimated_revenue - attr_reader :monthly_estimated_revenue - # The customer-facing business name. - attr_reader :name - # Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. - attr_reader :product_description - # A publicly available mailing address for sending support issues to. - attr_reader :support_address - # A publicly available email address for sending support issues to. - attr_reader :support_email - # A publicly available phone number to call with support issues. - attr_reader :support_phone - # A publicly available website for handling support issues. - attr_reader :support_url - # The business's publicly available website. - attr_reader :url + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :annual_revenue, :estimated_worker_count, :mcc, :monthly_estimated_revenue, :name, :product_description, :support_address, :support_email, :support_phone, :support_url, :url end class Capabilities < Stripe::StripeObject - # The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. - attr_reader :acss_debit_payments - # The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. - attr_reader :affirm_payments - # The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. - attr_reader :afterpay_clearpay_payments - # The status of the Alma capability of the account, or whether the account can directly process Alma payments. - attr_reader :alma_payments - # The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. - attr_reader :amazon_pay_payments - # The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. - attr_reader :au_becs_debit_payments - # The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. - attr_reader :bacs_debit_payments - # The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. - attr_reader :bancontact_payments - # The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. - attr_reader :bank_transfer_payments - # The status of the blik payments capability of the account, or whether the account can directly process blik charges. - attr_reader :blik_payments - # The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. - attr_reader :boleto_payments - # The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards - attr_reader :card_issuing - # The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. - attr_reader :card_payments - # The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. - attr_reader :cartes_bancaires_payments - # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. - attr_reader :cashapp_payments - # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. - attr_reader :eps_payments - # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. - attr_reader :fpx_payments - # The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. - attr_reader :gb_bank_transfer_payments - # The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. - attr_reader :giropay_payments - # The status of the Gopay capability of the account, or whether the account can directly process Gopay payments. - attr_reader :gopay_payments - # The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. - attr_reader :grabpay_payments - # The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges. - attr_reader :id_bank_transfer_payments - # The status of Bank BCA onboarding of the account. - attr_reader :id_bank_transfer_payments_bca - # The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. - attr_reader :ideal_payments - # The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. - attr_reader :india_international_payments - # The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. - attr_reader :jcb_payments - # The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. - attr_reader :jp_bank_transfer_payments - # The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. - attr_reader :kakao_pay_payments - # The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. - attr_reader :klarna_payments - # The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. - attr_reader :konbini_payments - # The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. - attr_reader :kr_card_payments - # The status of the legacy payments capability of the account. - attr_reader :legacy_payments - # The status of the link_payments capability of the account, or whether the account can directly process Link charges. - attr_reader :link_payments - # The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. - attr_reader :mb_way_payments - # The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. - attr_reader :mobilepay_payments - # The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. - attr_reader :multibanco_payments - # The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. - attr_reader :mx_bank_transfer_payments - # The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. - attr_reader :naver_pay_payments - # The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. - attr_reader :oxxo_payments - # The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. - attr_reader :p24_payments - # The status of the Payco capability of the account, or whether the account can directly process Payco payments. - attr_reader :payco_payments - # The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. - attr_reader :paynow_payments - # The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges. - attr_reader :paypal_payments - # The status of the PayTo capability of the account, or whether the account can directly process PayTo charges. - attr_reader :payto_payments - # The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. - attr_reader :promptpay_payments - # The status of the Qris capability of the account, or whether the account can directly process Qris payments. - attr_reader :qris_payments - # The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments. - attr_reader :rechnung_payments - # The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. - attr_reader :revolut_pay_payments - # The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. - attr_reader :samsung_pay_payments - # The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. - attr_reader :sepa_bank_transfer_payments - # The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. - attr_reader :sepa_debit_payments - # The status of the ShopeePay capability of the account, or whether the account can directly process ShopeePay payments. - attr_reader :shopeepay_payments - # The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. - attr_reader :sofort_payments - # The status of the Swish capability of the account, or whether the account can directly process Swish payments. - attr_reader :swish_payments - # The status of the tax reporting 1099-K (US) capability of the account. - attr_reader :tax_reporting_us_1099_k - # The status of the tax reporting 1099-MISC (US) capability of the account. - attr_reader :tax_reporting_us_1099_misc - # The status of the transfers capability of the account, or whether your platform can transfer funds to the account. - attr_reader :transfers - # The status of the banking capability, or whether the account can have bank accounts. - attr_reader :treasury - # The status of the treasury_evolve capability of the account. - attr_reader :treasury_evolve - # The status of the treasury_fifth_third capability of the account. - attr_reader :treasury_fifth_third - # The status of the treasury_goldman_sachs capability of the account. - attr_reader :treasury_goldman_sachs - # The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. - attr_reader :twint_payments - # The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. - attr_reader :us_bank_account_ach_payments - # The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. - attr_reader :us_bank_transfer_payments - # The status of the Zip capability of the account, or whether the account can directly process Zip charges. - attr_reader :zip_payments + attr_reader :acss_debit_payments, :affirm_payments, :afterpay_clearpay_payments, :alma_payments, :amazon_pay_payments, :au_becs_debit_payments, :automatic_indirect_tax, :bacs_debit_payments, :bancontact_payments, :bank_transfer_payments, :blik_payments, :boleto_payments, :card_issuing, :card_payments, :cartes_bancaires_payments, :cashapp_payments, :eps_payments, :fpx_payments, :gb_bank_transfer_payments, :giropay_payments, :gopay_payments, :grabpay_payments, :id_bank_transfer_payments, :id_bank_transfer_payments_bca, :ideal_payments, :india_international_payments, :jcb_payments, :jp_bank_transfer_payments, :kakao_pay_payments, :klarna_payments, :konbini_payments, :kr_card_payments, :legacy_payments, :link_payments, :mb_way_payments, :mobilepay_payments, :multibanco_payments, :mx_bank_transfer_payments, :naver_pay_payments, :oxxo_payments, :p24_payments, :payco_payments, :paynow_payments, :paypal_payments, :payto_payments, :promptpay_payments, :qris_payments, :rechnung_payments, :revolut_pay_payments, :samsung_pay_payments, :sepa_bank_transfer_payments, :sepa_debit_payments, :shopeepay_payments, :sofort_payments, :swish_payments, :tax_reporting_us_1099_k, :tax_reporting_us_1099_misc, :transfers, :treasury, :treasury_evolve, :treasury_fifth_third, :treasury_goldman_sachs, :twint_payments, :us_bank_account_ach_payments, :us_bank_transfer_payments, :zip_payments end class Company < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class AddressKana < Stripe::StripeObject - # City/Ward. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Block/Building number. - attr_reader :line1 - # Building details. - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # Prefecture. - attr_reader :state - # Town/cho-me. - attr_reader :town + attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town end class AddressKanji < Stripe::StripeObject - # City/Ward. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Block/Building number. - attr_reader :line1 - # Building details. - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # Prefecture. - attr_reader :state - # Town/cho-me. - attr_reader :town + attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town end class OwnershipDeclaration < Stripe::StripeObject - # The Unix timestamp marking when the beneficial owner attestation was made. - attr_reader :date - # The IP address from which the beneficial owner attestation was made. - attr_reader :ip - # The user-agent string from the browser where the beneficial owner attestation was made. - attr_reader :user_agent + attr_reader :date, :ip, :user_agent end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject - # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. - attr_reader :back - # A user-displayable string describing the verification state of this document. - attr_reader :details - # One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. - attr_reader :details_code - # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. - attr_reader :front + attr_reader :back, :details, :details_code, :front end - # Attribute for field document attr_reader :document end - # Attribute for field address - attr_reader :address - # The Kana variation of the company's primary address (Japan only). - attr_reader :address_kana - # The Kanji variation of the company's primary address (Japan only). - attr_reader :address_kanji - # Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). - attr_reader :directors_provided - # Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. - attr_reader :executives_provided - # The export license ID number of the company, also referred as Import Export Code (India only). - attr_reader :export_license_id - # The purpose code to use for export transactions (India only). - attr_reader :export_purpose_code - # The company's legal name. - attr_reader :name - # The Kana variation of the company's legal name (Japan only). - attr_reader :name_kana - # The Kanji variation of the company's legal name (Japan only). - attr_reader :name_kanji - # Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). - attr_reader :owners_provided - # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - attr_reader :ownership_declaration - # The company's phone number (used for verification). - attr_reader :phone - # The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. - attr_reader :structure - # Whether the company's business ID number was provided. - attr_reader :tax_id_provided - # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). - attr_reader :tax_id_registrar - # Whether the company's business VAT number was provided. - attr_reader :vat_id_provided - # Information on the verification state of the company. - attr_reader :verification + attr_reader :address, :address_kana, :address_kanji, :directors_provided, :executives_provided, :export_license_id, :export_purpose_code, :name, :name_kana, :name_kanji, :owners_provided, :ownership_declaration, :phone, :structure, :tax_id_provided, :tax_id_registrar, :vat_id_provided, :verification end class Controller < Stripe::StripeObject class Application < Stripe::StripeObject - # `true` if the Connect application is responsible for negative balances and should manage credit and fraud risk on the account. - attr_reader :loss_liable - # `true` if the Connect application is responsible for onboarding the account. - attr_reader :onboarding_owner - # `true` if the Connect application is responsible for paying Stripe fees on pricing-control eligible products. - attr_reader :pricing_controls + attr_reader :loss_liable, :onboarding_owner, :pricing_controls end class Dashboard < Stripe::StripeObject - # Whether this account has access to the full Stripe dashboard (`full`), to the Express dashboard (`express`), or to no dashboard (`none`). attr_reader :type end class Fees < Stripe::StripeObject - # A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). attr_reader :payer end class Losses < Stripe::StripeObject - # A value indicating who is liable when this account can't pay back negative balances from payments. attr_reader :payments end class StripeDashboard < Stripe::StripeObject - # A value indicating the Stripe dashboard this account has access to independent of the Connect application. attr_reader :type end - # Attribute for field application - attr_reader :application - # Attribute for field dashboard - attr_reader :dashboard - # Attribute for field fees - attr_reader :fees - # `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. - attr_reader :is_controller - # Attribute for field losses - attr_reader :losses - # A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. - attr_reader :requirement_collection - # Attribute for field stripe_dashboard - attr_reader :stripe_dashboard - # The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. - attr_reader :type + attr_reader :application, :dashboard, :fees, :is_controller, :losses, :requirement_collection, :stripe_dashboard, :type end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. - attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. - attr_reader :original_fields_due + attr_reader :alternative_fields_due, :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. - attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. - attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. - attr_reader :requirement - end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. - attr_reader :alternatives - # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. - attr_reader :current_deadline - # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. - attr_reader :currently_due - # This is typed as an enum for consistency with `requirements.disabled_reason`. - attr_reader :disabled_reason - # Fields that are `currently_due` and need to be collected again because validation or verification failed. - attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. - attr_reader :eventually_due - # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. - attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. - attr_reader :pending_verification + attr_reader :code, :reason, :requirement + end + attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification end class Groups < Stripe::StripeObject - # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. attr_reader :payments_pricing end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. - attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. - attr_reader :original_fields_due + attr_reader :alternative_fields_due, :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. - attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. - attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. - attr_reader :requirement - end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. - attr_reader :alternatives - # Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. - attr_reader :current_deadline - # Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. - attr_reader :currently_due - # If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). - attr_reader :disabled_reason - # Fields that are `currently_due` and need to be collected again because validation or verification failed. - attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. - attr_reader :eventually_due - # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. - attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. - attr_reader :pending_verification + attr_reader :code, :reason, :requirement + end + attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification end class RiskControls < Stripe::StripeObject class Charges < Stripe::StripeObject - # Whether a pause of the risk control has been requested. attr_reader :pause_requested end class Payouts < Stripe::StripeObject - # Whether a pause of the risk control has been requested. attr_reader :pause_requested end - # Attribute for field charges - attr_reader :charges - # Attribute for field payouts - attr_reader :payouts + attr_reader :charges, :payouts end class Settings < Stripe::StripeObject class BacsDebitPayments < Stripe::StripeObject - # The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. - attr_reader :display_name - # The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. - attr_reader :service_user_number + attr_reader :display_name, :service_user_number end class BankBcaOnboarding < Stripe::StripeObject - # Bank BCA business account holder name. - attr_reader :account_holder_name - # Bank BCA business account number. - attr_reader :business_account_number + attr_reader :account_holder_name, :business_account_number end class Branding < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. - attr_reader :icon - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. - attr_reader :logo - # A CSS hex color value representing the primary branding color for this account - attr_reader :primary_color - # A CSS hex color value representing the secondary branding color for this account - attr_reader :secondary_color + attr_reader :icon, :logo, :primary_color, :secondary_color end class Capital < Stripe::StripeObject - # Per-currency mapping of user-selected destination accounts used to pay out loans. - attr_reader :payout_destination - # Per-currency mapping of all destination accounts eligible to receive loan payouts. - attr_reader :payout_destination_selector + attr_reader :payout_destination, :payout_destination_selector end class CardIssuing < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject - # The Unix timestamp marking when the account representative accepted the service agreement. - attr_reader :date - # The IP address from which the account representative accepted the service agreement. - attr_reader :ip - # The user agent of the browser from which the account representative accepted the service agreement. - attr_reader :user_agent + attr_reader :date, :ip, :user_agent end - # Attribute for field tos_acceptance attr_reader :tos_acceptance end class CardPayments < Stripe::StripeObject class DeclineOn < Stripe::StripeObject - # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. - attr_reader :avs_failure - # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. - attr_reader :cvc_failure + attr_reader :avs_failure, :cvc_failure end - # Attribute for field decline_on - attr_reader :decline_on - # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. - attr_reader :statement_descriptor_prefix - # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. - attr_reader :statement_descriptor_prefix_kana - # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. - attr_reader :statement_descriptor_prefix_kanji + attr_reader :decline_on, :statement_descriptor_prefix, :statement_descriptor_prefix_kana, :statement_descriptor_prefix_kanji end class Dashboard < Stripe::StripeObject - # The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. - attr_reader :display_name - # The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). - attr_reader :timezone + attr_reader :display_name, :timezone end class Invoices < Stripe::StripeObject - # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. attr_reader :default_account_tax_ids end class Payments < Stripe::StripeObject - # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. - attr_reader :statement_descriptor - # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - attr_reader :statement_descriptor_kana - # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - attr_reader :statement_descriptor_kanji - # The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - attr_reader :statement_descriptor_prefix_kana - # The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - attr_reader :statement_descriptor_prefix_kanji + attr_reader :statement_descriptor, :statement_descriptor_kana, :statement_descriptor_kanji, :statement_descriptor_prefix_kana, :statement_descriptor_prefix_kanji end class Payouts < Stripe::StripeObject class Schedule < Stripe::StripeObject - # The number of days charges for the account will be held before being paid out. - attr_reader :delay_days - # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. - attr_reader :interval - # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. - attr_reader :monthly_anchor - # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. - attr_reader :weekly_anchor + attr_reader :delay_days, :interval, :monthly_anchor, :weekly_anchor end - # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. - attr_reader :debit_negative_balances - # Attribute for field schedule - attr_reader :schedule - # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. - attr_reader :statement_descriptor + attr_reader :debit_negative_balances, :schedule, :statement_descriptor end class SepaDebitPayments < Stripe::StripeObject - # SEPA creditor identifier that identifies the company making the payment. attr_reader :creditor_id end class TaxForms < Stripe::StripeObject - # Whether the account opted out of receiving their tax forms by postal delivery. attr_reader :consented_to_paperless_delivery end class Treasury < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject - # The Unix timestamp marking when the account representative accepted the service agreement. - attr_reader :date - # The IP address from which the account representative accepted the service agreement. - attr_reader :ip - # The user agent of the browser from which the account representative accepted the service agreement. - attr_reader :user_agent + attr_reader :date, :ip, :user_agent end - # Attribute for field tos_acceptance attr_reader :tos_acceptance end - # Attribute for field bacs_debit_payments - attr_reader :bacs_debit_payments - # Attribute for field bank_bca_onboarding - attr_reader :bank_bca_onboarding - # Attribute for field branding - attr_reader :branding - # Attribute for field capital - attr_reader :capital - # Attribute for field card_issuing - attr_reader :card_issuing - # Attribute for field card_payments - attr_reader :card_payments - # Attribute for field dashboard - attr_reader :dashboard - # Attribute for field invoices - attr_reader :invoices - # Attribute for field payments - attr_reader :payments - # Attribute for field payouts - attr_reader :payouts - # Attribute for field sepa_debit_payments - attr_reader :sepa_debit_payments - # Attribute for field tax_forms - attr_reader :tax_forms - # Attribute for field treasury - attr_reader :treasury + attr_reader :bacs_debit_payments, :bank_bca_onboarding, :branding, :capital, :card_issuing, :card_payments, :dashboard, :invoices, :payments, :payouts, :sepa_debit_payments, :tax_forms, :treasury end class TosAcceptance < Stripe::StripeObject - # The Unix timestamp marking when the account representative accepted their service agreement - attr_reader :date - # The IP address from which the account representative accepted their service agreement - attr_reader :ip - # The user's service agreement type - attr_reader :service_agreement - # The user agent of the browser from which the account representative accepted their service agreement - attr_reader :user_agent + attr_reader :date, :ip, :service_agreement, :user_agent end # Business information about the account. attr_reader :business_profile - # The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :business_type - # Attribute for field capabilities attr_reader :capabilities - # Whether the account can process charges. attr_reader :charges_enabled - # Attribute for field company attr_reader :company - # Attribute for field controller attr_reader :controller - # The account's country. attr_reader :country - # Time at which the account was connected. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). attr_reader :default_currency - # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. attr_reader :details_submitted - # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. attr_reader :email - # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. attr_reader :external_accounts - # Attribute for field future_requirements attr_reader :future_requirements - # The groups associated with the account. attr_reader :groups - # Unique identifier for the object. attr_reader :id - # This is an object representing a person associated with a Stripe account. # # A platform cannot access a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. # # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). attr_reader :individual - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Whether the funds in this account can be paid out. attr_reader :payouts_enabled - # Attribute for field requirements attr_reader :requirements - # Attribute for field risk_controls attr_reader :risk_controls - # Options for customizing how the account functions within Stripe. attr_reader :settings - # Attribute for field tos_acceptance attr_reader :tos_acceptance - # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. attr_reader :type - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/account_link.rb b/lib/stripe/resources/account_link.rb index 368d81591..ff0d0a71f 100644 --- a/lib/stripe/resources/account_link.rb +++ b/lib/stripe/resources/account_link.rb @@ -16,13 +16,10 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The timestamp at which this account link will expire. attr_reader :expires_at - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The URL for the account link. attr_reader :url diff --git a/lib/stripe/resources/account_notice.rb b/lib/stripe/resources/account_notice.rb index 82dfcb57e..fe9061dd7 100644 --- a/lib/stripe/resources/account_notice.rb +++ b/lib/stripe/resources/account_notice.rb @@ -15,49 +15,30 @@ def self.object_name end class Email < Stripe::StripeObject - # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. - attr_reader :plain_text - # Email address of the recipient. - attr_reader :recipient - # Subject of the email. - attr_reader :subject + attr_reader :plain_text, :recipient, :subject end class LinkedObjects < Stripe::StripeObject - # Associated [Capability](https://stripe.com/docs/api/capabilities) - attr_reader :capability - # Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record) - attr_reader :issuing_credit_underwriting_record - # Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes) - attr_reader :issuing_dispute + attr_reader :capability, :issuing_credit_underwriting_record, :issuing_dispute end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # When present, the deadline for sending the notice to meet the relevant regulations. attr_reader :deadline - # Information about the email when sent. attr_reader :email - # Unique identifier for the object. attr_reader :id - # Information about objects related to the notice. attr_reader :linked_objects - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. attr_reader :reason - # Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. attr_reader :sent_at diff --git a/lib/stripe/resources/account_session.rb b/lib/stripe/resources/account_session.rb index 704770da3..f01411839 100644 --- a/lib/stripe/resources/account_session.rb +++ b/lib/stripe/resources/account_session.rb @@ -20,218 +20,103 @@ def self.object_name class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. - attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. - attr_reader :external_account_collection + attr_reader :disable_stripe_user_authentication, :external_account_collection end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. - attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. - attr_reader :external_account_collection + attr_reader :disable_stripe_user_authentication, :external_account_collection end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class Balances < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. - attr_reader :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. - attr_reader :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. - attr_reader :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. - attr_reader :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. - attr_reader :standard_payouts + attr_reader :disable_stripe_user_authentication, :edit_payout_schedule, :external_account_collection, :instant_payouts, :standard_payouts end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class CapitalFinancing < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class CapitalFinancingApplication < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class CapitalFinancingPromotion < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class Documents < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. - attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. - attr_reader :external_account_collection + attr_reader :disable_stripe_user_authentication, :external_account_collection end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class PaymentDetails < Stripe::StripeObject class Features < Stripe::StripeObject - # Whether to allow capturing and cancelling payment intents. This is `true` by default. - attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. - attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. - attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. - attr_reader :refund_management + attr_reader :capture_payments, :destination_on_behalf_of_charge_management, :dispute_management, :refund_management end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class Payments < Stripe::StripeObject class Features < Stripe::StripeObject - # Whether to allow capturing and cancelling payment intents. This is `true` by default. - attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. - attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. - attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. - attr_reader :refund_management + attr_reader :capture_payments, :destination_on_behalf_of_charge_management, :dispute_management, :refund_management end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. - attr_reader :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. - attr_reader :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. - attr_reader :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. - attr_reader :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. - attr_reader :standard_payouts + attr_reader :disable_stripe_user_authentication, :edit_payout_schedule, :external_account_collection, :instant_payouts, :standard_payouts end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class PayoutsList < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class TaxRegistrations < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end class TaxSettings < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. - attr_reader :enabled - # Attribute for field features - attr_reader :features + attr_reader :enabled, :features end - # Attribute for field account_management - attr_reader :account_management - # Attribute for field account_onboarding - attr_reader :account_onboarding - # Attribute for field balances - attr_reader :balances - # Attribute for field capital_financing - attr_reader :capital_financing - # Attribute for field capital_financing_application - attr_reader :capital_financing_application - # Attribute for field capital_financing_promotion - attr_reader :capital_financing_promotion - # Attribute for field documents - attr_reader :documents - # Attribute for field notification_banner - attr_reader :notification_banner - # Attribute for field payment_details - attr_reader :payment_details - # Attribute for field payments - attr_reader :payments - # Attribute for field payouts - attr_reader :payouts - # Attribute for field payouts_list - attr_reader :payouts_list - # Attribute for field tax_registrations - attr_reader :tax_registrations - # Attribute for field tax_settings - attr_reader :tax_settings + attr_reader :account_management, :account_onboarding, :balances, :capital_financing, :capital_financing_application, :capital_financing_promotion, :documents, :notification_banner, :payment_details, :payments, :payouts, :payouts_list, :tax_registrations, :tax_settings end # The ID of the account the AccountSession was created for attr_reader :account - # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. # # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. attr_reader :client_secret - # Attribute for field components attr_reader :components - # The timestamp at which this AccountSession will expire. attr_reader :expires_at - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/apple_pay_domain.rb b/lib/stripe/resources/apple_pay_domain.rb index 9591dd34d..72e69dc1a 100644 --- a/lib/stripe/resources/apple_pay_domain.rb +++ b/lib/stripe/resources/apple_pay_domain.rb @@ -15,19 +15,14 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Attribute for field domain_name attr_reader :domain_name - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/application.rb b/lib/stripe/resources/application.rb index 22c9d820c..1e97598e2 100644 --- a/lib/stripe/resources/application.rb +++ b/lib/stripe/resources/application.rb @@ -10,13 +10,10 @@ def self.object_name # Unique identifier for the object. attr_reader :id - # The name of the application. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Always true for a deleted object attr_reader :deleted end diff --git a/lib/stripe/resources/application_fee.rb b/lib/stripe/resources/application_fee.rb index b7f89da17..1aeb9b833 100644 --- a/lib/stripe/resources/application_fee.rb +++ b/lib/stripe/resources/application_fee.rb @@ -14,55 +14,36 @@ def self.object_name nested_resource_class_methods :refund, operations: %i[create retrieve update list] class FeeSource < Stripe::StripeObject - # Charge ID that created this application fee. - attr_reader :charge - # Payout ID that created this application fee. - attr_reader :payout - # Type of object that created the application fee, either `charge` or `payout`. - attr_reader :type + attr_reader :charge, :payout, :type end # ID of the Stripe account this fee was taken from. attr_reader :account - # Amount earned, in cents (or local equivalent). attr_reader :amount - # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) attr_reader :amount_refunded - # ID of the Connect application that earned the fee. attr_reader :application - # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). attr_reader :balance_transaction - # ID of the charge that the application fee was taken from. attr_reader :charge - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. attr_reader :fee_source - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. attr_reader :originating_transaction - # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. attr_reader :refunded - # A list of refunds that have been applied to the fee. attr_reader :refunds diff --git a/lib/stripe/resources/application_fee_refund.rb b/lib/stripe/resources/application_fee_refund.rb index ef38db767..1878dd6f5 100644 --- a/lib/stripe/resources/application_fee_refund.rb +++ b/lib/stripe/resources/application_fee_refund.rb @@ -17,25 +17,18 @@ def self.object_name # Amount, in cents (or local equivalent). attr_reader :amount - # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # ID of the application fee that was refunded. attr_reader :fee - # Unique identifier for the object. attr_reader :id - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/apps/secret.rb b/lib/stripe/resources/apps/secret.rb index d6feca9a7..22c3c44fe 100644 --- a/lib/stripe/resources/apps/secret.rb +++ b/lib/stripe/resources/apps/secret.rb @@ -22,35 +22,24 @@ def self.object_name end class Scope < Stripe::StripeObject - # The secret scope type. - attr_reader :type - # The user ID, if type is set to "user" - attr_reader :user + attr_reader :type, :user end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # If true, indicates that this secret has been deleted attr_reader :deleted - # The Unix timestamp for the expiry time of the secret, after which the secret deletes. attr_reader :expires_at - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # A name for the secret that's unique within the scope. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The plaintext secret value to be stored. attr_reader :payload - # Attribute for field scope attr_reader :scope diff --git a/lib/stripe/resources/balance.rb b/lib/stripe/resources/balance.rb index db95d9cad..34817c27c 100644 --- a/lib/stripe/resources/balance.rb +++ b/lib/stripe/resources/balance.rb @@ -21,129 +21,60 @@ def self.object_name class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. - attr_reader :bank_account - # Amount for card. - attr_reader :card - # Amount for FPX. - attr_reader :fpx + attr_reader :bank_account, :card, :fpx end - # Balance amount. - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # Attribute for field source_types - attr_reader :source_types + attr_reader :amount, :currency, :source_types end class ConnectReserved < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. - attr_reader :bank_account - # Amount for card. - attr_reader :card - # Amount for FPX. - attr_reader :fpx + attr_reader :bank_account, :card, :fpx end - # Balance amount. - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # Attribute for field source_types - attr_reader :source_types + attr_reader :amount, :currency, :source_types end class InstantAvailable < Stripe::StripeObject class NetAvailable < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. - attr_reader :bank_account - # Amount for card. - attr_reader :card - # Amount for FPX. - attr_reader :fpx + attr_reader :bank_account, :card, :fpx end - # Net balance amount, subtracting fees from platform-set pricing. - attr_reader :amount - # ID of the external account for this net balance (not expandable). - attr_reader :destination - # Attribute for field source_types - attr_reader :source_types + attr_reader :amount, :destination, :source_types end class SourceTypes < Stripe::StripeObject - # Amount for bank account. - attr_reader :bank_account - # Amount for card. - attr_reader :card - # Amount for FPX. - attr_reader :fpx + attr_reader :bank_account, :card, :fpx end - # Balance amount. - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # Breakdown of balance by destination. - attr_reader :net_available - # Attribute for field source_types - attr_reader :source_types + attr_reader :amount, :currency, :net_available, :source_types end class Issuing < Stripe::StripeObject class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. - attr_reader :bank_account - # Amount for card. - attr_reader :card - # Amount for FPX. - attr_reader :fpx + attr_reader :bank_account, :card, :fpx end - # Balance amount. - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # Attribute for field source_types - attr_reader :source_types + attr_reader :amount, :currency, :source_types end - # Funds that are available for use. attr_reader :available end class Pending < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. - attr_reader :bank_account - # Amount for card. - attr_reader :card - # Amount for FPX. - attr_reader :fpx + attr_reader :bank_account, :card, :fpx end - # Balance amount. - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # Attribute for field source_types - attr_reader :source_types + attr_reader :amount, :currency, :source_types end # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. attr_reader :available - # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. attr_reader :connect_reserved - # Funds that you can pay out using Instant Payouts. attr_reader :instant_available - # Attribute for field issuing attr_reader :issuing - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. attr_reader :pending end diff --git a/lib/stripe/resources/balance_transaction.rb b/lib/stripe/resources/balance_transaction.rb index f621a5694..61b0751cb 100644 --- a/lib/stripe/resources/balance_transaction.rb +++ b/lib/stripe/resources/balance_transaction.rb @@ -15,59 +15,36 @@ def self.object_name end class FeeDetail < Stripe::StripeObject - # Amount of the fee, in cents. - attr_reader :amount - # ID of the Connect application that earned the fee. - attr_reader :application - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description - # Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. - attr_reader :type + attr_reader :amount, :application, :currency, :description, :type end # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. attr_reader :amount - # The date that the transaction's net funds become available in the Stripe balance. attr_reader :available_on - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. attr_reader :exchange_rate - # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. attr_reader :fee - # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. attr_reader :fee_details - # Unique identifier for the object. attr_reader :id - # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` attr_reader :net - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. attr_reader :reporting_category - # This transaction relates to the Stripe object. attr_reader :source - # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. attr_reader :status - # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. attr_reader :type diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index babead1f1..180b1d218 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -21,100 +21,57 @@ def self.object_name class FutureRequirements < Stripe::StripeObject class Error < Stripe::StripeObject - # The code for the type of error. - attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. - attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. - attr_reader :requirement + attr_reader :code, :reason, :requirement end - # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. - attr_reader :currently_due - # Fields that are `currently_due` and need to be collected again because validation or verification failed. - attr_reader :errors - # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. - attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. - attr_reader :pending_verification + attr_reader :currently_due, :errors, :past_due, :pending_verification end class Requirements < Stripe::StripeObject class Error < Stripe::StripeObject - # The code for the type of error. - attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. - attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. - attr_reader :requirement + attr_reader :code, :reason, :requirement end - # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. - attr_reader :currently_due - # Fields that are `currently_due` and need to be collected again because validation or verification failed. - attr_reader :errors - # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. - attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. - attr_reader :pending_verification + attr_reader :currently_due, :errors, :past_due, :pending_verification end # The ID of the account that the bank account is associated with. attr_reader :account - # The name of the person or business that owns the bank account. attr_reader :account_holder_name - # The type of entity that holds the account. This can be either `individual` or `company`. attr_reader :account_holder_type - # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. attr_reader :account_type - # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. attr_reader :available_payout_methods - # Name of the bank associated with the routing number (e.g., `WELLS FARGO`). attr_reader :bank_name - # Two-letter ISO code representing the country the bank account is located in. attr_reader :country - # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. attr_reader :currency - # The ID of the customer that the bank account is associated with. attr_reader :customer - # Whether this bank account is the default external account for its currency. attr_reader :default_for_currency - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. attr_reader :fingerprint - # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. attr_reader :future_requirements - # Unique identifier for the object. attr_reader :id - # The last four digits of the bank account number. attr_reader :last4 - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Information about the requirements for the bank account, including what information needs to be collected. attr_reader :requirements - # The routing transit number for the bank account. attr_reader :routing_number - # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. # # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. attr_reader :status - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/billing/alert.rb b/lib/stripe/resources/billing/alert.rb index 80e07a356..e2e9a8b67 100644 --- a/lib/stripe/resources/billing/alert.rb +++ b/lib/stripe/resources/billing/alert.rb @@ -15,38 +15,22 @@ def self.object_name class UsageThreshold < Stripe::StripeObject class Filter < Stripe::StripeObject - # Limit the scope of the alert to this customer ID - attr_reader :customer - # Attribute for field type - attr_reader :type + attr_reader :customer, :type end - # The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. - attr_reader :filters - # The value at which this alert will trigger. - attr_reader :gte - # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. - attr_reader :meter - # Defines how the alert will behave. - attr_reader :recurrence + attr_reader :filters, :gte, :meter, :recurrence end # Defines the type of the alert. attr_reader :alert_type - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Status of the alert. This can be active, inactive or archived. attr_reader :status - # Title of the alert. attr_reader :title - # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). attr_reader :usage_threshold diff --git a/lib/stripe/resources/billing/alert_triggered.rb b/lib/stripe/resources/billing/alert_triggered.rb index dae67e1b0..e89df9388 100644 --- a/lib/stripe/resources/billing/alert_triggered.rb +++ b/lib/stripe/resources/billing/alert_triggered.rb @@ -11,19 +11,14 @@ def self.object_name # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. attr_reader :alert - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # ID of customer for which the alert triggered attr_reader :customer - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The value triggering the alert attr_reader :value end diff --git a/lib/stripe/resources/billing/credit_balance_summary.rb b/lib/stripe/resources/billing/credit_balance_summary.rb index ce61e18ca..f3684f8dd 100644 --- a/lib/stripe/resources/billing/credit_balance_summary.rb +++ b/lib/stripe/resources/billing/credit_balance_summary.rb @@ -13,43 +13,25 @@ def self.object_name class Balance < Stripe::StripeObject class AvailableBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount. - attr_reader :value + attr_reader :currency, :value end - # The monetary amount. - attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. - attr_reader :type + attr_reader :monetary, :type end class LedgerBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount. - attr_reader :value + attr_reader :currency, :value end - # The monetary amount. - attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. - attr_reader :type + attr_reader :monetary, :type end - # Attribute for field available_balance - attr_reader :available_balance - # Attribute for field ledger_balance - attr_reader :ledger_balance + attr_reader :available_balance, :ledger_balance end # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. attr_reader :balances - # The customer the balance is for. attr_reader :customer - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/billing/credit_balance_transaction.rb b/lib/stripe/resources/billing/credit_balance_transaction.rb index 840f67067..4070db5c1 100644 --- a/lib/stripe/resources/billing/credit_balance_transaction.rb +++ b/lib/stripe/resources/billing/credit_balance_transaction.rb @@ -15,80 +15,48 @@ def self.object_name class Credit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount. - attr_reader :value + attr_reader :currency, :value end - # The monetary amount. - attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. - attr_reader :type + attr_reader :monetary, :type end - # Attribute for field amount - attr_reader :amount - # The type of credit transaction. - attr_reader :type + attr_reader :amount, :type end class Debit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount. - attr_reader :value + attr_reader :currency, :value end - # The monetary amount. - attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. - attr_reader :type + attr_reader :monetary, :type end class CreditsApplied < Stripe::StripeObject - # The invoice to which the billing credits were applied. - attr_reader :invoice - # The invoice line item to which the billing credits were applied. - attr_reader :invoice_line_item + attr_reader :invoice, :invoice_line_item end - # Attribute for field amount - attr_reader :amount - # Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. - attr_reader :credits_applied - # The type of debit transaction. - attr_reader :type + attr_reader :amount, :credits_applied, :type end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Credit details for this credit balance transaction. Only present if type is `credit`. attr_reader :credit - # The credit grant associated with this credit balance transaction. attr_reader :credit_grant - # Debit details for this credit balance transaction. Only present if type is `debit`. attr_reader :debit - # The effective time of this credit balance transaction. attr_reader :effective_at - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # ID of the test clock this credit balance transaction belongs to. attr_reader :test_clock - # The type of credit balance transaction (credit or debit). attr_reader :type - # Retrieve a list of credit balance transactions + # Retrieve a list of credit balance transactions. def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb index 96e6fb2dc..19c831c36 100644 --- a/lib/stripe/resources/billing/credit_grant.rb +++ b/lib/stripe/resources/billing/credit_grant.rb @@ -18,71 +18,49 @@ def self.object_name class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount. - attr_reader :value + attr_reader :currency, :value end - # The monetary amount. - attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. - attr_reader :type + attr_reader :monetary, :type end class ApplicabilityConfig < Stripe::StripeObject class Scope < Stripe::StripeObject - # The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. attr_reader :price_type end - # Attribute for field scope attr_reader :scope end # Attribute for field amount attr_reader :amount - # Attribute for field applicability_config attr_reader :applicability_config - # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. attr_reader :category - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # ID of the customer receiving the billing credits. attr_reader :customer - - # The time when the billing credits become effective—when they're eligible for use. + # The time when the billing credits become effective-when they're eligible for use. attr_reader :effective_at - # The time when the billing credits expire. If not present, the billing credits don't expire. attr_reader :expires_at - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # A descriptive name shown in dashboard. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # ID of the test clock this credit grant belongs to. attr_reader :test_clock - # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated - # The time when this credit grant was voided. If not present, the credit grant hasn't been voided. attr_reader :voided_at - # Creates a credit grant + # Creates a credit grant. def self.create(params = {}, opts = {}) request_stripe_object( method: :post, @@ -122,7 +100,7 @@ def self.list(filters = {}, opts = {}) ) end - # Updates a credit grant + # Updates a credit grant. def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, diff --git a/lib/stripe/resources/billing/meter.rb b/lib/stripe/resources/billing/meter.rb index 467dae72d..3a96a0013 100644 --- a/lib/stripe/resources/billing/meter.rb +++ b/lib/stripe/resources/billing/meter.rb @@ -3,7 +3,7 @@ module Stripe module Billing - # A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. + # Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill. # # Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) class Meter < APIResource @@ -22,71 +22,53 @@ def self.object_name resource_plural: "event_summaries" class CustomerMapping < Stripe::StripeObject - # The key in the meter event payload to use for mapping the event to a customer. - attr_reader :event_payload_key - # The method for mapping a meter event to a customer. - attr_reader :type + attr_reader :event_payload_key, :type end class DefaultAggregation < Stripe::StripeObject - # Specifies how events are aggregated. attr_reader :formula end class StatusTransitions < Stripe::StripeObject - # The time the meter was deactivated, if any. Measured in seconds since Unix epoch. attr_reader :deactivated_at end class ValueSettings < Stripe::StripeObject - # The key in the meter event payload to use as the value for this meter. attr_reader :event_payload_key end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Attribute for field customer_mapping attr_reader :customer_mapping - # Attribute for field default_aggregation attr_reader :default_aggregation - # The meter's name. attr_reader :display_name - # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. attr_reader :event_name - # The time window to pre-aggregate meter events for, if any. attr_reader :event_time_window - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The meter's status. attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated - # Attribute for field value_settings attr_reader :value_settings - # Creates a billing meter + # Creates a billing meter. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/billing/meters", params: params, opts: opts) end - # Deactivates a billing meter + # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. def deactivate(params = {}, opts = {}) request_stripe_object( method: :post, @@ -96,7 +78,7 @@ def deactivate(params = {}, opts = {}) ) end - # Deactivates a billing meter + # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. def self.deactivate(id, params = {}, opts = {}) request_stripe_object( method: :post, @@ -111,7 +93,7 @@ def self.list(filters = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/billing/meters", params: filters, opts: opts) end - # Reactivates a billing meter + # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. def reactivate(params = {}, opts = {}) request_stripe_object( method: :post, @@ -121,7 +103,7 @@ def reactivate(params = {}, opts = {}) ) end - # Reactivates a billing meter + # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. def self.reactivate(id, params = {}, opts = {}) request_stripe_object( method: :post, @@ -131,7 +113,7 @@ def self.reactivate(id, params = {}, opts = {}) ) end - # Updates a billing meter + # Updates a billing meter. def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, diff --git a/lib/stripe/resources/billing/meter_error_report.rb b/lib/stripe/resources/billing/meter_error_report.rb index 90b42650b..3523ed1bb 100644 --- a/lib/stripe/resources/billing/meter_error_report.rb +++ b/lib/stripe/resources/billing/meter_error_report.rb @@ -13,51 +13,30 @@ class Reason < Stripe::StripeObject class ErrorType < Stripe::StripeObject class SampleError < Stripe::StripeObject class ApiRequest < Stripe::StripeObject - # Unique identifier for the object. - attr_reader :id - # idempotency_key of the request - attr_reader :idempotency_key + attr_reader :id, :idempotency_key end - # Attribute for field api_request - attr_reader :api_request - # message of the error - attr_reader :error_message + attr_reader :api_request, :error_message end - # Attribute for field sample_errors attr_reader :sample_errors end - # The number of errors generated - attr_reader :error_count - # More information about errors - attr_reader :error_types + attr_reader :error_count, :error_types end class RelatedObject < Stripe::StripeObject - # Unique identifier for the object. - attr_reader :id - # The type of meter error related object. Should be 'meter' - attr_reader :object - # The url of the meter object - attr_reader :url + attr_reader :id, :object, :url end # Unique identifier for the object. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field reason attr_reader :reason - # The related objects about the error attr_reader :related_object - # Summary of invalid events attr_reader :summary - # Time when validation ended. Measured in seconds since the Unix epoch attr_reader :validation_end - # Time when validation started. Measured in seconds since the Unix epoch attr_reader :validation_start end diff --git a/lib/stripe/resources/billing/meter_event.rb b/lib/stripe/resources/billing/meter_event.rb index eb102b29e..535f73ca2 100644 --- a/lib/stripe/resources/billing/meter_event.rb +++ b/lib/stripe/resources/billing/meter_event.rb @@ -3,8 +3,7 @@ module Stripe module Billing - # A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. - # Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing. + # Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events. class MeterEvent < APIResource extend Stripe::APIOperations::Create @@ -15,26 +14,20 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name - # A unique identifier for the event. attr_reader :identifier - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). attr_reader :payload - # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. attr_reader :timestamp - # Creates a billing meter event + # Creates a billing meter event. def self.create(params = {}, opts = {}) request_stripe_object( method: :post, diff --git a/lib/stripe/resources/billing/meter_event_adjustment.rb b/lib/stripe/resources/billing/meter_event_adjustment.rb index 27675170a..ae36332d9 100644 --- a/lib/stripe/resources/billing/meter_event_adjustment.rb +++ b/lib/stripe/resources/billing/meter_event_adjustment.rb @@ -13,28 +13,22 @@ def self.object_name end class Cancel < Stripe::StripeObject - # Unique identifier for the event. attr_reader :identifier end # Specifies which event to cancel. attr_reader :cancel - # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The meter event adjustment's status. attr_reader :status - # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. attr_reader :type - # Creates a billing meter event adjustment + # Creates a billing meter event adjustment. def self.create(params = {}, opts = {}) request_stripe_object( method: :post, diff --git a/lib/stripe/resources/billing/meter_event_summary.rb b/lib/stripe/resources/billing/meter_event_summary.rb index 4e3c6cc0a..80bdc489a 100644 --- a/lib/stripe/resources/billing/meter_event_summary.rb +++ b/lib/stripe/resources/billing/meter_event_summary.rb @@ -13,22 +13,16 @@ def self.object_name # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. attr_reader :aggregated_value - # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. attr_reader :end_time - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The meter associated with this event summary. attr_reader :meter - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. attr_reader :start_time end diff --git a/lib/stripe/resources/billing_portal/configuration.rb b/lib/stripe/resources/billing_portal/configuration.rb index 75234340d..486fdcd23 100644 --- a/lib/stripe/resources/billing_portal/configuration.rb +++ b/lib/stripe/resources/billing_portal/configuration.rb @@ -15,132 +15,72 @@ def self.object_name end class BusinessProfile < Stripe::StripeObject - # The messaging shown to customers in the portal. - attr_reader :headline - # A link to the business’s publicly available privacy policy. - attr_reader :privacy_policy_url - # A link to the business’s publicly available terms of service. - attr_reader :terms_of_service_url + attr_reader :headline, :privacy_policy_url, :terms_of_service_url end class Features < Stripe::StripeObject class CustomerUpdate < Stripe::StripeObject - # The types of customer updates that are supported. When empty, customers are not updateable. - attr_reader :allowed_updates - # Whether the feature is enabled. - attr_reader :enabled + attr_reader :allowed_updates, :enabled end class InvoiceHistory < Stripe::StripeObject - # Whether the feature is enabled. attr_reader :enabled end class PaymentMethodUpdate < Stripe::StripeObject - # Whether the feature is enabled. attr_reader :enabled end class SubscriptionCancel < Stripe::StripeObject class CancellationReason < Stripe::StripeObject - # Whether the feature is enabled. - attr_reader :enabled - # Which cancellation reasons will be given as options to the customer. - attr_reader :options + attr_reader :enabled, :options end - # Attribute for field cancellation_reason - attr_reader :cancellation_reason - # Whether the feature is enabled. - attr_reader :enabled - # Whether to cancel subscriptions immediately or at the end of the billing period. - attr_reader :mode - # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. - attr_reader :proration_behavior + attr_reader :cancellation_reason, :enabled, :mode, :proration_behavior end class SubscriptionUpdate < Stripe::StripeObject class Product < Stripe::StripeObject - # The list of price IDs which, when subscribed to, a subscription can be updated. - attr_reader :prices - # The product ID. - attr_reader :product + attr_reader :prices, :product end class ScheduleAtPeriodEnd < Stripe::StripeObject class Condition < Stripe::StripeObject - # The type of condition. attr_reader :type end - # List of conditions. When any condition is true, an update will be scheduled at the end of the current period. attr_reader :conditions end - # The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. - attr_reader :default_allowed_updates - # Whether the feature is enabled. - attr_reader :enabled - # The list of up to 10 products that support subscription updates. - attr_reader :products - # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. - attr_reader :proration_behavior - # Attribute for field schedule_at_period_end - attr_reader :schedule_at_period_end + attr_reader :default_allowed_updates, :enabled, :products, :proration_behavior, :schedule_at_period_end end - # Attribute for field customer_update - attr_reader :customer_update - # Attribute for field invoice_history - attr_reader :invoice_history - # Attribute for field payment_method_update - attr_reader :payment_method_update - # Attribute for field subscription_cancel - attr_reader :subscription_cancel - # Attribute for field subscription_update - attr_reader :subscription_update + attr_reader :customer_update, :invoice_history, :payment_method_update, :subscription_cancel, :subscription_update end class LoginPage < Stripe::StripeObject - # If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. - # - # If `false`, the previously generated `url`, if any, will be deactivated. - attr_reader :enabled - # A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. - attr_reader :url + attr_reader :enabled, :url end # Whether the configuration is active and can be used to create portal sessions. attr_reader :active - # ID of the Connect Application that created the configuration. attr_reader :application - # Attribute for field business_profile attr_reader :business_profile - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. attr_reader :default_return_url - # Attribute for field features attr_reader :features - # Unique identifier for the object. attr_reader :id - # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. attr_reader :is_default - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Attribute for field login_page attr_reader :login_page - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated diff --git a/lib/stripe/resources/billing_portal/session.rb b/lib/stripe/resources/billing_portal/session.rb index eedb26d3c..e8685da57 100644 --- a/lib/stripe/resources/billing_portal/session.rb +++ b/lib/stripe/resources/billing_portal/session.rb @@ -28,108 +28,61 @@ def self.object_name class Flow < Stripe::StripeObject class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject - # A custom message to display to the customer after the flow is completed. attr_reader :custom_message end class Redirect < Stripe::StripeObject - # The URL the customer will be redirected to after the flow is completed. attr_reader :return_url end - # Configuration when `after_completion.type=hosted_confirmation`. - attr_reader :hosted_confirmation - # Configuration when `after_completion.type=redirect`. - attr_reader :redirect - # The specified type of behavior after the flow is completed. - attr_reader :type + attr_reader :hosted_confirmation, :redirect, :type end class SubscriptionCancel < Stripe::StripeObject class Retention < Stripe::StripeObject class CouponOffer < Stripe::StripeObject - # The ID of the coupon to be offered. attr_reader :coupon end - # Configuration when `retention.type=coupon_offer`. - attr_reader :coupon_offer - # Type of retention strategy that will be used. - attr_reader :type + attr_reader :coupon_offer, :type end - # Specify a retention strategy to be used in the cancellation flow. - attr_reader :retention - # The ID of the subscription to be canceled. - attr_reader :subscription + attr_reader :retention, :subscription end class SubscriptionUpdate < Stripe::StripeObject - # The ID of the subscription to be updated. attr_reader :subscription end class SubscriptionUpdateConfirm < Stripe::StripeObject class Discount < Stripe::StripeObject - # The ID of the coupon to apply to this subscription update. - attr_reader :coupon - # The ID of a promotion code to apply to this subscription update. - attr_reader :promotion_code + attr_reader :coupon, :promotion_code end class Item < Stripe::StripeObject - # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. - attr_reader :id - # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). - attr_reader :price - # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. - attr_reader :quantity + attr_reader :id, :price, :quantity end - # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. - attr_reader :discounts - # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. - attr_reader :items - # The ID of the subscription to be updated. - attr_reader :subscription + attr_reader :discounts, :items, :subscription end - # Attribute for field after_completion - attr_reader :after_completion - # Configuration when `flow.type=subscription_cancel`. - attr_reader :subscription_cancel - # Configuration when `flow.type=subscription_update`. - attr_reader :subscription_update - # Configuration when `flow.type=subscription_update_confirm`. - attr_reader :subscription_update_confirm - # Type of flow that the customer will go through. - attr_reader :type + attr_reader :after_completion, :subscription_cancel, :subscription_update, :subscription_update_confirm, :type end # The configuration used by this session, describing the features available. attr_reader :configuration - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The ID of the customer for this session. attr_reader :customer - # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. attr_reader :flow - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. attr_reader :locale - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. attr_reader :on_behalf_of - # The URL to redirect customers to when they click on the portal's link to return to your website. attr_reader :return_url - # The short-lived URL of the session that gives customers access to the customer portal. attr_reader :url diff --git a/lib/stripe/resources/capability.rb b/lib/stripe/resources/capability.rb index d5bab2b96..6daa7d6df 100644 --- a/lib/stripe/resources/capability.rb +++ b/lib/stripe/resources/capability.rb @@ -15,92 +15,39 @@ def self.object_name class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. - attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. - attr_reader :original_fields_due + attr_reader :alternative_fields_due, :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. - attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. - attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. - attr_reader :requirement + attr_reader :code, :reason, :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. - attr_reader :alternatives - # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. - attr_reader :current_deadline - # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. - attr_reader :currently_due - # This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. - attr_reader :disabled_reason - # Fields that are `currently_due` and need to be collected again because validation or verification failed. - attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. - attr_reader :eventually_due - # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. - attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. - attr_reader :pending_verification + attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. - attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. - attr_reader :original_fields_due + attr_reader :alternative_fields_due, :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. - attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. - attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. - attr_reader :requirement + attr_reader :code, :reason, :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. - attr_reader :alternatives - # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. - attr_reader :current_deadline - # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. - attr_reader :currently_due - # Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). - attr_reader :disabled_reason - # Fields that are `currently_due` and need to be collected again because validation or verification failed. - attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. - attr_reader :eventually_due - # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. - attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. - attr_reader :pending_verification + attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification end # The account for which the capability enables functionality. attr_reader :account - # Attribute for field future_requirements attr_reader :future_requirements - # The identifier for the capability. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Whether the capability has been requested. attr_reader :requested - # Time at which the capability was requested. Measured in seconds since the Unix epoch. attr_reader :requested_at - # Attribute for field requirements attr_reader :requirements - # The status of the capability. attr_reader :status diff --git a/lib/stripe/resources/capital/financing_offer.rb b/lib/stripe/resources/capital/financing_offer.rb index a347d4c1b..28c5dee5c 100644 --- a/lib/stripe/resources/capital/financing_offer.rb +++ b/lib/stripe/resources/capital/financing_offer.rb @@ -14,86 +14,47 @@ def self.object_name end class AcceptedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. - attr_reader :advance_amount - # Currency that the financing offer is transacted in. For example, `usd`. - attr_reader :currency - # Fixed fee amount, in minor units. - attr_reader :fee_amount - # Populated when the `product_type` of the `financingoffer` is `refill`. - # Represents the discount amount on remaining premium for the existing loan at payout time. - attr_reader :previous_financing_fee_discount_amount - # Per-transaction rate at which Stripe will withhold funds to repay the financing. - attr_reader :withhold_rate + attr_reader :advance_amount, :currency, :fee_amount, :previous_financing_fee_discount_amount, :withhold_rate end class OfferedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. - attr_reader :advance_amount - # Describes the type of user the offer is being extended to. - attr_reader :campaign_type - # Currency that the financing offer is transacted in. For example, `usd`. - attr_reader :currency - # Fixed fee amount, in minor units. - attr_reader :fee_amount - # Populated when the `product_type` of the `financingoffer` is `refill`. - # Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer` - # is paid out, the `previous_financing_fee_discount_amount` will be computed as the multiple of this rate - # and the remaining fee. - attr_reader :previous_financing_fee_discount_rate - # Per-transaction rate at which Stripe will withhold funds to repay the financing. - attr_reader :withhold_rate + attr_reader :advance_amount, :campaign_type, :currency, :fee_amount, :previous_financing_fee_discount_rate, :withhold_rate end # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # the terms accepted by the Connected account, which may differ from those # offered. attr_reader :accepted_terms - # The ID of the merchant associated with this financing object. attr_reader :account - # The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. attr_reader :charged_off_at - # Time at which the offer was created. Given in seconds since unix epoch. attr_reader :created - # Time at which the offer expires. Given in seconds since unix epoch. attr_reader :expires_after - # The type of financing being offered. attr_reader :financing_type - # A unique identifier for the financing object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The object type: financing_offer. attr_reader :object - # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # both the terms offered to the Connected account. attr_reader :offered_terms - # Financing product identifier. attr_reader :product_type - # The ID of the financing offer that replaced this offer. attr_reader :replacement - # The ID of the financing offer that this offer is a replacement for. attr_reader :replacement_for - # The current status of the offer. attr_reader :status - # See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). attr_reader :type diff --git a/lib/stripe/resources/capital/financing_summary.rb b/lib/stripe/resources/capital/financing_summary.rb index dc902a45f..187fe30e5 100644 --- a/lib/stripe/resources/capital/financing_summary.rb +++ b/lib/stripe/resources/capital/financing_summary.rb @@ -13,44 +13,18 @@ def self.object_name class Details < Stripe::StripeObject class CurrentRepaymentInterval < Stripe::StripeObject - # The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited. - # Given in seconds since unix epoch. - attr_reader :due_at - # The amount that has already been paid in the current repayment interval. - attr_reader :paid_amount - # The amount that is yet to be paid in the current repayment interval. - attr_reader :remaining_amount + attr_reader :due_at, :paid_amount, :remaining_amount end - # Amount of financing offered, in minor units. - attr_reader :advance_amount - # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. - attr_reader :advance_paid_out_at - # Currency that the financing offer is transacted in. For example, `usd`. - attr_reader :currency - # The chronologically current repayment interval for the financing offer. - attr_reader :current_repayment_interval - # Fixed fee amount, in minor units. - attr_reader :fee_amount - # The amount the Connected account has paid toward the financing debt so far. - attr_reader :paid_amount - # The balance remaining to be paid on the financing, in minor units. - attr_reader :remaining_amount - # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. - attr_reader :repayments_begin_at - # Per-transaction rate at which Stripe will withhold funds to repay the financing. - attr_reader :withhold_rate + attr_reader :advance_amount, :advance_paid_out_at, :currency, :current_repayment_interval, :fee_amount, :paid_amount, :remaining_amount, :repayments_begin_at, :withhold_rate end # Additional information about the financing summary. Describes currency, advance amount, # fee amount, withhold rate, remaining amount, paid amount, current repayment interval, # repayment start date, and advance payout date. attr_reader :details - # The Financing Offer ID this Financing Summary corresponds to attr_reader :financing_offer - # The object type: financing_summary attr_reader :object - # Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. attr_reader :status end diff --git a/lib/stripe/resources/capital/financing_transaction.rb b/lib/stripe/resources/capital/financing_transaction.rb index 851d1dcbc..77a156cc4 100644 --- a/lib/stripe/resources/capital/financing_transaction.rb +++ b/lib/stripe/resources/capital/financing_transaction.rb @@ -14,58 +14,30 @@ def self.object_name class Details < Stripe::StripeObject class Transaction < Stripe::StripeObject - # The linked payment ID. - attr_reader :charge - # The linked Treasury Financing Transaction ID. - attr_reader :treasury_transaction + attr_reader :charge, :treasury_transaction end - # The advance amount being repaid, paid out, or reversed in minor units. - attr_reader :advance_amount - # The currency of the financing transaction. - attr_reader :currency - # The fee amount being repaid, paid out, or reversed in minor units. - attr_reader :fee_amount - # The linked payment for the transaction. This field only applies to financing transactions of type `paydown` and reason `automatic_withholding`. - attr_reader :linked_payment - # The reason for the financing transaction (if applicable). - attr_reader :reason - # The reversed transaction. This field only applies to financing - # transactions of type `reversal`. - attr_reader :reversed_transaction - # The advance and fee amount being repaid, paid out, or reversed in minor units. - attr_reader :total_amount - # This is an object representing a linked transaction on a Capital Financing Transaction. - attr_reader :transaction + attr_reader :advance_amount, :currency, :fee_amount, :linked_payment, :reason, :reversed_transaction, :total_amount, :transaction end # The ID of the merchant associated with this financing transaction. attr_reader :account - # Time at which the financing transaction was created. Given in seconds since unix epoch. attr_reader :created_at - # This is an object representing a transaction on a Capital financing offer. attr_reader :details - # The Capital financing offer for this financing transaction. attr_reader :financing_offer - # A unique identifier for the financing transaction object. attr_reader :id - # The Capital transaction object that predates the Financing Transactions API and # corresponds with the balance transaction that was created as a result of this # financing transaction. attr_reader :legacy_balance_transaction_source - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The object type: financing_transaction attr_reader :object - # The type of the financing transaction. attr_reader :type - # A human-friendly description of the financing transaction. attr_reader :user_facing_description diff --git a/lib/stripe/resources/card.rb b/lib/stripe/resources/card.rb index 20f66d2b9..4904e6874 100644 --- a/lib/stripe/resources/card.rb +++ b/lib/stripe/resources/card.rb @@ -18,107 +18,74 @@ def self.object_name end class Networks < Stripe::StripeObject - # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. attr_reader :preferred end # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :account - # City/District/Suburb/Town/Village. attr_reader :address_city - # Billing address country, if provided when creating card. attr_reader :address_country - # Address line 1 (Street address/PO Box/Company name). attr_reader :address_line1 - # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. attr_reader :address_line1_check - # Address line 2 (Apartment/Suite/Unit/Building). attr_reader :address_line2 - # State/County/Province/Region. attr_reader :address_state - # ZIP or postal code. attr_reader :address_zip - # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. attr_reader :address_zip_check - # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. attr_reader :available_payout_methods - # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. attr_reader :brand - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. attr_reader :country - # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :currency - # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. attr_reader :customer - # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). attr_reader :cvc_check - # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :default_for_currency - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) attr_reader :description - # (For tokenized numbers only.) The last four digits of the device account number. attr_reader :dynamic_last4 - # Two-digit number representing the card's expiration month. attr_reader :exp_month - # Four-digit number representing the card's expiration year. attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. # # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. attr_reader :funding - # Unique identifier for the object. attr_reader :id - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) attr_reader :issuer - # The last four digits of the card. attr_reader :last4 - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Cardholder name. attr_reader :name - # Attribute for field networks attr_reader :networks - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. attr_reader :status - # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. attr_reader :tokenization_method - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/cash_balance.rb b/lib/stripe/resources/cash_balance.rb index 4aa57ffb2..6f93dca8a 100644 --- a/lib/stripe/resources/cash_balance.rb +++ b/lib/stripe/resources/cash_balance.rb @@ -10,23 +10,16 @@ def self.object_name end class Settings < Stripe::StripeObject - # The configuration for how funds that land in the customer cash balance are reconciled. - attr_reader :reconciliation_mode - # A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance - attr_reader :using_merchant_default + attr_reader :reconciliation_mode, :using_merchant_default end # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :available - # The ID of the customer whose cash balance this object represents. attr_reader :customer - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field settings attr_reader :settings diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index ebc1d0825..ef7d2e43e 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -22,155 +22,52 @@ def self.object_name class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Billing address. - attr_reader :address - # Email address. - attr_reader :email - # Full name. - attr_reader :name - # Billing phone number (including extension). - attr_reader :phone + attr_reader :address, :email, :name, :phone end class FraudDetails < Stripe::StripeObject - # Assessments from Stripe. If set, the value is `fraudulent`. - attr_reader :stripe_report - # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. - attr_reader :user_report + attr_reader :stripe_report, :user_report end class Level3 < Stripe::StripeObject class LineItem < Stripe::StripeObject - # Attribute for field discount_amount - attr_reader :discount_amount - # Attribute for field product_code - attr_reader :product_code - # Attribute for field product_description - attr_reader :product_description - # Attribute for field quantity - attr_reader :quantity - # Attribute for field tax_amount - attr_reader :tax_amount - # Attribute for field unit_cost - attr_reader :unit_cost + attr_reader :discount_amount, :product_code, :product_description, :quantity, :tax_amount, :unit_cost end - # Attribute for field customer_reference - attr_reader :customer_reference - # Attribute for field line_items - attr_reader :line_items - # Attribute for field merchant_reference - attr_reader :merchant_reference - # Attribute for field shipping_address_zip - attr_reader :shipping_address_zip - # Attribute for field shipping_amount - attr_reader :shipping_amount - # Attribute for field shipping_from_zip - attr_reader :shipping_from_zip + attr_reader :customer_reference, :line_items, :merchant_reference, :shipping_address_zip, :shipping_amount, :shipping_from_zip end class Outcome < Stripe::StripeObject class Rule < Stripe::StripeObject - # The action taken on the payment. - attr_reader :action - # Unique identifier for the object. - attr_reader :id - # The predicate to evaluate the payment against. - attr_reader :predicate + attr_reader :action, :id, :predicate end - # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. - attr_reader :network_advice_code - # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. - attr_reader :network_decline_code - # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. - attr_reader :network_status - # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. - attr_reader :reason - # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. - attr_reader :risk_level - # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. - attr_reader :risk_score - # The ID of the Radar rule that matched the payment, if applicable. - attr_reader :rule - # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. - attr_reader :seller_message - # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. - attr_reader :type + attr_reader :network_advice_code, :network_decline_code, :network_status, :reason, :risk_level, :risk_score, :rule, :seller_message, :type end class PaymentMethodDetails < Stripe::StripeObject class AchCreditTransfer < Stripe::StripeObject - # Account number to transfer funds to. - attr_reader :account_number - # Name of the bank associated with the routing number. - attr_reader :bank_name - # Routing transit number for the bank account to transfer funds to. - attr_reader :routing_number - # SWIFT code of the bank associated with the routing number. - attr_reader :swift_code + attr_reader :account_number, :bank_name, :routing_number, :swift_code end class AchDebit < Stripe::StripeObject - # Type of entity that holds the account. This can be either `individual` or `company`. - attr_reader :account_holder_type - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Two-letter ISO code representing the country the bank account is located in. - attr_reader :country - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # Routing transit number of the bank account. - attr_reader :routing_number + attr_reader :account_holder_type, :bank_name, :country, :fingerprint, :last4, :routing_number end class AcssDebit < Stripe::StripeObject - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Institution number of the bank account - attr_reader :institution_number - # Last four digits of the bank account number. - attr_reader :last4 - # ID of the mandate used to make this payment. - attr_reader :mandate - # Transit number of the bank account. - attr_reader :transit_number + attr_reader :bank_name, :fingerprint, :institution_number, :last4, :mandate, :transit_number end class Affirm < Stripe::StripeObject - # The Affirm transaction ID associated with this payment. attr_reader :transaction_id end class AfterpayClearpay < Stripe::StripeObject - # The Afterpay order ID associated with this payment intent. - attr_reader :order_id - # Order identifier shown to the merchant in Afterpay’s online portal. - attr_reader :reference + attr_reader :order_id, :reference end class Alipay < Stripe::StripeObject - # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. - attr_reader :buyer_id - # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. - attr_reader :fingerprint - # Transaction ID of this particular Alipay transaction. - attr_reader :transaction_id + attr_reader :buyer_id, :fingerprint, :transaction_id end class Alma < Stripe::StripeObject; end @@ -178,164 +75,75 @@ class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject class Funding < Stripe::StripeObject class Card < Stripe::StripeObject - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # The last four digits of the card. - attr_reader :last4 + attr_reader :brand, :country, :exp_month, :exp_year, :funding, :last4 end - # Attribute for field card - attr_reader :card - # funding type of the underlying payment method. - attr_reader :type + attr_reader :card, :type end - # Attribute for field funding attr_reader :funding end class AuBecsDebit < Stripe::StripeObject - # Bank-State-Branch number of the bank account. - attr_reader :bsb_number - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # ID of the mandate used to make this payment. - attr_reader :mandate + attr_reader :bsb_number, :fingerprint, :last4, :mandate end class BacsDebit < Stripe::StripeObject - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # ID of the mandate used to make this payment. - attr_reader :mandate - # Sort code of the bank account. (e.g., `10-20-30`) - attr_reader :sort_code + attr_reader :fingerprint, :last4, :mandate, :sort_code end class Bancontact < Stripe::StripeObject - # Bank code of bank associated with the bank account. - attr_reader :bank_code - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. - attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. - attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. - attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. - attr_reader :iban_last4 - # Preferred language of the Bancontact authorization page that the customer is redirected to. - # Can be one of `en`, `de`, `fr`, or `nl` - attr_reader :preferred_language - # Owner's verified full name. Values are verified or provided by Bancontact directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_name + attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name end class Blik < Stripe::StripeObject - # A unique and immutable identifier assigned by BLIK to every buyer. attr_reader :buyer_id end class Boleto < Stripe::StripeObject - # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_line1_check - # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_postal_code_check - # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :cvc_check + attr_reader :address_line1_check, :address_postal_code_check, :cvc_check end class DecrementalAuthorization < Stripe::StripeObject - # Indicates whether or not the decremental authorization feature is supported. attr_reader :status end class ExtendedAuthorization < Stripe::StripeObject - # Indicates whether or not the capture window is extended beyond the standard authorization. attr_reader :status end class IncrementalAuthorization < Stripe::StripeObject - # Indicates whether or not the incremental authorization feature is supported. attr_reader :status end class Installments < Stripe::StripeObject class Plan < Stripe::StripeObject - # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - attr_reader :count - # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - # One of `month`. - attr_reader :interval - # Type of installment plan, one of `fixed_count`. - attr_reader :type + attr_reader :count, :interval, :type end - # Installment plan selected for the payment. attr_reader :plan end class Multicapture < Stripe::StripeObject - # Indicates whether or not multiple captures are supported. attr_reader :status end class NetworkToken < Stripe::StripeObject - # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. attr_reader :used end class Overcapture < Stripe::StripeObject - # The maximum amount that can be captured. - attr_reader :maximum_amount_capturable - # Indicates whether or not the authorized amount can be over-captured. - attr_reader :status + attr_reader :maximum_amount_capturable, :status end class PartialAuthorization < Stripe::StripeObject - # Indicates whether the transaction requested for partial authorization feature and the authorization outcome. attr_reader :status end class ThreeDSecure < Stripe::StripeObject - # For authenticated transactions: how the customer was authenticated by - # the issuing bank. - attr_reader :authentication_flow - # The Electronic Commerce Indicator (ECI). A protocol-level field - # indicating what degree of authentication was performed. - attr_reader :electronic_commerce_indicator - # The exemption requested via 3DS and accepted by the issuer at authentication time. - attr_reader :exemption_indicator - # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on - # the outcome of Stripe's internal risk assessment. - attr_reader :exemption_indicator_applied - # Indicates the outcome of 3D Secure authentication. - attr_reader :result - # Additional information about why 3D Secure succeeded or failed based - # on the `result`. - attr_reader :result_reason - # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID - # (dsTransId) for this payment. - attr_reader :transaction_id - # The version of 3D Secure that was used. - attr_reader :version + attr_reader :authentication_flow, :electronic_commerce_indicator, :exemption_indicator, :exemption_indicator_applied, :result, :result_reason, :transaction_id, :version end class Wallet < Stripe::StripeObject @@ -346,435 +154,112 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :shipping_address + attr_reader :billing_address, :email, :name, :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :shipping_address + attr_reader :billing_address, :email, :name, :shipping_address end - # Attribute for field amex_express_checkout - attr_reader :amex_express_checkout - # Attribute for field apple_pay - attr_reader :apple_pay - # (For tokenized numbers only.) The last four digits of the device account number. - attr_reader :dynamic_last4 - # Attribute for field google_pay - attr_reader :google_pay - # Attribute for field link - attr_reader :link - # Attribute for field masterpass - attr_reader :masterpass - # Attribute for field samsung_pay - attr_reader :samsung_pay - # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - attr_reader :type - # Attribute for field visa_checkout - attr_reader :visa_checkout + attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout end - # The authorized amount. - attr_reader :amount_authorized - # The latest amount intended to be authorized by this charge. - attr_reader :amount_requested - # Authorization code on the charge. - attr_reader :authorization_code - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. - attr_reader :capture_before - # Check results by Card networks on Card address and CVC at time of payment. - attr_reader :checks - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # Attribute for field decremental_authorization - attr_reader :decremental_authorization - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Attribute for field extended_authorization - attr_reader :extended_authorization - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # Attribute for field incremental_authorization - attr_reader :incremental_authorization - # Installment details for this payment (Mexico only). - # - # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - attr_reader :installments - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # ID of the mandate used to make this payment or created by it. - attr_reader :mandate - # True if this payment was marked as MOTO and out of scope for SCA. - attr_reader :moto - # Attribute for field multicapture - attr_reader :multicapture - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :network - # If this card has network token credentials, this contains the details of the network token credentials. - attr_reader :network_token - # Attribute for field overcapture - attr_reader :overcapture - # Attribute for field partial_authorization - attr_reader :partial_authorization - # Populated if this transaction used 3D Secure authentication. - attr_reader :three_d_secure - # If this Card is part of a card wallet, this contains the details of the card wallet. - attr_reader :wallet + attr_reader :amount_authorized, :amount_requested, :authorization_code, :brand, :capture_before, :checks, :country, :decremental_authorization, :description, :exp_month, :exp_year, :extended_authorization, :fingerprint, :funding, :iin, :incremental_authorization, :installments, :issuer, :last4, :mandate, :moto, :multicapture, :network, :network_token, :overcapture, :partial_authorization, :three_d_secure, :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline - attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. - attr_reader :type + attr_reader :stored_at, :type end class Receipt < Stripe::StripeObject - # The type of account being debited or credited - attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. - attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. - attr_reader :application_preferred_name - # Identifier for this transaction. - attr_reader :authorization_code - # EMV tag 8A. A code returned by the card issuer. - attr_reader :authorization_response_code - # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. - attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. - attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. - attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. - attr_reader :transaction_status_information + attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - # The authorized amount - attr_reader :amount_authorized - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. - attr_reader :brand_product - # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. - attr_reader :capture_before - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Authorization response cryptogram. - attr_reader :emv_auth_data - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. - attr_reader :generated_card - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). - attr_reader :incremental_authorization_supported - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :network - # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. - attr_reader :network_transaction_id - # Details about payments collected offline. - attr_reader :offline - # Defines whether the authorized amount can be over-captured or not - attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. - attr_reader :preferred_locales - # How card details were read in this transaction. - attr_reader :read_method - # A collection of fields required to be displayed on receipts. Only required for EMV transactions. - attr_reader :receipt - # Attribute for field wallet - attr_reader :wallet + attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet end class Cashapp < Stripe::StripeObject - # A unique and immutable identifier assigned by Cash App to every buyer. - attr_reader :buyer_id - # A public identifier for buyers using Cash App. - attr_reader :cashtag + attr_reader :buyer_id, :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject - # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - attr_reader :bank - # Owner's verified full name. Values are verified or provided by EPS directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - # EPS rarely provides this information so the attribute is usually empty. - attr_reader :verified_name + attr_reader :bank, :verified_name end class Fpx < Stripe::StripeObject - # Account holder type, if provided. Can be one of `individual` or `company`. - attr_reader :account_holder_type - # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. - attr_reader :bank - # Unique transaction id generated by FPX for every request from the merchant - attr_reader :transaction_id + attr_reader :account_holder_type, :bank, :transaction_id end class Giropay < Stripe::StripeObject - # Bank code of bank associated with the bank account. - attr_reader :bank_code - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. - attr_reader :bic - # Owner's verified full name. Values are verified or provided by Giropay directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - # Giropay rarely provides this information so the attribute is usually empty. - attr_reader :verified_name + attr_reader :bank_code, :bank_name, :bic, :verified_name end class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject - # Unique transaction id generated by GrabPay attr_reader :transaction_id end class IdBankTransfer < Stripe::StripeObject - # Account number of the bank account to transfer funds to. - attr_reader :account_number - # Bank where the account is located. - attr_reader :bank - # Local bank code of the bank. - attr_reader :bank_code - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. - attr_reader :display_name + attr_reader :account_number, :bank, :bank_code, :bank_name, :display_name end class Ideal < Stripe::StripeObject - # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. - attr_reader :bank - # The Bank Identifier Code of the customer's bank. - attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. - attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. - attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. - attr_reader :iban_last4 - # Owner's verified full name. Values are verified or provided by iDEAL directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_name + attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name end class InteracPresent < Stripe::StripeObject class Receipt < Stripe::StripeObject - # The type of account being debited or credited - attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. - attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. - attr_reader :application_preferred_name - # Identifier for this transaction. - attr_reader :authorization_code - # EMV tag 8A. A code returned by the card issuer. - attr_reader :authorization_response_code - # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. - attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. - attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. - attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. - attr_reader :transaction_status_information + attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information end - # Card brand. Can be `interac`, `mastercard` or `visa`. - attr_reader :brand - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Authorization response cryptogram. - attr_reader :emv_auth_data - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. - attr_reader :generated_card - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :network - # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. - attr_reader :network_transaction_id - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. - attr_reader :preferred_locales - # How card details were read in this transaction. - attr_reader :read_method - # A collection of fields required to be displayed on receipts. Only required for EMV transactions. - attr_reader :receipt + attr_reader :brand, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :issuer, :last4, :network, :network_transaction_id, :preferred_locales, :read_method, :receipt end class KakaoPay < Stripe::StripeObject - # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Klarna < Stripe::StripeObject class PayerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # The payer address country attr_reader :country end - # The payer's address attr_reader :address end - # The payer details for this transaction. - attr_reader :payer_details - # The Klarna payment method used for this transaction. - # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` - attr_reader :payment_method_category - # Preferred language of the Klarna authorization page that the customer is redirected to. - # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` - attr_reader :preferred_locale + attr_reader :payer_details, :payment_method_category, :preferred_locale end class Konbini < Stripe::StripeObject class Store < Stripe::StripeObject - # The name of the convenience store chain where the payment was completed. attr_reader :chain end - # If the payment succeeded, this contains the details of the convenience store where the payment was completed. attr_reader :store end class KrCard < Stripe::StripeObject - # The local credit or debit card brand. - attr_reader :brand - # A unique identifier for the buyer as determined by the local payment processor. - attr_reader :buyer_id - # The last four digits of the card. This may not be present for American Express cards. - attr_reader :last4 + attr_reader :brand, :buyer_id, :last4 end class Link < Stripe::StripeObject - # Two-letter ISO code representing the funding source country beneath the Link payment. - # You could use this attribute to get a sense of international fees. attr_reader :country end @@ -782,142 +267,59 @@ class MbWay < Stripe::StripeObject; end class Mobilepay < Stripe::StripeObject class Card < Stripe::StripeObject - # Brand of the card used in the transaction - attr_reader :brand - # Two-letter ISO code representing the country of the card - attr_reader :country - # Two digit number representing the card's expiration month - attr_reader :exp_month - # Two digit number representing the card's expiration year - attr_reader :exp_year - # The last 4 digits of the card - attr_reader :last4 + attr_reader :brand, :country, :exp_month, :exp_year, :last4 end - # Internal card details attr_reader :card end class Multibanco < Stripe::StripeObject - # Entity number associated with this Multibanco payment. - attr_reader :entity - # Reference number associated with this Multibanco payment. - attr_reader :reference + attr_reader :entity, :reference end class NaverPay < Stripe::StripeObject - # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Oxxo < Stripe::StripeObject - # OXXO reference number attr_reader :number end class P24 < Stripe::StripeObject - # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. - attr_reader :bank - # Unique reference for this Przelewy24 payment. - attr_reader :reference - # Owner's verified full name. Values are verified or provided by Przelewy24 directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - # Przelewy24 rarely provides this information so the attribute is usually empty. - attr_reader :verified_name + attr_reader :bank, :reference, :verified_name end class Payco < Stripe::StripeObject - # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Paynow < Stripe::StripeObject - # Reference number associated with this PayNow payment attr_reader :reference end class Paypal < Stripe::StripeObject class SellerProtection < Stripe::StripeObject - # An array of conditions that are covered for the transaction, if applicable. - attr_reader :dispute_categories - # Indicates whether the transaction is eligible for PayPal's seller protection. - attr_reader :status + attr_reader :dispute_categories, :status end class Shipping < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class VerifiedAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Owner's email. Values are provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :payer_email - # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. - attr_reader :payer_id - # Owner's full name. Values provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :payer_name - # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. - attr_reader :seller_protection - # The shipping address for the customer, as supplied by the merchant at the point of payment - # execution. This shipping address will not be updated if the merchant updates the shipping - # address on the PaymentIntent after the PaymentIntent was successfully confirmed. - attr_reader :shipping - # A unique ID generated by PayPal for this transaction. - attr_reader :transaction_id - # The shipping address for the customer, as supplied by the merchant at the point of payment - # execution. This shipping address will not be updated if the merchant updates the shipping - # address on the PaymentIntent after the PaymentIntent was successfully confirmed. - attr_reader :verified_address - # Owner's verified email. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_email - # Owner's verified full name. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_name + attr_reader :payer_email, :payer_id, :payer_name, :seller_protection, :shipping, :transaction_id, :verified_address, :verified_email, :verified_name end class Payto < Stripe::StripeObject - # Bank-State-Branch number of the bank account. - attr_reader :bsb_number - # Last four digits of the bank account number. - attr_reader :last4 - # ID of the mandate used to make this payment. - attr_reader :mandate - # The PayID alias for the bank account. - attr_reader :pay_id + attr_reader :bsb_number, :last4, :mandate, :pay_id end class Pix < Stripe::StripeObject - # Unique transaction id generated by BCB attr_reader :bank_transaction_id end class Promptpay < Stripe::StripeObject - # Bill reference generated by PromptPay attr_reader :reference end @@ -927,425 +329,163 @@ class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject class Funding < Stripe::StripeObject class Card < Stripe::StripeObject - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # The last four digits of the card. - attr_reader :last4 + attr_reader :brand, :country, :exp_month, :exp_year, :funding, :last4 end - # Attribute for field card - attr_reader :card - # funding type of the underlying payment method. - attr_reader :type + attr_reader :card, :type end - # Attribute for field funding attr_reader :funding end class SamsungPay < Stripe::StripeObject - # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class SepaCreditTransfer < Stripe::StripeObject - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. - attr_reader :bic - # IBAN of the bank account to transfer funds to. - attr_reader :iban + attr_reader :bank_name, :bic, :iban end class SepaDebit < Stripe::StripeObject - # Bank code of bank associated with the bank account. - attr_reader :bank_code - # Branch code of bank associated with the bank account. - attr_reader :branch_code - # Two-letter ISO code representing the country the bank account is located in. - attr_reader :country - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four characters of the IBAN. - attr_reader :last4 - # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). - attr_reader :mandate + attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - # Bank code of bank associated with the bank account. - attr_reader :bank_code - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. - attr_reader :bic - # Two-letter ISO code representing the country the bank account is located in. - attr_reader :country - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. - attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. - attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. - attr_reader :iban_last4 - # Preferred language of the SOFORT authorization page that the customer is redirected to. - # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` - attr_reader :preferred_language - # Owner's verified full name. Values are verified or provided by SOFORT directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_name + attr_reader :bank_code, :bank_name, :bic, :country, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name end class StripeAccount < Stripe::StripeObject; end class Swish < Stripe::StripeObject - # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer - attr_reader :fingerprint - # Payer bank reference number for the payment - attr_reader :payment_reference - # The last four digits of the Swish account phone number - attr_reader :verified_phone_last4 + attr_reader :fingerprint, :payment_reference, :verified_phone_last4 end class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject - # Account holder type: individual or company. - attr_reader :account_holder_type - # Account type: checkings or savings. Defaults to checking if omitted. - attr_reader :account_type - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # ID of the mandate used to make this payment. - attr_reader :mandate - # Reference number to locate ACH payments with customer's bank. - attr_reader :payment_reference - # Routing number of the bank account. - attr_reader :routing_number + attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :payment_reference, :routing_number end class Wechat < Stripe::StripeObject; end class WechatPay < Stripe::StripeObject - # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. - attr_reader :fingerprint - # Transaction ID of this particular WeChat Pay transaction. - attr_reader :transaction_id + attr_reader :fingerprint, :transaction_id end class Zip < Stripe::StripeObject; end - # Attribute for field ach_credit_transfer - attr_reader :ach_credit_transfer - # Attribute for field ach_debit - attr_reader :ach_debit - # Attribute for field acss_debit - attr_reader :acss_debit - # Attribute for field affirm - attr_reader :affirm - # Attribute for field afterpay_clearpay - attr_reader :afterpay_clearpay - # Attribute for field alipay - attr_reader :alipay - # Attribute for field alma - attr_reader :alma - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field au_becs_debit - attr_reader :au_becs_debit - # Attribute for field bacs_debit - attr_reader :bacs_debit - # Attribute for field bancontact - attr_reader :bancontact - # Attribute for field blik - attr_reader :blik - # Attribute for field boleto - attr_reader :boleto - # Attribute for field card - attr_reader :card - # Attribute for field card_present - attr_reader :card_present - # Attribute for field cashapp - attr_reader :cashapp - # Attribute for field customer_balance - attr_reader :customer_balance - # Attribute for field eps - attr_reader :eps - # Attribute for field fpx - attr_reader :fpx - # Attribute for field giropay - attr_reader :giropay - # Attribute for field gopay - attr_reader :gopay - # Attribute for field grabpay - attr_reader :grabpay - # Attribute for field id_bank_transfer - attr_reader :id_bank_transfer - # Attribute for field ideal - attr_reader :ideal - # Attribute for field interac_present - attr_reader :interac_present - # Attribute for field kakao_pay - attr_reader :kakao_pay - # Attribute for field klarna - attr_reader :klarna - # Attribute for field konbini - attr_reader :konbini - # Attribute for field kr_card - attr_reader :kr_card - # Attribute for field link - attr_reader :link - # Attribute for field mb_way - attr_reader :mb_way - # Attribute for field mobilepay - attr_reader :mobilepay - # Attribute for field multibanco - attr_reader :multibanco - # Attribute for field naver_pay - attr_reader :naver_pay - # Attribute for field oxxo - attr_reader :oxxo - # Attribute for field p24 - attr_reader :p24 - # Attribute for field payco - attr_reader :payco - # Attribute for field paynow - attr_reader :paynow - # Attribute for field paypal - attr_reader :paypal - # Attribute for field payto - attr_reader :payto - # Attribute for field pix - attr_reader :pix - # Attribute for field promptpay - attr_reader :promptpay - # Attribute for field qris - attr_reader :qris - # Attribute for field rechnung - attr_reader :rechnung - # Attribute for field revolut_pay - attr_reader :revolut_pay - # Attribute for field samsung_pay - attr_reader :samsung_pay - # Attribute for field sepa_credit_transfer - attr_reader :sepa_credit_transfer - # Attribute for field sepa_debit - attr_reader :sepa_debit - # Attribute for field shopeepay - attr_reader :shopeepay - # Attribute for field sofort - attr_reader :sofort - # Attribute for field stripe_account - attr_reader :stripe_account - # Attribute for field swish - attr_reader :swish - # Attribute for field twint - attr_reader :twint - # The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. - # An additional hash is included on `payment_method_details` with a name matching this value. - # It contains information specific to the payment method. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account - # Attribute for field wechat - attr_reader :wechat - # Attribute for field wechat_pay - attr_reader :wechat_pay - # Attribute for field zip - attr_reader :zip + attr_reader :ach_credit_transfer, :ach_debit, :acss_debit, :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :blik, :boleto, :card, :card_present, :cashapp, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_credit_transfer, :sepa_debit, :shopeepay, :sofort, :stripe_account, :swish, :twint, :type, :us_bank_account, :wechat, :wechat_pay, :zip end class RadarOptions < Stripe::StripeObject - # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. attr_reader :session end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end class TransferData < Stripe::StripeObject - # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. - attr_reader :amount - # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. - attr_reader :destination + attr_reader :amount, :destination end # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). attr_reader :amount - # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). attr_reader :amount_captured - # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). attr_reader :amount_refunded - # ID of the Connect application that created the charge. attr_reader :application - # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. attr_reader :application_fee - # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. attr_reader :application_fee_amount - # Authorization code on the charge. attr_reader :authorization_code - # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). attr_reader :balance_transaction - # Attribute for field billing_details attr_reader :billing_details - # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. attr_reader :calculated_statement_descriptor - # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. attr_reader :captured - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # ID of the customer this charge is for if one exists. attr_reader :customer - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Whether the charge has been disputed. attr_reader :disputed - # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. attr_reader :failure_balance_transaction - # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). attr_reader :failure_code - # Message to user further explaining reason for charge failure if available. attr_reader :failure_message - # Information on fraud assessments for the charge. attr_reader :fraud_details - # Unique identifier for the object. attr_reader :id - # ID of the invoice this charge is for if one exists. attr_reader :invoice - # Attribute for field level3 attr_reader :level3 - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. attr_reader :on_behalf_of - # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. attr_reader :outcome - # `true` if the charge succeeded, or was successfully authorized for later capture. attr_reader :paid - # ID of the PaymentIntent associated with this charge, if one exists. attr_reader :payment_intent - # ID of the payment method used in this charge. attr_reader :payment_method - # Details about the payment method at the time of the transaction. attr_reader :payment_method_details - # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. attr_reader :radar_options - # This is the email address that the receipt for this charge was sent to. attr_reader :receipt_email - # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. attr_reader :receipt_number - # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. attr_reader :receipt_url - # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. attr_reader :refunded - # A list of refunds that have been applied to the charge. attr_reader :refunds - # ID of the review associated with this charge if one exists. attr_reader :review - # Shipping information for the charge. attr_reader :shipping - # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. attr_reader :source - # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. attr_reader :source_transfer - # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. attr_reader :statement_descriptor - # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. attr_reader :statement_descriptor_suffix - # The status of the payment is either `succeeded`, `pending`, or `failed`. attr_reader :status - # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). attr_reader :transfer - # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. attr_reader :transfer_data - # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. attr_reader :transfer_group diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index e7e1b64e3..a39c90fc6 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -28,1223 +28,493 @@ def self.object_name end class AdaptivePricing < Stripe::StripeObject - # Whether Adaptive Pricing is enabled. attr_reader :enabled end class AfterExpiration < Stripe::StripeObject class Recovery < Stripe::StripeObject - # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` - attr_reader :allow_promotion_codes - # If `true`, a recovery url will be generated to recover this Checkout Session if it - # expires before a transaction is completed. It will be attached to the - # Checkout Session object upon expiration. - attr_reader :enabled - # The timestamp at which the recovery URL will expire. - attr_reader :expires_at - # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session - attr_reader :url + attr_reader :allow_promotion_codes, :enabled, :expires_at, :url end - # When set, configuration used to recover the Checkout Session on expiry. attr_reader :recovery end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Indicates whether automatic tax is enabled for the session - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability - # The status of the most recent automated tax calculation for this session. - attr_reader :status + attr_reader :enabled, :liability, :status end class CollectedInformation < Stripe::StripeObject class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` - attr_reader :type - # The value of the tax ID. - attr_reader :value + attr_reader :type, :value end - # Customer’s business name for this Checkout Session - attr_reader :business_name - # Customer’s email for this Checkout Session - attr_reader :email - # Customer’s phone number for this Checkout Session - attr_reader :phone - # Shipping information for this Checkout Session. - attr_reader :shipping_details - # Customer’s tax ids for this Checkout Session. - attr_reader :tax_ids + attr_reader :business_name, :email, :phone, :shipping_details, :tax_ids end class Consent < Stripe::StripeObject - # If `opt_in`, the customer consents to receiving promotional communications - # from the merchant about this Checkout Session. - attr_reader :promotions - # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. - attr_reader :terms_of_service + attr_reader :promotions, :terms_of_service end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject - # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. - # - # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. attr_reader :position end - # If set to `hidden`, it will hide legal text related to the reuse of a payment method. - attr_reader :payment_method_reuse_agreement - # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - # Session will determine whether to display an option to opt into promotional communication - # from the merchant depending on the customer's locale. Only available to US merchants. - attr_reader :promotions - # If set to `required`, it requires customers to accept the terms of service before being able to pay. - attr_reader :terms_of_service + attr_reader :payment_method_reuse_agreement, :promotions, :terms_of_service end class CurrencyConversion < Stripe::StripeObject - # Total of all items in source currency before discounts or taxes are applied. - attr_reader :amount_subtotal - # Total of all items in source currency after discounts and taxes are applied. - attr_reader :amount_total - # Exchange rate used to convert source currency amounts to customer currency amounts - attr_reader :fx_rate - # Creation currency of the CheckoutSession before localization - attr_reader :source_currency + attr_reader :amount_subtotal, :amount_total, :fx_rate, :source_currency end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject - # The label for the option, displayed to the customer. Up to 100 characters. - attr_reader :label - # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - attr_reader :value + attr_reader :label, :value end - # The value that will pre-fill on the payment page. - attr_reader :default_value - # The options available for the customer to select. Up to 200 options allowed. - attr_reader :options - # The option selected by the customer. This will be the `value` for the option. - attr_reader :value + attr_reader :default_value, :options, :value end class Label < Stripe::StripeObject - # Custom text for the label, displayed to the customer. Up to 50 characters. - attr_reader :custom - # The type of the label. - attr_reader :type + attr_reader :custom, :type end class Numeric < Stripe::StripeObject - # The value that will pre-fill the field on the payment page. - attr_reader :default_value - # The maximum character length constraint for the customer's input. - attr_reader :maximum_length - # The minimum character length requirement for the customer's input. - attr_reader :minimum_length - # The value entered by the customer, containing only digits. - attr_reader :value + attr_reader :default_value, :maximum_length, :minimum_length, :value end class Text < Stripe::StripeObject - # The value that will pre-fill the field on the payment page. - attr_reader :default_value - # The maximum character length constraint for the customer's input. - attr_reader :maximum_length - # The minimum character length requirement for the customer's input. - attr_reader :minimum_length - # The value entered by the customer. - attr_reader :value + attr_reader :default_value, :maximum_length, :minimum_length, :value end - # Attribute for field dropdown - attr_reader :dropdown - # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - attr_reader :key - # Attribute for field label - attr_reader :label - # Attribute for field numeric - attr_reader :numeric - # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - attr_reader :optional - # Attribute for field text - attr_reader :text - # The type of the field. - attr_reader :type + attr_reader :dropdown, :key, :label, :numeric, :optional, :text, :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject - # Text may be up to 1200 characters in length. attr_reader :message end class ShippingAddress < Stripe::StripeObject - # Text may be up to 1200 characters in length. attr_reader :message end class Submit < Stripe::StripeObject - # Text may be up to 1200 characters in length. attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject - # Text may be up to 1200 characters in length. attr_reader :message end - # Custom text that should be displayed after the payment confirmation button. - attr_reader :after_submit - # Custom text that should be displayed alongside shipping address collection. - attr_reader :shipping_address - # Custom text that should be displayed alongside the payment confirmation button. - attr_reader :submit - # Custom text that should be displayed in place of the default terms of service agreement text. - attr_reader :terms_of_service_acceptance + attr_reader :after_submit, :shipping_address, :submit, :terms_of_service_acceptance end class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` - attr_reader :type - # The value of the tax ID. - attr_reader :value + attr_reader :type, :value end - # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. - attr_reader :address - # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. - # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. - attr_reader :email - # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. - attr_reader :name - # The customer's phone number after a completed Checkout Session. - attr_reader :phone - # The customer’s tax exempt status after a completed Checkout Session. - attr_reader :tax_exempt - # The customer’s tax IDs after a completed Checkout Session. - attr_reader :tax_ids + attr_reader :address, :email, :name, :phone, :tax_exempt, :tax_ids end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject - # The name of the custom field. - attr_reader :name - # The value of the custom field. - attr_reader :value + attr_reader :name, :value end class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end class RenderingOptions < Stripe::StripeObject - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. attr_reader :amount_tax_display end - # The account tax IDs associated with the invoice. - attr_reader :account_tax_ids - # Custom fields displayed on the invoice. - attr_reader :custom_fields - # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description - # Footer displayed on the invoice. - attr_reader :footer - # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - attr_reader :issuer - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - attr_reader :metadata - # Options for invoice PDF rendering. - attr_reader :rendering_options + attr_reader :account_tax_ids, :custom_fields, :description, :footer, :issuer, :metadata, :rendering_options end - # Indicates whether invoice creation is enabled for the Checkout Session. - attr_reader :enabled - # Attribute for field invoice_data - attr_reader :invoice_data + attr_reader :enabled, :invoice_data end class PaymentMethodConfigurationDetails < Stripe::StripeObject - # ID of the payment method configuration used. - attr_reader :id - # ID of the parent payment method configuration used. - attr_reader :parent + attr_reader :id, :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # A URL for custom mandate text - attr_reader :custom_mandate_url - # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. - attr_reader :default_for - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. - attr_reader :interval_description - # Payment schedule for the mandate. - attr_reader :payment_schedule - # Transaction type of the mandate. - attr_reader :transaction_type + attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type end - # Currency supported by the bank account. Returned when the Session is in `setup` mode. - attr_reader :currency - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # Bank account verification method. - attr_reader :verification_method + attr_reader :currency, :mandate_options, :setup_future_usage, :verification_method end class Affirm < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AmazonPay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :mandate_options, :setup_future_usage end class Bancontact < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject - # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. - attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :expires_after_days, :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject - # Indicates if installments are enabled attr_reader :enabled end - # Attribute for field installments - attr_reader :installments - # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. - attr_reader :request_decremental_authorization - # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. - attr_reader :request_extended_authorization - # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. - attr_reader :request_incremental_authorization - # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. - attr_reader :request_multicapture - # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. - attr_reader :request_overcapture - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - attr_reader :request_three_d_secure - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - attr_reader :statement_descriptor_suffix_kana - # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - attr_reader :statement_descriptor_suffix_kanji + attr_reader :installments, :request_decremental_authorization, :request_extended_authorization, :request_incremental_authorization, :request_multicapture, :request_overcapture, :request_three_d_secure, :setup_future_usage, :statement_descriptor_suffix_kana, :statement_descriptor_suffix_kanji end class Cashapp < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - # Attribute for field eu_bank_transfer - attr_reader :eu_bank_transfer - # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - # - # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - attr_reader :requested_address_types - # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - attr_reader :type + attr_reader :eu_bank_transfer, :requested_address_types, :type end - # Attribute for field bank_transfer - attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - attr_reader :funding_type - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :bank_transfer, :funding_type, :setup_future_usage end class Eps < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class KakaoPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class Klarna < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject - # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. - attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :expires_after_days, :setup_future_usage end class KrCard < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class Link < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Oxxo < Stripe::StripeObject - # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :expires_after_days, :setup_future_usage end class P24 < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Payco < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Paynow < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Preferred locale of the PayPal checkout page that the customer is redirected to. - attr_reader :preferred_locale - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - attr_reader :reference - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - attr_reader :subsellers + attr_reader :capture_method, :preferred_locale, :reference, :setup_future_usage, :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount that will be collected. It is required when `amount_type` is `fixed`. - attr_reader :amount - # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - attr_reader :amount_type - # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - attr_reader :end_date - # The periodicity at which payments will be collected. - attr_reader :payment_schedule - # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - attr_reader :payments_per_period - # The purpose for which payments are made. Defaults to retail. - attr_reader :purpose - # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - attr_reader :start_date + attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :mandate_options, :setup_future_usage end class Pix < Stripe::StripeObject - # The number of seconds after which Pix payment will expire. attr_reader :expires_after_seconds end class RevolutPay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :mandate_options, :setup_future_usage end class Sofort < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Swish < Stripe::StripeObject - # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. attr_reader :reference end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. - attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. - attr_reader :institution + attr_reader :account_subcategories, :institution end class ManualEntry < Stripe::StripeObject - # Settings for configuring manual entry of account details. attr_reader :mode end - # Attribute for field filters - attr_reader :filters - # Attribute for field manual_entry - attr_reader :manual_entry - # The list of permissions to request. The `payment_method` permission must be included. - attr_reader :permissions - # Data features requested to be retrieved upon account creation. - attr_reader :prefetch - # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - attr_reader :return_url + attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url end - # Attribute for field financial_connections - attr_reader :financial_connections - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # Bank account verification method. - attr_reader :verification_method + attr_reader :financial_connections, :setup_future_usage, :verification_method end - # Attribute for field acss_debit - attr_reader :acss_debit - # Attribute for field affirm - attr_reader :affirm - # Attribute for field afterpay_clearpay - attr_reader :afterpay_clearpay - # Attribute for field alipay - attr_reader :alipay - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field au_becs_debit - attr_reader :au_becs_debit - # Attribute for field bacs_debit - attr_reader :bacs_debit - # Attribute for field bancontact - attr_reader :bancontact - # Attribute for field boleto - attr_reader :boleto - # Attribute for field card - attr_reader :card - # Attribute for field cashapp - attr_reader :cashapp - # Attribute for field customer_balance - attr_reader :customer_balance - # Attribute for field eps - attr_reader :eps - # Attribute for field fpx - attr_reader :fpx - # Attribute for field giropay - attr_reader :giropay - # Attribute for field grabpay - attr_reader :grabpay - # Attribute for field ideal - attr_reader :ideal - # Attribute for field kakao_pay - attr_reader :kakao_pay - # Attribute for field klarna - attr_reader :klarna - # Attribute for field konbini - attr_reader :konbini - # Attribute for field kr_card - attr_reader :kr_card - # Attribute for field link - attr_reader :link - # Attribute for field mobilepay - attr_reader :mobilepay - # Attribute for field multibanco - attr_reader :multibanco - # Attribute for field naver_pay - attr_reader :naver_pay - # Attribute for field oxxo - attr_reader :oxxo - # Attribute for field p24 - attr_reader :p24 - # Attribute for field payco - attr_reader :payco - # Attribute for field paynow - attr_reader :paynow - # Attribute for field paypal - attr_reader :paypal - # Attribute for field payto - attr_reader :payto - # Attribute for field pix - attr_reader :pix - # Attribute for field revolut_pay - attr_reader :revolut_pay - # Attribute for field samsung_pay - attr_reader :samsung_pay - # Attribute for field sepa_debit - attr_reader :sepa_debit - # Attribute for field sofort - attr_reader :sofort - # Attribute for field swish - attr_reader :swish - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :cashapp, :customer_balance, :eps, :fpx, :giropay, :grabpay, :ideal, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :revolut_pay, :samsung_pay, :sepa_debit, :sofort, :swish, :us_bank_account end class Permissions < Stripe::StripeObject class Update < Stripe::StripeObject - # Determines which entity is allowed to update the line items. - # - # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. - # - # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. - attr_reader :line_items - # Determines which entity is allowed to update the shipping details. - # - # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - # - # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. - attr_reader :shipping_details + attr_reader :line_items, :shipping_details end - # Permissions for updating the Checkout Session. attr_reader :update end class PhoneNumberCollection < Stripe::StripeObject - # Indicates whether phone number collection is enabled for the session attr_reader :enabled end class SavedPaymentMethodOptions < Stripe::StripeObject - # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. - attr_reader :allow_redisplay_filters - # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. - attr_reader :payment_method_remove - # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. - attr_reader :payment_method_save + attr_reader :allow_redisplay_filters, :payment_method_remove, :payment_method_save end class ShippingAddressCollection < Stripe::StripeObject - # An array of two-letter ISO country codes representing which countries Checkout should provide as options for - # shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. attr_reader :allowed_countries end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # Total shipping cost before any discounts or taxes are applied. - attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. - attr_reader :amount_tax - # Total shipping cost after discounts and taxes are applied. - attr_reader :amount_total - # The ID of the ShippingRate for this order. - attr_reader :shipping_rate - # The taxes applied to the shipping rate. - attr_reader :taxes + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end class ShippingOption < Stripe::StripeObject - # A non-negative integer in cents representing how much to charge. - attr_reader :shipping_amount - # The shipping rate. - attr_reader :shipping_rate + attr_reader :shipping_amount, :shipping_rate end class TaxIdCollection < Stripe::StripeObject - # Indicates whether tax ID collection is enabled for the session - attr_reader :enabled - # Indicates whether a tax ID is required on the payment page - attr_reader :required + attr_reader :enabled, :required end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. - attr_reader :amount - # 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) - attr_reader :discount + attr_reader :amount, :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # The aggregated discounts. - attr_reader :discounts - # The aggregated tax amounts by rate. - attr_reader :taxes + attr_reader :discounts, :taxes end - # This is the sum of all the discounts. - attr_reader :amount_discount - # This is the sum of all the shipping amounts. - attr_reader :amount_shipping - # This is the sum of all the tax amounts. - attr_reader :amount_tax - # Attribute for field breakdown - attr_reader :breakdown + attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown end # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). attr_reader :adaptive_pricing - # When set, provides configuration for actions to take if this Checkout Session expires. attr_reader :after_expiration - # Enables user redeemable promotion codes. attr_reader :allow_promotion_codes - # Total of all items before discounts or taxes are applied. attr_reader :amount_subtotal - # Total of all items after discounts and taxes are applied. attr_reader :amount_total - # Attribute for field automatic_tax attr_reader :automatic_tax - # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. attr_reader :billing_address_collection - # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. attr_reader :cancel_url - # A unique string to reference the Checkout Session. This can be a # customer ID, a cart ID, or similar, and can be used to reconcile the # Session with your internal systems. attr_reader :client_reference_id - # The client secret of the Session. Use this with [initCustomCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. attr_reader :client_secret - # Information about the customer collected within the Checkout Session. attr_reader :collected_information - # Results of `consent_collection` for this session. attr_reader :consent - # When set, provides configuration for the Checkout Session to gather active consent from customers. attr_reader :consent_collection - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions attr_reader :currency_conversion - # Collect additional information from your customer using custom fields. Up to 3 fields are supported. attr_reader :custom_fields - # Attribute for field custom_text attr_reader :custom_text - # The ID of the customer for this Session. # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout # will create a new customer object based on information provided # during the payment flow unless an existing customer was provided when # the Session was created. attr_reader :customer - # Configure whether a Checkout Session creates a Customer when the Checkout Session completes. attr_reader :customer_creation - # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. attr_reader :customer_details - # If provided, this value will be used when the Customer object is created. # If not provided, customers will be asked to enter their email address. # Use this parameter to prefill customer data if you already have an email # on file. To access information about the customer once the payment flow is # complete, use the `customer` attribute. attr_reader :customer_email - # The timestamp at which the Checkout Session will expire. attr_reader :expires_at - # Unique identifier for the object. attr_reader :id - # ID of the invoice created by the Checkout Session, if it exists. attr_reader :invoice - # Details on the state of invoice creation for the Checkout Session. attr_reader :invoice_creation - # The line items purchased by the customer. attr_reader :line_items - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. attr_reader :locale - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The mode of the Checkout Session. attr_reader :mode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. attr_reader :payment_intent - # The ID of the Payment Link that created this Session. attr_reader :payment_link - # Configure whether a Checkout Session should collect a payment method. Defaults to `always`. attr_reader :payment_method_collection - # Information about the payment method configuration used for this Checkout session if using dynamic payment methods. attr_reader :payment_method_configuration_details - # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. attr_reader :payment_method_options - # A list of the types of payment methods (e.g. card) this Checkout # Session is allowed to accept. attr_reader :payment_method_types - # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. # You can use this value to decide when to fulfill your customer's order. attr_reader :payment_status - # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. # # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. attr_reader :permissions - # Attribute for field phone_number_collection attr_reader :phone_number_collection - # The ID of the original expired Checkout Session that triggered the recovery flow. attr_reader :recovered_from - # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. attr_reader :redirect_on_completion - # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. attr_reader :return_url - # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. attr_reader :saved_payment_method_options - # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. attr_reader :setup_intent - # When set, provides configuration for Checkout to collect a shipping address from a customer. attr_reader :shipping_address_collection - # The details of the customer cost of shipping, including the customer chosen ShippingRate. attr_reader :shipping_cost - # Shipping information for this Checkout Session. attr_reader :shipping_details - # The shipping rate options applied to this Session. attr_reader :shipping_options - # The status of the Checkout Session, one of `open`, `complete`, or `expired`. attr_reader :status - # Describes the type of transaction being performed by Checkout in order to customize # relevant text on the page, such as the submit button. `submit_type` can only be # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. attr_reader :submit_type - # The ID of the subscription for Checkout Sessions in `subscription` mode. attr_reader :subscription - # The URL the customer will be directed to after the payment or # subscription creation is successful. attr_reader :success_url - # Attribute for field tax_id_collection attr_reader :tax_id_collection - # Tax and discount details for the computed total amount. attr_reader :total_details - # The UI mode of the Session. Defaults to `hosted`. attr_reader :ui_mode - # The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` # This value is only present when the session is active. attr_reader :url diff --git a/lib/stripe/resources/climate/order.rb b/lib/stripe/resources/climate/order.rb index 2c9666363..3962cba81 100644 --- a/lib/stripe/resources/climate/order.rb +++ b/lib/stripe/resources/climate/order.rb @@ -16,97 +16,57 @@ def self.object_name end class Beneficiary < Stripe::StripeObject - # Publicly displayable name for the end beneficiary of carbon removal. attr_reader :public_name end class DeliveryDetail < Stripe::StripeObject class Location < Stripe::StripeObject - # The city where the supplier is located. - attr_reader :city - # Two-letter ISO code representing the country where the supplier is located. - attr_reader :country - # The geographic latitude where the supplier is located. - attr_reader :latitude - # The geographic longitude where the supplier is located. - attr_reader :longitude - # The state/county/province/region where the supplier is located. - attr_reader :region + attr_reader :city, :country, :latitude, :longitude, :region end - # Time at which the delivery occurred. Measured in seconds since the Unix epoch. - attr_reader :delivered_at - # Specific location of this delivery. - attr_reader :location - # Quantity of carbon removal supplied by this delivery. - attr_reader :metric_tons - # Once retired, a URL to the registry entry for the tons from this delivery. - attr_reader :registry_url - # A supplier of carbon removal. - attr_reader :supplier + attr_reader :delivered_at, :location, :metric_tons, :registry_url, :supplier end # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. attr_reader :amount_fees - # Total amount of the carbon removal in the currency's smallest unit. attr_reader :amount_subtotal - # Total amount of the order including fees in the currency's smallest unit. attr_reader :amount_total - # Attribute for field beneficiary attr_reader :beneficiary - # Time at which the order was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at - # Reason for the cancellation of this order. attr_reader :cancellation_reason - # For delivered orders, a URL to a delivery certificate for the order. attr_reader :certificate - # Time at which the order was confirmed. Measured in seconds since the Unix epoch. attr_reader :confirmed_at - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. attr_reader :currency - # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. attr_reader :delayed_at - # Time at which the order was delivered. Measured in seconds since the Unix epoch. attr_reader :delivered_at - # Details about the delivery of carbon removal for this order. attr_reader :delivery_details - # The year this order is expected to be delivered. attr_reader :expected_delivery_year - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Quantity of carbon removal that is included in this order. attr_reader :metric_tons - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Unique ID for the Climate `Product` this order is purchasing. attr_reader :product - # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. attr_reader :product_substituted_at - # The current status of this order. attr_reader :status diff --git a/lib/stripe/resources/climate/product.rb b/lib/stripe/resources/climate/product.rb index 645a93f28..e47af3f01 100644 --- a/lib/stripe/resources/climate/product.rb +++ b/lib/stripe/resources/climate/product.rb @@ -14,39 +14,26 @@ def self.object_name end class CurrentPricesPerMetricTon < Stripe::StripeObject - # Fees for one metric ton of carbon removal in the currency's smallest unit. - attr_reader :amount_fees - # Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. - attr_reader :amount_subtotal - # Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. - attr_reader :amount_total + attr_reader :amount_fees, :amount_subtotal, :amount_total end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Current prices for a metric ton of carbon removal in a currency's smallest unit. attr_reader :current_prices_per_metric_ton - # The year in which the carbon removal is expected to be delivered. attr_reader :delivery_year - # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) # for a list of available carbon removal products. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The quantity of metric tons available for reservation. attr_reader :metric_tons_available - # The Climate product's name. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The carbon removal suppliers that fulfill orders for this Climate product. attr_reader :suppliers diff --git a/lib/stripe/resources/climate/supplier.rb b/lib/stripe/resources/climate/supplier.rb index 5a31d18d4..f48fdb10b 100644 --- a/lib/stripe/resources/climate/supplier.rb +++ b/lib/stripe/resources/climate/supplier.rb @@ -13,35 +13,20 @@ def self.object_name end class Location < Stripe::StripeObject - # The city where the supplier is located. - attr_reader :city - # Two-letter ISO code representing the country where the supplier is located. - attr_reader :country - # The geographic latitude where the supplier is located. - attr_reader :latitude - # The geographic longitude where the supplier is located. - attr_reader :longitude - # The state/county/province/region where the supplier is located. - attr_reader :region + attr_reader :city, :country, :latitude, :longitude, :region end # Unique identifier for the object. attr_reader :id - # Link to a webpage to learn more about the supplier. attr_reader :info_url - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The locations in which this supplier operates. attr_reader :locations - # Name of this carbon removal supplier. attr_reader :name - # String representing the object’s type. Objects of the same type share the same value. attr_reader :object - # The scientific pathway used for carbon removal. attr_reader :removal_pathway diff --git a/lib/stripe/resources/confirmation_token.rb b/lib/stripe/resources/confirmation_token.rb index d5ff6896a..6166c21e1 100644 --- a/lib/stripe/resources/confirmation_token.rb +++ b/lib/stripe/resources/confirmation_token.rb @@ -18,41 +18,23 @@ def self.object_name class MandateData < Stripe::StripeObject class CustomerAcceptance < Stripe::StripeObject class Online < Stripe::StripeObject - # The IP address from which the Mandate was accepted by the customer. - attr_reader :ip_address - # The user agent of the browser from which the Mandate was accepted by the customer. - attr_reader :user_agent + attr_reader :ip_address, :user_agent end - # If this is a Mandate accepted online, this hash contains details about the online acceptance. - attr_reader :online - # The type of customer acceptance information included with the Mandate. - attr_reader :type + attr_reader :online, :type end - # This hash contains details about the customer acceptance of the Mandate. attr_reader :customer_acceptance end class PaymentMethodOptions < Stripe::StripeObject class Card < Stripe::StripeObject - # The `cvc_update` Token collected from the Payment Element. attr_reader :cvc_token end - # This hash contains the card payment method options. attr_reader :card end class PaymentMethodPreview < Stripe::StripeObject class AcssDebit < Stripe::StripeObject - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Institution number of the bank account. - attr_reader :institution_number - # Last four digits of the bank account number. - attr_reader :last4 - # Transit number of the bank account. - attr_reader :transit_number + attr_reader :bank_name, :fingerprint, :institution_number, :last4, :transit_number end class Affirm < Stripe::StripeObject; end @@ -62,177 +44,59 @@ class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - # Six-digit number identifying bank and branch associated with this bank account. - attr_reader :bsb_number - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 + attr_reader :bsb_number, :fingerprint, :last4 end class BacsDebit < Stripe::StripeObject - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # Sort code of the bank account. (e.g., `10-20-30`) - attr_reader :sort_code + attr_reader :fingerprint, :last4, :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Billing address. - attr_reader :address - # Email address. - attr_reader :email - # Full name. - attr_reader :name - # Billing phone number (including extension). - attr_reader :phone + attr_reader :address, :email, :name, :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject - # Uniquely identifies the customer tax id (CNPJ or CPF) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_line1_check - # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_postal_code_check - # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :cvc_check + attr_reader :address_line1_check, :address_postal_code_check, :cvc_check end class GeneratedFrom < Stripe::StripeObject class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline - attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. - attr_reader :type + attr_reader :stored_at, :type end class Receipt < Stripe::StripeObject - # The type of account being debited or credited - attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. - attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. - attr_reader :application_preferred_name - # Identifier for this transaction. - attr_reader :authorization_code - # EMV tag 8A. A code returned by the card issuer. - attr_reader :authorization_response_code - # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. - attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. - attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. - attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. - attr_reader :transaction_status_information + attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - # The authorized amount - attr_reader :amount_authorized - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. - attr_reader :brand_product - # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. - attr_reader :capture_before - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Authorization response cryptogram. - attr_reader :emv_auth_data - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. - attr_reader :generated_card - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). - attr_reader :incremental_authorization_supported - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :network - # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. - attr_reader :network_transaction_id - # Details about payments collected offline. - attr_reader :offline - # Defines whether the authorized amount can be over-captured or not - attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. - attr_reader :preferred_locales - # How card details were read in this transaction. - attr_reader :read_method - # A collection of fields required to be displayed on receipts. Only required for EMV transactions. - attr_reader :receipt - # Attribute for field wallet - attr_reader :wallet + attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet end - # Attribute for field card_present - attr_reader :card_present - # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. - attr_reader :type + attr_reader :card_present, :type end - # The charge that created this object. - attr_reader :charge - # Transaction-specific details of the payment method used in the payment. - attr_reader :payment_method_details - # The ID of the SetupAttempt that generated this PaymentMethod, if any. - attr_reader :setup_attempt + attr_reader :charge, :payment_method_details, :setup_attempt end class Networks < Stripe::StripeObject - # All available networks for the card. - attr_reader :available - # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. - attr_reader :preferred + attr_reader :available, :preferred end class ThreeDSecureUsage < Stripe::StripeObject - # Whether 3D Secure is supported on this card. attr_reader :supported end @@ -244,216 +108,59 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :shipping_address + attr_reader :billing_address, :email, :name, :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :shipping_address + attr_reader :billing_address, :email, :name, :shipping_address end - # Attribute for field amex_express_checkout - attr_reader :amex_express_checkout - # Attribute for field apple_pay - attr_reader :apple_pay - # (For tokenized numbers only.) The last four digits of the device account number. - attr_reader :dynamic_last4 - # Attribute for field google_pay - attr_reader :google_pay - # Attribute for field link - attr_reader :link - # Attribute for field masterpass - attr_reader :masterpass - # Attribute for field samsung_pay - attr_reader :samsung_pay - # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - attr_reader :type - # Attribute for field visa_checkout - attr_reader :visa_checkout + attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # Checks on Card address and CVC if provided. - attr_reader :checks - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. - attr_reader :display_brand - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # Details of the original PaymentMethod that created this object. - attr_reader :generated_from - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Contains information about card networks that can be used to process the payment. - attr_reader :networks - # Contains details on how this Card may be used for 3D Secure authentication. - attr_reader :three_d_secure_usage - # If this Card is part of a card wallet, this contains the details of the card wallet. - attr_reader :wallet + attr_reader :brand, :checks, :country, :description, :display_brand, :exp_month, :exp_year, :fingerprint, :funding, :generated_from, :iin, :issuer, :last4, :networks, :three_d_secure_usage, :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - # All available networks for the card. - attr_reader :available - # The preferred network for the card. - attr_reader :preferred + attr_reader :available, :preferred end class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline - attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. - attr_reader :type + attr_reader :stored_at, :type end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. - attr_reader :brand_product - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Contains information about card networks that can be used to process the payment. - attr_reader :networks - # Details about payment methods collected offline. - attr_reader :offline - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. - attr_reader :preferred_locales - # How card details were read in this transaction. - attr_reader :read_method - # Attribute for field wallet - attr_reader :wallet + attr_reader :brand, :brand_product, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :offline, :preferred_locales, :read_method, :wallet end class Cashapp < Stripe::StripeObject - # A unique and immutable identifier assigned by Cash App to every buyer. - attr_reader :buyer_id - # A public identifier for buyers using Cash App. - attr_reader :cashtag + attr_reader :buyer_id, :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject - # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. attr_reader :bank end class Fpx < Stripe::StripeObject - # Account holder type, if provided. Can be one of `individual` or `company`. - attr_reader :account_holder_type - # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. - attr_reader :bank + attr_reader :account_holder_type, :bank end class Giropay < Stripe::StripeObject; end @@ -461,91 +168,37 @@ class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - # Attribute for field bank - attr_reader :bank - # Attribute for field bank_code - attr_reader :bank_code - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field display_name - attr_reader :display_name + attr_reader :bank, :bank_code, :bank_name, :display_name end class Ideal < Stripe::StripeObject - # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. - attr_reader :bank - # The Bank Identifier Code of the customer's bank, if the bank was provided. - attr_reader :bic + attr_reader :bank, :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - # All available networks for the card. - attr_reader :available - # The preferred network for the card. - attr_reader :preferred + attr_reader :available, :preferred end - # Card brand. Can be `interac`, `mastercard` or `visa`. - attr_reader :brand - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Contains information about card networks that can be used to process the payment. - attr_reader :networks - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. - attr_reader :preferred_locales - # How card details were read in this transaction. - attr_reader :read_method + attr_reader :brand, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :preferred_locales, :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. - attr_reader :day - # The month of birth, between 1 and 12. - attr_reader :month - # The four-digit year of birth. - attr_reader :year + attr_reader :day, :month, :year end - # The customer's date of birth, if provided. attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject - # The local credit or debit card brand. - attr_reader :brand - # The last four digits of the card. This may not be present for American Express cards. - attr_reader :last4 + attr_reader :brand, :last4 end class Link < Stripe::StripeObject - # Account owner's email address. - attr_reader :email - # [Deprecated] This is a legacy parameter that no longer has any function. - attr_reader :persistent_token + attr_reader :email, :persistent_token end class MbWay < Stripe::StripeObject; end @@ -553,14 +206,12 @@ class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject - # Whether to fund this transaction with Naver Pay points or a card. attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject - # The customer's bank, if provided. attr_reader :bank end @@ -568,25 +219,11 @@ class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. - attr_reader :fingerprint - # Owner's email. Values are provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :payer_email - # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. - attr_reader :payer_id - # Owner's verified email. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_email + attr_reader :fingerprint, :payer_email, :payer_id, :verified_email end class Payto < Stripe::StripeObject - # Bank-State-Branch number of the bank account. - attr_reader :bsb_number - # Last four digits of the bank account number. - attr_reader :last4 - # The PayID alias for the bank account. - attr_reader :pay_id + attr_reader :bsb_number, :last4, :pay_id end class Pix < Stripe::StripeObject; end @@ -595,14 +232,8 @@ class Qris < Stripe::StripeObject; end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. - attr_reader :day - # The month of birth, between 1 and 12. - attr_reader :month - # The four-digit year of birth. - attr_reader :year + attr_reader :day, :month, :year end - # Attribute for field dob attr_reader :dob end @@ -611,29 +242,14 @@ class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject - # The ID of the Charge that generated this PaymentMethod, if any. - attr_reader :charge - # The ID of the SetupAttempt that generated this PaymentMethod, if any. - attr_reader :setup_attempt + attr_reader :charge, :setup_attempt end - # Bank code of bank associated with the bank account. - attr_reader :bank_code - # Branch code of bank associated with the bank account. - attr_reader :branch_code - # Two-letter ISO code representing the country the bank account is located in. - attr_reader :country - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Information about the object that generated this PaymentMethod. - attr_reader :generated_from - # Last four characters of the IBAN. - attr_reader :last4 + attr_reader :bank_code, :branch_code, :country, :fingerprint, :generated_from, :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - # Two-letter ISO code representing the country the bank account is located in. attr_reader :country end @@ -642,223 +258,57 @@ class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject - # The preferred network. - attr_reader :preferred - # All supported networks. - attr_reader :supported + attr_reader :preferred, :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject - # The ACH network code that resulted in this block. - attr_reader :network_code - # The reason why this PaymentMethod's fingerprint has been blocked - attr_reader :reason + attr_reader :network_code, :reason end - # Attribute for field blocked attr_reader :blocked end - # Account holder type: individual or company. - attr_reader :account_holder_type - # Account number of the bank account. - attr_reader :account_number - # Account type: checkings or savings. Defaults to checking if omitted. - attr_reader :account_type - # The name of the bank. - attr_reader :bank_name - # The ID of the Financial Connections Account used to create the payment method. - attr_reader :financial_connections_account - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # Contains information about US bank account networks that can be used. - attr_reader :networks - # Routing number of the bank account. - attr_reader :routing_number - # Contains information about the future reusability of this PaymentMethod. - attr_reader :status_details + attr_reader :account_holder_type, :account_number, :account_type, :bank_name, :financial_connections_account, :fingerprint, :last4, :networks, :routing_number, :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - # Attribute for field acss_debit - attr_reader :acss_debit - # Attribute for field affirm - attr_reader :affirm - # Attribute for field afterpay_clearpay - attr_reader :afterpay_clearpay - # Attribute for field alipay - attr_reader :alipay - # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. - attr_reader :allow_redisplay - # Attribute for field alma - attr_reader :alma - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field au_becs_debit - attr_reader :au_becs_debit - # Attribute for field bacs_debit - attr_reader :bacs_debit - # Attribute for field bancontact - attr_reader :bancontact - # Attribute for field billing_details - attr_reader :billing_details - # Attribute for field blik - attr_reader :blik - # Attribute for field boleto - attr_reader :boleto - # Attribute for field card - attr_reader :card - # Attribute for field card_present - attr_reader :card_present - # Attribute for field cashapp - attr_reader :cashapp - # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. - attr_reader :customer - # Attribute for field customer_balance - attr_reader :customer_balance - # Attribute for field eps - attr_reader :eps - # Attribute for field fpx - attr_reader :fpx - # Attribute for field giropay - attr_reader :giropay - # Attribute for field gopay - attr_reader :gopay - # Attribute for field grabpay - attr_reader :grabpay - # Attribute for field id_bank_transfer - attr_reader :id_bank_transfer - # Attribute for field ideal - attr_reader :ideal - # Attribute for field interac_present - attr_reader :interac_present - # Attribute for field kakao_pay - attr_reader :kakao_pay - # Attribute for field klarna - attr_reader :klarna - # Attribute for field konbini - attr_reader :konbini - # Attribute for field kr_card - attr_reader :kr_card - # Attribute for field link - attr_reader :link - # Attribute for field mb_way - attr_reader :mb_way - # Attribute for field mobilepay - attr_reader :mobilepay - # Attribute for field multibanco - attr_reader :multibanco - # Attribute for field naver_pay - attr_reader :naver_pay - # Attribute for field oxxo - attr_reader :oxxo - # Attribute for field p24 - attr_reader :p24 - # Attribute for field payco - attr_reader :payco - # Attribute for field paynow - attr_reader :paynow - # Attribute for field paypal - attr_reader :paypal - # Attribute for field payto - attr_reader :payto - # Attribute for field pix - attr_reader :pix - # Attribute for field promptpay - attr_reader :promptpay - # Attribute for field qris - attr_reader :qris - # Attribute for field rechnung - attr_reader :rechnung - # Attribute for field revolut_pay - attr_reader :revolut_pay - # Attribute for field samsung_pay - attr_reader :samsung_pay - # Attribute for field sepa_debit - attr_reader :sepa_debit - # Attribute for field shopeepay - attr_reader :shopeepay - # Attribute for field sofort - attr_reader :sofort - # Attribute for field swish - attr_reader :swish - # Attribute for field twint - attr_reader :twint - # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account - # Attribute for field wechat_pay - attr_reader :wechat_pay - # Attribute for field zip - attr_reader :zip + attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :allow_redisplay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :billing_details, :blik, :boleto, :card, :card_present, :cashapp, :customer, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_debit, :shopeepay, :sofort, :swish, :twint, :type, :us_bank_account, :wechat_pay, :zip end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone + attr_reader :address, :name, :phone end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. attr_reader :expires_at - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Data used for generating a Mandate. attr_reader :mandate_data - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. attr_reader :payment_intent - # Payment-method-specific configuration for this ConfirmationToken. attr_reader :payment_method_options - # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. attr_reader :payment_method_preview - # Return URL used to confirm the Intent. attr_reader :return_url - # Indicates that you intend to make future payments with this ConfirmationToken's payment method. # # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. attr_reader :setup_future_usage - # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. attr_reader :setup_intent - # Shipping information collected on this ConfirmationToken. attr_reader :shipping - # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. attr_reader :use_stripe_sdk diff --git a/lib/stripe/resources/connect_collection_transfer.rb b/lib/stripe/resources/connect_collection_transfer.rb index 9d7758899..3e0d4fc7a 100644 --- a/lib/stripe/resources/connect_collection_transfer.rb +++ b/lib/stripe/resources/connect_collection_transfer.rb @@ -10,19 +10,14 @@ def self.object_name # Amount transferred, in cents (or local equivalent). attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # ID of the account that funds are being collected for. attr_reader :destination - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/country_spec.rb b/lib/stripe/resources/country_spec.rb index 9ad1cde9e..9b4aebadd 100644 --- a/lib/stripe/resources/country_spec.rb +++ b/lib/stripe/resources/country_spec.rb @@ -18,44 +18,28 @@ def self.object_name class VerificationFields < Stripe::StripeObject class Company < Stripe::StripeObject - # Additional fields which are only required for some users. - attr_reader :additional - # Fields which every account must eventually provide. - attr_reader :minimum + attr_reader :additional, :minimum end class Individual < Stripe::StripeObject - # Additional fields which are only required for some users. - attr_reader :additional - # Fields which every account must eventually provide. - attr_reader :minimum + attr_reader :additional, :minimum end - # Attribute for field company - attr_reader :company - # Attribute for field individual - attr_reader :individual + attr_reader :company, :individual end # The default currency for this country. This applies to both payment methods and bank accounts. attr_reader :default_currency - # Unique identifier for the object. Represented as the ISO country code for this country. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Currencies that can be accepted in the specific country (for transfers). attr_reader :supported_bank_account_currencies - # Currencies that can be accepted in the specified country (for payments). attr_reader :supported_payment_currencies - # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). attr_reader :supported_payment_methods - # Countries that can accept transfers from the specified country. attr_reader :supported_transfer_countries - # Attribute for field verification_fields attr_reader :verification_fields diff --git a/lib/stripe/resources/coupon.rb b/lib/stripe/resources/coupon.rb index b58644a72..bef8d6eda 100644 --- a/lib/stripe/resources/coupon.rb +++ b/lib/stripe/resources/coupon.rb @@ -17,65 +17,46 @@ def self.object_name end class AppliesTo < Stripe::StripeObject - # A list of product IDs this coupon applies to attr_reader :products end class CurrencyOptions < Stripe::StripeObject - # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. attr_reader :amount_off end # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. attr_reader :amount_off - # Attribute for field applies_to attr_reader :applies_to - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. attr_reader :currency - # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency_options - # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. attr_reader :duration - # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. attr_reader :duration_in_months - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. attr_reader :max_redemptions - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Name of the coupon displayed to customers on for instance invoices or receipts. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. attr_reader :percent_off - # Date after which the coupon can no longer be redeemed. attr_reader :redeem_by - # Number of times this coupon has been applied to a customer. attr_reader :times_redeemed - # Taking account of the above properties, whether this coupon can still be applied to a customer. attr_reader :valid - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb index fe02be889..b2d1067b0 100644 --- a/lib/stripe/resources/credit_note.rb +++ b/lib/stripe/resources/credit_note.rb @@ -16,166 +16,93 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. - attr_reader :amount - # The discount that was applied to get this discount amount. - attr_reader :discount + attr_reader :amount, :discount end class PretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. - attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. - attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. - attr_reader :discount - # Type of the pretax credit amount referenced. - attr_reader :type + attr_reader :amount, :credit_balance_transaction, :discount, :type end class Refund < Stripe::StripeObject - # Amount of the refund that applies to this credit note, in cents (or local equivalent). - attr_reader :amount_refunded - # ID of the refund. - attr_reader :refund + attr_reader :amount_refunded, :refund end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # Total shipping cost before any taxes are applied. - attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. - attr_reader :amount_tax - # Total shipping cost after taxes are applied. - attr_reader :amount_total - # The ID of the ShippingRate for this invoice. - attr_reader :shipping_rate - # The taxes applied to the shipping rate. - attr_reader :taxes + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes end class TaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. - attr_reader :amount - # Whether this tax amount is inclusive or exclusive. - attr_reader :inclusive - # The tax rate that was applied to get this tax amount. - attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount end # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. attr_reader :amount - # This is the sum of all the shipping amounts. attr_reader :amount_shipping - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # ID of the customer. attr_reader :customer - # Customer balance transaction related to this credit note. attr_reader :customer_balance_transaction - # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. attr_reader :discount_amount - # The aggregate amounts calculated per discount for all line items. attr_reader :discount_amounts - # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. attr_reader :effective_at - # Unique identifier for the object. attr_reader :id - # ID of the invoice. attr_reader :invoice - # Line items that make up the credit note attr_reader :lines - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Customer-facing text that appears on the credit note PDF. attr_reader :memo - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. attr_reader :number - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Amount that was credited outside of Stripe. attr_reader :out_of_band_amount - # The link to download the PDF of the credit note. attr_reader :pdf - # Attribute for field post_payment_amount attr_reader :post_payment_amount - # Attribute for field pre_payment_amount attr_reader :pre_payment_amount - # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. attr_reader :pretax_credit_amounts - # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` attr_reader :reason - # Refund related to this credit note. attr_reader :refund - # Refunds related to this credit note. attr_reader :refunds - # The details of the cost of shipping, including the ShippingRate applied to the invoice. attr_reader :shipping_cost - # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). attr_reader :status - # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. attr_reader :subtotal - # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. attr_reader :subtotal_excluding_tax - # The aggregate amounts calculated per tax rate for all line items. attr_reader :tax_amounts - # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. attr_reader :total - # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. attr_reader :total_excluding_tax - # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. attr_reader :type - # The time that the credit note was voided. attr_reader :voided_at diff --git a/lib/stripe/resources/credit_note_line_item.rb b/lib/stripe/resources/credit_note_line_item.rb index 07110e212..072909b44 100644 --- a/lib/stripe/resources/credit_note_line_item.rb +++ b/lib/stripe/resources/credit_note_line_item.rb @@ -10,83 +10,48 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. - attr_reader :amount - # The discount that was applied to get this discount amount. - attr_reader :discount + attr_reader :amount, :discount end class PretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. - attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. - attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. - attr_reader :discount - # Type of the pretax credit amount referenced. - attr_reader :type + attr_reader :amount, :credit_balance_transaction, :discount, :type end class TaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. - attr_reader :amount - # Whether this tax amount is inclusive or exclusive. - attr_reader :inclusive - # The tax rate that was applied to get this tax amount. - attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount end # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. attr_reader :amount - # The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. attr_reader :amount_excluding_tax - # Description of the item being credited. attr_reader :description - # The integer amount in cents (or local equivalent) representing the discount being credited for this line item. attr_reader :discount_amount - # The amount of discount calculated per discount for this line item attr_reader :discount_amounts - # Unique identifier for the object. attr_reader :id - # ID of the invoice line item being credited attr_reader :invoice_line_item - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The pretax credit amounts (ex: discount, credit grants, etc) for this line item. attr_reader :pretax_credit_amounts - # The number of units of product being credited. attr_reader :quantity - # The amount of tax calculated per tax rate for this line item attr_reader :tax_amounts - # The tax rates which apply to the line item. attr_reader :tax_rates - # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. attr_reader :type - # The cost of each unit of product being credited. attr_reader :unit_amount - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. attr_reader :unit_amount_decimal - # The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. attr_reader :unit_amount_excluding_tax end diff --git a/lib/stripe/resources/customer.rb b/lib/stripe/resources/customer.rb index f24a9e361..5cb98dde4 100644 --- a/lib/stripe/resources/customer.rb +++ b/lib/stripe/resources/customer.rb @@ -23,177 +23,95 @@ def self.object_name nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list] class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class InvoiceSettings < Stripe::StripeObject class CustomField < Stripe::StripeObject - # The name of the custom field. - attr_reader :name - # The value of the custom field. - attr_reader :value + attr_reader :name, :value end class RenderingOptions < Stripe::StripeObject - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. - attr_reader :amount_tax_display - # ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. - attr_reader :template + attr_reader :amount_tax_display, :template end - # Default custom fields to be displayed on invoices for this customer. - attr_reader :custom_fields - # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. - attr_reader :default_payment_method - # Default footer to be displayed on invoices for this customer. - attr_reader :footer - # Default options for invoice PDF rendering for this customer. - attr_reader :rendering_options + attr_reader :custom_fields, :default_payment_method, :footer, :rendering_options end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end class Tax < Stripe::StripeObject class Location < Stripe::StripeObject - # The customer's country as identified by Stripe Tax. - attr_reader :country - # The data source used to infer the customer's location. - attr_reader :source - # The customer's state, county, province, or region as identified by Stripe Tax. - attr_reader :state + attr_reader :country, :source, :state end - # Surfaces if automatic tax computation is possible given the current customer location information. - attr_reader :automatic_tax - # A recent IP address of the customer used for tax reporting and tax location inference. - attr_reader :ip_address - # The customer's location as identified by Stripe Tax. - attr_reader :location + attr_reader :automatic_tax, :ip_address, :location end # The customer's address. attr_reader :address - # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. attr_reader :balance - # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. attr_reader :cash_balance - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. attr_reader :currency - # ID of the default payment source for the customer. # # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. attr_reader :default_source - # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. # # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. # # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. attr_reader :delinquent - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Describes the current discount active on the customer, if there is one. attr_reader :discount - # The customer's email address. attr_reader :email - # Unique identifier for the object. attr_reader :id - # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. attr_reader :invoice_credit_balance - # The prefix for the customer used to generate unique invoice numbers. attr_reader :invoice_prefix - # Attribute for field invoice_settings attr_reader :invoice_settings - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The customer's full name or business name. attr_reader :name - # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. attr_reader :next_invoice_sequence - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The customer's phone number. attr_reader :phone - # The customer's preferred locales (languages), ordered by preference. attr_reader :preferred_locales - # Mailing and shipping address for the customer. Appears on invoices emailed to this customer. attr_reader :shipping - # The customer's payment sources, if any. attr_reader :sources - # The customer's current subscriptions, if any. attr_reader :subscriptions - # Attribute for field tax attr_reader :tax - # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. attr_reader :tax_exempt - # The customer's tax IDs. attr_reader :tax_ids - # ID of the test clock that this customer belongs to. attr_reader :test_clock - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/customer_balance_transaction.rb b/lib/stripe/resources/customer_balance_transaction.rb index bb812dd43..9ad1d4b98 100644 --- a/lib/stripe/resources/customer_balance_transaction.rb +++ b/lib/stripe/resources/customer_balance_transaction.rb @@ -18,40 +18,28 @@ def self.object_name # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. attr_reader :amount - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The ID of the credit note (if any) related to the transaction. attr_reader :credit_note - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The ID of the customer the transaction belongs to. attr_reader :customer - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. attr_reader :ending_balance - # Unique identifier for the object. attr_reader :id - # The ID of the invoice (if any) related to the transaction. attr_reader :invoice - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. attr_reader :type diff --git a/lib/stripe/resources/customer_cash_balance_transaction.rb b/lib/stripe/resources/customer_cash_balance_transaction.rb index 94c991734..8413107e0 100644 --- a/lib/stripe/resources/customer_cash_balance_transaction.rb +++ b/lib/stripe/resources/customer_cash_balance_transaction.rb @@ -13,125 +13,74 @@ def self.object_name end class AdjustedForOverdraft < Stripe::StripeObject - # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. - attr_reader :balance_transaction - # The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. - attr_reader :linked_transaction + attr_reader :balance_transaction, :linked_transaction end class AppliedToPayment < Stripe::StripeObject - # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. attr_reader :payment_intent end class Funded < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The BIC of the bank of the sender of the funding. - attr_reader :bic - # The last 4 digits of the IBAN of the sender of the funding. - attr_reader :iban_last4 - # The full name of the sender, as supplied by the sending bank. - attr_reader :sender_name + attr_reader :bic, :iban_last4, :sender_name end class GbBankTransfer < Stripe::StripeObject - # The last 4 digits of the account number of the sender of the funding. - attr_reader :account_number_last4 - # The full name of the sender, as supplied by the sending bank. - attr_reader :sender_name - # The sort code of the bank of the sender of the funding - attr_reader :sort_code + attr_reader :account_number_last4, :sender_name, :sort_code end class JpBankTransfer < Stripe::StripeObject - # The name of the bank of the sender of the funding. - attr_reader :sender_bank - # The name of the bank branch of the sender of the funding. - attr_reader :sender_branch - # The full name of the sender, as supplied by the sending bank. - attr_reader :sender_name + attr_reader :sender_bank, :sender_branch, :sender_name end class UsBankTransfer < Stripe::StripeObject - # The banking network used for this funding. - attr_reader :network - # The full name of the sender, as supplied by the sending bank. - attr_reader :sender_name + attr_reader :network, :sender_name end - # Attribute for field eu_bank_transfer - attr_reader :eu_bank_transfer - # Attribute for field gb_bank_transfer - attr_reader :gb_bank_transfer - # Attribute for field jp_bank_transfer - attr_reader :jp_bank_transfer - # The user-supplied reference field on the bank transfer. - attr_reader :reference - # The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - attr_reader :type - # Attribute for field us_bank_transfer - attr_reader :us_bank_transfer + attr_reader :eu_bank_transfer, :gb_bank_transfer, :jp_bank_transfer, :reference, :type, :us_bank_transfer end - # Attribute for field bank_transfer attr_reader :bank_transfer end class RefundedFromPayment < Stripe::StripeObject - # The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. attr_reader :refund end class TransferredToBalance < Stripe::StripeObject - # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. attr_reader :balance_transaction end class UnappliedFromPayment < Stripe::StripeObject - # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. attr_reader :payment_intent end # Attribute for field adjusted_for_overdraft attr_reader :adjusted_for_overdraft - # Attribute for field applied_to_payment attr_reader :applied_to_payment - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The customer whose available cash balance changed as a result of this transaction. attr_reader :customer - # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :ending_balance - # Attribute for field funded attr_reader :funded - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. attr_reader :net_amount - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field refunded_from_payment attr_reader :refunded_from_payment - # Attribute for field transferred_to_balance attr_reader :transferred_to_balance - # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. attr_reader :type - # Attribute for field unapplied_from_payment attr_reader :unapplied_from_payment end diff --git a/lib/stripe/resources/customer_session.rb b/lib/stripe/resources/customer_session.rb index 513bd9ace..0d5ba8954 100644 --- a/lib/stripe/resources/customer_session.rb +++ b/lib/stripe/resources/customer_session.rb @@ -18,70 +18,35 @@ def self.object_name class Components < Stripe::StripeObject class BuyButton < Stripe::StripeObject - # Whether the buy button is enabled. attr_reader :enabled end class PaymentElement < Stripe::StripeObject class Features < Stripe::StripeObject - # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. - # - # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. - attr_reader :payment_method_allow_redisplay_filters - # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. - attr_reader :payment_method_redisplay - # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. - attr_reader :payment_method_redisplay_limit - # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. - # - # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). - attr_reader :payment_method_remove - # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. - # - # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. - attr_reader :payment_method_save - # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. - # - # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. - attr_reader :payment_method_save_usage + attr_reader :payment_method_allow_redisplay_filters, :payment_method_redisplay, :payment_method_redisplay_limit, :payment_method_remove, :payment_method_save, :payment_method_save_usage end - # Whether the Payment Element is enabled. - attr_reader :enabled - # This hash defines whether the Payment Element supports certain features. - attr_reader :features + attr_reader :enabled, :features end class PricingTable < Stripe::StripeObject - # Whether the pricing table is enabled. attr_reader :enabled end - # This hash contains whether the buy button is enabled. - attr_reader :buy_button - # This hash contains whether the Payment Element is enabled and the features it supports. - attr_reader :payment_element - # This hash contains whether the pricing table is enabled. - attr_reader :pricing_table + attr_reader :buy_button, :payment_element, :pricing_table end # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. # # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. attr_reader :client_secret - # Configuration for the components supported by this Customer Session. attr_reader :components - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The Customer the Customer Session was created for. attr_reader :customer - # The timestamp at which this Customer Session will expire. attr_reader :expires_at - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/discount.rb b/lib/stripe/resources/discount.rb index ed9af3c6e..4be0398a3 100644 --- a/lib/stripe/resources/discount.rb +++ b/lib/stripe/resources/discount.rb @@ -14,42 +14,30 @@ def self.object_name # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. attr_reader :checkout_session - # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). attr_reader :coupon - # The ID of the customer associated with this discount. attr_reader :customer - # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. attr_reader :end - # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. attr_reader :id - # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. attr_reader :invoice - # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. attr_reader :invoice_item - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The promotion code applied to create this discount. attr_reader :promotion_code - # Date that the coupon was applied. attr_reader :start - # The subscription that this coupon is applied to, if it is applied to a particular subscription. attr_reader :subscription - # The subscription item that this coupon is applied to, if it is applied to a particular subscription item. attr_reader :subscription_item - # Always true for a deleted object attr_reader :deleted end diff --git a/lib/stripe/resources/dispute.rb b/lib/stripe/resources/dispute.rb index 07de5aeb1..ad46a11ba 100644 --- a/lib/stripe/resources/dispute.rb +++ b/lib/stripe/resources/dispute.rb @@ -21,246 +21,86 @@ class EnhancedEvidence < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject class DisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # User Account ID used to log into business platform. Must be recognizable by the user. - attr_reader :customer_account_id - # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. - attr_reader :customer_device_fingerprint - # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. - attr_reader :customer_device_id - # The email address of the customer. - attr_reader :customer_email_address - # The IP address that the customer used when making the purchase. - attr_reader :customer_purchase_ip - # Categorization of disputed payment. - attr_reader :merchandise_or_services - # A description of the product or service that was sold. - attr_reader :product_description - # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. - attr_reader :shipping_address + attr_reader :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :merchandise_or_services, :product_description, :shipping_address end class PriorUndisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. - attr_reader :charge - # User Account ID used to log into business platform. Must be recognizable by the user. - attr_reader :customer_account_id - # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. - attr_reader :customer_device_fingerprint - # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. - attr_reader :customer_device_id - # The email address of the customer. - attr_reader :customer_email_address - # The IP address that the customer used when making the purchase. - attr_reader :customer_purchase_ip - # A description of the product or service that was sold. - attr_reader :product_description - # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. - attr_reader :shipping_address + attr_reader :charge, :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :product_description, :shipping_address end - # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. - attr_reader :disputed_transaction - # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. - attr_reader :prior_undisputed_transactions + attr_reader :disputed_transaction, :prior_undisputed_transactions end - # Attribute for field visa_compelling_evidence_3 attr_reader :visa_compelling_evidence_3 end - # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. - attr_reader :access_activity_log - # The billing address provided by the customer. - attr_reader :billing_address - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. - attr_reader :cancellation_policy - # An explanation of how and when the customer was shown your refund policy prior to purchase. - attr_reader :cancellation_policy_disclosure - # A justification for why the customer's subscription was not canceled. - attr_reader :cancellation_rebuttal - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. - attr_reader :customer_communication - # The email address of the customer. - attr_reader :customer_email_address - # The name of the customer. - attr_reader :customer_name - # The IP address that the customer used when making the purchase. - attr_reader :customer_purchase_ip - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. - attr_reader :customer_signature - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. - attr_reader :duplicate_charge_documentation - # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. - attr_reader :duplicate_charge_explanation - # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. - attr_reader :duplicate_charge_id - # Attribute for field enhanced_evidence - attr_reader :enhanced_evidence - # A description of the product or service that was sold. - attr_reader :product_description - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. - attr_reader :receipt - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. - attr_reader :refund_policy - # Documentation demonstrating that the customer was shown your refund policy prior to purchase. - attr_reader :refund_policy_disclosure - # A justification for why the customer is not entitled to a refund. - attr_reader :refund_refusal_explanation - # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. - attr_reader :service_date - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. - attr_reader :service_documentation - # The address to which a physical product was shipped. You should try to include as complete address information as possible. - attr_reader :shipping_address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. - attr_reader :shipping_carrier - # The date on which a physical product began its route to the shipping address, in a clear human-readable format. - attr_reader :shipping_date - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. - attr_reader :shipping_documentation - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :shipping_tracking_number - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. - attr_reader :uncategorized_file - # Any additional evidence or statements. - attr_reader :uncategorized_text + attr_reader :access_activity_log, :billing_address, :cancellation_policy, :cancellation_policy_disclosure, :cancellation_rebuttal, :customer_communication, :customer_email_address, :customer_name, :customer_purchase_ip, :customer_signature, :duplicate_charge_documentation, :duplicate_charge_explanation, :duplicate_charge_id, :enhanced_evidence, :product_description, :receipt, :refund_policy, :refund_policy_disclosure, :refund_refusal_explanation, :service_date, :service_documentation, :shipping_address, :shipping_carrier, :shipping_date, :shipping_documentation, :shipping_tracking_number, :uncategorized_file, :uncategorized_text end class EvidenceDetails < Stripe::StripeObject class EnhancedEligibility < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject - # List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. - attr_reader :required_actions - # Visa Compelling Evidence 3.0 eligibility status. - attr_reader :status + attr_reader :required_actions, :status end - # Attribute for field visa_compelling_evidence_3 attr_reader :visa_compelling_evidence_3 end - # Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. - attr_reader :due_by - # Attribute for field enhanced_eligibility - attr_reader :enhanced_eligibility - # Whether evidence has been staged for this dispute. - attr_reader :has_evidence - # Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. - attr_reader :past_due - # The number of times evidence has been submitted. Typically, you may only submit evidence once. - attr_reader :submission_count + attr_reader :due_by, :enhanced_eligibility, :has_evidence, :past_due, :submission_count end class PaymentMethodDetails < Stripe::StripeObject class AmazonPay < Stripe::StripeObject - # The AmazonPay dispute type, chargeback or claim attr_reader :dispute_type end class Card < Stripe::StripeObject - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # The type of dispute opened. Different case types may have varying fees and financial impact. - attr_reader :case_type - # The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. - attr_reader :network_reason_code + attr_reader :brand, :case_type, :network_reason_code end class Klarna < Stripe::StripeObject - # The reason for the dispute as defined by Klarna attr_reader :reason_code end class Paypal < Stripe::StripeObject - # The ID of the dispute in PayPal. - attr_reader :case_id - # The reason for the dispute as defined by PayPal - attr_reader :reason_code + attr_reader :case_id, :reason_code end - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field card - attr_reader :card - # Attribute for field klarna - attr_reader :klarna - # Attribute for field paypal - attr_reader :paypal - # Payment method type. - attr_reader :type + attr_reader :amazon_pay, :card, :klarna, :paypal, :type end # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). attr_reader :amount - # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. attr_reader :balance_transactions - # ID of the charge that's disputed. attr_reader :charge - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # List of eligibility types that are included in `enhanced_evidence`. attr_reader :enhanced_eligibility_types - # Attribute for field evidence attr_reader :evidence - # Attribute for field evidence_details attr_reader :evidence_details - # Unique identifier for the object. attr_reader :id - # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. attr_reader :is_charge_refundable - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Network-dependent reason code for the dispute. attr_reader :network_reason_code - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # ID of the PaymentIntent that's disputed. attr_reader :payment_intent - # Attribute for field payment_method_details attr_reader :payment_method_details - # Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). attr_reader :reason - # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. attr_reader :status diff --git a/lib/stripe/resources/entitlements/active_entitlement.rb b/lib/stripe/resources/entitlements/active_entitlement.rb index abb05c3b8..76dd2e814 100644 --- a/lib/stripe/resources/entitlements/active_entitlement.rb +++ b/lib/stripe/resources/entitlements/active_entitlement.rb @@ -14,16 +14,12 @@ def self.object_name # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. attr_reader :feature - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # A unique key you provide as your own system identifier. This may be up to 80 characters. attr_reader :lookup_key - # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/entitlements/active_entitlement_summary.rb b/lib/stripe/resources/entitlements/active_entitlement_summary.rb index 2680c7c3f..7fd0fa7fc 100644 --- a/lib/stripe/resources/entitlements/active_entitlement_summary.rb +++ b/lib/stripe/resources/entitlements/active_entitlement_summary.rb @@ -12,13 +12,10 @@ def self.object_name # The customer that is entitled to this feature. attr_reader :customer - # The list of entitlements this customer has. attr_reader :entitlements - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/entitlements/feature.rb b/lib/stripe/resources/entitlements/feature.rb index 023acb2a9..818f93eda 100644 --- a/lib/stripe/resources/entitlements/feature.rb +++ b/lib/stripe/resources/entitlements/feature.rb @@ -17,22 +17,16 @@ def self.object_name # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. attr_reader :active - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # A unique key you provide as your own system identifier. This may be up to 80 characters. attr_reader :lookup_key - # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The feature's name, for your own purpose, not meant to be displayable to the customer. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/ephemeral_key.rb b/lib/stripe/resources/ephemeral_key.rb index baff0304d..55ace3a75 100644 --- a/lib/stripe/resources/ephemeral_key.rb +++ b/lib/stripe/resources/ephemeral_key.rb @@ -13,19 +13,14 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Time at which the key will expire. Measured in seconds since the Unix epoch. attr_reader :expires - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The key's secret. You can use this value to make authorized requests to the Stripe API. attr_reader :secret diff --git a/lib/stripe/resources/event.rb b/lib/stripe/resources/event.rb index b96f88161..881dd9a7e 100644 --- a/lib/stripe/resources/event.rb +++ b/lib/stripe/resources/event.rb @@ -41,77 +41,46 @@ def self.object_name end class Data < Stripe::StripeObject - # Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. - attr_reader :object - # Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. - attr_reader :previous_attributes + attr_reader :object, :previous_attributes end class Reason < Stripe::StripeObject class AutomationAction < Stripe::StripeObject class StripeSendWebhookCustomEvent < Stripe::StripeObject - # Set of key-value pairs attached to the action when creating an Automation. attr_reader :custom_data end - # Attribute for field stripe_send_webhook_custom_event - attr_reader :stripe_send_webhook_custom_event - # The trigger name of the automation that triggered this action. - # Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names. - attr_reader :trigger - # The type of the `automation_action`. - attr_reader :type + attr_reader :stripe_send_webhook_custom_event, :trigger, :type end class Request < Stripe::StripeObject - # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. - attr_reader :id - # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. - attr_reader :idempotency_key + attr_reader :id, :idempotency_key end - # Attribute for field automation_action - attr_reader :automation_action - # Attribute for field request - attr_reader :request - # The type of the reason for the event. - attr_reader :type + attr_reader :automation_action, :request, :type end class Request < Stripe::StripeObject - # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. - attr_reader :id - # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. - attr_reader :idempotency_key + attr_reader :id, :idempotency_key end # The connected account that originates the event. attr_reader :account - # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. attr_reader :api_version - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Attribute for field data attr_reader :data - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. attr_reader :pending_webhooks - # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. attr_reader :reason - # Information on the API request that triggers the event. attr_reader :request - # Description of the event (for example, `invoice.created` or `charge.refunded`). attr_reader :type diff --git a/lib/stripe/resources/exchange_rate.rb b/lib/stripe/resources/exchange_rate.rb index 89875999e..cf00aa263 100644 --- a/lib/stripe/resources/exchange_rate.rb +++ b/lib/stripe/resources/exchange_rate.rb @@ -38,10 +38,8 @@ def self.object_name # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. attr_reader :rates diff --git a/lib/stripe/resources/file.rb b/lib/stripe/resources/file.rb index a713d0d58..0f490f61a 100644 --- a/lib/stripe/resources/file.rb +++ b/lib/stripe/resources/file.rb @@ -20,34 +20,24 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The file expires and isn't available at this time in epoch seconds. attr_reader :expires_at - # The suitable name for saving the file to a filesystem. attr_reader :filename - # Unique identifier for the object. attr_reader :id - # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. attr_reader :links - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. attr_reader :purpose - # The size of the file object in bytes. attr_reader :size - # A suitable title for the document. attr_reader :title - # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). attr_reader :type - # Use your live secret API key to download the file from this URL. attr_reader :url diff --git a/lib/stripe/resources/file_link.rb b/lib/stripe/resources/file_link.rb index eb187b8c1..52b89a9c1 100644 --- a/lib/stripe/resources/file_link.rb +++ b/lib/stripe/resources/file_link.rb @@ -17,28 +17,20 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Returns if the link is already expired. attr_reader :expired - # Time that the link expires. attr_reader :expires_at - # The file object this link points to. attr_reader :file - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The publicly accessible URL to download the file. attr_reader :url diff --git a/lib/stripe/resources/financial_connections/account.rb b/lib/stripe/resources/financial_connections/account.rb index e54110cae..ecd842c08 100644 --- a/lib/stripe/resources/financial_connections/account.rb +++ b/lib/stripe/resources/financial_connections/account.rb @@ -16,133 +16,67 @@ def self.object_name nested_resource_class_methods :inferred_balance, operations: %i[list] class AccountHolder < Stripe::StripeObject - # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. - attr_reader :account - # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. - attr_reader :customer - # Type of account holder that this account belongs to. - attr_reader :type + attr_reader :account, :customer, :type end class Balance < Stripe::StripeObject class Cash < Stripe::StripeObject - # The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. - # - # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. - # - # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. attr_reader :available end class Credit < Stripe::StripeObject - # The credit that has been used by the account holder. - # - # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. - # - # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. attr_reader :used end - # The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. - attr_reader :as_of - # Attribute for field cash - attr_reader :cash - # Attribute for field credit - attr_reader :credit - # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. - # - # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. - # - # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. - attr_reader :current - # The `type` of the balance. An additional hash is included on the balance with a name matching this value. - attr_reader :type + attr_reader :as_of, :cash, :credit, :current, :type end class BalanceRefresh < Stripe::StripeObject - # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. - attr_reader :last_attempted_at - # Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. - attr_reader :next_refresh_available_at - # The status of the last refresh attempt. - attr_reader :status + attr_reader :last_attempted_at, :next_refresh_available_at, :status end class InferredBalancesRefresh < Stripe::StripeObject - # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. - attr_reader :last_attempted_at - # Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. - attr_reader :next_refresh_available_at - # The status of the last refresh attempt. - attr_reader :status + attr_reader :last_attempted_at, :next_refresh_available_at, :status end class OwnershipRefresh < Stripe::StripeObject - # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. - attr_reader :last_attempted_at - # Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. - attr_reader :next_refresh_available_at - # The status of the last refresh attempt. - attr_reader :status + attr_reader :last_attempted_at, :next_refresh_available_at, :status end class TransactionRefresh < Stripe::StripeObject - # Unique identifier for the object. - attr_reader :id - # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. - attr_reader :last_attempted_at - # Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. - attr_reader :next_refresh_available_at - # The status of the last refresh attempt. - attr_reader :status + attr_reader :id, :last_attempted_at, :next_refresh_available_at, :status end # The account holder that this account belongs to. attr_reader :account_holder - # The most recent information about the account's balance. attr_reader :balance - # The state of the most recent attempt to refresh the account balance. attr_reader :balance_refresh - # The type of the account. Account category is further divided in `subcategory`. attr_reader :category - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # A human-readable name that has been assigned to this account, either by the account holder or by the institution. attr_reader :display_name - # Unique identifier for the object. attr_reader :id - # The state of the most recent attempt to refresh the account's inferred balance history. attr_reader :inferred_balances_refresh - # The name of the institution that holds this account. attr_reader :institution_name - # The last 4 digits of the account number. If present, this will be 4 numeric characters. attr_reader :last4 - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The most recent information about the account's owners. attr_reader :ownership - # The state of the most recent attempt to refresh the account owners. attr_reader :ownership_refresh - # The list of permissions granted by this account. attr_reader :permissions - # The status of the link to the account. attr_reader :status - # If `category` is `cash`, one of: # # - `checking` @@ -158,13 +92,10 @@ class TransactionRefresh < Stripe::StripeObject # # If `category` is `investment` or `other`, this will be `other`. attr_reader :subcategory - # The list of data refresh subscriptions requested on this account. attr_reader :subscriptions - # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. attr_reader :supported_payment_method_types - # The state of the most recent attempt to refresh the account transactions. attr_reader :transaction_refresh diff --git a/lib/stripe/resources/financial_connections/account_inferred_balance.rb b/lib/stripe/resources/financial_connections/account_inferred_balance.rb index 82b328f23..25176af79 100644 --- a/lib/stripe/resources/financial_connections/account_inferred_balance.rb +++ b/lib/stripe/resources/financial_connections/account_inferred_balance.rb @@ -12,17 +12,14 @@ def self.object_name # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. attr_reader :as_of - # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. # # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. # # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. attr_reader :current - # Unique identifier for the object. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/financial_connections/account_owner.rb b/lib/stripe/resources/financial_connections/account_owner.rb index 43d6754a2..c5ef98197 100644 --- a/lib/stripe/resources/financial_connections/account_owner.rb +++ b/lib/stripe/resources/financial_connections/account_owner.rb @@ -12,25 +12,18 @@ def self.object_name # The email address of the owner. attr_reader :email - # Unique identifier for the object. attr_reader :id - # The full name of the owner. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The ownership object that this owner belongs to. attr_reader :ownership - # The raw phone number of the owner. attr_reader :phone - # The raw physical address of the owner. attr_reader :raw_address - # The timestamp of the refresh that updated this owner. attr_reader :refreshed_at end diff --git a/lib/stripe/resources/financial_connections/account_ownership.rb b/lib/stripe/resources/financial_connections/account_ownership.rb index a8996967b..439272e0e 100644 --- a/lib/stripe/resources/financial_connections/account_ownership.rb +++ b/lib/stripe/resources/financial_connections/account_ownership.rb @@ -12,13 +12,10 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # A paginated list of owners for this account. attr_reader :owners end diff --git a/lib/stripe/resources/financial_connections/institution.rb b/lib/stripe/resources/financial_connections/institution.rb index c1567d1f4..8bf8f0b03 100644 --- a/lib/stripe/resources/financial_connections/institution.rb +++ b/lib/stripe/resources/financial_connections/institution.rb @@ -14,54 +14,36 @@ def self.object_name class Features < Stripe::StripeObject class Balances < Stripe::StripeObject - # Whether the given feature is supported by this institution. attr_reader :supported end class Ownership < Stripe::StripeObject - # Whether the given feature is supported by this institution. attr_reader :supported end class PaymentMethod < Stripe::StripeObject - # Whether the given feature is supported by this institution. attr_reader :supported end class Transactions < Stripe::StripeObject - # Whether the given feature is supported by this institution. attr_reader :supported end - # Attribute for field balances - attr_reader :balances - # Attribute for field ownership - attr_reader :ownership - # Attribute for field payment_method - attr_reader :payment_method - # Attribute for field transactions - attr_reader :transactions + attr_reader :balances, :ownership, :payment_method, :transactions end # Attribute for field features attr_reader :features - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The name of this institution. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. attr_reader :routing_numbers - # The status of this institution in the Financial Connections authentication flow. attr_reader :status - # A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. attr_reader :url diff --git a/lib/stripe/resources/financial_connections/session.rb b/lib/stripe/resources/financial_connections/session.rb index baba362b6..5ceb2036f 100644 --- a/lib/stripe/resources/financial_connections/session.rb +++ b/lib/stripe/resources/financial_connections/session.rb @@ -13,25 +13,14 @@ def self.object_name end class AccountHolder < Stripe::StripeObject - # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. - attr_reader :account - # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. - attr_reader :customer - # Type of account holder that this account belongs to. - attr_reader :type + attr_reader :account, :customer, :type end class Filters < Stripe::StripeObject - # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. - attr_reader :account_subcategories - # List of countries from which to filter accounts. - attr_reader :countries - # Stripe ID of the institution with which the customer should be directed to log in. - attr_reader :institution + attr_reader :account_subcategories, :countries, :institution end class Limits < Stripe::StripeObject - # The number of accounts that can be linked in this Session. attr_reader :accounts end @@ -39,51 +28,36 @@ class ManualEntry < Stripe::StripeObject; end class StatusDetails < Stripe::StripeObject class Cancelled < Stripe::StripeObject - # The reason for the Session being cancelled. attr_reader :reason end - # Attribute for field cancelled attr_reader :cancelled end # The account holder for whom accounts are collected in this session. attr_reader :account_holder - # The accounts that were collected as part of this Session. attr_reader :accounts - # A value that will be passed to the client to launch the authentication flow. attr_reader :client_secret - # Attribute for field filters attr_reader :filters - # Unique identifier for the object. attr_reader :id - # Attribute for field limits attr_reader :limits - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Attribute for field manual_entry attr_reader :manual_entry - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Permissions requested for accounts collected during this session. attr_reader :permissions - # Data features requested to be retrieved upon account creation. attr_reader :prefetch - # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. attr_reader :return_url - # The current state of the session. attr_reader :status - # Attribute for field status_details attr_reader :status_details diff --git a/lib/stripe/resources/financial_connections/transaction.rb b/lib/stripe/resources/financial_connections/transaction.rb index 2f61489fb..1bf15f3cb 100644 --- a/lib/stripe/resources/financial_connections/transaction.rb +++ b/lib/stripe/resources/financial_connections/transaction.rb @@ -13,44 +13,30 @@ def self.object_name end class StatusTransitions < Stripe::StripeObject - # Time at which this transaction posted. Measured in seconds since the Unix epoch. - attr_reader :posted_at - # Time at which this transaction was voided. Measured in seconds since the Unix epoch. - attr_reader :void_at + attr_reader :posted_at, :void_at end # The ID of the Financial Connections Account this transaction belongs to. attr_reader :account - # The amount of this transaction, in cents (or local equivalent). attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The description of this transaction. attr_reader :description - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The status of the transaction. attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # Time at which the transaction was transacted. Measured in seconds since the Unix epoch. attr_reader :transacted_at - # The token of the transaction refresh that last updated or created this transaction. attr_reader :transaction_refresh - # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated diff --git a/lib/stripe/resources/forwarding/request.rb b/lib/stripe/resources/forwarding/request.rb index 14a908ace..c66e94fdc 100644 --- a/lib/stripe/resources/forwarding/request.rb +++ b/lib/stripe/resources/forwarding/request.rb @@ -29,71 +29,42 @@ def self.object_name end class RequestContext < Stripe::StripeObject - # The time it took in milliseconds for the destination endpoint to respond. - attr_reader :destination_duration - # The IP address of the destination. - attr_reader :destination_ip_address + attr_reader :destination_duration, :destination_ip_address end class RequestDetails < Stripe::StripeObject class Header < Stripe::StripeObject - # The header name. - attr_reader :name - # The header value. - attr_reader :value + attr_reader :name, :value end - # The body payload to send to the destination endpoint. - attr_reader :body - # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. - attr_reader :headers - # The HTTP method used to call the destination endpoint. - attr_reader :http_method + attr_reader :body, :headers, :http_method end class ResponseDetails < Stripe::StripeObject class Header < Stripe::StripeObject - # The header name. - attr_reader :name - # The header value. - attr_reader :value + attr_reader :name, :value end - # The response body from the destination endpoint to Stripe. - attr_reader :body - # HTTP headers that the destination endpoint returned. - attr_reader :headers - # The HTTP status code that the destination endpoint returned. - attr_reader :status + attr_reader :body, :headers, :status end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. attr_reader :payment_method - # The field kinds to be replaced in the forwarded request. attr_reader :replacements - # Context about the request from Stripe's servers to the destination endpoint. attr_reader :request_context - # The request that was sent to the destination endpoint. We redact any sensitive fields. attr_reader :request_details - # The response that the destination endpoint returned to us. We redact any sensitive fields. attr_reader :response_details - # The destination URL for the forwarded request. Must be supported by the config. attr_reader :url diff --git a/lib/stripe/resources/funding_instructions.rb b/lib/stripe/resources/funding_instructions.rb index 60315cd0e..c43585f17 100644 --- a/lib/stripe/resources/funding_instructions.rb +++ b/lib/stripe/resources/funding_instructions.rb @@ -17,311 +17,81 @@ class BankTransfer < Stripe::StripeObject class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The account holder name - attr_reader :account_holder_name - # The ABA account number - attr_reader :account_number - # The account type - attr_reader :account_type - # Attribute for field bank_address - attr_reader :bank_address - # The bank name - attr_reader :bank_name - # The ABA routing number - attr_reader :routing_number + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :routing_number end class Iban < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The name of the person or business that owns the bank account - attr_reader :account_holder_name - # Attribute for field bank_address - attr_reader :bank_address - # The BIC/SWIFT code of the account. - attr_reader :bic - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # The IBAN of the account. - attr_reader :iban + attr_reader :account_holder_address, :account_holder_name, :bank_address, :bic, :country, :iban end class SortCode < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The name of the person or business that owns the bank account - attr_reader :account_holder_name - # The account number - attr_reader :account_number - # Attribute for field bank_address - attr_reader :bank_address - # The six-digit sort code - attr_reader :sort_code + attr_reader :account_holder_address, :account_holder_name, :account_number, :bank_address, :sort_code end class Spei < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The account holder name - attr_reader :account_holder_name - # Attribute for field bank_address - attr_reader :bank_address - # The three-digit bank code - attr_reader :bank_code - # The short banking institution name - attr_reader :bank_name - # The CLABE number - attr_reader :clabe + attr_reader :account_holder_address, :account_holder_name, :bank_address, :bank_code, :bank_name, :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The account holder name - attr_reader :account_holder_name - # The account number - attr_reader :account_number - # The account type - attr_reader :account_type - # Attribute for field bank_address - attr_reader :bank_address - # The bank name - attr_reader :bank_name - # The SWIFT code - attr_reader :swift_code + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :swift_code end class Zengin < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The account holder name - attr_reader :account_holder_name - # The account number - attr_reader :account_number - # The bank account type. In Japan, this can only be `futsu` or `toza`. - attr_reader :account_type - # Attribute for field bank_address - attr_reader :bank_address - # The bank code of the account - attr_reader :bank_code - # The bank name of the account - attr_reader :bank_name - # The branch code of the account - attr_reader :branch_code - # The branch name of the account - attr_reader :branch_name + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_code, :bank_name, :branch_code, :branch_name end - # ABA Records contain U.S. bank account details per the ABA format. - attr_reader :aba - # Iban Records contain E.U. bank account details per the SEPA format. - attr_reader :iban - # Sort Code Records contain U.K. bank account details per the sort code format. - attr_reader :sort_code - # SPEI Records contain Mexico bank account details per the SPEI format. - attr_reader :spei - # The payment networks supported by this FinancialAddress - attr_reader :supported_networks - # SWIFT Records contain U.S. bank account details per the SWIFT format. - attr_reader :swift - # The type of financial address - attr_reader :type - # Zengin Records contain Japan bank account details per the Zengin format. - attr_reader :zengin + attr_reader :aba, :iban, :sort_code, :spei, :supported_networks, :swift, :type, :zengin end - # The country of the bank account to fund - attr_reader :country - # A list of financial addresses that can be used to fund a particular balance - attr_reader :financial_addresses - # The bank_transfer type - attr_reader :type + attr_reader :country, :financial_addresses, :type end # Attribute for field bank_transfer attr_reader :bank_transfer - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The `funding_type` of the returned instructions attr_reader :funding_type - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/gift_cards/card.rb b/lib/stripe/resources/gift_cards/card.rb index cab803961..b8fd8e4cd 100644 --- a/lib/stripe/resources/gift_cards/card.rb +++ b/lib/stripe/resources/gift_cards/card.rb @@ -17,62 +17,38 @@ def self.object_name class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject - # The Stripe CheckoutSession that created this object. - attr_reader :checkout_session - # The Stripe CheckoutSession LineItem that created this object. - attr_reader :line_item + attr_reader :checkout_session, :line_item end class Order < Stripe::StripeObject - # The Stripe Order LineItem that created this object. - attr_reader :line_item - # The Stripe Order that created this object. - attr_reader :order + attr_reader :line_item, :order end class Payment < Stripe::StripeObject - # The PaymentIntent that created this object. attr_reader :payment_intent end - # Attribute for field checkout - attr_reader :checkout - # Attribute for field order - attr_reader :order - # Attribute for field payment - attr_reader :payment - # The type of event that created this object. - attr_reader :type + attr_reader :checkout, :order, :payment, :type end # Whether this gift card can be used or not. attr_reader :active - # The amount of funds available for new transactions. attr_reader :amount_available - # The amount of funds marked as held. attr_reader :amount_held - # Code used to redeem this gift card. attr_reader :code - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The related Stripe objects that created this gift card. attr_reader :created_by - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Unique identifier for the object. attr_reader :id - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Transactions on this gift card. attr_reader :transactions diff --git a/lib/stripe/resources/gift_cards/transaction.rb b/lib/stripe/resources/gift_cards/transaction.rb index a9420df81..88b538ce2 100644 --- a/lib/stripe/resources/gift_cards/transaction.rb +++ b/lib/stripe/resources/gift_cards/transaction.rb @@ -21,65 +21,40 @@ def self.object_name class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject - # The Stripe CheckoutSession that created this object. - attr_reader :checkout_session - # The Stripe CheckoutSession LineItem that created this object. - attr_reader :line_item + attr_reader :checkout_session, :line_item end class Order < Stripe::StripeObject - # The Stripe Order LineItem that created this object. - attr_reader :line_item - # The Stripe Order that created this object. - attr_reader :order + attr_reader :line_item, :order end class Payment < Stripe::StripeObject - # The PaymentIntent that created this object. attr_reader :payment_intent end - # Attribute for field checkout - attr_reader :checkout - # Attribute for field order - attr_reader :order - # Attribute for field payment - attr_reader :payment - # The type of event that created this object. - attr_reader :type + attr_reader :checkout, :order, :payment, :type end # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. attr_reader :amount - # Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. attr_reader :confirmed_at - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The related Stripe objects that created this gift card transaction. attr_reader :created_by - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # The gift card that this transaction occurred on attr_reader :gift_card - # Unique identifier for the object. attr_reader :id - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Status of this transaction, one of `held`, `confirmed`, or `canceled`. attr_reader :status - # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. attr_reader :transfer_group diff --git a/lib/stripe/resources/identity/verification_report.rb b/lib/stripe/resources/identity/verification_report.rb index 725a5e27b..37f4a6a73 100644 --- a/lib/stripe/resources/identity/verification_report.rb +++ b/lib/stripe/resources/identity/verification_report.rb @@ -24,215 +24,93 @@ def self.object_name class Document < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class Dob < Stripe::StripeObject - # Numerical day between 1 and 31. - attr_reader :day - # Numerical month between 1 and 12. - attr_reader :month - # The four-digit year. - attr_reader :year + attr_reader :day, :month, :year end class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. - attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. - attr_reader :reason + attr_reader :code, :reason end class ExpirationDate < Stripe::StripeObject - # Numerical day between 1 and 31. - attr_reader :day - # Numerical month between 1 and 12. - attr_reader :month - # The four-digit year. - attr_reader :year + attr_reader :day, :month, :year end class IssuedDate < Stripe::StripeObject - # Numerical day between 1 and 31. - attr_reader :day - # Numerical month between 1 and 12. - attr_reader :month - # The four-digit year. - attr_reader :year + attr_reader :day, :month, :year end - # Address as it appears in the document. - attr_reader :address - # Date of birth as it appears in the document. - attr_reader :dob - # Details on the verification error. Present when status is `unverified`. - attr_reader :error - # Expiration date of the document. - attr_reader :expiration_date - # Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. - attr_reader :files - # First name as it appears in the document. - attr_reader :first_name - # Issued date of the document. - attr_reader :issued_date - # Issuing country of the document. - attr_reader :issuing_country - # Last name as it appears in the document. - attr_reader :last_name - # Document ID number. - attr_reader :number - # Status of this `document` check. - attr_reader :status - # Type of the document. - attr_reader :type + attr_reader :address, :dob, :error, :expiration_date, :files, :first_name, :issued_date, :issuing_country, :last_name, :number, :status, :type end class Email < Stripe::StripeObject class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. - attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. - attr_reader :reason + attr_reader :code, :reason end - # Email to be verified. - attr_reader :email - # Details on the verification error. Present when status is `unverified`. - attr_reader :error - # Status of this `email` check. - attr_reader :status + attr_reader :email, :error, :status end class IdNumber < Stripe::StripeObject class Dob < Stripe::StripeObject - # Numerical day between 1 and 31. - attr_reader :day - # Numerical month between 1 and 12. - attr_reader :month - # The four-digit year. - attr_reader :year + attr_reader :day, :month, :year end class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. - attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. - attr_reader :reason + attr_reader :code, :reason end - # Date of birth. - attr_reader :dob - # Details on the verification error. Present when status is `unverified`. - attr_reader :error - # First name. - attr_reader :first_name - # ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. - attr_reader :id_number - # Type of ID number. - attr_reader :id_number_type - # Last name. - attr_reader :last_name - # Status of this `id_number` check. - attr_reader :status + attr_reader :dob, :error, :first_name, :id_number, :id_number_type, :last_name, :status end class Options < Stripe::StripeObject class Document < Stripe::StripeObject - # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. - attr_reader :allowed_types - # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. - attr_reader :require_id_number - # Disable image uploads, identity document images have to be captured using the device’s camera. - attr_reader :require_live_capture - # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). - attr_reader :require_matching_selfie + attr_reader :allowed_types, :require_id_number, :require_live_capture, :require_matching_selfie end class IdNumber < Stripe::StripeObject; end - # Attribute for field document - attr_reader :document - # Attribute for field id_number - attr_reader :id_number + attr_reader :document, :id_number end class Phone < Stripe::StripeObject class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. - attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. - attr_reader :reason + attr_reader :code, :reason end - # Details on the verification error. Present when status is `unverified`. - attr_reader :error - # Phone to be verified. - attr_reader :phone - # Status of this `phone` check. - attr_reader :status + attr_reader :error, :phone, :status end class Selfie < Stripe::StripeObject class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. - attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. - attr_reader :reason + attr_reader :code, :reason end - # ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. - attr_reader :document - # Details on the verification error. Present when status is `unverified`. - attr_reader :error - # ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. - attr_reader :selfie - # Status of this `selfie` check. - attr_reader :status + attr_reader :document, :error, :selfie, :status end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_reader :client_reference_id - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Result from a document check attr_reader :document - # Result from a email check attr_reader :email - # Unique identifier for the object. attr_reader :id - # Result from an id_number check attr_reader :id_number - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field options attr_reader :options - # Result from a phone check attr_reader :phone - # Result from a selfie check attr_reader :selfie - # Type of report. attr_reader :type - # The configuration token of a verification flow from the dashboard. attr_reader :verification_flow - # ID of the VerificationSession that created this report. attr_reader :verification_session diff --git a/lib/stripe/resources/identity/verification_session.rb b/lib/stripe/resources/identity/verification_session.rb index 6c161cf44..dc8ce7ece 100644 --- a/lib/stripe/resources/identity/verification_session.rb +++ b/lib/stripe/resources/identity/verification_session.rb @@ -25,149 +25,78 @@ def self.object_name end class LastError < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification or user-session failure. - attr_reader :code - # A message that explains the reason for verification or user-session failure. - attr_reader :reason + attr_reader :code, :reason end class Options < Stripe::StripeObject class Document < Stripe::StripeObject - # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. - attr_reader :allowed_types - # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. - attr_reader :require_id_number - # Disable image uploads, identity document images have to be captured using the device’s camera. - attr_reader :require_live_capture - # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). - attr_reader :require_matching_selfie + attr_reader :allowed_types, :require_id_number, :require_live_capture, :require_matching_selfie end class Email < Stripe::StripeObject - # Request one time password verification of `provided_details.email`. attr_reader :require_verification end class IdNumber < Stripe::StripeObject; end class Phone < Stripe::StripeObject - # Request one time password verification of `provided_details.phone`. attr_reader :require_verification end - # Attribute for field document - attr_reader :document - # Attribute for field email - attr_reader :email - # Attribute for field id_number - attr_reader :id_number - # Attribute for field phone - attr_reader :phone + attr_reader :document, :email, :id_number, :phone end class ProvidedDetails < Stripe::StripeObject - # Email of user being verified - attr_reader :email - # Phone number of user being verified - attr_reader :phone + attr_reader :email, :phone end class Redaction < Stripe::StripeObject - # Indicates whether this object and its related objects have been redacted or not. attr_reader :status end class VerifiedOutputs < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class Dob < Stripe::StripeObject - # Numerical day between 1 and 31. - attr_reader :day - # Numerical month between 1 and 12. - attr_reader :month - # The four-digit year. - attr_reader :year + attr_reader :day, :month, :year end - # The user's verified address. - attr_reader :address - # The user’s verified date of birth. - attr_reader :dob - # The user's verified email address - attr_reader :email - # The user's verified first name. - attr_reader :first_name - # The user's verified id number. - attr_reader :id_number - # The user's verified id number type. - attr_reader :id_number_type - # The user's verified last name. - attr_reader :last_name - # The user's verified phone number - attr_reader :phone + attr_reader :address, :dob, :email, :first_name, :id_number, :id_number_type, :last_name, :phone end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_reader :client_reference_id - # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. attr_reader :client_secret - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # If present, this property tells you the last error encountered when processing the verification. attr_reader :last_error - # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) attr_reader :last_verification_report - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # A set of options for the session’s verification checks. attr_reader :options - # Details provided about the user being verified. These details may be shown to the user. attr_reader :provided_details - # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. attr_reader :redaction - # Token referencing a Customer resource. attr_reader :related_customer - # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). attr_reader :status - # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. attr_reader :type - # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. attr_reader :url - # The configuration token of a verification flow from the dashboard. attr_reader :verification_flow - # The user’s verified data. attr_reader :verified_outputs diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 3734f3353..70c715bb5 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -51,220 +51,75 @@ def self.object_name nested_resource_class_methods :payment, operations: %i[retrieve list] class AmountsDue < Stripe::StripeObject - # Incremental amount due for this payment in cents (or local equivalent). - attr_reader :amount - # The amount in cents (or local equivalent) that was paid for this payment. - attr_reader :amount_paid - # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). - attr_reader :amount_remaining - # Number of days from when invoice is finalized until the payment is due. - attr_reader :days_until_due - # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description - # Date on which a payment plan’s payment is due. - attr_reader :due_date - # Timestamp when the payment was paid. - attr_reader :paid_at - # The status of the payment, one of `open`, `paid`, or `past_due` - attr_reader :status + attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability - # The status of the most recent automated tax calculation for this invoice. - attr_reader :status + attr_reader :disabled_reason, :enabled, :liability, :status end class CustomField < Stripe::StripeObject - # The name of the custom field. - attr_reader :name - # The value of the custom field. - attr_reader :value + attr_reader :name, :value end class CustomerAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end class CustomerTaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` - attr_reader :type - # The value of the tax ID. - attr_reader :value + attr_reader :type, :value end class FromInvoice < Stripe::StripeObject - # The relation between this invoice and the cloned invoice - attr_reader :action - # The invoice that was cloned. - attr_reader :invoice + attr_reader :action, :invoice end class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end class LastFinalizationError < Stripe::StripeObject - # For card errors, the ID of the failed charge. - attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. - attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. - attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. - attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. - attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. - attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) - attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). - attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. - attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. - attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) - attr_reader :setup_intent - # Attribute for field source - attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` - attr_reader :type + attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Transaction type of the mandate. attr_reader :transaction_type end - # Attribute for field mandate_options - attr_reader :mandate_options - # Bank account verification method. - attr_reader :verification_method + attr_reader :mandate_options, :verification_method end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject - # Whether Installments are enabled for this Invoice. attr_reader :enabled end - # Attribute for field installments - attr_reader :installments - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - attr_reader :request_three_d_secure + attr_reader :installments, :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - # Attribute for field eu_bank_transfer - attr_reader :eu_bank_transfer - # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - attr_reader :type + attr_reader :eu_bank_transfer, :type end - # Attribute for field bank_transfer - attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - attr_reader :funding_type + attr_reader :bank_transfer, :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -274,247 +129,107 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. - attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. - attr_reader :institution + attr_reader :account_subcategories, :institution end - # Attribute for field filters - attr_reader :filters - # The list of permissions to request. The `payment_method` permission must be included. - attr_reader :permissions - # Data features requested to be retrieved upon account creation. - attr_reader :prefetch + attr_reader :filters, :permissions, :prefetch end - # Attribute for field financial_connections - attr_reader :financial_connections - # Bank account verification method. - attr_reader :verification_method + attr_reader :financial_connections, :verification_method end - # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. - attr_reader :acss_debit - # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. - attr_reader :bancontact - # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. - attr_reader :card - # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. - attr_reader :customer_balance - # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. - attr_reader :id_bank_transfer - # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. - attr_reader :konbini - # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. - attr_reader :sepa_debit - # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. - attr_reader :us_bank_account + attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account end - # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. - attr_reader :default_mandate - # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. - attr_reader :payment_method_options - # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). - attr_reader :payment_method_types + attr_reader :default_mandate, :payment_method_options, :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject - # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. attr_reader :page_size end - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. - attr_reader :amount_tax_display - # Invoice pdf rendering options - attr_reader :pdf - # ID of the rendering template that the invoice is formatted by. - attr_reader :template - # Version of the rendering template that the invoice is using. - attr_reader :template_version + attr_reader :amount_tax_display, :pdf, :template, :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # Total shipping cost before any taxes are applied. - attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. - attr_reader :amount_tax - # Total shipping cost after taxes are applied. - attr_reader :amount_total - # The ID of the ShippingRate for this invoice. - attr_reader :shipping_rate - # The taxes applied to the shipping rate. - attr_reader :taxes + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end class StatusTransitions < Stripe::StripeObject - # The time that the invoice draft was finalized. - attr_reader :finalized_at - # The time that the invoice was marked uncollectible. - attr_reader :marked_uncollectible_at - # The time that the invoice was paid. - attr_reader :paid_at - # The time that the invoice was voided. - attr_reader :voided_at + attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - attr_reader :behavior - # The time after which the subscription will resume collecting payments. - attr_reader :resumes_at + attr_reader :behavior, :resumes_at end - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. - # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* - attr_reader :metadata - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - attr_reader :pause_collection + attr_reader :metadata, :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject - # The IDs of the line items that triggered the threshold invoice. - attr_reader :line_item_ids - # The quantity threshold boundary that applied to the given line item. - attr_reader :usage_gte + attr_reader :line_item_ids, :usage_gte end - # The total invoice amount threshold boundary if it triggered the threshold invoice. - attr_reader :amount_gte - # Indicates which line items triggered a threshold invoice. - attr_reader :item_reasons + attr_reader :amount_gte, :item_reasons end class TotalDiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. - attr_reader :amount - # The discount that was applied to get this discount amount. - attr_reader :discount + attr_reader :amount, :discount end class TotalMarginAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the reduction in line item amount. - attr_reader :amount - # The margin that was applied to get this margin amount. - attr_reader :margin + attr_reader :amount, :margin end class TotalPretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. - attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. - attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. - attr_reader :discount - # The margin that was applied to get this pretax credit amount. - attr_reader :margin - # Type of the pretax credit amount referenced. - attr_reader :type + attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type end class TotalTaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. - attr_reader :amount - # Whether this tax amount is inclusive or exclusive. - attr_reader :inclusive - # The tax rate that was applied to get this tax amount. - attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount end class TransferData < Stripe::StripeObject - # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. - attr_reader :amount - # The account where funds from the payment will be transferred to upon payment success. - attr_reader :destination + attr_reader :amount, :destination end # The country of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_country - # The public name of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_name - # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. attr_reader :account_tax_ids - # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. attr_reader :amount_due - # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. attr_reader :amount_overpaid - # The amount, in cents (or local equivalent), that was paid. attr_reader :amount_paid - # The difference between amount_due and amount_paid, in cents (or local equivalent). attr_reader :amount_remaining - # This is the sum of all the shipping amounts. attr_reader :amount_shipping - # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. attr_reader :amounts_due - # ID of the Connect Application that created the invoice. attr_reader :application - # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. attr_reader :application_fee_amount - # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. attr_reader :attempt_count - # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. attr_reader :attempted - # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. attr_reader :auto_advance - # Attribute for field automatic_tax attr_reader :automatic_tax - # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. attr_reader :automatically_finalizes_at - # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -525,223 +240,150 @@ class TransferData < Stripe::StripeObject # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. attr_reader :billing_reason - # ID of the latest charge generated for this invoice, if any. attr_reader :charge - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. attr_reader :collection_method - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Custom fields displayed on the invoice. attr_reader :custom_fields - # The ID of the customer who will be billed. attr_reader :customer - # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_address - # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_email - # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_name - # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_phone - # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_shipping - # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_exempt - # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_ids - # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. attr_reader :default_margins - # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. attr_reader :default_payment_method - # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source - # The tax rates applied to this invoice, if any. attr_reader :default_tax_rates - # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. attr_reader :description - # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. attr_reader :discount - # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. attr_reader :due_date - # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. attr_reader :effective_at - # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :ending_balance - # Footer displayed on the invoice. attr_reader :footer - # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. attr_reader :from_invoice - # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. attr_reader :hosted_invoice_url - # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. attr_reader :id - # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :invoice_pdf - # Attribute for field issuer attr_reader :issuer - # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. attr_reader :last_finalization_error - # The ID of the most recent non-draft revision of this invoice attr_reader :latest_revision - # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. attr_reader :lines - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. attr_reader :next_payment_attempt - # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. attr_reader :number - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. attr_reader :on_behalf_of - # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. attr_reader :paid - # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. attr_reader :paid_out_of_band - # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. attr_reader :payment_intent - # Attribute for field payment_settings attr_reader :payment_settings - # Payments for this invoice attr_reader :payments - # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_end - # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_start - # Total amount of all post-payment credit notes issued for this invoice. attr_reader :post_payment_credit_notes_amount - # Total amount of all pre-payment credit notes issued for this invoice. attr_reader :pre_payment_credit_notes_amount - # The quote this invoice was generated from. attr_reader :quote - # This is the transaction number that appears on email receipts sent for this invoice. attr_reader :receipt_number - # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. attr_reader :rendering - # The details of the cost of shipping, including the ShippingRate applied on the invoice. attr_reader :shipping_cost - # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. attr_reader :shipping_details - # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. attr_reader :starting_balance - # Extra information about an invoice for the customer's credit card statement. attr_reader :statement_descriptor - # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # The subscription that this invoice was prepared for, if any. attr_reader :subscription - # Details about the subscription that created this invoice. attr_reader :subscription_details - # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. attr_reader :subscription_proration_date - # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated attr_reader :subtotal - # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated attr_reader :subtotal_excluding_tax - # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. attr_reader :tax - # ID of the test clock this invoice belongs to. attr_reader :test_clock - # Attribute for field threshold_reason attr_reader :threshold_reason - # Total after discounts and taxes. attr_reader :total - # The aggregate amounts calculated per discount across all line items. attr_reader :total_discount_amounts - # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. attr_reader :total_excluding_tax - # The aggregate amounts calculated per margin across all line items. attr_reader :total_margin_amounts - # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. attr_reader :total_pretax_credit_amounts - # The aggregate amounts calculated per tax rate for all line items. attr_reader :total_tax_amounts - # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. attr_reader :transfer_data - # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. attr_reader :webhooks_delivered_at - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/invoice_item.rb b/lib/stripe/resources/invoice_item.rb index b2eddba37..156c10f52 100644 --- a/lib/stripe/resources/invoice_item.rb +++ b/lib/stripe/resources/invoice_item.rb @@ -25,83 +25,56 @@ def self.object_name end class Period < Stripe::StripeObject - # The end of the period, which must be greater than or equal to the start. This value is inclusive. - attr_reader :end - # The start of the period. This value is inclusive. - attr_reader :start + attr_reader :end, :start end # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The ID of the customer who will be billed when this invoice item is billed. attr_reader :customer - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :date - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # If true, discounts will apply to this invoice item. Always false for prorations. attr_reader :discountable - # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - # Unique identifier for the object. attr_reader :id - # The ID of the invoice this invoice item belongs to. attr_reader :invoice - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. attr_reader :margins - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field period attr_reader :period - # If the invoice item is a proration, the plan of the subscription that the proration was computed for. attr_reader :plan - # The price of the invoice item. attr_reader :price - # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. attr_reader :proration - # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. attr_reader :quantity - # The subscription that this invoice item has been created for, if any. attr_reader :subscription - # The subscription item that this invoice item has been created for, if any. attr_reader :subscription_item - # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. attr_reader :tax_rates - # ID of the test clock this invoice item belongs to. attr_reader :test_clock - # Unit amount (in the `currency` specified) of the invoice item. attr_reader :unit_amount - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. attr_reader :unit_amount_decimal - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/invoice_line_item.rb b/lib/stripe/resources/invoice_line_item.rb index 9f93f6148..99f75b072 100644 --- a/lib/stripe/resources/invoice_line_item.rb +++ b/lib/stripe/resources/invoice_line_item.rb @@ -14,143 +14,85 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. - attr_reader :amount - # The discount that was applied to get this discount amount. - attr_reader :discount + attr_reader :amount, :discount end class MarginAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the reduction in line item amount. - attr_reader :amount - # The margin that was applied to get this margin amount. - attr_reader :margin + attr_reader :amount, :margin end class Period < Stripe::StripeObject - # The end of the period, which must be greater than or equal to the start. This value is inclusive. - attr_reader :end - # The start of the period. This value is inclusive. - attr_reader :start + attr_reader :end, :start end class PretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. - attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. - attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. - attr_reader :discount - # The margin that was applied to get this pretax credit amount. - attr_reader :margin - # Type of the pretax credit amount referenced. - attr_reader :type + attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type end class ProrationDetails < Stripe::StripeObject class CreditedItems < Stripe::StripeObject - # Invoice containing the credited invoice line items - attr_reader :invoice - # Credited invoice line items - attr_reader :invoice_line_items + attr_reader :invoice, :invoice_line_items end - # For a credit proration `line_item`, the original debit line_items to which the credit proration applies. attr_reader :credited_items end class TaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. - attr_reader :amount - # Whether this tax amount is inclusive or exclusive. - attr_reader :inclusive - # The tax rate that was applied to get this tax amount. - attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount end # The amount, in cents (or local equivalent). attr_reader :amount - # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. attr_reader :amount_excluding_tax - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # The amount of discount calculated per discount for this line item. attr_reader :discount_amounts - # If true, discounts will apply to this line item. Always false for prorations. attr_reader :discountable - # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - # Unique identifier for the object. attr_reader :id - # The ID of the invoice that contains this line item. attr_reader :invoice - # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. attr_reader :invoice_item - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The amount of margin calculated per margin for this line item. attr_reader :margin_amounts - # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. attr_reader :margins - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field period attr_reader :period - # The plan of the subscription, if the line item is a subscription or a proration. attr_reader :plan - # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. attr_reader :pretax_credit_amounts - # The price of the line item. attr_reader :price - # Whether this is a proration. attr_reader :proration - # Additional details for proration line items attr_reader :proration_details - # The quantity of the subscription, if the line item is a subscription or a proration. attr_reader :quantity - # The subscription that the invoice item pertains to, if any. attr_reader :subscription - # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. attr_reader :subscription_item - # The amount of tax calculated per tax rate for this line item attr_reader :tax_amounts - # The tax rates which apply to the line item. attr_reader :tax_rates - # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. attr_reader :type - # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. attr_reader :unit_amount_excluding_tax diff --git a/lib/stripe/resources/invoice_payment.rb b/lib/stripe/resources/invoice_payment.rb index 01ae58e0e..a717aebf7 100644 --- a/lib/stripe/resources/invoice_payment.rb +++ b/lib/stripe/resources/invoice_payment.rb @@ -10,58 +10,36 @@ def self.object_name end class Payment < Stripe::StripeObject - # ID of the successful charge for this payment when `type` is `charge`. - attr_reader :charge - # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. - attr_reader :payment_intent - # ID of the PaymentRecord associated with this payment when `type` is `payment_record`. - attr_reader :payment_record - # Type of payment object associated with this invoice payment. - attr_reader :type + attr_reader :charge, :payment_intent, :payment_record, :type end class StatusTransitions < Stripe::StripeObject - # The time that the payment was canceled. - attr_reader :canceled_at - # The time that the payment succeeded. - attr_reader :paid_at + attr_reader :canceled_at, :paid_at end # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. attr_reader :amount_overpaid - # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. attr_reader :amount_paid - # Amount intended to be paid toward this invoice, in cents (or local equivalent) attr_reader :amount_requested - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Unique identifier for the object. attr_reader :id - # The invoice that was paid. attr_reader :invoice - # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. attr_reader :is_default - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field payment attr_reader :payment - # The status of the payment, one of `open`, `paid`, or `canceled`. attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions end diff --git a/lib/stripe/resources/invoice_rendering_template.rb b/lib/stripe/resources/invoice_rendering_template.rb index 5246ebdb7..9f033c1a3 100644 --- a/lib/stripe/resources/invoice_rendering_template.rb +++ b/lib/stripe/resources/invoice_rendering_template.rb @@ -14,25 +14,18 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # A brief description of the template, hidden from customers attr_reader :nickname - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The status of the template, one of `active` or `archived`. attr_reader :status - # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering attr_reader :version diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index a3a1583d7..cc78edd17 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -19,292 +19,131 @@ def self.object_name end class AmountDetails < Stripe::StripeObject - # The fee charged by the ATM for the cash withdrawal. - attr_reader :atm_fee - # The amount of cash requested by the cardholder. - attr_reader :cashback_amount + attr_reader :atm_fee, :cashback_amount end class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject - # [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. - attr_reader :alphanumeric_id - # Driver ID. - attr_reader :driver_id - # Odometer reading. - attr_reader :odometer - # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - attr_reader :unspecified_id - # User ID. - attr_reader :user_id - # Vehicle number. - attr_reader :vehicle_number + attr_reader :alphanumeric_id, :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject - # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject - # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject - # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. - attr_reader :local_amount_decimal - # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. - attr_reader :national_amount_decimal + attr_reader :local_amount_decimal, :national_amount_decimal end - # Breakdown of fuel portion of the purchase. - attr_reader :fuel - # Breakdown of non-fuel portion of the purchase. - attr_reader :non_fuel - # Information about tax included in this transaction. - attr_reader :tax + attr_reader :fuel, :non_fuel, :tax end - # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - attr_reader :cardholder_prompt_data - # The type of purchase. - attr_reader :purchase_type - # More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - attr_reader :reported_breakdown - # The type of fuel service. - attr_reader :service_type + attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type end class FraudChallenge < Stripe::StripeObject - # The method by which the fraud challenge was delivered to the cardholder. - attr_reader :channel - # The status of the fraud challenge. - attr_reader :status - # If the challenge is not deliverable, the reason why. - attr_reader :undeliverable_reason + attr_reader :channel, :status, :undeliverable_reason end class Fuel < Stripe::StripeObject - # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - attr_reader :industry_product_code - # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - attr_reader :quantity_decimal - # The type of fuel that was purchased. - attr_reader :type - # The units for `quantity_decimal`. - attr_reader :unit - # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - attr_reader :unit_cost_decimal + attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal end class MerchantData < Stripe::StripeObject - # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - attr_reader :category - # The merchant category code for the seller’s business - attr_reader :category_code - # City where the seller is located - attr_reader :city - # Country where the seller is located - attr_reader :country - # Name of the seller - attr_reader :name - # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - attr_reader :network_id - # Postal code where the seller is located - attr_reader :postal_code - # State where the seller is located - attr_reader :state - # An ID assigned by the seller to the location of the sale. - attr_reader :terminal_id - # URL provided by the merchant on a 3DS request - attr_reader :url + attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :terminal_id, :url end class NetworkData < Stripe::StripeObject - # Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. - attr_reader :acquiring_institution_id - # The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. - attr_reader :system_trace_audit_number - # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. - attr_reader :transaction_id + attr_reader :acquiring_institution_id, :system_trace_audit_number, :transaction_id end class PendingRequest < Stripe::StripeObject class AmountDetails < Stripe::StripeObject - # The fee charged by the ATM for the cash withdrawal. - attr_reader :atm_fee - # The amount of cash requested by the cardholder. - attr_reader :cashback_amount + attr_reader :atm_fee, :cashback_amount end - # The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount - # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount_details - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. - attr_reader :is_amount_controllable - # The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :merchant_amount - # The local currency the merchant is requesting to authorize. - attr_reader :merchant_currency - # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. - attr_reader :network_risk_score + attr_reader :amount, :amount_details, :currency, :is_amount_controllable, :merchant_amount, :merchant_currency, :network_risk_score end class RequestHistory < Stripe::StripeObject class AmountDetails < Stripe::StripeObject - # The fee charged by the ATM for the cash withdrawal. - attr_reader :atm_fee - # The amount of cash requested by the cardholder. - attr_reader :cashback_amount + attr_reader :atm_fee, :cashback_amount end - # The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. - attr_reader :amount - # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount_details - # Whether this request was approved. - attr_reader :approved - # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. - attr_reader :authorization_code - # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :merchant_amount - # The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :merchant_currency - # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. - attr_reader :network_risk_score - # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. - attr_reader :reason - # If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. - attr_reader :reason_message - # Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. - attr_reader :requested_at + attr_reader :amount, :amount_details, :approved, :authorization_code, :created, :currency, :merchant_amount, :merchant_currency, :network_risk_score, :reason, :reason_message, :requested_at end class Treasury < Stripe::StripeObject - # The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization - attr_reader :received_credits - # The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization - attr_reader :received_debits - # The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization - attr_reader :transaction + attr_reader :received_credits, :received_debits, :transaction end class VerificationData < Stripe::StripeObject class AuthenticationExemption < Stripe::StripeObject - # The entity that requested the exemption, either the acquiring merchant or the Issuing user. - attr_reader :claimed_by - # The specific exemption claimed for this authorization. - attr_reader :type + attr_reader :claimed_by, :type end class ThreeDSecure < Stripe::StripeObject - # The outcome of the 3D Secure authentication request. attr_reader :result end - # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. - attr_reader :address_line1_check - # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. - attr_reader :address_postal_code_check - # The exemption applied to this authorization. - attr_reader :authentication_exemption - # Whether the cardholder provided a CVC and if it matched Stripe’s record. - attr_reader :cvc_check - # Whether the cardholder provided an expiry date and if it matched Stripe’s record. - attr_reader :expiry_check - # The postal code submitted as part of the authorization used for postal code verification. - attr_reader :postal_code - # 3D Secure details. - attr_reader :three_d_secure + attr_reader :address_line1_check, :address_postal_code_check, :authentication_exemption, :cvc_check, :expiry_check, :postal_code, :three_d_secure end # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. attr_reader :amount - # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_details - # Whether the authorization has been approved. attr_reader :approved - # How the card details were provided. attr_reader :authorization_method - # List of balance transactions associated with this authorization. attr_reader :balance_transactions - # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. attr_reader :card - # The cardholder to whom this authorization belongs. attr_reader :cardholder - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Fleet-specific information for authorizations using Fleet cards. attr_reader :fleet - # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. attr_reader :fraud_challenges - # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. attr_reader :fuel - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. attr_reader :merchant_amount - # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :merchant_currency - # Attribute for field merchant_data attr_reader :merchant_data - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Details about the authorization, such as identifiers, set by the card network. attr_reader :network_data - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. attr_reader :pending_request - # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. attr_reader :request_history - # The current status of the authorization in its lifecycle. attr_reader :status - # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. attr_reader :token - # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. attr_reader :transactions - # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). attr_reader :treasury - # Attribute for field verification_data attr_reader :verification_data - # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. attr_reader :verified_by_fraud_challenge - # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. attr_reader :wallet diff --git a/lib/stripe/resources/issuing/card.rb b/lib/stripe/resources/issuing/card.rb index 9f689fc52..aa8cd2bd0 100644 --- a/lib/stripe/resources/issuing/card.rb +++ b/lib/stripe/resources/issuing/card.rb @@ -16,190 +16,87 @@ def self.object_name class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class AddressValidation < Stripe::StripeObject class NormalizedAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # The address validation capabilities to use. - attr_reader :mode - # The normalized shipping address. - attr_reader :normalized_address - # The validation result for the shipping address. - attr_reader :result + attr_reader :mode, :normalized_address, :result end class Customs < Stripe::StripeObject - # A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. attr_reader :eori_number end - # Attribute for field address - attr_reader :address - # Address validation details for the shipment. - attr_reader :address_validation - # The delivery company that shipped a card. - attr_reader :carrier - # Additional information that may be required for clearing customs. - attr_reader :customs - # A unix timestamp representing a best estimate of when the card will be delivered. - attr_reader :eta - # Recipient name. - attr_reader :name - # The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. - attr_reader :phone_number - # Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. - attr_reader :require_signature - # Shipment service, such as `standard` or `express`. - attr_reader :service - # The delivery status of the card. - attr_reader :status - # A tracking number for a card shipment. - attr_reader :tracking_number - # A link to the shipping carrier's site where you can view detailed information about a card shipment. - attr_reader :tracking_url - # Packaging options. - attr_reader :type + attr_reader :address, :address_validation, :carrier, :customs, :eta, :name, :phone_number, :require_signature, :service, :status, :tracking_number, :tracking_url, :type end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject - # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - attr_reader :categories - # Interval (or event) to which the amount applies. - attr_reader :interval + attr_reader :amount, :categories, :interval end - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - attr_reader :allowed_categories - # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - attr_reader :allowed_merchant_countries - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - attr_reader :blocked_categories - # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - attr_reader :blocked_merchant_countries - # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). - attr_reader :spending_limits - # Currency of the amounts within `spending_limits`. Always the same as the currency of the card. - attr_reader :spending_limits_currency + attr_reader :allowed_categories, :allowed_merchant_countries, :blocked_categories, :blocked_merchant_countries, :spending_limits, :spending_limits_currency end class Wallets < Stripe::StripeObject class ApplePay < Stripe::StripeObject - # Apple Pay Eligibility - attr_reader :eligible - # Reason the card is ineligible for Apple Pay - attr_reader :ineligible_reason + attr_reader :eligible, :ineligible_reason end class GooglePay < Stripe::StripeObject - # Google Pay Eligibility - attr_reader :eligible - # Reason the card is ineligible for Google Pay - attr_reader :ineligible_reason + attr_reader :eligible, :ineligible_reason end - # Attribute for field apple_pay - attr_reader :apple_pay - # Attribute for field google_pay - attr_reader :google_pay - # Unique identifier for a card used with digital wallets - attr_reader :primary_account_identifier + attr_reader :apple_pay, :google_pay, :primary_account_identifier end # The brand of the card. attr_reader :brand - # The reason why the card was canceled. attr_reader :cancellation_reason - # 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/virtual/issue-cards#create-cardholder) attr_reader :cardholder - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. attr_reader :currency - # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. attr_reader :cvc - # The expiration month of the card. attr_reader :exp_month - # The expiration year of the card. attr_reader :exp_year - # The financial account this card is attached to. attr_reader :financial_account - # Unique identifier for the object. attr_reader :id - # The last 4 digits of the card number. attr_reader :last4 - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. attr_reader :number - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The personalization design object belonging to this card. attr_reader :personalization_design - # The latest card that replaces this card, if any. attr_reader :replaced_by - # The card this card replaces, if any. attr_reader :replacement_for - # The reason why the previous card needed to be replaced. attr_reader :replacement_reason - # Where and how the card will be shipped. attr_reader :shipping - # Attribute for field spending_controls attr_reader :spending_controls - # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. attr_reader :status - # The type of the card. attr_reader :type - # Information relating to digital wallets (like Apple Pay and Google Pay). attr_reader :wallets diff --git a/lib/stripe/resources/issuing/cardholder.rb b/lib/stripe/resources/issuing/cardholder.rb index b593bb223..ac9a686d2 100644 --- a/lib/stripe/resources/issuing/cardholder.rb +++ b/lib/stripe/resources/issuing/cardholder.rb @@ -18,148 +18,77 @@ def self.object_name class Billing < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address attr_reader :address end class Company < Stripe::StripeObject - # Whether the company's business ID number was provided. attr_reader :tax_id_provided end class Individual < Stripe::StripeObject class CardIssuing < Stripe::StripeObject class UserTermsAcceptance < Stripe::StripeObject - # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. - attr_reader :date - # The IP address from which the cardholder accepted the Authorized User Terms. - attr_reader :ip - # The user agent of the browser from which the cardholder accepted the Authorized User Terms. - attr_reader :user_agent + attr_reader :date, :ip, :user_agent end - # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. attr_reader :user_terms_acceptance end class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. - attr_reader :day - # The month of birth, between 1 and 12. - attr_reader :month - # The four-digit year of birth. - attr_reader :year + attr_reader :day, :month, :year end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject - # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - attr_reader :back - # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - attr_reader :front + attr_reader :back, :front end - # An identifying document, either a passport or local ID card. attr_reader :document end - # Information related to the card_issuing program for this cardholder. - attr_reader :card_issuing - # The date of birth of this cardholder. - attr_reader :dob - # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - attr_reader :first_name - # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - attr_reader :last_name - # Government-issued ID document for this cardholder. - attr_reader :verification + attr_reader :card_issuing, :dob, :first_name, :last_name, :verification end class Requirements < Stripe::StripeObject - # If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. - attr_reader :disabled_reason - # Array of fields that need to be collected in order to verify and re-enable the cardholder. - attr_reader :past_due + attr_reader :disabled_reason, :past_due end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject - # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - attr_reader :categories - # Interval (or event) to which the amount applies. - attr_reader :interval + attr_reader :amount, :categories, :interval end - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - attr_reader :allowed_categories - # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - attr_reader :allowed_merchant_countries - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - attr_reader :blocked_categories - # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - attr_reader :blocked_merchant_countries - # Limit spending with amount-based rules that apply across this cardholder's cards. - attr_reader :spending_limits - # Currency of the amounts within `spending_limits`. - attr_reader :spending_limits_currency + attr_reader :allowed_categories, :allowed_merchant_countries, :blocked_categories, :blocked_merchant_countries, :spending_limits, :spending_limits_currency end # Attribute for field billing attr_reader :billing - # Additional information about a `company` cardholder. attr_reader :company - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The cardholder's email address. attr_reader :email - # Unique identifier for the object. attr_reader :id - # Additional information about an `individual` cardholder. attr_reader :individual - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The cardholder's name. This will be printed on cards issued to them. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. attr_reader :phone_number - # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. attr_reader :preferred_locales - # Attribute for field requirements attr_reader :requirements - # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. attr_reader :spending_controls - # Specifies whether to permit authorizations on this cardholder's cards. attr_reader :status - # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. attr_reader :type diff --git a/lib/stripe/resources/issuing/credit_underwriting_record.rb b/lib/stripe/resources/issuing/credit_underwriting_record.rb index 100f27257..d5f51d632 100644 --- a/lib/stripe/resources/issuing/credit_underwriting_record.rb +++ b/lib/stripe/resources/issuing/credit_underwriting_record.rb @@ -15,107 +15,59 @@ def self.object_name end class Application < Stripe::StripeObject - # The channel through which the applicant has submitted their application. - attr_reader :application_method - # Scope of demand made by the applicant. - attr_reader :purpose - # Date when the applicant submitted their application. - attr_reader :submitted_at + attr_reader :application_method, :purpose, :submitted_at end class CreditUser < Stripe::StripeObject - # Email of the applicant or accountholder. - attr_reader :email - # Full name of the company or person. - attr_reader :name + attr_reader :email, :name end class Decision < Stripe::StripeObject class ApplicationRejected < Stripe::StripeObject - # Details about the `reasons.other` when present. - attr_reader :reason_other_explanation - # List of reasons why the application was rejected up to 4 reasons, in order of importance. - attr_reader :reasons + attr_reader :reason_other_explanation, :reasons end class CreditLimitApproved < Stripe::StripeObject - # Credit amount approved. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency + attr_reader :amount, :currency end class CreditLimitDecreased < Stripe::StripeObject - # Credit amount approved after decrease. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # Details about the `reasons.other` when present. - attr_reader :reason_other_explanation - # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. - attr_reader :reasons + attr_reader :amount, :currency, :reason_other_explanation, :reasons end class CreditLineClosed < Stripe::StripeObject - # Details about the `reasons.other` when present. - attr_reader :reason_other_explanation - # List of reasons why the existing account was closed, up to 4 reasons, in order of importance. - attr_reader :reasons + attr_reader :reason_other_explanation, :reasons end - # Details about a decision application_rejected. - attr_reader :application_rejected - # Details about a decision credit_limit_approved. - attr_reader :credit_limit_approved - # Details about a decision credit_limit_decreased. - attr_reader :credit_limit_decreased - # Details about a decision credit_line_closed. - attr_reader :credit_line_closed - # Outcome of the decision. - attr_reader :type + attr_reader :application_rejected, :credit_limit_approved, :credit_limit_decreased, :credit_line_closed, :type end class UnderwritingException < Stripe::StripeObject - # Written explanation for the exception. - attr_reader :explanation - # The decision before the exception was applied. - attr_reader :original_decision_type + attr_reader :explanation, :original_decision_type end # For decisions triggered by an application, details about the submission. attr_reader :application - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The event that triggered the underwriting. attr_reader :created_from - # Attribute for field credit_user attr_reader :credit_user - # Date when a decision was made. attr_reader :decided_at - # Details about the decision. attr_reader :decision - # For underwriting initiated by an application, a decision must be taken 30 days after the submission. attr_reader :decision_deadline - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). attr_reader :regulatory_reporting_file - # If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. attr_reader :underwriting_exception diff --git a/lib/stripe/resources/issuing/dispute.rb b/lib/stripe/resources/issuing/dispute.rb index e130c8adb..fc2cf4e2f 100644 --- a/lib/stripe/resources/issuing/dispute.rb +++ b/lib/stripe/resources/issuing/dispute.rb @@ -18,170 +18,66 @@ def self.object_name class Evidence < Stripe::StripeObject class Canceled < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - attr_reader :additional_documentation - # Date when order was canceled. - attr_reader :canceled_at - # Whether the cardholder was provided with a cancellation policy. - attr_reader :cancellation_policy_provided - # Reason for canceling the order. - attr_reader :cancellation_reason - # Date when the cardholder expected to receive the product. - attr_reader :expected_at - # Explanation of why the cardholder is disputing this transaction. - attr_reader :explanation - # Description of the merchandise or service that was purchased. - attr_reader :product_description - # Whether the product was a merchandise or service. - attr_reader :product_type - # Result of cardholder's attempt to return the product. - attr_reader :return_status - # Date when the product was returned or attempted to be returned. - attr_reader :returned_at + attr_reader :additional_documentation, :canceled_at, :cancellation_policy_provided, :cancellation_reason, :expected_at, :explanation, :product_description, :product_type, :return_status, :returned_at end class Duplicate < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - attr_reader :additional_documentation - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. - attr_reader :card_statement - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. - attr_reader :cash_receipt - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. - attr_reader :check_image - # Explanation of why the cardholder is disputing this transaction. - attr_reader :explanation - # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. - attr_reader :original_transaction + attr_reader :additional_documentation, :card_statement, :cash_receipt, :check_image, :explanation, :original_transaction end class Fraudulent < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - attr_reader :additional_documentation - # Explanation of why the cardholder is disputing this transaction. - attr_reader :explanation + attr_reader :additional_documentation, :explanation end class MerchandiseNotAsDescribed < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - attr_reader :additional_documentation - # Explanation of why the cardholder is disputing this transaction. - attr_reader :explanation - # Date when the product was received. - attr_reader :received_at - # Description of the cardholder's attempt to return the product. - attr_reader :return_description - # Result of cardholder's attempt to return the product. - attr_reader :return_status - # Date when the product was returned or attempted to be returned. - attr_reader :returned_at + attr_reader :additional_documentation, :explanation, :received_at, :return_description, :return_status, :returned_at end class NoValidAuthorization < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - attr_reader :additional_documentation - # Explanation of why the cardholder is disputing this transaction. - attr_reader :explanation + attr_reader :additional_documentation, :explanation end class NotReceived < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - attr_reader :additional_documentation - # Date when the cardholder expected to receive the product. - attr_reader :expected_at - # Explanation of why the cardholder is disputing this transaction. - attr_reader :explanation - # Description of the merchandise or service that was purchased. - attr_reader :product_description - # Whether the product was a merchandise or service. - attr_reader :product_type + attr_reader :additional_documentation, :expected_at, :explanation, :product_description, :product_type end class Other < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - attr_reader :additional_documentation - # Explanation of why the cardholder is disputing this transaction. - attr_reader :explanation - # Description of the merchandise or service that was purchased. - attr_reader :product_description - # Whether the product was a merchandise or service. - attr_reader :product_type + attr_reader :additional_documentation, :explanation, :product_description, :product_type end class ServiceNotAsDescribed < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - attr_reader :additional_documentation - # Date when order was canceled. - attr_reader :canceled_at - # Reason for canceling the order. - attr_reader :cancellation_reason - # Explanation of why the cardholder is disputing this transaction. - attr_reader :explanation - # Date when the product was received. - attr_reader :received_at + attr_reader :additional_documentation, :canceled_at, :cancellation_reason, :explanation, :received_at end - # Attribute for field canceled - attr_reader :canceled - # Attribute for field duplicate - attr_reader :duplicate - # Attribute for field fraudulent - attr_reader :fraudulent - # Attribute for field merchandise_not_as_described - attr_reader :merchandise_not_as_described - # Attribute for field no_valid_authorization - attr_reader :no_valid_authorization - # Attribute for field not_received - attr_reader :not_received - # Attribute for field other - attr_reader :other - # The reason for filing the dispute. Its value will match the field containing the evidence. - attr_reader :reason - # Attribute for field service_not_as_described - attr_reader :service_not_as_described + attr_reader :canceled, :duplicate, :fraudulent, :merchandise_not_as_described, :no_valid_authorization, :not_received, :other, :reason, :service_not_as_described end class Treasury < Stripe::StripeObject - # The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute - attr_reader :debit_reversal - # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. - attr_reader :received_debit + attr_reader :debit_reversal, :received_debit end # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). attr_reader :amount - # List of balance transactions associated with the dispute. attr_reader :balance_transactions - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The currency the `transaction` was made in. attr_reader :currency - # Attribute for field evidence attr_reader :evidence - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. attr_reader :loss_reason - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Current status of the dispute. attr_reader :status - # The transaction being disputed. attr_reader :transaction - # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts attr_reader :treasury diff --git a/lib/stripe/resources/issuing/dispute_settlement_detail.rb b/lib/stripe/resources/issuing/dispute_settlement_detail.rb index 8fa27fbca..c94ed93cd 100644 --- a/lib/stripe/resources/issuing/dispute_settlement_detail.rb +++ b/lib/stripe/resources/issuing/dispute_settlement_detail.rb @@ -14,34 +14,24 @@ def self.object_name # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). attr_reader :amount - # The card used to make the original transaction. attr_reader :card - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The ID of the linked dispute. attr_reader :dispute - # The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. attr_reader :event_type - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] attr_reader :network - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The ID of the linked card network settlement. attr_reader :settlement diff --git a/lib/stripe/resources/issuing/fraud_liability_debit.rb b/lib/stripe/resources/issuing/fraud_liability_debit.rb index 1092373fe..19872b9fb 100644 --- a/lib/stripe/resources/issuing/fraud_liability_debit.rb +++ b/lib/stripe/resources/issuing/fraud_liability_debit.rb @@ -14,25 +14,18 @@ def self.object_name # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. attr_reader :amount - # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. attr_reader :balance_transaction - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The ID of the linked dispute. attr_reader :dispute - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/issuing/personalization_design.rb b/lib/stripe/resources/issuing/personalization_design.rb index d5512f2c7..06387b16d 100644 --- a/lib/stripe/resources/issuing/personalization_design.rb +++ b/lib/stripe/resources/issuing/personalization_design.rb @@ -15,65 +15,40 @@ def self.object_name end class CarrierText < Stripe::StripeObject - # The footer body text of the carrier letter. - attr_reader :footer_body - # The footer title text of the carrier letter. - attr_reader :footer_title - # The header body text of the carrier letter. - attr_reader :header_body - # The header title text of the carrier letter. - attr_reader :header_title + attr_reader :footer_body, :footer_title, :header_body, :header_title end class Preferences < Stripe::StripeObject - # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. - attr_reader :is_default - # Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. - attr_reader :is_platform_default + attr_reader :is_default, :is_platform_default end class RejectionReasons < Stripe::StripeObject - # The reason(s) the card logo was rejected. - attr_reader :card_logo - # The reason(s) the carrier text was rejected. - attr_reader :carrier_text + attr_reader :card_logo, :carrier_text end # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. attr_reader :card_logo - # Hash containing carrier text, for use with physical bundles that support carrier text. attr_reader :carrier_text - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. attr_reader :lookup_key - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Friendly display name. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The physical bundle object belonging to this personalization design. attr_reader :physical_bundle - # Attribute for field preferences attr_reader :preferences - # Attribute for field rejection_reasons attr_reader :rejection_reasons - # Whether this personalization design can be used to create cards. attr_reader :status diff --git a/lib/stripe/resources/issuing/physical_bundle.rb b/lib/stripe/resources/issuing/physical_bundle.rb index 5c994e9b0..2914698ba 100644 --- a/lib/stripe/resources/issuing/physical_bundle.rb +++ b/lib/stripe/resources/issuing/physical_bundle.rb @@ -13,31 +13,20 @@ def self.object_name end class Features < Stripe::StripeObject - # The policy for how to use card logo images in a card design with this physical bundle. - attr_reader :card_logo - # The policy for how to use carrier letter text in a card design with this physical bundle. - attr_reader :carrier_text - # The policy for how to use a second line on a card with this physical bundle. - attr_reader :second_line + attr_reader :card_logo, :carrier_text, :second_line end # Attribute for field features attr_reader :features - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Friendly display name. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Whether this physical bundle can be used to create cards. attr_reader :status - # Whether this physical bundle is a standard Stripe offering or custom-made for you. attr_reader :type diff --git a/lib/stripe/resources/issuing/settlement.rb b/lib/stripe/resources/issuing/settlement.rb index 400cc26be..c0c91a1df 100644 --- a/lib/stripe/resources/issuing/settlement.rb +++ b/lib/stripe/resources/issuing/settlement.rb @@ -12,52 +12,36 @@ def self.object_name # The Bank Identification Number reflecting this settlement record. attr_reader :bin - # The date that the transactions are cleared and posted to user's accounts. attr_reader :clearing_date - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Unique identifier for the object. attr_reader :id - # The total interchange received as reimbursement for the transactions. attr_reader :interchange_fees - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The total net amount required to settle with the network. attr_reader :net_total - # The card network for this settlement report. One of ["visa", "maestro"] attr_reader :network - # The total amount of fees owed to the network. attr_reader :network_fees - # The Settlement Identification Number assigned by the network. attr_reader :network_settlement_identifier - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # One of `international` or `uk_national_net`. attr_reader :settlement_service - # The current processing status of this settlement. attr_reader :status - # The total number of transactions reflected in this settlement. attr_reader :transaction_count - # The total transaction amount reflected in this settlement. attr_reader :transaction_volume end diff --git a/lib/stripe/resources/issuing/token.rb b/lib/stripe/resources/issuing/token.rb index 5ec8cb2cf..22d116c94 100644 --- a/lib/stripe/resources/issuing/token.rb +++ b/lib/stripe/resources/issuing/token.rb @@ -15,114 +15,47 @@ def self.object_name class NetworkData < Stripe::StripeObject class Device < Stripe::StripeObject - # An obfuscated ID derived from the device ID. - attr_reader :device_fingerprint - # The IP address of the device at provisioning time. - attr_reader :ip_address - # The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. - attr_reader :location - # The name of the device used for tokenization. - attr_reader :name - # The phone number of the device used for tokenization. - attr_reader :phone_number - # The type of device used for tokenization. - attr_reader :type + attr_reader :device_fingerprint, :ip_address, :location, :name, :phone_number, :type end class Mastercard < Stripe::StripeObject - # A unique reference ID from MasterCard to represent the card account number. - attr_reader :card_reference_id - # The network-unique identifier for the token. - attr_reader :token_reference_id - # The ID of the entity requesting tokenization, specific to MasterCard. - attr_reader :token_requestor_id - # The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. - attr_reader :token_requestor_name + attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_requestor_name end class Visa < Stripe::StripeObject - # A unique reference ID from Visa to represent the card account number. - attr_reader :card_reference_id - # The network-unique identifier for the token. - attr_reader :token_reference_id - # The ID of the entity requesting tokenization, specific to Visa. - attr_reader :token_requestor_id - # Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. - attr_reader :token_risk_score + attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_risk_score end class WalletProvider < Stripe::StripeObject class CardholderAddress < Stripe::StripeObject - # The street address of the cardholder tokenizing the card. - attr_reader :line1 - # The postal code of the cardholder tokenizing the card. - attr_reader :postal_code + attr_reader :line1, :postal_code end - # The wallet provider-given account ID of the digital wallet the token belongs to. - attr_reader :account_id - # An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. - attr_reader :account_trust_score - # The method used for tokenizing a card. - attr_reader :card_number_source - # Attribute for field cardholder_address - attr_reader :cardholder_address - # The name of the cardholder tokenizing the card. - attr_reader :cardholder_name - # An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. - attr_reader :device_trust_score - # The hashed email address of the cardholder's account with the wallet provider. - attr_reader :hashed_account_email_address - # The reasons for suggested tokenization given by the card network. - attr_reader :reason_codes - # The recommendation on responding to the tokenization request. - attr_reader :suggested_decision - # The version of the standard for mapping reason codes followed by the wallet provider. - attr_reader :suggested_decision_version + attr_reader :account_id, :account_trust_score, :card_number_source, :cardholder_address, :cardholder_name, :device_trust_score, :hashed_account_email_address, :reason_codes, :suggested_decision, :suggested_decision_version end - # Attribute for field device - attr_reader :device - # Attribute for field mastercard - attr_reader :mastercard - # The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. - attr_reader :type - # Attribute for field visa - attr_reader :visa - # Attribute for field wallet_provider - attr_reader :wallet_provider + attr_reader :device, :mastercard, :type, :visa, :wallet_provider end # Card associated with this token. attr_reader :card - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The hashed ID derived from the device ID from the card network associated with the token. attr_reader :device_fingerprint - # Unique identifier for the object. attr_reader :id - # The last four digits of the token. attr_reader :last4 - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The token service provider / card network associated with the token. attr_reader :network - # Attribute for field network_data attr_reader :network_data - # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. attr_reader :network_updated_at - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The usage state of the token. attr_reader :status - # The digital wallet for this token, if one was used. attr_reader :wallet_provider diff --git a/lib/stripe/resources/issuing/transaction.rb b/lib/stripe/resources/issuing/transaction.rb index 23bda1310..8ff91af19 100644 --- a/lib/stripe/resources/issuing/transaction.rb +++ b/lib/stripe/resources/issuing/transaction.rb @@ -18,236 +18,108 @@ def self.object_name end class AmountDetails < Stripe::StripeObject - # The fee charged by the ATM for the cash withdrawal. - attr_reader :atm_fee - # The amount of cash requested by the cardholder. - attr_reader :cashback_amount + attr_reader :atm_fee, :cashback_amount end class MerchantData < Stripe::StripeObject - # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - attr_reader :category - # The merchant category code for the seller’s business - attr_reader :category_code - # City where the seller is located - attr_reader :city - # Country where the seller is located - attr_reader :country - # Name of the seller - attr_reader :name - # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - attr_reader :network_id - # Postal code where the seller is located - attr_reader :postal_code - # State where the seller is located - attr_reader :state - # An ID assigned by the seller to the location of the sale. - attr_reader :terminal_id - # URL provided by the merchant on a 3DS request - attr_reader :url + attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :terminal_id, :url end class NetworkData < Stripe::StripeObject - # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. - attr_reader :authorization_code - # The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. - attr_reader :processing_date - # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. - attr_reader :transaction_id + attr_reader :authorization_code, :processing_date, :transaction_id end class PurchaseDetails < Stripe::StripeObject class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject - # Driver ID. - attr_reader :driver_id - # Odometer reading. - attr_reader :odometer - # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - attr_reader :unspecified_id - # User ID. - attr_reader :user_id - # Vehicle number. - attr_reader :vehicle_number + attr_reader :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject - # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject - # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject - # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - attr_reader :local_amount_decimal - # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - attr_reader :national_amount_decimal + attr_reader :local_amount_decimal, :national_amount_decimal end - # Breakdown of fuel portion of the purchase. - attr_reader :fuel - # Breakdown of non-fuel portion of the purchase. - attr_reader :non_fuel - # Information about tax included in this transaction. - attr_reader :tax + attr_reader :fuel, :non_fuel, :tax end - # Answers to prompts presented to cardholder at point of sale. - attr_reader :cardholder_prompt_data - # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - attr_reader :purchase_type - # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - attr_reader :reported_breakdown - # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - attr_reader :service_type + attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type end class Flight < Stripe::StripeObject class Segment < Stripe::StripeObject - # The three-letter IATA airport code of the flight's destination. - attr_reader :arrival_airport_code - # The airline carrier code. - attr_reader :carrier - # The three-letter IATA airport code that the flight departed from. - attr_reader :departure_airport_code - # The flight number. - attr_reader :flight_number - # The flight's service class. - attr_reader :service_class - # Whether a stopover is allowed on this flight. - attr_reader :stopover_allowed + attr_reader :arrival_airport_code, :carrier, :departure_airport_code, :flight_number, :service_class, :stopover_allowed end - # The time that the flight departed. - attr_reader :departure_at - # The name of the passenger. - attr_reader :passenger_name - # Whether the ticket is refundable. - attr_reader :refundable - # The legs of the trip. - attr_reader :segments - # The travel agency that issued the ticket. - attr_reader :travel_agency + attr_reader :departure_at, :passenger_name, :refundable, :segments, :travel_agency end class Fuel < Stripe::StripeObject - # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - attr_reader :industry_product_code - # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - attr_reader :quantity_decimal - # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - attr_reader :type - # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - attr_reader :unit - # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - attr_reader :unit_cost_decimal + attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal end class Lodging < Stripe::StripeObject - # The time of checking into the lodging. - attr_reader :check_in_at - # The number of nights stayed at the lodging. - attr_reader :nights + attr_reader :check_in_at, :nights end class Receipt < Stripe::StripeObject - # The description of the item. The maximum length of this field is 26 characters. - attr_reader :description - # The quantity of the item. - attr_reader :quantity - # The total for this line item in cents. - attr_reader :total - # The unit cost of the item in cents. - attr_reader :unit_cost + attr_reader :description, :quantity, :total, :unit_cost end - # Fleet-specific information for transactions using Fleet cards. - attr_reader :fleet - # Information about the flight that was purchased with this transaction. - attr_reader :flight - # Information about fuel that was purchased with this transaction. - attr_reader :fuel - # Information about lodging that was purchased with this transaction. - attr_reader :lodging - # The line items in the purchase. - attr_reader :receipt - # A merchant-specific order number. - attr_reader :reference + attr_reader :fleet, :flight, :fuel, :lodging, :receipt, :reference end class Treasury < Stripe::StripeObject - # The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund - attr_reader :received_credit - # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture - attr_reader :received_debit + attr_reader :received_credit, :received_debit end # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount - # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_details - # The `Authorization` object that led to this transaction. attr_reader :authorization - # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. attr_reader :balance_transaction - # The card used to make this transaction. attr_reader :card - # The cardholder to whom this transaction belongs. attr_reader :cardholder - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # If you've disputed the transaction, the ID of the dispute. attr_reader :dispute - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. attr_reader :merchant_amount - # The currency with which the merchant is taking payment. attr_reader :merchant_currency - # Attribute for field merchant_data attr_reader :merchant_data - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Details about the transaction, such as processing dates, set by the card network. attr_reader :network_data - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Additional purchase information that is optionally provided by the merchant. attr_reader :purchase_details - # Attribute for field settlement attr_reader :settlement - # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. attr_reader :token - # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts attr_reader :treasury - # The nature of the transaction. attr_reader :type - # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. attr_reader :wallet diff --git a/lib/stripe/resources/line_item.rb b/lib/stripe/resources/line_item.rb index 65db1431a..ae720b1f1 100644 --- a/lib/stripe/resources/line_item.rb +++ b/lib/stripe/resources/line_item.rb @@ -10,92 +10,52 @@ def self.object_name end class AdjustableQuantity < Stripe::StripeObject - # Attribute for field enabled - attr_reader :enabled - # Attribute for field maximum - attr_reader :maximum - # Attribute for field minimum - attr_reader :minimum + attr_reader :enabled, :maximum, :minimum end class Discount < Stripe::StripeObject - # The amount discounted. - attr_reader :amount - # 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) - attr_reader :discount + attr_reader :amount, :discount end class Display < Stripe::StripeObject - # Attribute for field description - attr_reader :description - # Attribute for field images - attr_reader :images - # Attribute for field name - attr_reader :name + attr_reader :description, :images, :name end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end # Attribute for field adjustable_quantity attr_reader :adjustable_quantity - # Total discount amount applied. If no discounts were applied, defaults to 0. attr_reader :amount_discount - # Total before any discounts or taxes are applied. attr_reader :amount_subtotal - # Total tax amount applied. If no tax was applied, defaults to 0. attr_reader :amount_tax - # Total after discounts and taxes. attr_reader :amount_total - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. attr_reader :description - # The discounts applied to the line item. attr_reader :discounts - # Attribute for field display attr_reader :display - # Unique identifier for the object. attr_reader :id - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The price used to generate the line item. attr_reader :price - # The ID of the product for this line item. # # This will always be the same as `price.product`. attr_reader :product - # The quantity of products being purchased. attr_reader :quantity - # The taxes applied to the line item. attr_reader :taxes end diff --git a/lib/stripe/resources/login_link.rb b/lib/stripe/resources/login_link.rb index 268beef08..ec3d624ec 100644 --- a/lib/stripe/resources/login_link.rb +++ b/lib/stripe/resources/login_link.rb @@ -11,10 +11,8 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The URL for the login link. attr_reader :url diff --git a/lib/stripe/resources/mandate.rb b/lib/stripe/resources/mandate.rb index 54037a6a6..c1cca7a8c 100644 --- a/lib/stripe/resources/mandate.rb +++ b/lib/stripe/resources/mandate.rb @@ -13,51 +13,26 @@ class CustomerAcceptance < Stripe::StripeObject class Offline < Stripe::StripeObject; end class Online < Stripe::StripeObject - # The customer accepts the mandate from this IP address. - attr_reader :ip_address - # The customer accepts the mandate using the user agent of the browser. - attr_reader :user_agent + attr_reader :ip_address, :user_agent end - # The time that the customer accepts the mandate. - attr_reader :accepted_at - # Attribute for field offline - attr_reader :offline - # Attribute for field online - attr_reader :online - # The mandate includes the type of customer acceptance information, such as: `online` or `offline`. - attr_reader :type + attr_reader :accepted_at, :offline, :online, :type end class MultiUse < Stripe::StripeObject; end class PaymentMethodDetails < Stripe::StripeObject class AcssDebit < Stripe::StripeObject - # List of Stripe products where this mandate can be selected automatically. - attr_reader :default_for - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. - attr_reader :interval_description - # Payment schedule for the mandate. - attr_reader :payment_schedule - # Transaction type of the mandate. - attr_reader :transaction_type + attr_reader :default_for, :interval_description, :payment_schedule, :transaction_type end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. attr_reader :url end class BacsDebit < Stripe::StripeObject - # The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. - attr_reader :network_status - # The unique reference identifying the mandate on the Bacs network. - attr_reader :reference - # When the mandate is revoked on the Bacs network this field displays the reason for the revocation. - attr_reader :revocation_reason - # The URL that will contain the mandate that the customer has signed. - attr_reader :url + attr_reader :network_status, :reference, :revocation_reason, :url end class Card < Stripe::StripeObject; end @@ -67,115 +42,48 @@ class KrCard < Stripe::StripeObject; end class Link < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - attr_reader :billing_agreement_id - # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. - attr_reader :fingerprint - # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. - attr_reader :payer_id - # Owner's verified email. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_email + attr_reader :billing_agreement_id, :fingerprint, :payer_id, :verified_email end class Payto < Stripe::StripeObject - # Amount that will be collected. It is required when `amount_type` is `fixed`. - attr_reader :amount - # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - attr_reader :amount_type - # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - attr_reader :end_date - # The periodicity at which payments will be collected. - attr_reader :payment_schedule - # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - attr_reader :payments_per_period - # The purpose for which payments are made. Defaults to retail. - attr_reader :purpose - # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - attr_reader :start_date + attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date end class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject - # The unique reference of the mandate. - attr_reader :reference - # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. - attr_reader :url + attr_reader :reference, :url end class UsBankAccount < Stripe::StripeObject - # Mandate collection method attr_reader :collection_method end - # Attribute for field acss_debit - attr_reader :acss_debit - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field au_becs_debit - attr_reader :au_becs_debit - # Attribute for field bacs_debit - attr_reader :bacs_debit - # Attribute for field card - attr_reader :card - # Attribute for field cashapp - attr_reader :cashapp - # Attribute for field kakao_pay - attr_reader :kakao_pay - # Attribute for field kr_card - attr_reader :kr_card - # Attribute for field link - attr_reader :link - # Attribute for field paypal - attr_reader :paypal - # Attribute for field payto - attr_reader :payto - # Attribute for field revolut_pay - attr_reader :revolut_pay - # Attribute for field sepa_debit - attr_reader :sepa_debit - # This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :card, :cashapp, :kakao_pay, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :type, :us_bank_account end class SingleUse < Stripe::StripeObject - # The amount of the payment on a single use mandate. - attr_reader :amount - # The currency of the payment on a single use mandate. - attr_reader :currency + attr_reader :amount, :currency end # Attribute for field customer_acceptance attr_reader :customer_acceptance - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Attribute for field multi_use attr_reader :multi_use - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account (if any) that the mandate is intended for. attr_reader :on_behalf_of - # ID of the payment method associated with this mandate. attr_reader :payment_method - # Attribute for field payment_method_details attr_reader :payment_method_details - # Attribute for field single_use attr_reader :single_use - # The mandate status indicates whether or not you can use it to initiate a payment. attr_reader :status - # The type of the mandate. attr_reader :type end diff --git a/lib/stripe/resources/margin.rb b/lib/stripe/resources/margin.rb index 53f04f187..3724a5b7d 100644 --- a/lib/stripe/resources/margin.rb +++ b/lib/stripe/resources/margin.rb @@ -16,28 +16,20 @@ def self.object_name # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. attr_reader :active - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Name of the margin that's displayed on, for example, invoices. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. attr_reader :percent_off - # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated diff --git a/lib/stripe/resources/order.rb b/lib/stripe/resources/order.rb index d59a6b32a..f1a953c69 100644 --- a/lib/stripe/resources/order.rb +++ b/lib/stripe/resources/order.rb @@ -18,559 +18,202 @@ def self.object_name end class AutomaticTax < Stripe::StripeObject - # Whether Stripe automatically computes tax on this Order. - attr_reader :enabled - # The status of the most recent automated tax calculation for this Order. - attr_reader :status + attr_reader :enabled, :status end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Billing address for the order. - attr_reader :address - # Email address for the order. - attr_reader :email - # Full name for the order. - attr_reader :name - # Billing phone number for the order (including extension). - attr_reader :phone + attr_reader :address, :email, :name, :phone end class Credit < Stripe::StripeObject class GiftCard < Stripe::StripeObject - # The token of the gift card applied to the order attr_reader :card end - # The amount of this credit to apply to the order. - attr_reader :amount - # Details for a gift card. - attr_reader :gift_card - # Line items on this order that are ineligible for this credit - attr_reader :ineligible_line_items - # The type of credit to apply to the order, only `gift_card` currently supported. - attr_reader :type + attr_reader :amount, :gift_card, :ineligible_line_items, :type end class Payment < Stripe::StripeObject class Settings < Stripe::StripeObject class AutomaticPaymentMethods < Stripe::StripeObject - # Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). attr_reader :enabled end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # A URL for custom mandate text - attr_reader :custom_mandate_url - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. - attr_reader :interval_description - # Payment schedule for the mandate. - attr_reader :payment_schedule - # Transaction type of the mandate. - attr_reader :transaction_type + attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # Bank account verification method. - attr_reader :verification_method + attr_reader :mandate_options, :setup_future_usage, :verification_method end class AfterpayClearpay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. - attr_reader :reference - # Indicates that you intend to make future payments with the payment method. - # - # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - # - # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - # - # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - attr_reader :setup_future_usage + attr_reader :capture_method, :reference, :setup_future_usage end class Alipay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. - attr_reader :preferred_language - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :preferred_language, :setup_future_usage end class Card < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with the payment method. - # - # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - # - # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - # - # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - # Attribute for field eu_bank_transfer - attr_reader :eu_bank_transfer - # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - # - # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - attr_reader :requested_address_types - # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - attr_reader :type + attr_reader :eu_bank_transfer, :requested_address_types, :type end - # Attribute for field bank_transfer - attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - attr_reader :funding_type - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :bank_transfer, :funding_type, :setup_future_usage end class Ideal < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Preferred locale of the Klarna checkout page that the customer is redirected to. - attr_reader :preferred_locale - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :preferred_locale, :setup_future_usage end class Link < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # [Deprecated] This is a legacy parameter that no longer has any function. - attr_reader :persistent_token - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :persistent_token, :setup_future_usage end class Oxxo < Stripe::StripeObject - # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :expires_after_days, :setup_future_usage end class P24 < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject - # The tax for a single unit of the line item in minor units. Cannot be a negative number. - attr_reader :amount - # The tax behavior for the line item. - attr_reader :behavior + attr_reader :amount, :behavior end - # Type of the line item. - attr_reader :category - # Description of the line item. - attr_reader :description - # Descriptive name of the line item. - attr_reader :name - # Quantity of the line item. Cannot be a negative number. - attr_reader :quantity - # Client facing stock keeping unit, article number or similar. - attr_reader :sku - # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). - attr_reader :sold_by - # Attribute for field tax - attr_reader :tax - # Price for a single unit of the line item in minor units. Cannot be a negative number. - attr_reader :unit_amount + attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount end - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # The line items purchased by the customer. - attr_reader :line_items - # Preferred locale of the PayPal checkout page that the customer is redirected to. - attr_reader :preferred_locale - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - attr_reader :reference - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - attr_reader :reference_id - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - attr_reader :subsellers + attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :mandate_options, :setup_future_usage end class Sofort < Stripe::StripeObject - # Preferred language of the SOFORT authorization page that the customer is redirected to. - attr_reader :preferred_language - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :preferred_language, :setup_future_usage end class WechatPay < Stripe::StripeObject - # The app ID registered with WeChat Pay. Only required when client is ios or android. - attr_reader :app_id - # The client type that the end customer will pay from - attr_reader :client - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :app_id, :client, :setup_future_usage end - # Attribute for field acss_debit - attr_reader :acss_debit - # Attribute for field afterpay_clearpay - attr_reader :afterpay_clearpay - # Attribute for field alipay - attr_reader :alipay - # Attribute for field bancontact - attr_reader :bancontact - # Attribute for field card - attr_reader :card - # Attribute for field customer_balance - attr_reader :customer_balance - # Attribute for field ideal - attr_reader :ideal - # Attribute for field klarna - attr_reader :klarna - # Attribute for field link - attr_reader :link - # Attribute for field oxxo - attr_reader :oxxo - # Attribute for field p24 - attr_reader :p24 - # Attribute for field paypal - attr_reader :paypal - # Attribute for field sepa_debit - attr_reader :sepa_debit - # Attribute for field sofort - attr_reader :sofort - # Attribute for field wechat_pay - attr_reader :wechat_pay + attr_reader :acss_debit, :afterpay_clearpay, :alipay, :bancontact, :card, :customer_balance, :ideal, :klarna, :link, :oxxo, :p24, :paypal, :sepa_debit, :sofort, :wechat_pay end class TransferData < Stripe::StripeObject - # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - attr_reader :amount - # ID of the Connected account receiving the transfer. - attr_reader :destination + attr_reader :amount, :destination end - # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. - attr_reader :application_fee_amount - # Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. - attr_reader :automatic_payment_methods - # PaymentMethod-specific configuration to provide to the order's PaymentIntent. - attr_reader :payment_method_options - # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - attr_reader :payment_method_types - # The URL to redirect the customer to after they authenticate their payment. - attr_reader :return_url - # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. - attr_reader :statement_descriptor - # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. - attr_reader :statement_descriptor_suffix - # Provides configuration for completing a transfer for the order after it is paid. - attr_reader :transfer_data + attr_reader :application_fee_amount, :automatic_payment_methods, :payment_method_options, :payment_method_types, :return_url, :statement_descriptor, :statement_descriptor_suffix, :transfer_data end - # ID of the payment intent associated with this order. Null when the order is `open`. - attr_reader :payment_intent - # Settings describing how the order should configure generated PaymentIntents. - attr_reader :settings - # The status of the underlying payment associated with this order, if any. Null when the order is `open`. - attr_reader :status + attr_reader :payment_intent, :settings, :status end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # Total shipping cost before any discounts or taxes are applied. - attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. - attr_reader :amount_tax - # Total shipping cost after discounts and taxes are applied. - attr_reader :amount_total - # The ID of the ShippingRate for this order. - attr_reader :shipping_rate - # The taxes applied to the shipping rate. - attr_reader :taxes + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Recipient shipping address. Required if the order includes products that are shippable. - attr_reader :address - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone + attr_reader :address, :name, :phone end class TaxDetails < Stripe::StripeObject class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` - attr_reader :type - # The value of the tax ID. - attr_reader :value + attr_reader :type, :value end - # Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. - attr_reader :tax_exempt - # The purchaser's tax IDs to be used in calculation of tax for this Order. - attr_reader :tax_ids + attr_reader :tax_exempt, :tax_ids end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. - attr_reader :amount - # 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) - attr_reader :discount + attr_reader :amount, :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # The aggregated discounts. - attr_reader :discounts - # The aggregated tax amounts by rate. - attr_reader :taxes + attr_reader :discounts, :taxes end - # Attribute for field amount_credit - attr_reader :amount_credit - # This is the sum of all the discounts. - attr_reader :amount_discount - # This is the sum of all the shipping amounts. - attr_reader :amount_shipping - # This is the sum of all the tax amounts. - attr_reader :amount_tax - # Attribute for field breakdown - attr_reader :breakdown + attr_reader :amount_credit, :amount_discount, :amount_shipping, :amount_tax, :breakdown end # Attribute for field amount_remaining attr_reader :amount_remaining - # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). attr_reader :amount_subtotal - # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). attr_reader :amount_total - # ID of the Connect application that created the Order, if any. attr_reader :application - # Attribute for field automatic_tax attr_reader :automatic_tax - # Customer billing details associated with the order. attr_reader :billing_details - # The client secret of this Order. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. attr_reader :client_secret - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The credits applied to the Order. At most 10 credits can be applied to an Order. attr_reader :credits - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The customer which this orders belongs to. attr_reader :customer - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # The discounts applied to the order. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - # Unique identifier for the object. attr_reader :id - # A recent IP address of the purchaser used for tax reporting and tax location inference. attr_reader :ip_address - # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. attr_reader :line_items - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field payment attr_reader :payment - # The details of the customer cost of shipping, including the customer chosen ShippingRate. attr_reader :shipping_cost - # Customer shipping information associated with the order. attr_reader :shipping_details - # The overall status of the order. attr_reader :status - # Attribute for field tax_details attr_reader :tax_details - # Attribute for field total_details attr_reader :total_details diff --git a/lib/stripe/resources/payment_attempt_record.rb b/lib/stripe/resources/payment_attempt_record.rb index 2efa232a4..7b5bf5829 100644 --- a/lib/stripe/resources/payment_attempt_record.rb +++ b/lib/stripe/resources/payment_attempt_record.rb @@ -15,153 +15,75 @@ def self.object_name end class AmountCanceled < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class AmountFailed < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class AmountGuaranteed < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class AmountRequested < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class CustomerDetails < Stripe::StripeObject - # ID of the Stripe Customer associated with this payment. - attr_reader :customer - # The customer's email address. - attr_reader :email - # The customer's name. - attr_reader :name - # The customer's phone number. - attr_reader :phone + attr_reader :customer, :email, :name, :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # A representation of a physical address. - attr_reader :address - # The billing email associated with the method of payment. - attr_reader :email - # The billing name associated with the method of payment. - attr_reader :name - # The billing phone number associated with the method of payment. - attr_reader :phone + attr_reader :address, :email, :name, :phone end class Custom < Stripe::StripeObject - # Display name for the custom (user-defined) payment method type used to make this payment. - attr_reader :display_name - # The custom payment method type associated with this payment. - attr_reader :type + attr_reader :display_name, :type end - # The billing details associated with the method of payment. - attr_reader :billing_details - # Information about the custom (user-defined) payment method used to make this payment. - attr_reader :custom - # ID of the Stripe PaymentMethod used to make this payment. - attr_reader :payment_method - # The type of Payment Method used for this payment attempt. - attr_reader :type + attr_reader :billing_details, :custom, :payment_method, :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # A representation of a physical address. - attr_reader :address - # The shipping recipient's name. - attr_reader :name - # The shipping recipient's phone number. - attr_reader :phone + attr_reader :address, :name, :phone end # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_canceled - # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_failed - # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_guaranteed - # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_requested - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Customer information for this payment. attr_reader :customer_details - # Indicates whether the customer was present in your checkout flow during this payment. attr_reader :customer_presence - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Information about the Payment Method debited for this payment. attr_reader :payment_method_details - # ID of the Payment Record this Payment Attempt Record belongs to. attr_reader :payment_record - # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. attr_reader :payment_reference - # Shipping information for this payment. attr_reader :shipping_details diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 57f377314..012656dea 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -26,1943 +26,617 @@ def self.object_name class AmountDetails < Stripe::StripeObject class Tip < Stripe::StripeObject - # Portion of the amount that corresponds to a tip. attr_reader :amount end - # Attribute for field tip attr_reader :tip end class AsyncWorkflows < Stripe::StripeObject class Inputs < Stripe::StripeObject class Tax < Stripe::StripeObject - # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id attr_reader :calculation end - # Attribute for field tax attr_reader :tax end - # Attribute for field inputs attr_reader :inputs end class AutomaticPaymentMethods < Stripe::StripeObject - # Controls whether this PaymentIntent will accept redirect-based payment methods. - # - # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. - attr_reader :allow_redirects - # Automatically calculates compatible payment methods - attr_reader :enabled + attr_reader :allow_redirects, :enabled end class LastPaymentError < Stripe::StripeObject - # For card errors, the ID of the failed charge. - attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. - attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. - attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. - attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. - attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. - attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) - attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). - attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. - attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. - attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) - attr_reader :setup_intent - # Attribute for field source - attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` - attr_reader :type + attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type end class NextAction < Stripe::StripeObject class AlipayHandleRedirect < Stripe::StripeObject - # The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. - attr_reader :native_data - # The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. - attr_reader :native_url - # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. - attr_reader :return_url - # The URL you must redirect your customer to in order to authenticate the payment. - attr_reader :url + attr_reader :native_data, :native_url, :return_url, :url end class BoletoDisplayDetails < Stripe::StripeObject - # The timestamp after which the boleto expires. - attr_reader :expires_at - # The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. - attr_reader :hosted_voucher_url - # The boleto number. - attr_reader :number - # The URL to the downloadable boleto voucher PDF. - attr_reader :pdf + attr_reader :expires_at, :hosted_voucher_url, :number, :pdf end class CardAwaitNotification < Stripe::StripeObject - # The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. - attr_reader :charge_attempt_at - # For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. - attr_reader :customer_approval_required + attr_reader :charge_attempt_at, :customer_approval_required end class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - # The date (unix timestamp) when the QR code expires. - attr_reader :expires_at - # The image_url_png string used to render QR code - attr_reader :image_url_png - # The image_url_svg string used to render QR code - attr_reader :image_url_svg + attr_reader :expires_at, :image_url_png, :image_url_svg end - # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. - attr_reader :hosted_instructions_url - # The url for mobile redirect based auth - attr_reader :mobile_auth_url - # Attribute for field qr_code - attr_reader :qr_code + attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code end class DisplayBankTransferInstructions < Stripe::StripeObject class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The account holder name - attr_reader :account_holder_name - # The ABA account number - attr_reader :account_number - # The account type - attr_reader :account_type - # Attribute for field bank_address - attr_reader :bank_address - # The bank name - attr_reader :bank_name - # The ABA routing number - attr_reader :routing_number + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :routing_number end class Iban < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The name of the person or business that owns the bank account - attr_reader :account_holder_name - # Attribute for field bank_address - attr_reader :bank_address - # The BIC/SWIFT code of the account. - attr_reader :bic - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # The IBAN of the account. - attr_reader :iban + attr_reader :account_holder_address, :account_holder_name, :bank_address, :bic, :country, :iban end class SortCode < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The name of the person or business that owns the bank account - attr_reader :account_holder_name - # The account number - attr_reader :account_number - # Attribute for field bank_address - attr_reader :bank_address - # The six-digit sort code - attr_reader :sort_code + attr_reader :account_holder_address, :account_holder_name, :account_number, :bank_address, :sort_code end class Spei < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The account holder name - attr_reader :account_holder_name - # Attribute for field bank_address - attr_reader :bank_address - # The three-digit bank code - attr_reader :bank_code - # The short banking institution name - attr_reader :bank_name - # The CLABE number - attr_reader :clabe + attr_reader :account_holder_address, :account_holder_name, :bank_address, :bank_code, :bank_name, :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The account holder name - attr_reader :account_holder_name - # The account number - attr_reader :account_number - # The account type - attr_reader :account_type - # Attribute for field bank_address - attr_reader :bank_address - # The bank name - attr_reader :bank_name - # The SWIFT code - attr_reader :swift_code + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :swift_code end class Zengin < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field account_holder_address - attr_reader :account_holder_address - # The account holder name - attr_reader :account_holder_name - # The account number - attr_reader :account_number - # The bank account type. In Japan, this can only be `futsu` or `toza`. - attr_reader :account_type - # Attribute for field bank_address - attr_reader :bank_address - # The bank code of the account - attr_reader :bank_code - # The bank name of the account - attr_reader :bank_name - # The branch code of the account - attr_reader :branch_code - # The branch name of the account - attr_reader :branch_name + attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_code, :bank_name, :branch_code, :branch_name end - # ABA Records contain U.S. bank account details per the ABA format. - attr_reader :aba - # Iban Records contain E.U. bank account details per the SEPA format. - attr_reader :iban - # Sort Code Records contain U.K. bank account details per the sort code format. - attr_reader :sort_code - # SPEI Records contain Mexico bank account details per the SPEI format. - attr_reader :spei - # The payment networks supported by this FinancialAddress - attr_reader :supported_networks - # SWIFT Records contain U.S. bank account details per the SWIFT format. - attr_reader :swift - # The type of financial address - attr_reader :type - # Zengin Records contain Japan bank account details per the Zengin format. - attr_reader :zengin + attr_reader :aba, :iban, :sort_code, :spei, :supported_networks, :swift, :type, :zengin end - # The remaining amount that needs to be transferred to complete the payment. - attr_reader :amount_remaining - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A list of financial addresses that can be used to fund the customer balance - attr_reader :financial_addresses - # A link to a hosted page that guides your customer through completing the transfer. - attr_reader :hosted_instructions_url - # A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. - attr_reader :reference - # Type of bank transfer - attr_reader :type + attr_reader :amount_remaining, :currency, :financial_addresses, :hosted_instructions_url, :reference, :type end class KonbiniDisplayDetails < Stripe::StripeObject class Stores < Stripe::StripeObject class Familymart < Stripe::StripeObject - # The confirmation number. - attr_reader :confirmation_number - # The payment code. - attr_reader :payment_code + attr_reader :confirmation_number, :payment_code end class Lawson < Stripe::StripeObject - # The confirmation number. - attr_reader :confirmation_number - # The payment code. - attr_reader :payment_code + attr_reader :confirmation_number, :payment_code end class Ministop < Stripe::StripeObject - # The confirmation number. - attr_reader :confirmation_number - # The payment code. - attr_reader :payment_code + attr_reader :confirmation_number, :payment_code end class Seicomart < Stripe::StripeObject - # The confirmation number. - attr_reader :confirmation_number - # The payment code. - attr_reader :payment_code + attr_reader :confirmation_number, :payment_code end - # FamilyMart instruction details. - attr_reader :familymart - # Lawson instruction details. - attr_reader :lawson - # Ministop instruction details. - attr_reader :ministop - # Seicomart instruction details. - attr_reader :seicomart + attr_reader :familymart, :lawson, :ministop, :seicomart end - # The timestamp at which the pending Konbini payment expires. - attr_reader :expires_at - # The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. - attr_reader :hosted_voucher_url - # Attribute for field stores - attr_reader :stores + attr_reader :expires_at, :hosted_voucher_url, :stores end class MultibancoDisplayDetails < Stripe::StripeObject - # Entity number associated with this Multibanco payment. - attr_reader :entity - # The timestamp at which the Multibanco voucher expires. - attr_reader :expires_at - # The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. - attr_reader :hosted_voucher_url - # Reference number associated with this Multibanco payment. - attr_reader :reference + attr_reader :entity, :expires_at, :hosted_voucher_url, :reference end class OxxoDisplayDetails < Stripe::StripeObject - # The timestamp after which the OXXO voucher expires. - attr_reader :expires_after - # The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. - attr_reader :hosted_voucher_url - # OXXO reference number. - attr_reader :number + attr_reader :expires_after, :hosted_voucher_url, :number end class PaynowDisplayQrCode < Stripe::StripeObject - # The raw data string used to generate QR code, it should be used together with QR code library. - attr_reader :data - # The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. - attr_reader :hosted_instructions_url - # The image_url_png string used to render QR code - attr_reader :image_url_png - # The image_url_svg string used to render QR code - attr_reader :image_url_svg + attr_reader :data, :hosted_instructions_url, :image_url_png, :image_url_svg end class PixDisplayQrCode < Stripe::StripeObject - # The raw data string used to generate QR code, it should be used together with QR code library. - attr_reader :data - # The date (unix timestamp) when the PIX expires. - attr_reader :expires_at - # The URL to the hosted pix instructions page, which allows customers to view the pix QR code. - attr_reader :hosted_instructions_url - # The image_url_png string used to render png QR code - attr_reader :image_url_png - # The image_url_svg string used to render svg QR code - attr_reader :image_url_svg + attr_reader :data, :expires_at, :hosted_instructions_url, :image_url_png, :image_url_svg end class PromptpayDisplayQrCode < Stripe::StripeObject - # The raw data string used to generate QR code, it should be used together with QR code library. - attr_reader :data - # The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. - attr_reader :hosted_instructions_url - # The PNG path used to render the QR code, can be used as the source in an HTML img tag - attr_reader :image_url_png - # The SVG path used to render the QR code, can be used as the source in an HTML img tag - attr_reader :image_url_svg + attr_reader :data, :hosted_instructions_url, :image_url_png, :image_url_svg end class RedirectToUrl < Stripe::StripeObject - # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. - attr_reader :return_url - # The URL you must redirect your customer to in order to authenticate the payment. - attr_reader :url + attr_reader :return_url, :url end class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - # The raw data string used to generate QR code, it should be used together with QR code library. - attr_reader :data - # The image_url_png string used to render QR code - attr_reader :image_url_png - # The image_url_svg string used to render QR code - attr_reader :image_url_svg + attr_reader :data, :image_url_png, :image_url_svg end - # The URL to the hosted Swish instructions page, which allows customers to view the QR code. - attr_reader :hosted_instructions_url - # The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). - attr_reader :mobile_auth_url - # Attribute for field qr_code - attr_reader :qr_code + attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code end class VerifyWithMicrodeposits < Stripe::StripeObject - # The timestamp when the microdeposits are expected to land. - attr_reader :arrival_date - # The URL for the hosted verification page, which allows customers to verify their bank account. - attr_reader :hosted_verification_url - # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. - attr_reader :microdeposit_type + attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type end class WechatPayDisplayQrCode < Stripe::StripeObject - # The data being used to generate QR code - attr_reader :data - # The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. - attr_reader :hosted_instructions_url - # The base64 image data for a pre-generated QR code - attr_reader :image_data_url - # The image_url_png string used to render QR code - attr_reader :image_url_png - # The image_url_svg string used to render QR code - attr_reader :image_url_svg + attr_reader :data, :hosted_instructions_url, :image_data_url, :image_url_png, :image_url_svg end class WechatPayRedirectToAndroidApp < Stripe::StripeObject - # app_id is the APP ID registered on WeChat open platform - attr_reader :app_id - # nonce_str is a random string - attr_reader :nonce_str - # package is static value - attr_reader :package - # an unique merchant ID assigned by WeChat Pay - attr_reader :partner_id - # an unique trading ID assigned by WeChat Pay - attr_reader :prepay_id - # A signature - attr_reader :sign - # Specifies the current time in epoch format - attr_reader :timestamp + attr_reader :app_id, :nonce_str, :package, :partner_id, :prepay_id, :sign, :timestamp end class WechatPayRedirectToIosApp < Stripe::StripeObject - # An universal link that redirect to WeChat Pay app attr_reader :native_url end - # Attribute for field alipay_handle_redirect - attr_reader :alipay_handle_redirect - # Attribute for field boleto_display_details - attr_reader :boleto_display_details - # Attribute for field card_await_notification - attr_reader :card_await_notification - # Attribute for field cashapp_handle_redirect_or_display_qr_code - attr_reader :cashapp_handle_redirect_or_display_qr_code - # Attribute for field display_bank_transfer_instructions - attr_reader :display_bank_transfer_instructions - # Attribute for field konbini_display_details - attr_reader :konbini_display_details - # Attribute for field multibanco_display_details - attr_reader :multibanco_display_details - # Attribute for field oxxo_display_details - attr_reader :oxxo_display_details - # Attribute for field paynow_display_qr_code - attr_reader :paynow_display_qr_code - # Attribute for field pix_display_qr_code - attr_reader :pix_display_qr_code - # Attribute for field promptpay_display_qr_code - attr_reader :promptpay_display_qr_code - # Attribute for field redirect_to_url - attr_reader :redirect_to_url - # Attribute for field swish_handle_redirect_or_display_qr_code - attr_reader :swish_handle_redirect_or_display_qr_code - # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. - attr_reader :type - # When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. - attr_reader :use_stripe_sdk - # Attribute for field verify_with_microdeposits - attr_reader :verify_with_microdeposits - # Attribute for field wechat_pay_display_qr_code - attr_reader :wechat_pay_display_qr_code - # Attribute for field wechat_pay_redirect_to_android_app - attr_reader :wechat_pay_redirect_to_android_app - # Attribute for field wechat_pay_redirect_to_ios_app - attr_reader :wechat_pay_redirect_to_ios_app + attr_reader :alipay_handle_redirect, :boleto_display_details, :card_await_notification, :cashapp_handle_redirect_or_display_qr_code, :display_bank_transfer_instructions, :konbini_display_details, :multibanco_display_details, :oxxo_display_details, :paynow_display_qr_code, :pix_display_qr_code, :promptpay_display_qr_code, :redirect_to_url, :swish_handle_redirect_or_display_qr_code, :type, :use_stripe_sdk, :verify_with_microdeposits, :wechat_pay_display_qr_code, :wechat_pay_redirect_to_android_app, :wechat_pay_redirect_to_ios_app end class PaymentDetails < Stripe::StripeObject class CarRental < Stripe::StripeObject class Affiliate < Stripe::StripeObject - # The name of the affiliate that originated the purchase. attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject - # The email of the recipient the ticket is delivered to. - attr_reader :email - # The name of the recipient the ticket is delivered to. - attr_reader :name - # The phone number of the recipient the ticket is delivered to. - attr_reader :phone + attr_reader :email, :name, :phone end - # The delivery method for the payment - attr_reader :mode - # Attribute for field recipient - attr_reader :recipient + attr_reader :mode, :recipient end class Driver < Stripe::StripeObject - # Full name of the driver on the reservation. attr_reader :name end class PickupAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class ReturnAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field affiliate - attr_reader :affiliate - # The booking number associated with the car rental. - attr_reader :booking_number - # Class code of the car. - attr_reader :car_class_code - # Make of the car. - attr_reader :car_make - # Model of the car. - attr_reader :car_model - # The name of the rental car company. - attr_reader :company - # The customer service phone number of the car rental company. - attr_reader :customer_service_phone_number - # Number of days the car is being rented. - attr_reader :days_rented - # Attribute for field delivery - attr_reader :delivery - # The details of the drivers associated with the trip. - attr_reader :drivers - # List of additional charges being billed. - attr_reader :extra_charges - # Indicates if the customer did not keep nor cancel their booking. - attr_reader :no_show - # Attribute for field pickup_address - attr_reader :pickup_address - # Car pick-up time. Measured in seconds since the Unix epoch. - attr_reader :pickup_at - # Rental rate. - attr_reader :rate_amount - # The frequency at which the rate amount is applied. One of `day`, `week` or `month` - attr_reader :rate_interval - # The full name of the person or entity renting the car. - attr_reader :renter_name - # Attribute for field return_address - attr_reader :return_address - # Car return time. Measured in seconds since the Unix epoch. - attr_reader :return_at - # Indicates whether the goods or services are tax-exempt or tax is not collected. - attr_reader :tax_exempt + attr_reader :affiliate, :booking_number, :car_class_code, :car_make, :car_model, :company, :customer_service_phone_number, :days_rented, :delivery, :drivers, :extra_charges, :no_show, :pickup_address, :pickup_at, :rate_amount, :rate_interval, :renter_name, :return_address, :return_at, :tax_exempt end class EventDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class Affiliate < Stripe::StripeObject - # The name of the affiliate that originated the purchase. attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject - # The email of the recipient the ticket is delivered to. - attr_reader :email - # The name of the recipient the ticket is delivered to. - attr_reader :name - # The phone number of the recipient the ticket is delivered to. - attr_reader :phone + attr_reader :email, :name, :phone end - # The delivery method for the payment - attr_reader :mode - # Attribute for field recipient - attr_reader :recipient + attr_reader :mode, :recipient end - # Indicates if the tickets are digitally checked when entering the venue. - attr_reader :access_controlled_venue - # Attribute for field address - attr_reader :address - # Attribute for field affiliate - attr_reader :affiliate - # The name of the company - attr_reader :company - # Attribute for field delivery - attr_reader :delivery - # Event end time. Measured in seconds since the Unix epoch. - attr_reader :ends_at - # Type of the event entertainment (concert, sports event etc) - attr_reader :genre - # The name of the event. - attr_reader :name - # Event start time. Measured in seconds since the Unix epoch. - attr_reader :starts_at + attr_reader :access_controlled_venue, :address, :affiliate, :company, :delivery, :ends_at, :genre, :name, :starts_at end class Subscription < Stripe::StripeObject class Affiliate < Stripe::StripeObject - # The name of the affiliate that originated the purchase. attr_reader :name end class BillingInterval < Stripe::StripeObject - # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - attr_reader :count - # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - attr_reader :interval + attr_reader :count, :interval end - # Attribute for field affiliate - attr_reader :affiliate - # Info whether the subscription will be auto renewed upon expiry. - attr_reader :auto_renewal - # Attribute for field billing_interval - attr_reader :billing_interval - # Subscription end time. Measured in seconds since the Unix epoch. - attr_reader :ends_at - # Name of the product on subscription. e.g. Apple Music Subscription. - attr_reader :name - # Subscription start time. Measured in seconds since the Unix epoch. - attr_reader :starts_at - end - # Attribute for field car_rental - attr_reader :car_rental - # Attribute for field event_details - attr_reader :event_details - # Attribute for field subscription - attr_reader :subscription + attr_reader :affiliate, :auto_renewal, :billing_interval, :ends_at, :name, :starts_at + end + attr_reader :car_rental, :event_details, :subscription end class PaymentMethodConfigurationDetails < Stripe::StripeObject - # ID of the payment method configuration used. - attr_reader :id - # ID of the parent payment method configuration used. - attr_reader :parent + attr_reader :id, :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # A URL for custom mandate text - attr_reader :custom_mandate_url - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. - attr_reader :interval_description - # Payment schedule for the mandate. - attr_reader :payment_schedule - # Transaction type of the mandate. - attr_reader :transaction_type + attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # Bank account verification method. - attr_reader :verification_method + attr_reader :mandate_options, :setup_future_usage, :verification_method end class Affirm < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Preferred language of the Affirm authorization page that the customer is redirected to. - attr_reader :preferred_locale - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :preferred_locale, :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - # This field differs from the statement descriptor and item name. - attr_reader :reference - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :reference, :setup_future_usage end class Alipay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Alma < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class AmazonPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class AuBecsDebit < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :mandate_options, :setup_future_usage end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. - attr_reader :preferred_language - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :preferred_language, :setup_future_usage end class Blik < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject - # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. - attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :expires_after_days, :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject class AvailablePlan < Stripe::StripeObject - # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - attr_reader :count - # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - # One of `month`. - attr_reader :interval - # Type of installment plan, one of `fixed_count`. - attr_reader :type + attr_reader :count, :interval, :type end class Plan < Stripe::StripeObject - # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. - attr_reader :count - # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - # One of `month`. - attr_reader :interval - # Type of installment plan, one of `fixed_count`. - attr_reader :type + attr_reader :count, :interval, :type end - # Installment plans that may be selected for this PaymentIntent. - attr_reader :available_plans - # Whether Installments are enabled for this PaymentIntent. - attr_reader :enabled - # Installment plan selected for this PaymentIntent. - attr_reader :plan + attr_reader :available_plans, :enabled, :plan end class MandateOptions < Stripe::StripeObject - # Amount to be charged for future payments. - attr_reader :amount - # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - attr_reader :amount_type - # A description of the mandate or subscription that is meant to be displayed to the customer. - attr_reader :description - # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - attr_reader :end_date - # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - attr_reader :interval - # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - attr_reader :interval_count - # Unique identifier for the mandate or subscription. - attr_reader :reference - # Start date of the mandate or subscription. Start date should not be lesser than yesterday. - attr_reader :start_date - # Specifies the type of mandates supported. Possible values are `india`. - attr_reader :supported_types + attr_reader :amount, :amount_type, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types end class StatementDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # Phone number - attr_reader :phone + attr_reader :address, :phone end - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Installment details for this payment (Mexico only). - # - # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - attr_reader :installments - # Configuration options for setting up an eMandate for cards issued in India. - attr_reader :mandate_options - # Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. - attr_reader :network - # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. - attr_reader :request_decremental_authorization - # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - attr_reader :request_extended_authorization - # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - attr_reader :request_incremental_authorization - # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - attr_reader :request_multicapture - # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - attr_reader :request_overcapture - # Request partial authorization on this PaymentIntent. - attr_reader :request_partial_authorization - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - attr_reader :request_three_d_secure - # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). - attr_reader :require_cvc_recollection - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - attr_reader :statement_descriptor_suffix_kana - # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - attr_reader :statement_descriptor_suffix_kanji - # Attribute for field statement_details - attr_reader :statement_details + attr_reader :capture_method, :installments, :mandate_options, :network, :request_decremental_authorization, :request_extended_authorization, :request_incremental_authorization, :request_multicapture, :request_overcapture, :request_partial_authorization, :request_three_d_secure, :require_cvc_recollection, :setup_future_usage, :statement_descriptor_suffix_kana, :statement_descriptor_suffix_kanji, :statement_details end class CardPresent < Stripe::StripeObject class Routing < Stripe::StripeObject - # Requested routing priority attr_reader :requested_priority end - # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - attr_reader :request_extended_authorization - # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - attr_reader :request_incremental_authorization_support - # Attribute for field routing - attr_reader :routing + attr_reader :request_extended_authorization, :request_incremental_authorization_support, :routing end class Cashapp < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - # Attribute for field eu_bank_transfer - attr_reader :eu_bank_transfer - # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - # - # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - attr_reader :requested_address_types - # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - attr_reader :type + attr_reader :eu_bank_transfer, :requested_address_types, :type end - # Attribute for field bank_transfer - attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - attr_reader :funding_type - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :bank_transfer, :funding_type, :setup_future_usage end class Eps < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Gopay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class IdBankTransfer < Stripe::StripeObject - # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now till 2678400 seconds (31 days) from now. - attr_reader :expires_after - # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. - attr_reader :expires_at - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :expires_after, :expires_at, :setup_future_usage end class Ideal < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class InteracPresent < Stripe::StripeObject; end class KakaoPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class Klarna < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Preferred locale of the Klarna checkout page that the customer is redirected to. - attr_reader :preferred_locale - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :preferred_locale, :setup_future_usage end class Konbini < Stripe::StripeObject - # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. - attr_reader :confirmation_number - # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. - attr_reader :expires_after_days - # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - attr_reader :expires_at - # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - attr_reader :product_description - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :confirmation_number, :expires_after_days, :expires_at, :product_description, :setup_future_usage end class KrCard < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class Link < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # [Deprecated] This is a legacy parameter that no longer has any function. - attr_reader :persistent_token - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :persistent_token, :setup_future_usage end class MbWay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class Multibanco < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Oxxo < Stripe::StripeObject - # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :expires_after_days, :setup_future_usage end class P24 < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Payco < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Paynow < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject - # The tax for a single unit of the line item in minor units. Cannot be a negative number. - attr_reader :amount - # The tax behavior for the line item. - attr_reader :behavior + attr_reader :amount, :behavior end - # Type of the line item. - attr_reader :category - # Description of the line item. - attr_reader :description - # Descriptive name of the line item. - attr_reader :name - # Quantity of the line item. Cannot be a negative number. - attr_reader :quantity - # Client facing stock keeping unit, article number or similar. - attr_reader :sku - # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). - attr_reader :sold_by - # Attribute for field tax - attr_reader :tax - # Price for a single unit of the line item in minor units. Cannot be a negative number. - attr_reader :unit_amount + attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount end - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # The line items purchased by the customer. - attr_reader :line_items - # Preferred locale of the PayPal checkout page that the customer is redirected to. - attr_reader :preferred_locale - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - attr_reader :reference - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - attr_reader :reference_id - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - attr_reader :subsellers + attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount that will be collected. It is required when `amount_type` is `fixed`. - attr_reader :amount - # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - attr_reader :amount_type - # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - attr_reader :end_date - # The periodicity at which payments will be collected. - attr_reader :payment_schedule - # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - attr_reader :payments_per_period - # The purpose for which payments are made. Defaults to retail. - attr_reader :purpose + attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :mandate_options, :setup_future_usage end class Pix < Stripe::StripeObject - # The number of seconds (between 10 and 1209600) after which Pix payment will expire. - attr_reader :expires_after_seconds - # The timestamp at which the Pix expires. - attr_reader :expires_at - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :expires_after_seconds, :expires_at, :setup_future_usage end class Promptpay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Qris < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. - attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :capture_method, :setup_future_usage end class SamsungPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options - attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :mandate_options, :setup_future_usage end class Shopeepay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject - # Preferred language of the SOFORT authorization page that the customer is redirected to. - attr_reader :preferred_language - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :preferred_language, :setup_future_usage end class Swish < Stripe::StripeObject - # A reference for this payment to be displayed in the Swish app. - attr_reader :reference - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :reference, :setup_future_usage end class Twint < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. - attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. - attr_reader :institution + attr_reader :account_subcategories, :institution end class ManualEntry < Stripe::StripeObject - # Settings for configuring manual entry of account details. attr_reader :mode end - # Attribute for field filters - attr_reader :filters - # Attribute for field manual_entry - attr_reader :manual_entry - # The list of permissions to request. The `payment_method` permission must be included. - attr_reader :permissions - # Data features requested to be retrieved upon account creation. - attr_reader :prefetch - # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - attr_reader :return_url + attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url end class MandateOptions < Stripe::StripeObject - # Mandate collection method attr_reader :collection_method end - # Attribute for field financial_connections - attr_reader :financial_connections - # Attribute for field mandate_options - attr_reader :mandate_options - # Preferred transaction settlement speed - attr_reader :preferred_settlement_speed - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage - # Bank account verification method. - attr_reader :verification_method + attr_reader :financial_connections, :mandate_options, :preferred_settlement_speed, :setup_future_usage, :verification_method end class WechatPay < Stripe::StripeObject - # The app ID registered with WeChat Pay. Only required when client is ios or android. - attr_reader :app_id - # The client type that the end customer will pay from - attr_reader :client - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - attr_reader :setup_future_usage + attr_reader :app_id, :client, :setup_future_usage end class Zip < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end - # Attribute for field acss_debit - attr_reader :acss_debit - # Attribute for field affirm - attr_reader :affirm - # Attribute for field afterpay_clearpay - attr_reader :afterpay_clearpay - # Attribute for field alipay - attr_reader :alipay - # Attribute for field alma - attr_reader :alma - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field au_becs_debit - attr_reader :au_becs_debit - # Attribute for field bacs_debit - attr_reader :bacs_debit - # Attribute for field bancontact - attr_reader :bancontact - # Attribute for field blik - attr_reader :blik - # Attribute for field boleto - attr_reader :boleto - # Attribute for field card - attr_reader :card - # Attribute for field card_present - attr_reader :card_present - # Attribute for field cashapp - attr_reader :cashapp - # Attribute for field customer_balance - attr_reader :customer_balance - # Attribute for field eps - attr_reader :eps - # Attribute for field fpx - attr_reader :fpx - # Attribute for field giropay - attr_reader :giropay - # Attribute for field gopay - attr_reader :gopay - # Attribute for field grabpay - attr_reader :grabpay - # Attribute for field id_bank_transfer - attr_reader :id_bank_transfer - # Attribute for field ideal - attr_reader :ideal - # Attribute for field interac_present - attr_reader :interac_present - # Attribute for field kakao_pay - attr_reader :kakao_pay - # Attribute for field klarna - attr_reader :klarna - # Attribute for field konbini - attr_reader :konbini - # Attribute for field kr_card - attr_reader :kr_card - # Attribute for field link - attr_reader :link - # Attribute for field mb_way - attr_reader :mb_way - # Attribute for field mobilepay - attr_reader :mobilepay - # Attribute for field multibanco - attr_reader :multibanco - # Attribute for field naver_pay - attr_reader :naver_pay - # Attribute for field oxxo - attr_reader :oxxo - # Attribute for field p24 - attr_reader :p24 - # Attribute for field payco - attr_reader :payco - # Attribute for field paynow - attr_reader :paynow - # Attribute for field paypal - attr_reader :paypal - # Attribute for field payto - attr_reader :payto - # Attribute for field pix - attr_reader :pix - # Attribute for field promptpay - attr_reader :promptpay - # Attribute for field qris - attr_reader :qris - # Attribute for field rechnung - attr_reader :rechnung - # Attribute for field revolut_pay - attr_reader :revolut_pay - # Attribute for field samsung_pay - attr_reader :samsung_pay - # Attribute for field sepa_debit - attr_reader :sepa_debit - # Attribute for field shopeepay - attr_reader :shopeepay - # Attribute for field sofort - attr_reader :sofort - # Attribute for field swish - attr_reader :swish - # Attribute for field twint - attr_reader :twint - # Attribute for field us_bank_account - attr_reader :us_bank_account - # Attribute for field wechat_pay - attr_reader :wechat_pay - # Attribute for field zip - attr_reader :zip + attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :blik, :boleto, :card, :card_present, :cashapp, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_debit, :shopeepay, :sofort, :swish, :twint, :us_bank_account, :wechat_pay, :zip end class Processing < Stripe::StripeObject class Card < Stripe::StripeObject class CustomerNotification < Stripe::StripeObject - # Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. - attr_reader :approval_requested - # If customer approval is required, they need to provide approval before this time. - attr_reader :completes_at + attr_reader :approval_requested, :completes_at end - # Attribute for field customer_notification attr_reader :customer_notification end - # Attribute for field card - attr_reader :card - # Type of the payment method for which payment is in `processing` state, one of `card`. - attr_reader :type + attr_reader :card, :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state - end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :city, :country, :line1, :line2, :postal_code, :state + end + attr_reader :address, :carrier, :name, :phone, :tracking_number end class TransferData < Stripe::StripeObject - # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - attr_reader :amount - # The account (if any) that the payment is attributed to for tax - # reporting, and where funds from the payment are transferred to after - # payment success. - attr_reader :destination + attr_reader :amount, :destination end # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). attr_reader :amount - # Amount that can be captured from this PaymentIntent. attr_reader :amount_capturable - # Attribute for field amount_details attr_reader :amount_details - # Amount that this PaymentIntent collects. attr_reader :amount_received - # ID of the Connect application that created the PaymentIntent. attr_reader :application - # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). attr_reader :application_fee_amount - # Attribute for field async_workflows attr_reader :async_workflows - # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) attr_reader :automatic_payment_methods - # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at - # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). attr_reader :cancellation_reason - # Controls when the funds will be captured from the customer's account. attr_reader :capture_method - # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. attr_reader :client_secret - # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. attr_reader :confirmation_method - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # ID of the Customer this PaymentIntent belongs to, if one exists. # # Payment methods attached to other Customers cannot be used with this PaymentIntent. # # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. attr_reader :customer - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Unique identifier for the object. attr_reader :id - # ID of the invoice that created this PaymentIntent, if it exists. attr_reader :invoice - # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. attr_reader :last_payment_error - # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. attr_reader :latest_charge - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). attr_reader :metadata - # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. attr_reader :next_action - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. attr_reader :on_behalf_of - # Attribute for field payment_details attr_reader :payment_details - # ID of the payment method used in this PaymentIntent. attr_reader :payment_method - # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. attr_reader :payment_method_configuration_details - # Payment-method-specific configuration for this PaymentIntent. attr_reader :payment_method_options - # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. attr_reader :payment_method_types - # If present, this property tells you about the processing state of the payment. attr_reader :processing - # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). attr_reader :receipt_email - # ID of the review associated with this PaymentIntent, if any. attr_reader :review - # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. attr_reader :secret_key_confirmation - # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1971,27 +645,20 @@ class TransferData < Stripe::StripeObject # # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage - # Shipping information for this PaymentIntent. attr_reader :shipping - # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. attr_reader :source - # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. attr_reader :statement_descriptor - # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. attr_reader :statement_descriptor_suffix - # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). attr_reader :status - # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). attr_reader :transfer_data - # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). attr_reader :transfer_group diff --git a/lib/stripe/resources/payment_link.rb b/lib/stripe/resources/payment_link.rb index b4f8bc2bf..b01ba8e39 100644 --- a/lib/stripe/resources/payment_link.rb +++ b/lib/stripe/resources/payment_link.rb @@ -19,355 +19,199 @@ def self.object_name class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject - # The custom message that is displayed to the customer after the purchase is complete. attr_reader :custom_message end class Redirect < Stripe::StripeObject - # The URL the customer will be redirected to after the purchase is complete. attr_reader :url end - # Attribute for field hosted_confirmation - attr_reader :hosted_confirmation - # Attribute for field redirect - attr_reader :redirect - # The specified behavior after the purchase is complete. - attr_reader :type + attr_reader :hosted_confirmation, :redirect, :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # If `true`, tax will be calculated automatically using the customer's location. - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability + attr_reader :enabled, :liability end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject - # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. - # - # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. attr_reader :position end - # Settings related to the payment method reuse text shown in the Checkout UI. - attr_reader :payment_method_reuse_agreement - # If set to `auto`, enables the collection of customer consent for promotional communications. - attr_reader :promotions - # If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. - attr_reader :terms_of_service + attr_reader :payment_method_reuse_agreement, :promotions, :terms_of_service end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject - # The label for the option, displayed to the customer. Up to 100 characters. - attr_reader :label - # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - attr_reader :value + attr_reader :label, :value end - # The options available for the customer to select. Up to 200 options allowed. attr_reader :options end class Label < Stripe::StripeObject - # Custom text for the label, displayed to the customer. Up to 50 characters. - attr_reader :custom - # The type of the label. - attr_reader :type + attr_reader :custom, :type end class Numeric < Stripe::StripeObject - # The maximum character length constraint for the customer's input. - attr_reader :maximum_length - # The minimum character length requirement for the customer's input. - attr_reader :minimum_length + attr_reader :maximum_length, :minimum_length end class Text < Stripe::StripeObject - # The maximum character length constraint for the customer's input. - attr_reader :maximum_length - # The minimum character length requirement for the customer's input. - attr_reader :minimum_length + attr_reader :maximum_length, :minimum_length end - # Attribute for field dropdown - attr_reader :dropdown - # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - attr_reader :key - # Attribute for field label - attr_reader :label - # Attribute for field numeric - attr_reader :numeric - # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - attr_reader :optional - # Attribute for field text - attr_reader :text - # The type of the field. - attr_reader :type + attr_reader :dropdown, :key, :label, :numeric, :optional, :text, :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject - # Text may be up to 1200 characters in length. attr_reader :message end class ShippingAddress < Stripe::StripeObject - # Text may be up to 1200 characters in length. attr_reader :message end class Submit < Stripe::StripeObject - # Text may be up to 1200 characters in length. attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject - # Text may be up to 1200 characters in length. attr_reader :message end - # Custom text that should be displayed after the payment confirmation button. - attr_reader :after_submit - # Custom text that should be displayed alongside shipping address collection. - attr_reader :shipping_address - # Custom text that should be displayed alongside the payment confirmation button. - attr_reader :submit - # Custom text that should be displayed in place of the default terms of service agreement text. - attr_reader :terms_of_service_acceptance + attr_reader :after_submit, :shipping_address, :submit, :terms_of_service_acceptance end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject - # The name of the custom field. - attr_reader :name - # The value of the custom field. - attr_reader :value + attr_reader :name, :value end class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end class RenderingOptions < Stripe::StripeObject - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. attr_reader :amount_tax_display end - # The account tax IDs associated with the invoice. - attr_reader :account_tax_ids - # A list of up to 4 custom fields to be displayed on the invoice. - attr_reader :custom_fields - # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description - # Footer to be displayed on the invoice. - attr_reader :footer - # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - attr_reader :issuer - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - attr_reader :metadata - # Options for invoice PDF rendering. - attr_reader :rendering_options + attr_reader :account_tax_ids, :custom_fields, :description, :footer, :issuer, :metadata, :rendering_options end - # Enable creating an invoice on successful payment. - attr_reader :enabled - # Configuration for the invoice. Default invoice values will be used if unspecified. - attr_reader :invoice_data + attr_reader :enabled, :invoice_data end class PaymentIntentData < Stripe::StripeObject - # Indicates when the funds will be captured from the customer's account. - attr_reader :capture_method - # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. - attr_reader :metadata - # Indicates that you intend to make future payments with the payment method collected during checkout. - attr_reader :setup_future_usage - # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. - attr_reader :statement_descriptor - # For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. - attr_reader :statement_descriptor_suffix - # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - attr_reader :transfer_group + attr_reader :capture_method, :description, :metadata, :setup_future_usage, :statement_descriptor, :statement_descriptor_suffix, :transfer_group end class PhoneNumberCollection < Stripe::StripeObject - # If `true`, a phone number will be collected during checkout. attr_reader :enabled end class Restrictions < Stripe::StripeObject class CompletedSessions < Stripe::StripeObject - # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. - attr_reader :count - # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. - attr_reader :limit + attr_reader :count, :limit end - # Attribute for field completed_sessions attr_reader :completed_sessions end class ShippingAddressCollection < Stripe::StripeObject - # An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. attr_reader :allowed_countries end class ShippingOption < Stripe::StripeObject - # A non-negative integer in cents representing how much to charge. - attr_reader :shipping_amount - # The ID of the Shipping Rate to use for this shipping option. - attr_reader :shipping_rate + attr_reader :shipping_amount, :shipping_rate end class SubscriptionData < Stripe::StripeObject class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Attribute for field issuer attr_reader :issuer end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. attr_reader :missing_payment_method end - # Defines how a subscription behaves when a free trial ends. attr_reader :end_behavior end - # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - attr_reader :description - # Attribute for field invoice_settings - attr_reader :invoice_settings - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. - attr_reader :metadata - # Integer representing the number of trial period days before the customer is charged for the first time. - attr_reader :trial_period_days - # Settings related to subscription trials. - attr_reader :trial_settings + attr_reader :description, :invoice_settings, :metadata, :trial_period_days, :trial_settings end class TaxIdCollection < Stripe::StripeObject - # Indicates whether tax ID collection is enabled for the session. - attr_reader :enabled - # Attribute for field required - attr_reader :required + attr_reader :enabled, :required end class TransferData < Stripe::StripeObject - # The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - attr_reader :amount - # The connected account receiving the transfer. - attr_reader :destination + attr_reader :amount, :destination end # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. attr_reader :active - # Attribute for field after_completion attr_reader :after_completion - # Whether user redeemable promotion codes are enabled. attr_reader :allow_promotion_codes - # The ID of the Connect application that created the Payment Link. attr_reader :application - # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. attr_reader :application_fee_amount - # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. attr_reader :application_fee_percent - # Attribute for field automatic_tax attr_reader :automatic_tax - # Configuration for collecting the customer's billing address. Defaults to `auto`. attr_reader :billing_address_collection - # When set, provides configuration to gather active consent from customers. attr_reader :consent_collection - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Collect additional information from your customer using custom fields. Up to 3 fields are supported. attr_reader :custom_fields - # Attribute for field custom_text attr_reader :custom_text - # Configuration for Customer creation during checkout. attr_reader :customer_creation - # Unique identifier for the object. attr_reader :id - # The custom message to be displayed to a customer when a payment link is no longer active. attr_reader :inactive_message - # Configuration for creating invoice for payment mode payment links. attr_reader :invoice_creation - # The line items representing what is being sold. attr_reader :line_items - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. attr_reader :on_behalf_of - # Indicates the parameters to be passed to PaymentIntent creation during checkout. attr_reader :payment_intent_data - # Configuration for collecting a payment method during checkout. Defaults to `always`. attr_reader :payment_method_collection - # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). attr_reader :payment_method_types - # Attribute for field phone_number_collection attr_reader :phone_number_collection - # Settings that restrict the usage of a payment link. attr_reader :restrictions - # Configuration for collecting the customer's shipping address. attr_reader :shipping_address_collection - # The shipping rate options applied to the session. attr_reader :shipping_options - # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. attr_reader :submit_type - # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. attr_reader :subscription_data - # Attribute for field tax_id_collection attr_reader :tax_id_collection - # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. attr_reader :transfer_data - # The public URL that can be shared with customers. attr_reader :url diff --git a/lib/stripe/resources/payment_method.rb b/lib/stripe/resources/payment_method.rb index 5481f6d24..0cf025150 100644 --- a/lib/stripe/resources/payment_method.rb +++ b/lib/stripe/resources/payment_method.rb @@ -18,16 +18,7 @@ def self.object_name end class AcssDebit < Stripe::StripeObject - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Institution number of the bank account. - attr_reader :institution_number - # Last four digits of the bank account number. - attr_reader :last4 - # Transit number of the bank account. - attr_reader :transit_number + attr_reader :bank_name, :fingerprint, :institution_number, :last4, :transit_number end class Affirm < Stripe::StripeObject; end @@ -37,177 +28,59 @@ class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - # Six-digit number identifying bank and branch associated with this bank account. - attr_reader :bsb_number - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 + attr_reader :bsb_number, :fingerprint, :last4 end class BacsDebit < Stripe::StripeObject - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # Sort code of the bank account. (e.g., `10-20-30`) - attr_reader :sort_code + attr_reader :fingerprint, :last4, :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Billing address. - attr_reader :address - # Email address. - attr_reader :email - # Full name. - attr_reader :name - # Billing phone number (including extension). - attr_reader :phone + attr_reader :address, :email, :name, :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject - # Uniquely identifies the customer tax id (CNPJ or CPF) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_line1_check - # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_postal_code_check - # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :cvc_check + attr_reader :address_line1_check, :address_postal_code_check, :cvc_check end class GeneratedFrom < Stripe::StripeObject class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline - attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. - attr_reader :type + attr_reader :stored_at, :type end class Receipt < Stripe::StripeObject - # The type of account being debited or credited - attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. - attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. - attr_reader :application_preferred_name - # Identifier for this transaction. - attr_reader :authorization_code - # EMV tag 8A. A code returned by the card issuer. - attr_reader :authorization_response_code - # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. - attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. - attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. - attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. - attr_reader :transaction_status_information + attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - # The authorized amount - attr_reader :amount_authorized - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. - attr_reader :brand_product - # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. - attr_reader :capture_before - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Authorization response cryptogram. - attr_reader :emv_auth_data - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. - attr_reader :generated_card - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). - attr_reader :incremental_authorization_supported - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :network - # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. - attr_reader :network_transaction_id - # Details about payments collected offline. - attr_reader :offline - # Defines whether the authorized amount can be over-captured or not - attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. - attr_reader :preferred_locales - # How card details were read in this transaction. - attr_reader :read_method - # A collection of fields required to be displayed on receipts. Only required for EMV transactions. - attr_reader :receipt - # Attribute for field wallet - attr_reader :wallet + attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet end - # Attribute for field card_present - attr_reader :card_present - # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. - attr_reader :type + attr_reader :card_present, :type end - # The charge that created this object. - attr_reader :charge - # Transaction-specific details of the payment method used in the payment. - attr_reader :payment_method_details - # The ID of the SetupAttempt that generated this PaymentMethod, if any. - attr_reader :setup_attempt + attr_reader :charge, :payment_method_details, :setup_attempt end class Networks < Stripe::StripeObject - # All available networks for the card. - attr_reader :available - # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. - attr_reader :preferred + attr_reader :available, :preferred end class ThreeDSecureUsage < Stripe::StripeObject - # Whether 3D Secure is supported on this card. attr_reader :supported end @@ -219,216 +92,59 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :shipping_address + attr_reader :billing_address, :email, :name, :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :shipping_address + attr_reader :billing_address, :email, :name, :shipping_address end - # Attribute for field amex_express_checkout - attr_reader :amex_express_checkout - # Attribute for field apple_pay - attr_reader :apple_pay - # (For tokenized numbers only.) The last four digits of the device account number. - attr_reader :dynamic_last4 - # Attribute for field google_pay - attr_reader :google_pay - # Attribute for field link - attr_reader :link - # Attribute for field masterpass - attr_reader :masterpass - # Attribute for field samsung_pay - attr_reader :samsung_pay - # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - attr_reader :type - # Attribute for field visa_checkout - attr_reader :visa_checkout + attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # Checks on Card address and CVC if provided. - attr_reader :checks - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. - attr_reader :display_brand - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # Details of the original PaymentMethod that created this object. - attr_reader :generated_from - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Contains information about card networks that can be used to process the payment. - attr_reader :networks - # Contains details on how this Card may be used for 3D Secure authentication. - attr_reader :three_d_secure_usage - # If this Card is part of a card wallet, this contains the details of the card wallet. - attr_reader :wallet + attr_reader :brand, :checks, :country, :description, :display_brand, :exp_month, :exp_year, :fingerprint, :funding, :generated_from, :iin, :issuer, :last4, :networks, :three_d_secure_usage, :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - # All available networks for the card. - attr_reader :available - # The preferred network for the card. - attr_reader :preferred + attr_reader :available, :preferred end class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline - attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. - attr_reader :type + attr_reader :stored_at, :type end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. - attr_reader :brand_product - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Contains information about card networks that can be used to process the payment. - attr_reader :networks - # Details about payment methods collected offline. - attr_reader :offline - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. - attr_reader :preferred_locales - # How card details were read in this transaction. - attr_reader :read_method - # Attribute for field wallet - attr_reader :wallet + attr_reader :brand, :brand_product, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :offline, :preferred_locales, :read_method, :wallet end class Cashapp < Stripe::StripeObject - # A unique and immutable identifier assigned by Cash App to every buyer. - attr_reader :buyer_id - # A public identifier for buyers using Cash App. - attr_reader :cashtag + attr_reader :buyer_id, :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject - # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. attr_reader :bank end class Fpx < Stripe::StripeObject - # Account holder type, if provided. Can be one of `individual` or `company`. - attr_reader :account_holder_type - # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. - attr_reader :bank + attr_reader :account_holder_type, :bank end class Giropay < Stripe::StripeObject; end @@ -436,91 +152,37 @@ class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - # Attribute for field bank - attr_reader :bank - # Attribute for field bank_code - attr_reader :bank_code - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field display_name - attr_reader :display_name + attr_reader :bank, :bank_code, :bank_name, :display_name end class Ideal < Stripe::StripeObject - # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. - attr_reader :bank - # The Bank Identifier Code of the customer's bank, if the bank was provided. - attr_reader :bic + attr_reader :bank, :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - # All available networks for the card. - attr_reader :available - # The preferred network for the card. - attr_reader :preferred + attr_reader :available, :preferred end - # Card brand. Can be `interac`, `mastercard` or `visa`. - attr_reader :brand - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. - attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Contains information about card networks that can be used to process the payment. - attr_reader :networks - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. - attr_reader :preferred_locales - # How card details were read in this transaction. - attr_reader :read_method + attr_reader :brand, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :preferred_locales, :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. - attr_reader :day - # The month of birth, between 1 and 12. - attr_reader :month - # The four-digit year of birth. - attr_reader :year + attr_reader :day, :month, :year end - # The customer's date of birth, if provided. attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject - # The local credit or debit card brand. - attr_reader :brand - # The last four digits of the card. This may not be present for American Express cards. - attr_reader :last4 + attr_reader :brand, :last4 end class Link < Stripe::StripeObject - # Account owner's email address. - attr_reader :email - # [Deprecated] This is a legacy parameter that no longer has any function. - attr_reader :persistent_token + attr_reader :email, :persistent_token end class MbWay < Stripe::StripeObject; end @@ -528,14 +190,12 @@ class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject - # Whether to fund this transaction with Naver Pay points or a card. attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject - # The customer's bank, if provided. attr_reader :bank end @@ -543,25 +203,11 @@ class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. - attr_reader :fingerprint - # Owner's email. Values are provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :payer_email - # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. - attr_reader :payer_id - # Owner's verified email. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_email + attr_reader :fingerprint, :payer_email, :payer_id, :verified_email end class Payto < Stripe::StripeObject - # Bank-State-Branch number of the bank account. - attr_reader :bsb_number - # Last four digits of the bank account number. - attr_reader :last4 - # The PayID alias for the bank account. - attr_reader :pay_id + attr_reader :bsb_number, :last4, :pay_id end class Pix < Stripe::StripeObject; end @@ -569,20 +215,13 @@ class Promptpay < Stripe::StripeObject; end class Qris < Stripe::StripeObject; end class RadarOptions < Stripe::StripeObject - # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. attr_reader :session end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. - attr_reader :day - # The month of birth, between 1 and 12. - attr_reader :month - # The four-digit year of birth. - attr_reader :year + attr_reader :day, :month, :year end - # Attribute for field dob attr_reader :dob end @@ -591,29 +230,14 @@ class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject - # The ID of the Charge that generated this PaymentMethod, if any. - attr_reader :charge - # The ID of the SetupAttempt that generated this PaymentMethod, if any. - attr_reader :setup_attempt + attr_reader :charge, :setup_attempt end - # Bank code of bank associated with the bank account. - attr_reader :bank_code - # Branch code of bank associated with the bank account. - attr_reader :branch_code - # Two-letter ISO code representing the country the bank account is located in. - attr_reader :country - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Information about the object that generated this PaymentMethod. - attr_reader :generated_from - # Last four characters of the IBAN. - attr_reader :last4 + attr_reader :bank_code, :branch_code, :country, :fingerprint, :generated_from, :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - # Two-letter ISO code representing the country the bank account is located in. attr_reader :country end @@ -622,229 +246,142 @@ class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject - # The preferred network. - attr_reader :preferred - # All supported networks. - attr_reader :supported + attr_reader :preferred, :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject - # The ACH network code that resulted in this block. - attr_reader :network_code - # The reason why this PaymentMethod's fingerprint has been blocked - attr_reader :reason + attr_reader :network_code, :reason end - # Attribute for field blocked attr_reader :blocked end - # Account holder type: individual or company. - attr_reader :account_holder_type - # Account number of the bank account. - attr_reader :account_number - # Account type: checkings or savings. Defaults to checking if omitted. - attr_reader :account_type - # The name of the bank. - attr_reader :bank_name - # The ID of the Financial Connections Account used to create the payment method. - attr_reader :financial_connections_account - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # Contains information about US bank account networks that can be used. - attr_reader :networks - # Routing number of the bank account. - attr_reader :routing_number - # Contains information about the future reusability of this PaymentMethod. - attr_reader :status_details + attr_reader :account_holder_type, :account_number, :account_type, :bank_name, :financial_connections_account, :fingerprint, :last4, :networks, :routing_number, :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end # Attribute for field acss_debit attr_reader :acss_debit - # Attribute for field affirm attr_reader :affirm - # Attribute for field afterpay_clearpay attr_reader :afterpay_clearpay - # Attribute for field alipay attr_reader :alipay - # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. attr_reader :allow_redisplay - # Attribute for field alma attr_reader :alma - # Attribute for field amazon_pay attr_reader :amazon_pay - # Attribute for field au_becs_debit attr_reader :au_becs_debit - # Attribute for field bacs_debit attr_reader :bacs_debit - # Attribute for field bancontact attr_reader :bancontact - # Attribute for field billing_details attr_reader :billing_details - # Attribute for field blik attr_reader :blik - # Attribute for field boleto attr_reader :boleto - # Attribute for field card attr_reader :card - # Attribute for field card_present attr_reader :card_present - # Attribute for field cashapp attr_reader :cashapp - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. attr_reader :customer - # Attribute for field customer_balance attr_reader :customer_balance - # Attribute for field eps attr_reader :eps - # Attribute for field fpx attr_reader :fpx - # Attribute for field giropay attr_reader :giropay - # Attribute for field gopay attr_reader :gopay - # Attribute for field grabpay attr_reader :grabpay - # Unique identifier for the object. attr_reader :id - # Attribute for field id_bank_transfer attr_reader :id_bank_transfer - # Attribute for field ideal attr_reader :ideal - # Attribute for field interac_present attr_reader :interac_present - # Attribute for field kakao_pay attr_reader :kakao_pay - # Attribute for field klarna attr_reader :klarna - # Attribute for field konbini attr_reader :konbini - # Attribute for field kr_card attr_reader :kr_card - # Attribute for field link attr_reader :link - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Attribute for field mb_way attr_reader :mb_way - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Attribute for field mobilepay attr_reader :mobilepay - # Attribute for field multibanco attr_reader :multibanco - # Attribute for field naver_pay attr_reader :naver_pay - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field oxxo attr_reader :oxxo - # Attribute for field p24 attr_reader :p24 - # Attribute for field payco attr_reader :payco - # Attribute for field paynow attr_reader :paynow - # Attribute for field paypal attr_reader :paypal - # Attribute for field payto attr_reader :payto - # Attribute for field pix attr_reader :pix - # Attribute for field promptpay attr_reader :promptpay - # Attribute for field qris attr_reader :qris - # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. attr_reader :radar_options - # Attribute for field rechnung attr_reader :rechnung - # Attribute for field revolut_pay attr_reader :revolut_pay - # Attribute for field samsung_pay attr_reader :samsung_pay - # Attribute for field sepa_debit attr_reader :sepa_debit - # Attribute for field shopeepay attr_reader :shopeepay - # Attribute for field sofort attr_reader :sofort - # Attribute for field swish attr_reader :swish - # Attribute for field twint attr_reader :twint - # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. attr_reader :type - # Attribute for field us_bank_account attr_reader :us_bank_account - # Attribute for field wechat_pay attr_reader :wechat_pay - # Attribute for field zip attr_reader :zip diff --git a/lib/stripe/resources/payment_method_configuration.rb b/lib/stripe/resources/payment_method_configuration.rb index 182861f7c..fece78419 100644 --- a/lib/stripe/resources/payment_method_configuration.rb +++ b/lib/stripe/resources/payment_method_configuration.rb @@ -28,852 +28,431 @@ def self.object_name class AcssDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Affirm < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class AfterpayClearpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Alipay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Alma < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class AmazonPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class ApplePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class AuBecsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class BacsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Bancontact < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Blik < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Boleto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Card < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class CartesBancaires < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Cashapp < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class CustomerBalance < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Eps < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Fpx < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Giropay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class GooglePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Gopay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Grabpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class IdBankTransfer < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Ideal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Jcb < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Klarna < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Konbini < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Link < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Mobilepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Multibanco < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Oxxo < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class P24 < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Paynow < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Paypal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Payto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Promptpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Qris < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class RevolutPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class SepaDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Shopeepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Sofort < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Swish < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Twint < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class UsBankAccount < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class WechatPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end class Zip < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. - attr_reader :overridable - # The account's display preference. - attr_reader :preference - # The effective display preference value. - attr_reader :value + attr_reader :overridable, :preference, :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. - attr_reader :available - # Attribute for field display_preference - attr_reader :display_preference + attr_reader :available, :display_preference end # Attribute for field acss_debit attr_reader :acss_debit - # Whether the configuration can be used for new payments. attr_reader :active - # Attribute for field affirm attr_reader :affirm - # Attribute for field afterpay_clearpay attr_reader :afterpay_clearpay - # Attribute for field alipay attr_reader :alipay - # Attribute for field alma attr_reader :alma - # Attribute for field amazon_pay attr_reader :amazon_pay - # Attribute for field apple_pay attr_reader :apple_pay - # For child configs, the Connect application associated with the configuration. attr_reader :application - # Attribute for field au_becs_debit attr_reader :au_becs_debit - # Attribute for field bacs_debit attr_reader :bacs_debit - # Attribute for field bancontact attr_reader :bancontact - # Attribute for field blik attr_reader :blik - # Attribute for field boleto attr_reader :boleto - # Attribute for field card attr_reader :card - # Attribute for field cartes_bancaires attr_reader :cartes_bancaires - # Attribute for field cashapp attr_reader :cashapp - # Attribute for field customer_balance attr_reader :customer_balance - # Attribute for field eps attr_reader :eps - # Attribute for field fpx attr_reader :fpx - # Attribute for field giropay attr_reader :giropay - # Attribute for field google_pay attr_reader :google_pay - # Attribute for field gopay attr_reader :gopay - # Attribute for field grabpay attr_reader :grabpay - # Unique identifier for the object. attr_reader :id - # Attribute for field id_bank_transfer attr_reader :id_bank_transfer - # Attribute for field ideal attr_reader :ideal - # The default configuration is used whenever a payment method configuration is not specified. attr_reader :is_default - # Attribute for field jcb attr_reader :jcb - # Attribute for field klarna attr_reader :klarna - # Attribute for field konbini attr_reader :konbini - # Attribute for field link attr_reader :link - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Attribute for field mobilepay attr_reader :mobilepay - # Attribute for field multibanco attr_reader :multibanco - # The configuration's name. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field oxxo attr_reader :oxxo - # Attribute for field p24 attr_reader :p24 - # For child configs, the configuration's parent configuration. attr_reader :parent - # Attribute for field paynow attr_reader :paynow - # Attribute for field paypal attr_reader :paypal - # Attribute for field payto attr_reader :payto - # Attribute for field promptpay attr_reader :promptpay - # Attribute for field qris attr_reader :qris - # Attribute for field revolut_pay attr_reader :revolut_pay - # Attribute for field sepa_debit attr_reader :sepa_debit - # Attribute for field shopeepay attr_reader :shopeepay - # Attribute for field sofort attr_reader :sofort - # Attribute for field swish attr_reader :swish - # Attribute for field twint attr_reader :twint - # Attribute for field us_bank_account attr_reader :us_bank_account - # Attribute for field wechat_pay attr_reader :wechat_pay - # Attribute for field zip attr_reader :zip diff --git a/lib/stripe/resources/payment_method_domain.rb b/lib/stripe/resources/payment_method_domain.rb index a1fdafdcd..5e16e18fd 100644 --- a/lib/stripe/resources/payment_method_domain.rb +++ b/lib/stripe/resources/payment_method_domain.rb @@ -18,88 +18,58 @@ def self.object_name class AmazonPay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - # The status of the payment method on the domain. - attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. - attr_reader :status_details + attr_reader :status, :status_details end class ApplePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - # The status of the payment method on the domain. - attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. - attr_reader :status_details + attr_reader :status, :status_details end class GooglePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - # The status of the payment method on the domain. - attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. - attr_reader :status_details + attr_reader :status, :status_details end class Link < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - # The status of the payment method on the domain. - attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. - attr_reader :status_details + attr_reader :status, :status_details end class Paypal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - # The status of the payment method on the domain. - attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. - attr_reader :status_details + attr_reader :status, :status_details end # Indicates the status of a specific payment method on a payment method domain. attr_reader :amazon_pay - # Indicates the status of a specific payment method on a payment method domain. attr_reader :apple_pay - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The domain name that this payment method domain object represents. attr_reader :domain_name - # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. attr_reader :enabled - # Indicates the status of a specific payment method on a payment method domain. attr_reader :google_pay - # Unique identifier for the object. attr_reader :id - # Indicates the status of a specific payment method on a payment method domain. attr_reader :link - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Indicates the status of a specific payment method on a payment method domain. attr_reader :paypal diff --git a/lib/stripe/resources/payment_record.rb b/lib/stripe/resources/payment_record.rb index b1914f020..d06e56715 100644 --- a/lib/stripe/resources/payment_record.rb +++ b/lib/stripe/resources/payment_record.rb @@ -13,163 +13,81 @@ def self.object_name end class AmountCanceled < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class AmountFailed < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class AmountGuaranteed < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class AmountRefunded < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class AmountRequested < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). - attr_reader :value + attr_reader :currency, :value end class CustomerDetails < Stripe::StripeObject - # ID of the Stripe Customer associated with this payment. - attr_reader :customer - # The customer's email address. - attr_reader :email - # The customer's name. - attr_reader :name - # The customer's phone number. - attr_reader :phone + attr_reader :customer, :email, :name, :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # A representation of a physical address. - attr_reader :address - # The billing email associated with the method of payment. - attr_reader :email - # The billing name associated with the method of payment. - attr_reader :name - # The billing phone number associated with the method of payment. - attr_reader :phone + attr_reader :address, :email, :name, :phone end class Custom < Stripe::StripeObject - # Display name for the custom (user-defined) payment method type used to make this payment. - attr_reader :display_name - # The custom payment method type associated with this payment. - attr_reader :type + attr_reader :display_name, :type end - # The billing details associated with the method of payment. - attr_reader :billing_details - # Information about the custom (user-defined) payment method used to make this payment. - attr_reader :custom - # ID of the Stripe PaymentMethod used to make this payment. - attr_reader :payment_method - # The type of Payment Method used for this payment attempt. - attr_reader :type + attr_reader :billing_details, :custom, :payment_method, :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # A representation of a physical address. - attr_reader :address - # The shipping recipient's name. - attr_reader :name - # The shipping recipient's phone number. - attr_reader :phone + attr_reader :address, :name, :phone end # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_canceled - # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_failed - # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_guaranteed - # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_refunded - # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_requested - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Customer information for this payment. attr_reader :customer_details - # Indicates whether the customer was present in your checkout flow during this payment. attr_reader :customer_presence - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Unique identifier for the object. attr_reader :id - # ID of the latest Payment Attempt Record attached to this Payment Record. attr_reader :latest_payment_attempt_record - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Information about the Payment Method debited for this payment. attr_reader :payment_method_details - # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. attr_reader :payment_reference - # Shipping information for this payment. attr_reader :shipping_details diff --git a/lib/stripe/resources/payout.rb b/lib/stripe/resources/payout.rb index e2d007153..dc6220842 100644 --- a/lib/stripe/resources/payout.rb +++ b/lib/stripe/resources/payout.rb @@ -21,86 +21,58 @@ def self.object_name end class TraceId < Stripe::StripeObject - # Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. - attr_reader :status - # The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. - attr_reader :value + attr_reader :status, :value end # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. attr_reader :amount - # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. attr_reader :application_fee - # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. attr_reader :application_fee_amount - # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. attr_reader :arrival_date - # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). attr_reader :automatic - # ID of the balance transaction that describes the impact of this payout on your account balance. attr_reader :balance_transaction - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # ID of the bank account or card the payout is sent to. attr_reader :destination - # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. attr_reader :failure_balance_transaction - # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). attr_reader :failure_code - # Message that provides the reason for a payout failure, if available. attr_reader :failure_message - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). attr_reader :method - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # If the payout reverses another, this is the ID of the original payout. attr_reader :original_payout - # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. attr_reader :reconciliation_status - # If the payout reverses, this is the ID of the payout that reverses this payout. attr_reader :reversed_by - # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. attr_reader :source_type - # Extra information about a payout that displays on the user's bank statement. attr_reader :statement_descriptor - # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. attr_reader :status - # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. attr_reader :trace_id - # Can be `bank_account` or `card`. attr_reader :type diff --git a/lib/stripe/resources/person.rb b/lib/stripe/resources/person.rb index 923d406df..b4d84fddc 100644 --- a/lib/stripe/resources/person.rb +++ b/lib/stripe/resources/person.rb @@ -17,295 +17,129 @@ def self.object_name class AdditionalTosAcceptances < Stripe::StripeObject class Account < Stripe::StripeObject - # The Unix timestamp marking when the legal guardian accepted the service agreement. - attr_reader :date - # The IP address from which the legal guardian accepted the service agreement. - attr_reader :ip - # The user agent of the browser from which the legal guardian accepted the service agreement. - attr_reader :user_agent + attr_reader :date, :ip, :user_agent end - # Details on the legal guardian's acceptance of the main Stripe service agreement. attr_reader :account end class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class AddressKana < Stripe::StripeObject - # City/Ward. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Block/Building number. - attr_reader :line1 - # Building details. - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # Prefecture. - attr_reader :state - # Town/cho-me. - attr_reader :town + attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town end class AddressKanji < Stripe::StripeObject - # City/Ward. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Block/Building number. - attr_reader :line1 - # Building details. - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # Prefecture. - attr_reader :state - # Town/cho-me. - attr_reader :town + attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town end class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. - attr_reader :day - # The month of birth, between 1 and 12. - attr_reader :month - # The four-digit year of birth. - attr_reader :year + attr_reader :day, :month, :year end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. - attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. - attr_reader :original_fields_due + attr_reader :alternative_fields_due, :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. - attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. - attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. - attr_reader :requirement + attr_reader :code, :reason, :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. - attr_reader :alternatives - # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. - attr_reader :currently_due - # Fields that are `currently_due` and need to be collected again because validation or verification failed. - attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. - attr_reader :eventually_due - # Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. - attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. - attr_reader :pending_verification + attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification end class RegisteredAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class Relationship < Stripe::StripeObject - # Whether the person is the authorizer of the account's representative. - attr_reader :authorizer - # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - attr_reader :director - # Whether the person has significant responsibility to control, manage, or direct the organization. - attr_reader :executive - # Whether the person is the legal guardian of the account's representative. - attr_reader :legal_guardian - # Whether the person is an owner of the account’s legal entity. - attr_reader :owner - # The percent owned by the person of the account's legal entity. - attr_reader :percent_ownership - # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - attr_reader :representative - # The person's title (e.g., CEO, Support Engineer). - attr_reader :title + attr_reader :authorizer, :director, :executive, :legal_guardian, :owner, :percent_ownership, :representative, :title end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. - attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. - attr_reader :original_fields_due + attr_reader :alternative_fields_due, :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. - attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. - attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. - attr_reader :requirement + attr_reader :code, :reason, :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. - attr_reader :alternatives - # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. - attr_reader :currently_due - # Fields that are `currently_due` and need to be collected again because validation or verification failed. - attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. - attr_reader :eventually_due - # Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. - attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. - attr_reader :pending_verification + attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification end class Verification < Stripe::StripeObject class AdditionalDocument < Stripe::StripeObject - # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - attr_reader :back - # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". - attr_reader :details - # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. - attr_reader :details_code - # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - attr_reader :front + attr_reader :back, :details, :details_code, :front end class Document < Stripe::StripeObject - # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - attr_reader :back - # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". - attr_reader :details - # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. - attr_reader :details_code - # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - attr_reader :front + attr_reader :back, :details, :details_code, :front end - # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - attr_reader :additional_document - # A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". - attr_reader :details - # One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. - attr_reader :details_code - # Attribute for field document - attr_reader :document - # The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. - attr_reader :status + attr_reader :additional_document, :details, :details_code, :document, :status end # The account the person is associated with. attr_reader :account - # Attribute for field additional_tos_acceptances attr_reader :additional_tos_acceptances - # Attribute for field address attr_reader :address - # The Kana variation of the person's address (Japan only). attr_reader :address_kana - # The Kanji variation of the person's address (Japan only). attr_reader :address_kanji - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Attribute for field dob attr_reader :dob - # The person's email address. attr_reader :email - # The person's first name. attr_reader :first_name - # The Kana variation of the person's first name (Japan only). attr_reader :first_name_kana - # The Kanji variation of the person's first name (Japan only). attr_reader :first_name_kanji - # A list of alternate names or aliases that the person is known by. attr_reader :full_name_aliases - # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. attr_reader :future_requirements - # The person's gender. attr_reader :gender - # Unique identifier for the object. attr_reader :id - # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). attr_reader :id_number_provided - # Whether the person's `id_number_secondary` was provided. attr_reader :id_number_secondary_provided - # The person's last name. attr_reader :last_name - # The Kana variation of the person's last name (Japan only). attr_reader :last_name_kana - # The Kanji variation of the person's last name (Japan only). attr_reader :last_name_kanji - # The person's maiden name. attr_reader :maiden_name - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The country where the person is a national. attr_reader :nationality - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The person's phone number. attr_reader :phone - # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. attr_reader :political_exposure - # Attribute for field registered_address attr_reader :registered_address - # Attribute for field relationship attr_reader :relationship - # Information about the requirements for this person, including what information needs to be collected, and by when. attr_reader :requirements - # Whether the last four digits of the person's Social Security number have been provided (U.S. only). attr_reader :ssn_last_4_provided - # Attribute for field verification attr_reader :verification - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/plan.rb b/lib/stripe/resources/plan.rb index cad4164e5..c55fdceb1 100644 --- a/lib/stripe/resources/plan.rb +++ b/lib/stripe/resources/plan.rb @@ -22,87 +22,54 @@ def self.object_name end class Tier < Stripe::StripeObject - # Price for the entire tier. - attr_reader :flat_amount - # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - attr_reader :flat_amount_decimal - # Per unit price for units relevant to the tier. - attr_reader :unit_amount - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - attr_reader :unit_amount_decimal - # Up to and including to this quantity will be contained in the tier. - attr_reader :up_to + attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to end class TransformUsage < Stripe::StripeObject - # Divide usage by this number. - attr_reader :divide_by - # After division, either round the result `up` or `down`. - attr_reader :round + attr_reader :divide_by, :round end # Whether the plan can be used for new purchases. attr_reader :active - # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. attr_reader :aggregate_usage - # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. attr_reader :amount - # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. attr_reader :amount_decimal - # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. attr_reader :billing_scheme - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Unique identifier for the object. attr_reader :id - # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. attr_reader :interval - # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. attr_reader :interval_count - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The meter tracking the usage of a metered price attr_reader :meter - # A brief description of the plan, hidden from customers. attr_reader :nickname - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The product whose pricing this plan determines. attr_reader :product - # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. attr_reader :tiers - # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. attr_reader :tiers_mode - # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. attr_reader :transform_usage - # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). attr_reader :trial_period_days - # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. attr_reader :usage_type - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/price.rb b/lib/stripe/resources/price.rb index e3902cd78..2a10a85bd 100644 --- a/lib/stripe/resources/price.rb +++ b/lib/stripe/resources/price.rb @@ -21,156 +21,78 @@ def self.object_name class CurrencyOptions < Stripe::StripeObject class CustomUnitAmount < Stripe::StripeObject - # The maximum unit amount the customer can specify for this item. - attr_reader :maximum - # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - attr_reader :minimum - # The starting unit amount which can be updated by the customer. - attr_reader :preset + attr_reader :maximum, :minimum, :preset end class Tier < Stripe::StripeObject - # Price for the entire tier. - attr_reader :flat_amount - # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - attr_reader :flat_amount_decimal - # Per unit price for units relevant to the tier. - attr_reader :unit_amount - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - attr_reader :unit_amount_decimal - # Up to and including to this quantity will be contained in the tier. - attr_reader :up_to + attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to end - # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - attr_reader :custom_unit_amount - # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - attr_reader :tax_behavior - # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - attr_reader :tiers - # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. - attr_reader :unit_amount - # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - attr_reader :unit_amount_decimal + attr_reader :custom_unit_amount, :tax_behavior, :tiers, :unit_amount, :unit_amount_decimal end class CustomUnitAmount < Stripe::StripeObject - # The maximum unit amount the customer can specify for this item. - attr_reader :maximum - # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - attr_reader :minimum - # The starting unit amount which can be updated by the customer. - attr_reader :preset + attr_reader :maximum, :minimum, :preset end class MigrateTo < Stripe::StripeObject - # The behavior controlling at what point in the subscription lifecycle to migrate the price - attr_reader :behavior - # The unix timestamp after at which subscriptions will start to migrate to the new price. - attr_reader :effective_after - # The id of the price being migrated to - attr_reader :price + attr_reader :behavior, :effective_after, :price end class Recurring < Stripe::StripeObject - # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. - attr_reader :aggregate_usage - # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. - attr_reader :interval - # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. - attr_reader :interval_count - # The meter tracking the usage of a metered price - attr_reader :meter - # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - attr_reader :trial_period_days - # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - attr_reader :usage_type + attr_reader :aggregate_usage, :interval, :interval_count, :meter, :trial_period_days, :usage_type end class Tier < Stripe::StripeObject - # Price for the entire tier. - attr_reader :flat_amount - # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - attr_reader :flat_amount_decimal - # Per unit price for units relevant to the tier. - attr_reader :unit_amount - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - attr_reader :unit_amount_decimal - # Up to and including to this quantity will be contained in the tier. - attr_reader :up_to + attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to end class TransformQuantity < Stripe::StripeObject - # Divide usage by this number. - attr_reader :divide_by - # After division, either round the result `up` or `down`. - attr_reader :round + attr_reader :divide_by, :round end # Whether the price can be used for new purchases. attr_reader :active - # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. attr_reader :billing_scheme - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency_options - # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_reader :custom_unit_amount - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. attr_reader :lookup_key - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Subscriptions using this price will be migrated to use the new referenced price. attr_reader :migrate_to - # A brief description of the price, hidden from customers. attr_reader :nickname - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The ID of the product this price is associated with. attr_reader :product - # The recurring components of a price such as `interval` and `usage_type`. attr_reader :recurring - # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. attr_reader :tax_behavior - # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. attr_reader :tiers - # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. attr_reader :tiers_mode - # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. attr_reader :transform_quantity - # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. attr_reader :type - # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. attr_reader :unit_amount - # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. attr_reader :unit_amount_decimal - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/product.rb b/lib/stripe/resources/product.rb index ca12a7a2b..85379e215 100644 --- a/lib/stripe/resources/product.rb +++ b/lib/stripe/resources/product.rb @@ -26,99 +26,62 @@ def self.object_name nested_resource_class_methods :feature, operations: %i[create retrieve delete list] class MarketingFeature < Stripe::StripeObject - # The marketing feature name. Up to 80 characters long. attr_reader :name end class PackageDimensions < Stripe::StripeObject - # Height, in inches. - attr_reader :height - # Length, in inches. - attr_reader :length - # Weight, in ounces. - attr_reader :weight - # Width, in inches. - attr_reader :width + attr_reader :height, :length, :weight, :width end class Provisioning < Stripe::StripeObject class GiftCard < Stripe::StripeObject class FixedAmount < Stripe::StripeObject - # The initial amount with which the provisioned gift card will be created. - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency + attr_reader :amount, :currency end - # Attribute for field fixed_amount - attr_reader :fixed_amount - # The specific type of gift_card provisioning, only `fixed_amount` currently supported. - attr_reader :type + attr_reader :fixed_amount, :type end - # Attribute for field gift_card - attr_reader :gift_card - # The type of provisioning, only `gift_card` currently supported. - attr_reader :type + attr_reader :gift_card, :type end # Whether the product is currently available for purchase. attr_reader :active - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. attr_reader :default_price - # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. attr_reader :description - # Unique identifier for the object. attr_reader :id - # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. attr_reader :images - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). attr_reader :marketing_features - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The product's name, meant to be displayable to the customer. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The dimensions of this product for shipping purposes. attr_reader :package_dimensions - # Provisioning configuration for this product. attr_reader :provisioning - # Whether this product is shipped (i.e., physical goods). attr_reader :shippable - # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. attr_reader :statement_descriptor - # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. attr_reader :tax_code - # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. attr_reader :type - # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. attr_reader :unit_label - # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated - # A URL of a publicly-accessible webpage for this product. attr_reader :url - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/product_feature.rb b/lib/stripe/resources/product_feature.rb index 937633c6e..ebf0ba3e5 100644 --- a/lib/stripe/resources/product_feature.rb +++ b/lib/stripe/resources/product_feature.rb @@ -13,16 +13,12 @@ def self.object_name # A feature represents a monetizable ability or functionality in your system. # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. attr_reader :entitlement_feature - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Always true for a deleted object attr_reader :deleted end diff --git a/lib/stripe/resources/promotion_code.rb b/lib/stripe/resources/promotion_code.rb index aed9581ca..1339b7eb5 100644 --- a/lib/stripe/resources/promotion_code.rb +++ b/lib/stripe/resources/promotion_code.rb @@ -16,56 +16,36 @@ def self.object_name class Restrictions < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject - # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). attr_reader :minimum_amount end - # Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency_options - # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices - attr_reader :first_time_transaction - # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - attr_reader :minimum_amount - # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount - attr_reader :minimum_amount_currency + attr_reader :currency_options, :first_time_transaction, :minimum_amount, :minimum_amount_currency end # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. attr_reader :active - # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). attr_reader :code - # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). attr_reader :coupon - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The customer that this promotion code can be used by. attr_reader :customer - # Date at which the promotion code can no longer be redeemed. attr_reader :expires_at - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Maximum number of times this promotion code can be redeemed. attr_reader :max_redemptions - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field restrictions attr_reader :restrictions - # Number of times this promotion code has been used. attr_reader :times_redeemed diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index 2291233a8..a0844890d 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -20,558 +20,253 @@ def self.object_name class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Automatically calculate taxes - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability - # The status of the most recent automated tax calculation for this quote. - attr_reader :status + attr_reader :enabled, :liability, :status end class Computed < Stripe::StripeObject class LastReestimationDetails < Stripe::StripeObject class Failed < Stripe::StripeObject - # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field. - attr_reader :failure_code - # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID". - attr_reader :message - # The reason the reestimation failed. - attr_reader :reason + attr_reader :failure_code, :message, :reason end - # When `status` is `failed`, provides details about the quote reestimation failure. - attr_reader :failed - # Latest status of the reestimation. - attr_reader :status + attr_reader :failed, :status end class Recurring < Stripe::StripeObject class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. - attr_reader :amount - # 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) - attr_reader :discount + attr_reader :amount, :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # The aggregated discounts. - attr_reader :discounts - # The aggregated tax amounts by rate. - attr_reader :taxes + attr_reader :discounts, :taxes end - # This is the sum of all the discounts. - attr_reader :amount_discount - # This is the sum of all the shipping amounts. - attr_reader :amount_shipping - # This is the sum of all the tax amounts. - attr_reader :amount_tax - # Attribute for field breakdown - attr_reader :breakdown + attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown end - # Total before any discounts or taxes are applied. - attr_reader :amount_subtotal - # Total after discounts and taxes are applied. - attr_reader :amount_total - # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. - attr_reader :interval - # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. - attr_reader :interval_count - # Attribute for field total_details - attr_reader :total_details + attr_reader :amount_subtotal, :amount_total, :interval, :interval_count, :total_details end class Upfront < Stripe::StripeObject class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. - attr_reader :amount - # 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) - attr_reader :discount + attr_reader :amount, :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # The aggregated discounts. - attr_reader :discounts - # The aggregated tax amounts by rate. - attr_reader :taxes + attr_reader :discounts, :taxes end - # This is the sum of all the discounts. - attr_reader :amount_discount - # This is the sum of all the shipping amounts. - attr_reader :amount_shipping - # This is the sum of all the tax amounts. - attr_reader :amount_tax - # Attribute for field breakdown - attr_reader :breakdown + attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown end - # Total before any discounts or taxes are applied. - attr_reader :amount_subtotal - # Total after discounts and taxes are applied. - attr_reader :amount_total - # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. - attr_reader :line_items - # Attribute for field total_details - attr_reader :total_details + attr_reader :amount_subtotal, :amount_total, :line_items, :total_details end - # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation. - attr_reader :last_reestimation_details - # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. - attr_reader :recurring - # The time at which the quote's estimated schedules and upcoming invoices were generated. - attr_reader :updated_at - # Attribute for field upfront - attr_reader :upfront + attr_reader :last_reestimation_details, :recurring, :updated_at, :upfront end class FromQuote < Stripe::StripeObject - # Whether this quote is a revision of a different quote. - attr_reader :is_revision - # The quote that was cloned. - attr_reader :quote + attr_reader :is_revision, :quote end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. - attr_reader :days_until_due - # Attribute for field issuer - attr_reader :issuer + attr_reader :days_until_due, :issuer end class StatusDetails < Stripe::StripeObject class Canceled < Stripe::StripeObject - # The reason this quote was marked as canceled. - attr_reader :reason - # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch. - attr_reader :transitioned_at + attr_reader :reason, :transitioned_at end class Stale < Stripe::StripeObject class LastReason < Stripe::StripeObject class LinesInvalid < Stripe::StripeObject - # The timestamp at which the lines were marked as invalid. - attr_reader :invalid_at - # The list of lines that became invalid at the given timestamp. - attr_reader :lines + attr_reader :invalid_at, :lines end class SubscriptionChanged < Stripe::StripeObject - # The subscription's state before the quote was marked as stale. attr_reader :previous_subscription end class SubscriptionScheduleChanged < Stripe::StripeObject - # The subscription schedule's state before the quote was marked as stale. attr_reader :previous_subscription_schedule end - # The ID of the line that is invalid if the stale reason type is `line_invalid`. - attr_reader :line_invalid - # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`. - attr_reader :lines_invalid - # The user supplied mark stale reason. - attr_reader :marked_stale - # The ID of the subscription that was canceled. - attr_reader :subscription_canceled - # Attribute for field subscription_changed - attr_reader :subscription_changed - # The ID of the subscription that was expired. - attr_reader :subscription_expired - # The ID of the subscription schedule that was canceled. - attr_reader :subscription_schedule_canceled - # Attribute for field subscription_schedule_changed - attr_reader :subscription_schedule_changed - # The ID of the subscription schedule that was released. - attr_reader :subscription_schedule_released - # The reason the quote was marked as stale. - attr_reader :type + attr_reader :line_invalid, :lines_invalid, :marked_stale, :subscription_canceled, :subscription_changed, :subscription_expired, :subscription_schedule_canceled, :subscription_schedule_changed, :subscription_schedule_released, :type end - # Time at which the quote expires. Measured in seconds since the Unix epoch. - attr_reader :expires_at - # The most recent reason this quote was marked as stale. - attr_reader :last_reason - # Time at which the stale reason was updated. Measured in seconds since the Unix epoch. - attr_reader :last_updated_at - # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch. - attr_reader :transitioned_at + attr_reader :expires_at, :last_reason, :last_updated_at, :transitioned_at end - # Attribute for field canceled - attr_reader :canceled - # Attribute for field stale - attr_reader :stale + attr_reader :canceled, :stale end class StatusTransitions < Stripe::StripeObject - # The time that the quote was accepted. Measured in seconds since Unix epoch. - attr_reader :accepted_at - # The time that the quote was canceled. Measured in seconds since Unix epoch. - attr_reader :canceled_at - # The time that the quote was finalized. Measured in seconds since Unix epoch. - attr_reader :finalized_at + attr_reader :accepted_at, :canceled_at, :finalized_at end class SubscriptionData < Stripe::StripeObject class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject - # Unique identifier for the object. attr_reader :id end - # The materialized time. - attr_reader :computed - # The timestamp the given line starts at. - attr_reader :line_starts_at - # A precise Unix timestamp. - attr_reader :timestamp - # The type of method to specify the `bill_from` time. - attr_reader :type + attr_reader :computed, :line_starts_at, :timestamp, :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject - # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - attr_reader :interval - # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - attr_reader :interval_count + attr_reader :interval, :interval_count end class LineEndsAt < Stripe::StripeObject - # Unique identifier for the object. attr_reader :id end - # The materialized time. - attr_reader :computed - # Time span for the quote line starting from the `starts_at` date. - attr_reader :duration - # The timestamp the given line ends at. - attr_reader :line_ends_at - # A precise Unix timestamp. - attr_reader :timestamp - # The type of method to specify the `bill_until` time. - attr_reader :type + attr_reader :computed, :duration, :line_ends_at, :timestamp, :type end - # The start of the period to bill from when the Quote is accepted. - attr_reader :bill_from - # The end of the period to bill until when the Quote is accepted. - attr_reader :bill_until + attr_reader :bill_from, :bill_until end class Prebilling < Stripe::StripeObject - # Attribute for field iterations attr_reader :iterations end - # Describes the period to bill for upon accepting the quote. - attr_reader :bill_on_acceptance - # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - attr_reader :billing_behavior - # Whether the subscription will always start a new billing period when the quote is accepted. - attr_reader :billing_cycle_anchor - # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - attr_reader :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. - attr_reader :effective_date - # Behavior of the subscription schedule and underlying subscription when it ends. - attr_reader :end_behavior - # The id of the subscription that will be updated when the quote is accepted. - attr_reader :from_subscription - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - attr_reader :metadata - # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. - attr_reader :prebilling - # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. - attr_reader :proration_behavior - # Integer representing the number of trial period days before the customer is charged for the first time. - attr_reader :trial_period_days + attr_reader :bill_on_acceptance, :billing_behavior, :billing_cycle_anchor, :description, :effective_date, :end_behavior, :from_subscription, :metadata, :prebilling, :proration_behavior, :trial_period_days end class SubscriptionDataOverride < Stripe::StripeObject class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - attr_reader :new_reference - # The ID of the schedule the line applies to. - attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. - attr_reader :type + attr_reader :new_reference, :subscription_schedule, :type end class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject - # Unique identifier for the object. attr_reader :id end - # The materialized time. - attr_reader :computed - # The timestamp the given line starts at. - attr_reader :line_starts_at - # A precise Unix timestamp. - attr_reader :timestamp - # The type of method to specify the `bill_from` time. - attr_reader :type + attr_reader :computed, :line_starts_at, :timestamp, :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject - # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - attr_reader :interval - # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - attr_reader :interval_count + attr_reader :interval, :interval_count end class LineEndsAt < Stripe::StripeObject - # Unique identifier for the object. attr_reader :id end - # The materialized time. - attr_reader :computed - # Time span for the quote line starting from the `starts_at` date. - attr_reader :duration - # The timestamp the given line ends at. - attr_reader :line_ends_at - # A precise Unix timestamp. - attr_reader :timestamp - # The type of method to specify the `bill_until` time. - attr_reader :type + attr_reader :computed, :duration, :line_ends_at, :timestamp, :type end - # The start of the period to bill from when the Quote is accepted. - attr_reader :bill_from - # The end of the period to bill until when the Quote is accepted. - attr_reader :bill_until + attr_reader :bill_from, :bill_until end - # Attribute for field applies_to - attr_reader :applies_to - # Describes the period to bill for upon accepting the quote. - attr_reader :bill_on_acceptance - # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - attr_reader :billing_behavior - # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - attr_reader :customer - # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - attr_reader :description - # Behavior of the subscription schedule and underlying subscription when it ends. - attr_reader :end_behavior - # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. - attr_reader :proration_behavior + attr_reader :applies_to, :bill_on_acceptance, :billing_behavior, :customer, :description, :end_behavior, :proration_behavior end class SubscriptionSchedule < Stripe::StripeObject class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - attr_reader :new_reference - # The ID of the schedule the line applies to. - attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. - attr_reader :type + attr_reader :new_reference, :subscription_schedule, :type end - # Attribute for field applies_to - attr_reader :applies_to - # The subscription schedule that was created or updated from this quote. - attr_reader :subscription_schedule + attr_reader :applies_to, :subscription_schedule end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. - attr_reader :amount - # 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) - attr_reader :discount + attr_reader :amount, :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # The aggregated discounts. - attr_reader :discounts - # The aggregated tax amounts by rate. - attr_reader :taxes + attr_reader :discounts, :taxes end - # This is the sum of all the discounts. - attr_reader :amount_discount - # This is the sum of all the shipping amounts. - attr_reader :amount_shipping - # This is the sum of all the tax amounts. - attr_reader :amount_tax - # Attribute for field breakdown - attr_reader :breakdown + attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown end class TransferData < Stripe::StripeObject - # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. - attr_reader :amount - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. - attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. - attr_reader :destination + attr_reader :amount, :amount_percent, :destination end # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. attr_reader :allow_backdated_lines - # Total before any discounts or taxes are applied. attr_reader :amount_subtotal - # Total after discounts and taxes are applied. attr_reader :amount_total - # ID of the Connect Application that created the quote. attr_reader :application - # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. attr_reader :application_fee_amount - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. attr_reader :application_fee_percent - # Attribute for field automatic_tax attr_reader :automatic_tax - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. attr_reader :collection_method - # Attribute for field computed attr_reader :computed - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. attr_reader :customer - # The tax rates applied to this quote. attr_reader :default_tax_rates - # A description that will be displayed on the quote PDF. attr_reader :description - # The discounts applied to this quote. attr_reader :discounts - # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. attr_reader :expires_at - # A footer that will be displayed on the quote PDF. attr_reader :footer - # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. attr_reader :from_quote - # A header that will be displayed on the quote PDF. attr_reader :header - # Unique identifier for the object. attr_reader :id - # The invoice that was created from this quote. attr_reader :invoice - # Attribute for field invoice_settings attr_reader :invoice_settings - # A list of items the customer is being quoted for. attr_reader :line_items - # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. attr_reader :lines - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). attr_reader :number - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. attr_reader :on_behalf_of - # The status of the quote. attr_reader :status - # Details on when and why a quote has been marked as stale or canceled. attr_reader :status_details - # Attribute for field status_transitions attr_reader :status_transitions - # The subscription that was created or updated from this quote. attr_reader :subscription - # Attribute for field subscription_data attr_reader :subscription_data - # List representing overrides for `subscription_data` configurations for specific subscription schedules. attr_reader :subscription_data_overrides - # The subscription schedule that was created or updated from this quote. attr_reader :subscription_schedule - # The subscription schedules that were created or updated from this quote. attr_reader :subscription_schedules - # ID of the test clock this quote belongs to. attr_reader :test_clock - # Attribute for field total_details attr_reader :total_details - # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. attr_reader :transfer_data diff --git a/lib/stripe/resources/quote_line.rb b/lib/stripe/resources/quote_line.rb index 9df1a44f4..16cd4815c 100644 --- a/lib/stripe/resources/quote_line.rb +++ b/lib/stripe/resources/quote_line.rb @@ -12,273 +12,124 @@ def self.object_name class Action < Stripe::StripeObject class AddDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end type. attr_reader :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - attr_reader :index - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :index, :promotion_code end class AddItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. - attr_reader :converts_to - # Determines the type of trial for this item. - attr_reader :type + attr_reader :converts_to, :type end - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. - attr_reader :discounts - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. - attr_reader :metadata - # ID of the price to which the customer should be subscribed. - attr_reader :price - # Quantity of the plan to which the customer should be subscribed. - attr_reader :quantity - # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. - attr_reader :tax_rates - # Options that configure the trial on the subscription item. - attr_reader :trial + attr_reader :discounts, :metadata, :price, :quantity, :tax_rates, :trial end class RemoveDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end class RemoveItem < Stripe::StripeObject - # ID of a price to remove. attr_reader :price end class SetDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end class SetItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. - attr_reader :converts_to - # Determines the type of trial for this item. - attr_reader :type + attr_reader :converts_to, :type end - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. - attr_reader :discounts - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. - attr_reader :metadata - # ID of the price to which the customer should be subscribed. - attr_reader :price - # Quantity of the plan to which the customer should be subscribed. - attr_reader :quantity - # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. - attr_reader :tax_rates - # Options that configure the trial on the subscription item. - attr_reader :trial + attr_reader :discounts, :metadata, :price, :quantity, :tax_rates, :trial end - # Details for the `add_discount` type. - attr_reader :add_discount - # Details for the `add_item` type. - attr_reader :add_item - # Details for the `add_metadata` type: specify a hash of key-value pairs. - attr_reader :add_metadata - # Details for the `remove_discount` type. - attr_reader :remove_discount - # Details for the `remove_item` type. - attr_reader :remove_item - # Details for the `remove_metadata` type: specify an array of metadata keys. - attr_reader :remove_metadata - # Details for the `set_discounts` type. - attr_reader :set_discounts - # Details for the `set_items` type. - attr_reader :set_items - # Details for the `set_metadata` type: specify an array of key-value pairs. - attr_reader :set_metadata - # The type of action the quote line performs. - attr_reader :type + attr_reader :add_discount, :add_item, :add_metadata, :remove_discount, :remove_item, :remove_metadata, :set_discounts, :set_items, :set_metadata, :type end class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - attr_reader :new_reference - # The ID of the schedule the line applies to. - attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. - attr_reader :type + attr_reader :new_reference, :subscription_schedule, :type end class CancelSubscriptionSchedule < Stripe::StripeObject - # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. - attr_reader :cancel_at - # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. - attr_reader :invoice_now - # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. - attr_reader :prorate + attr_reader :cancel_at, :invoice_now, :prorate end class EndsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The ID of a specific discount. attr_reader :discount end class Duration < Stripe::StripeObject - # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - attr_reader :interval - # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - attr_reader :interval_count + attr_reader :interval, :interval_count end - # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `ends_at` field. For example, if `ends_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `ends_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `ends_at` is respecified. This field is guaranteed to be populated after quote acceptance. - attr_reader :computed - # Use the `end` time of a given discount. - attr_reader :discount_end - # Time span for the quote line starting from the `starts_at` date. - attr_reader :duration - # A precise Unix timestamp. - attr_reader :timestamp - # Select a way to pass in `ends_at`. - attr_reader :type + attr_reader :computed, :discount_end, :duration, :timestamp, :type end class SetPauseCollection < Stripe::StripeObject class Set < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - attr_reader :set - # Defines the type of the pause_collection behavior for the quote line. - attr_reader :type + attr_reader :set, :type end class StartsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The ID of a specific discount. attr_reader :discount end class LineEndsAt < Stripe::StripeObject - # Unique identifier for the object. attr_reader :id end - # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `starts_at` field. For example, if `starts_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `starts_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `starts_at` is respecified. This field is guaranteed to be populated after quote acceptance. - attr_reader :computed - # Use the `end` time of a given discount. - attr_reader :discount_end - # The timestamp the given line ends at. - attr_reader :line_ends_at - # A precise Unix timestamp. - attr_reader :timestamp - # Select a way to pass in `starts_at`. - attr_reader :type + attr_reader :computed, :discount_end, :line_ends_at, :timestamp, :type end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end - # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end # A list of items the customer is being quoted for. attr_reader :actions - # Details to identify the subscription schedule the quote line applies to. attr_reader :applies_to - # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. attr_reader :billing_cycle_anchor - # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. attr_reader :cancel_subscription_schedule - # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. attr_reader :ends_at - # Unique identifier for the object. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. attr_reader :proration_behavior - # Details to modify the pause_collection behavior of the subscription schedule. attr_reader :set_pause_collection - # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. attr_reader :set_schedule_end - # Details to identify the earliest timestamp where the proposed change should take effect. attr_reader :starts_at - # Settings related to subscription trials. attr_reader :trial_settings end diff --git a/lib/stripe/resources/quote_preview_invoice.rb b/lib/stripe/resources/quote_preview_invoice.rb index 9268b3533..d10f9a109 100644 --- a/lib/stripe/resources/quote_preview_invoice.rb +++ b/lib/stripe/resources/quote_preview_invoice.rb @@ -41,229 +41,79 @@ def self.object_name end class AmountsDue < Stripe::StripeObject - # Incremental amount due for this payment in cents (or local equivalent). - attr_reader :amount - # The amount in cents (or local equivalent) that was paid for this payment. - attr_reader :amount_paid - # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). - attr_reader :amount_remaining - # Number of days from when invoice is finalized until the payment is due. - attr_reader :days_until_due - # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description - # Date on which a payment plan’s payment is due. - attr_reader :due_date - # Timestamp when the payment was paid. - attr_reader :paid_at - # The status of the payment, one of `open`, `paid`, or `past_due` - attr_reader :status + attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status end class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - attr_reader :new_reference - # The ID of the schedule the line applies to. - attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. - attr_reader :type + attr_reader :new_reference, :subscription_schedule, :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability - # The status of the most recent automated tax calculation for this invoice. - attr_reader :status + attr_reader :disabled_reason, :enabled, :liability, :status end class CustomField < Stripe::StripeObject - # The name of the custom field. - attr_reader :name - # The value of the custom field. - attr_reader :value + attr_reader :name, :value end class CustomerAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end class CustomerTaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` - attr_reader :type - # The value of the tax ID. - attr_reader :value + attr_reader :type, :value end class FromInvoice < Stripe::StripeObject - # The relation between this invoice and the cloned invoice - attr_reader :action - # The invoice that was cloned. - attr_reader :invoice + attr_reader :action, :invoice end class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end class LastFinalizationError < Stripe::StripeObject - # For card errors, the ID of the failed charge. - attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. - attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. - attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. - attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. - attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. - attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) - attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). - attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. - attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. - attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) - attr_reader :setup_intent - # Attribute for field source - attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` - attr_reader :type + attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Transaction type of the mandate. attr_reader :transaction_type end - # Attribute for field mandate_options - attr_reader :mandate_options - # Bank account verification method. - attr_reader :verification_method + attr_reader :mandate_options, :verification_method end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject - # Whether Installments are enabled for this Invoice. attr_reader :enabled end - # Attribute for field installments - attr_reader :installments - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - attr_reader :request_three_d_secure + attr_reader :installments, :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - # Attribute for field eu_bank_transfer - attr_reader :eu_bank_transfer - # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - attr_reader :type + attr_reader :eu_bank_transfer, :type end - # Attribute for field bank_transfer - attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - attr_reader :funding_type + attr_reader :bank_transfer, :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -273,247 +123,107 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. - attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. - attr_reader :institution + attr_reader :account_subcategories, :institution end - # Attribute for field filters - attr_reader :filters - # The list of permissions to request. The `payment_method` permission must be included. - attr_reader :permissions - # Data features requested to be retrieved upon account creation. - attr_reader :prefetch + attr_reader :filters, :permissions, :prefetch end - # Attribute for field financial_connections - attr_reader :financial_connections - # Bank account verification method. - attr_reader :verification_method + attr_reader :financial_connections, :verification_method end - # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. - attr_reader :acss_debit - # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. - attr_reader :bancontact - # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. - attr_reader :card - # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. - attr_reader :customer_balance - # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. - attr_reader :id_bank_transfer - # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. - attr_reader :konbini - # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. - attr_reader :sepa_debit - # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. - attr_reader :us_bank_account + attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account end - # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. - attr_reader :default_mandate - # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. - attr_reader :payment_method_options - # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). - attr_reader :payment_method_types + attr_reader :default_mandate, :payment_method_options, :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject - # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. attr_reader :page_size end - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. - attr_reader :amount_tax_display - # Invoice pdf rendering options - attr_reader :pdf - # ID of the rendering template that the invoice is formatted by. - attr_reader :template - # Version of the rendering template that the invoice is using. - attr_reader :template_version + attr_reader :amount_tax_display, :pdf, :template, :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. - attr_reader :amount - # 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) - attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :rate, :taxability_reason, :taxable_amount end - # Total shipping cost before any taxes are applied. - attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. - attr_reader :amount_tax - # Total shipping cost after taxes are applied. - attr_reader :amount_total - # The ID of the ShippingRate for this invoice. - attr_reader :shipping_rate - # The taxes applied to the shipping rate. - attr_reader :taxes + attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end class StatusTransitions < Stripe::StripeObject - # The time that the invoice draft was finalized. - attr_reader :finalized_at - # The time that the invoice was marked uncollectible. - attr_reader :marked_uncollectible_at - # The time that the invoice was paid. - attr_reader :paid_at - # The time that the invoice was voided. - attr_reader :voided_at + attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - attr_reader :behavior - # The time after which the subscription will resume collecting payments. - attr_reader :resumes_at + attr_reader :behavior, :resumes_at end - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. - # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* - attr_reader :metadata - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - attr_reader :pause_collection + attr_reader :metadata, :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject - # The IDs of the line items that triggered the threshold invoice. - attr_reader :line_item_ids - # The quantity threshold boundary that applied to the given line item. - attr_reader :usage_gte + attr_reader :line_item_ids, :usage_gte end - # The total invoice amount threshold boundary if it triggered the threshold invoice. - attr_reader :amount_gte - # Indicates which line items triggered a threshold invoice. - attr_reader :item_reasons + attr_reader :amount_gte, :item_reasons end class TotalDiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. - attr_reader :amount - # The discount that was applied to get this discount amount. - attr_reader :discount + attr_reader :amount, :discount end class TotalMarginAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the reduction in line item amount. - attr_reader :amount - # The margin that was applied to get this margin amount. - attr_reader :margin + attr_reader :amount, :margin end class TotalPretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. - attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. - attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. - attr_reader :discount - # The margin that was applied to get this pretax credit amount. - attr_reader :margin - # Type of the pretax credit amount referenced. - attr_reader :type + attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type end class TotalTaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. - attr_reader :amount - # Whether this tax amount is inclusive or exclusive. - attr_reader :inclusive - # The tax rate that was applied to get this tax amount. - attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). - attr_reader :taxable_amount + attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount end class TransferData < Stripe::StripeObject - # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. - attr_reader :amount - # The account where funds from the payment will be transferred to upon payment success. - attr_reader :destination + attr_reader :amount, :destination end # The country of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_country - # The public name of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_name - # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. attr_reader :account_tax_ids - # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. attr_reader :amount_due - # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. attr_reader :amount_overpaid - # The amount, in cents (or local equivalent), that was paid. attr_reader :amount_paid - # The difference between amount_due and amount_paid, in cents (or local equivalent). attr_reader :amount_remaining - # This is the sum of all the shipping amounts. attr_reader :amount_shipping - # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. attr_reader :amounts_due - # ID of the Connect Application that created the invoice. attr_reader :application - # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. attr_reader :application_fee_amount - # Attribute for field applies_to attr_reader :applies_to - # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. attr_reader :attempt_count - # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. attr_reader :attempted - # Attribute for field automatic_tax attr_reader :automatic_tax - # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. attr_reader :automatically_finalizes_at - # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -524,208 +234,140 @@ class TransferData < Stripe::StripeObject # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. attr_reader :billing_reason - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. attr_reader :collection_method - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Custom fields displayed on the invoice. attr_reader :custom_fields - # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_address - # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_email - # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_name - # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_phone - # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_shipping - # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_exempt - # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_ids - # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. attr_reader :default_margins - # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. attr_reader :default_payment_method - # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source - # The tax rates applied to this invoice, if any. attr_reader :default_tax_rates - # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. attr_reader :description - # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. attr_reader :discount - # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. attr_reader :due_date - # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. attr_reader :effective_at - # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :ending_balance - # Footer displayed on the invoice. attr_reader :footer - # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. attr_reader :from_invoice - # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. attr_reader :id - # Attribute for field issuer attr_reader :issuer - # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. attr_reader :last_finalization_error - # The ID of the most recent non-draft revision of this invoice attr_reader :latest_revision - # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. attr_reader :lines - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. attr_reader :next_payment_attempt - # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. attr_reader :number - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. attr_reader :on_behalf_of - # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. attr_reader :paid - # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. attr_reader :paid_out_of_band - # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. attr_reader :payment_intent - # Attribute for field payment_settings attr_reader :payment_settings - # Payments for this invoice attr_reader :payments - # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_end - # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_start - # Total amount of all post-payment credit notes issued for this invoice. attr_reader :post_payment_credit_notes_amount - # Total amount of all pre-payment credit notes issued for this invoice. attr_reader :pre_payment_credit_notes_amount - # The quote this invoice was generated from. attr_reader :quote - # This is the transaction number that appears on email receipts sent for this invoice. attr_reader :receipt_number - # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. attr_reader :rendering - # The details of the cost of shipping, including the ShippingRate applied on the invoice. attr_reader :shipping_cost - # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. attr_reader :shipping_details - # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. attr_reader :starting_balance - # Extra information about an invoice for the customer's credit card statement. attr_reader :statement_descriptor - # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # Attribute for field subscription attr_reader :subscription - # Details about the subscription that created this invoice. attr_reader :subscription_details - # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. attr_reader :subscription_proration_date - # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated attr_reader :subtotal - # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated attr_reader :subtotal_excluding_tax - # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. attr_reader :tax - # ID of the test clock this invoice belongs to. attr_reader :test_clock - # Attribute for field threshold_reason attr_reader :threshold_reason - # Total after discounts and taxes. attr_reader :total - # The aggregate amounts calculated per discount across all line items. attr_reader :total_discount_amounts - # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. attr_reader :total_excluding_tax - # The aggregate amounts calculated per margin across all line items. attr_reader :total_margin_amounts - # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. attr_reader :total_pretax_credit_amounts - # The aggregate amounts calculated per tax rate for all line items. attr_reader :total_tax_amounts - # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. attr_reader :transfer_data - # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. attr_reader :webhooks_delivered_at end diff --git a/lib/stripe/resources/quote_preview_subscription_schedule.rb b/lib/stripe/resources/quote_preview_subscription_schedule.rb index f91baab9d..efb6bb307 100644 --- a/lib/stripe/resources/quote_preview_subscription_schedule.rb +++ b/lib/stripe/resources/quote_preview_subscription_schedule.rb @@ -9,370 +9,161 @@ def self.object_name end class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - attr_reader :new_reference - # The ID of the schedule the line applies to. - attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. - attr_reader :type + attr_reader :new_reference, :subscription_schedule, :type end class CurrentPhase < Stripe::StripeObject - # The end of this phase of the subscription schedule. - attr_reader :end_date - # The start of this phase of the subscription schedule. - attr_reader :start_date + attr_reader :end_date, :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Whether Stripe automatically computes tax on invoices created during this phase. - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability + attr_reader :disabled_reason, :enabled, :liability end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice - attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. - attr_reader :reset_billing_cycle_anchor + attr_reader :amount_gte, :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. - attr_reader :account_tax_ids - # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - attr_reader :days_until_due - # Attribute for field issuer - attr_reader :issuer + attr_reader :account_tax_ids, :days_until_due, :issuer end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. - attr_reader :destination + attr_reader :amount_percent, :destination end - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. - attr_reader :application_fee_percent - # Attribute for field automatic_tax - attr_reader :automatic_tax - # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - attr_reader :billing_cycle_anchor - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period - attr_reader :billing_thresholds - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. - attr_reader :collection_method - # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - attr_reader :default_payment_method - # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - attr_reader :description - # Attribute for field invoice_settings - attr_reader :invoice_settings - # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. - attr_reader :on_behalf_of - # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. - attr_reader :transfer_data + attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - # The original price to be migrated. - attr_reader :source_price - # The intended resulting price of the migration. - attr_reader :target_price + attr_reader :source_price, :target_price end - # The time at which the price migration encountered an error. - attr_reader :errored_at - # The involved price pairs in each failed transition. - attr_reader :failed_transitions - # The type of error encountered by the price migration. - attr_reader :type + attr_reader :errored_at, :failed_transitions, :type end class Phase < Stripe::StripeObject class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end - # The stackable discounts that will be applied to the item. - attr_reader :discounts - # ID of the price used to generate the invoice item. - attr_reader :price - # The quantity of the invoice item. - attr_reader :quantity - # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - attr_reader :tax_rates + attr_reader :discounts, :price, :quantity, :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Whether Stripe automatically computes tax on invoices created during this phase. - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability + attr_reader :disabled_reason, :enabled, :liability end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice - attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. - attr_reader :reset_billing_cycle_anchor + attr_reader :amount_gte, :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. - attr_reader :account_tax_ids - # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - attr_reader :days_until_due - # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - attr_reader :issuer + attr_reader :account_tax_ids, :days_until_due, :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject - # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. - attr_reader :converts_to - # Determines the type of trial for this item. - attr_reader :type + attr_reader :converts_to, :type end - # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period - attr_reader :billing_thresholds - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. - attr_reader :discounts - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. - attr_reader :metadata - # ID of the plan to which the customer should be subscribed. - attr_reader :plan - # ID of the price to which the customer should be subscribed. - attr_reader :price - # Quantity of the plan to which the customer should be subscribed. - attr_reader :quantity - # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. - attr_reader :tax_rates - # Options that configure the trial on the subscription item. - attr_reader :trial + attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial end class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. - attr_reader :destination + attr_reader :amount_percent, :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end - # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end - # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. - attr_reader :add_invoice_items - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. - attr_reader :application_fee_percent - # Attribute for field automatic_tax - attr_reader :automatic_tax - # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - attr_reader :billing_cycle_anchor - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period - attr_reader :billing_thresholds - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. - attr_reader :collection_method - # ID of the coupon to use during this phase of the subscription schedule. - attr_reader :coupon - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - attr_reader :default_payment_method - # The default tax rates to apply to the subscription during this phase of the subscription schedule. - attr_reader :default_tax_rates - # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - attr_reader :description - # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. - attr_reader :discounts - # The end of this phase of the subscription schedule. - attr_reader :end_date - # The invoice settings applicable during this phase. - attr_reader :invoice_settings - # Subscription items to configure the subscription to during this phase of the subscription schedule. - attr_reader :items - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. - attr_reader :metadata - # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. - attr_reader :on_behalf_of - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - attr_reader :pause_collection - # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. - attr_reader :proration_behavior - # The start of this phase of the subscription schedule. - attr_reader :start_date - # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. - attr_reader :transfer_data - # Specify behavior of the trial when crossing schedule phase boundaries - attr_reader :trial_continuation - # When the trial ends within the phase. - attr_reader :trial_end - # Settings related to any trials on the subscription during this phase. - attr_reader :trial_settings + attr_reader :add_invoice_items, :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :coupon, :currency, :default_payment_method, :default_tax_rates, :description, :discounts, :end_date, :invoice_settings, :items, :metadata, :on_behalf_of, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings end class Prebilling < Stripe::StripeObject - # ID of the prebilling invoice. - attr_reader :invoice - # The end of the last period for which the invoice pre-bills. - attr_reader :period_end - # The start of the first period for which the invoice pre-bills. - attr_reader :period_start - # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. - attr_reader :update_behavior + attr_reader :invoice, :period_end, :period_start, :update_behavior end # ID of the Connect Application that created the schedule. attr_reader :application - # Attribute for field applies_to attr_reader :applies_to - # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_reader :billing_behavior - # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at - # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. attr_reader :completed_at - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. attr_reader :current_phase - # ID of the customer who owns the subscription schedule. attr_reader :customer - # Attribute for field default_settings attr_reader :default_settings - # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. attr_reader :end_behavior - # Unique identifier for the object. attr_reader :id - # Details of the most recent price migration that failed for the subscription schedule. attr_reader :last_price_migration_error - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Configuration for the subscription schedule's phases. attr_reader :phases - # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling - # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. attr_reader :released_at - # ID of the subscription once managed by the subscription schedule (if it is released). attr_reader :released_subscription - # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). attr_reader :status - # ID of the subscription managed by the subscription schedule. attr_reader :subscription - # ID of the test clock this subscription schedule belongs to. attr_reader :test_clock end diff --git a/lib/stripe/resources/radar/early_fraud_warning.rb b/lib/stripe/resources/radar/early_fraud_warning.rb index 20be30f79..04f91876b 100644 --- a/lib/stripe/resources/radar/early_fraud_warning.rb +++ b/lib/stripe/resources/radar/early_fraud_warning.rb @@ -17,25 +17,18 @@ def self.object_name # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. attr_reader :actionable - # ID of the charge this early fraud warning is for, optionally expanded. attr_reader :charge - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. attr_reader :fraud_type - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # ID of the Payment Intent this early fraud warning is for, optionally expanded. attr_reader :payment_intent diff --git a/lib/stripe/resources/radar/value_list.rb b/lib/stripe/resources/radar/value_list.rb index 92464bf57..bfe3302be 100644 --- a/lib/stripe/resources/radar/value_list.rb +++ b/lib/stripe/resources/radar/value_list.rb @@ -19,34 +19,24 @@ def self.object_name # The name of the value list for use in rules. attr_reader :alias - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The name or email address of the user who created this value list. attr_reader :created_by - # Unique identifier for the object. attr_reader :id - # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. attr_reader :item_type - # List of items contained within this value list. attr_reader :list_items - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The name of the value list. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/radar/value_list_item.rb b/lib/stripe/resources/radar/value_list_item.rb index 5f98cbfc6..e2871b7b3 100644 --- a/lib/stripe/resources/radar/value_list_item.rb +++ b/lib/stripe/resources/radar/value_list_item.rb @@ -18,25 +18,18 @@ def self.object_name # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The name or email address of the user who added this item to the value list. attr_reader :created_by - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The value of the item. attr_reader :value - # The identifier of the value list this item belongs to. attr_reader :value_list - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index 6be35c196..8e5e64856 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -26,30 +26,15 @@ class AmazonPay < Stripe::StripeObject; end class AuBankTransfer < Stripe::StripeObject; end class Blik < Stripe::StripeObject - # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. - attr_reader :network_decline_code - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :network_decline_code, :reference, :reference_status end class BrBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class Card < Stripe::StripeObject - # Value of the reference number assigned to the refund. - attr_reader :reference - # Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status - # Type of the reference number assigned to the refund. - attr_reader :reference_type - # The type of refund. This can be `refund`, `reversal`, or `pending`. - attr_reader :type + attr_reader :reference, :reference_status, :reference_type, :type end class Cashapp < Stripe::StripeObject; end @@ -57,57 +42,36 @@ class CustomerCashBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject; end class EuBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class GbBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class JpBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class Klarna < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class MxBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class P24 < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class Paynow < Stripe::StripeObject; end @@ -117,173 +81,69 @@ class Revolut < Stripe::StripeObject; end class Sofort < Stripe::StripeObject; end class Swish < Stripe::StripeObject - # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. - attr_reader :network_decline_code - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :network_decline_code, :reference, :reference_status end class ThBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class UsBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. - attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. - attr_reader :reference_status + attr_reader :reference, :reference_status end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - # Attribute for field affirm - attr_reader :affirm - # Attribute for field afterpay_clearpay - attr_reader :afterpay_clearpay - # Attribute for field alipay - attr_reader :alipay - # Attribute for field alma - attr_reader :alma - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field au_bank_transfer - attr_reader :au_bank_transfer - # Attribute for field blik - attr_reader :blik - # Attribute for field br_bank_transfer - attr_reader :br_bank_transfer - # Attribute for field card - attr_reader :card - # Attribute for field cashapp - attr_reader :cashapp - # Attribute for field customer_cash_balance - attr_reader :customer_cash_balance - # Attribute for field eps - attr_reader :eps - # Attribute for field eu_bank_transfer - attr_reader :eu_bank_transfer - # Attribute for field gb_bank_transfer - attr_reader :gb_bank_transfer - # Attribute for field giropay - attr_reader :giropay - # Attribute for field grabpay - attr_reader :grabpay - # Attribute for field id_bank_transfer - attr_reader :id_bank_transfer - # Attribute for field jp_bank_transfer - attr_reader :jp_bank_transfer - # Attribute for field klarna - attr_reader :klarna - # Attribute for field multibanco - attr_reader :multibanco - # Attribute for field mx_bank_transfer - attr_reader :mx_bank_transfer - # Attribute for field p24 - attr_reader :p24 - # Attribute for field paynow - attr_reader :paynow - # Attribute for field paypal - attr_reader :paypal - # Attribute for field pix - attr_reader :pix - # Attribute for field revolut - attr_reader :revolut - # Attribute for field sofort - attr_reader :sofort - # Attribute for field swish - attr_reader :swish - # Attribute for field th_bank_transfer - attr_reader :th_bank_transfer - # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. - attr_reader :type - # Attribute for field us_bank_transfer - attr_reader :us_bank_transfer - # Attribute for field wechat_pay - attr_reader :wechat_pay - # Attribute for field zip - attr_reader :zip + attr_reader :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_bank_transfer, :blik, :br_bank_transfer, :card, :cashapp, :customer_cash_balance, :eps, :eu_bank_transfer, :gb_bank_transfer, :giropay, :grabpay, :id_bank_transfer, :jp_bank_transfer, :klarna, :multibanco, :mx_bank_transfer, :p24, :paynow, :paypal, :pix, :revolut, :sofort, :swish, :th_bank_transfer, :type, :us_bank_transfer, :wechat_pay, :zip end class NextAction < Stripe::StripeObject class DisplayDetails < Stripe::StripeObject class EmailSent < Stripe::StripeObject - # The timestamp when the email was sent. - attr_reader :email_sent_at - # The recipient's email address. - attr_reader :email_sent_to + attr_reader :email_sent_at, :email_sent_to end - # Attribute for field email_sent - attr_reader :email_sent - # The expiry timestamp. - attr_reader :expires_at + attr_reader :email_sent, :expires_at end - # Attribute for field display_details - attr_reader :display_details - # Type of the next action to perform. - attr_reader :type + attr_reader :display_details, :type end # Amount, in cents (or local equivalent). attr_reader :amount - # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction - # ID of the charge that's refunded. attr_reader :charge - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). attr_reader :description - # Attribute for field destination_details attr_reader :destination_details - # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. attr_reader :failure_balance_transaction - # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. attr_reader :failure_reason - # Unique identifier for the object. attr_reader :id - # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. attr_reader :instructions_email - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Attribute for field next_action attr_reader :next_action - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # ID of the PaymentIntent that's refunded. attr_reader :payment_intent - # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). attr_reader :reason - # This is the transaction number that appears on email receipts sent for this refund. attr_reader :receipt_number - # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. attr_reader :source_transfer_reversal - # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). attr_reader :status - # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. attr_reader :transfer_reversal diff --git a/lib/stripe/resources/reporting/report_run.rb b/lib/stripe/resources/reporting/report_run.rb index bbbc086cb..b69c60b29 100644 --- a/lib/stripe/resources/reporting/report_run.rb +++ b/lib/stripe/resources/reporting/report_run.rb @@ -21,54 +21,30 @@ def self.object_name end class Parameters < Stripe::StripeObject - # The set of output columns requested for inclusion in the report run. - attr_reader :columns - # Connected account ID by which to filter the report run. - attr_reader :connected_account - # Currency of objects to be included in the report run. - attr_reader :currency - # Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. - attr_reader :interval_end - # Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. - attr_reader :interval_start - # Payout ID by which to filter the report run. - attr_reader :payout - # Category of balance transactions to be included in the report run. - attr_reader :reporting_category - # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. - attr_reader :timezone + attr_reader :columns, :connected_account, :currency, :interval_end, :interval_start, :payout, :reporting_category, :timezone end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # If something should go wrong during the run, a message about the failure (populated when # `status=failed`). attr_reader :error - # Unique identifier for the object. attr_reader :id - # `true` if the report is run on live mode data and `false` if it is run on test mode data. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field parameters attr_reader :parameters - # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. attr_reader :report_type - # The file object representing the result of the report run (populated when # `status=succeeded`). attr_reader :result - # Status of this report run. This will be `pending` when the run is initially created. # When the run finishes, this will be set to `succeeded` and the `result` field will be populated. # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. attr_reader :status - # Timestamp at which this run successfully finished (populated when # `status=succeeded`). Measured in seconds since the Unix epoch. attr_reader :succeeded_at diff --git a/lib/stripe/resources/reporting/report_type.rb b/lib/stripe/resources/reporting/report_type.rb index 3e1870cfc..65e2a9de2 100644 --- a/lib/stripe/resources/reporting/report_type.rb +++ b/lib/stripe/resources/reporting/report_type.rb @@ -21,28 +21,20 @@ def self.object_name # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. attr_reader :data_available_end - # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. attr_reader :data_available_start - # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) attr_reader :default_columns - # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Human-readable name of the Report Type attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # When this Report Type was latest updated. Measured in seconds since the Unix epoch. attr_reader :updated - # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. attr_reader :version diff --git a/lib/stripe/resources/reserve_transaction.rb b/lib/stripe/resources/reserve_transaction.rb index 78b98dab1..f12d71eaa 100644 --- a/lib/stripe/resources/reserve_transaction.rb +++ b/lib/stripe/resources/reserve_transaction.rb @@ -10,16 +10,12 @@ def self.object_name # Attribute for field amount attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Unique identifier for the object. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object end diff --git a/lib/stripe/resources/reversal.rb b/lib/stripe/resources/reversal.rb index 135a51e88..9ae781796 100644 --- a/lib/stripe/resources/reversal.rb +++ b/lib/stripe/resources/reversal.rb @@ -25,31 +25,22 @@ def self.object_name # Amount, in cents (or local equivalent). attr_reader :amount - # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Linked payment refund for the transfer reversal. attr_reader :destination_payment_refund - # Unique identifier for the object. attr_reader :id - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # ID of the refund responsible for the transfer reversal. attr_reader :source_refund - # ID of the transfer that was reversed. attr_reader :transfer diff --git a/lib/stripe/resources/review.rb b/lib/stripe/resources/review.rb index e3a4ddd8b..239cad633 100644 --- a/lib/stripe/resources/review.rb +++ b/lib/stripe/resources/review.rb @@ -15,67 +15,38 @@ def self.object_name end class IpAddressLocation < Stripe::StripeObject - # The city where the payment originated. - attr_reader :city - # Two-letter ISO code representing the country where the payment originated. - attr_reader :country - # The geographic latitude where the payment originated. - attr_reader :latitude - # The geographic longitude where the payment originated. - attr_reader :longitude - # The state/county/province/region where the payment originated. - attr_reader :region + attr_reader :city, :country, :latitude, :longitude, :region end class Session < Stripe::StripeObject - # The browser used in this browser session (e.g., `Chrome`). - attr_reader :browser - # Information about the device used for the browser session (e.g., `Samsung SM-G930T`). - attr_reader :device - # The platform for the browser session (e.g., `Macintosh`). - attr_reader :platform - # The version for the browser session (e.g., `61.0.3163.100`). - attr_reader :version + attr_reader :browser, :device, :platform, :version end # The ZIP or postal code of the card used, if applicable. attr_reader :billing_zip - # The charge associated with this review. attr_reader :charge - # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. attr_reader :closed_reason - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # The IP address where the payment originated. attr_reader :ip_address - # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. attr_reader :ip_address_location - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # If `true`, the review needs action. attr_reader :open - # The reason the review was opened. One of `rule` or `manual`. attr_reader :opened_reason - # The PaymentIntent ID associated with this review, if one exists. attr_reader :payment_intent - # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. attr_reader :reason - # Information related to the browsing session of the user who initiated the payment. attr_reader :session diff --git a/lib/stripe/resources/setup_attempt.rb b/lib/stripe/resources/setup_attempt.rb index d87da884d..53dd6e2bf 100644 --- a/lib/stripe/resources/setup_attempt.rb +++ b/lib/stripe/resources/setup_attempt.rb @@ -21,139 +21,43 @@ class AuBecsDebit < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject; end class Bancontact < Stripe::StripeObject - # Bank code of bank associated with the bank account. - attr_reader :bank_code - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. - attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. - attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. - attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. - attr_reader :iban_last4 - # Preferred language of the Bancontact authorization page that the customer is redirected to. - # Can be one of `en`, `de`, `fr`, or `nl` - attr_reader :preferred_language - # Owner's verified full name. Values are verified or provided by Bancontact directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_name + attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name end class Boleto < Stripe::StripeObject; end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_line1_check - # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_postal_code_check - # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :cvc_check + attr_reader :address_line1_check, :address_postal_code_check, :cvc_check end class ThreeDSecure < Stripe::StripeObject - # For authenticated transactions: how the customer was authenticated by - # the issuing bank. - attr_reader :authentication_flow - # The Electronic Commerce Indicator (ECI). A protocol-level field - # indicating what degree of authentication was performed. - attr_reader :electronic_commerce_indicator - # Indicates the outcome of 3D Secure authentication. - attr_reader :result - # Additional information about why 3D Secure succeeded or failed based - # on the `result`. - attr_reader :result_reason - # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID - # (dsTransId) for this payment. - attr_reader :transaction_id - # The version of 3D Secure that was used. - attr_reader :version + attr_reader :authentication_flow, :electronic_commerce_indicator, :result, :result_reason, :transaction_id, :version end class Wallet < Stripe::StripeObject class ApplePay < Stripe::StripeObject; end class GooglePay < Stripe::StripeObject; end - # Attribute for field apple_pay - attr_reader :apple_pay - # Attribute for field google_pay - attr_reader :google_pay - # The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - attr_reader :type + attr_reader :apple_pay, :google_pay, :type end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :brand - # Check results by Card networks on Card address and CVC at the time of authorization - attr_reader :checks - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) - attr_reader :description - # Two-digit number representing the card's expiration month. - attr_reader :exp_month - # Four-digit number representing the card's expiration year. - attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer - # The last four digits of the card. - attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. - attr_reader :network - # Populated if this authorization used 3D Secure authentication. - attr_reader :three_d_secure - # If this Card is part of a card wallet, this contains the details of the card wallet. - attr_reader :wallet + attr_reader :brand, :checks, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :network, :three_d_secure, :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline - attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. - attr_reader :type + attr_reader :stored_at, :type end - # The ID of the Card PaymentMethod which was generated by this SetupAttempt. - attr_reader :generated_card - # Details about payments collected offline. - attr_reader :offline + attr_reader :generated_card, :offline end class Cashapp < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - # Bank where the account is located. - attr_reader :bank - # Local bank code of the bank. - attr_reader :bank_code - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. - attr_reader :display_name + attr_reader :bank, :bank_code, :bank_name, :display_name end class Ideal < Stripe::StripeObject - # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. - attr_reader :bank - # The Bank Identifier Code of the customer's bank. - attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. - attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. - attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. - attr_reader :iban_last4 - # Owner's verified full name. Values are verified or provided by iDEAL directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_name + attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name end class KakaoPay < Stripe::StripeObject; end @@ -166,185 +70,48 @@ class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - # Bank code of bank associated with the bank account. - attr_reader :bank_code - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. - attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. - attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. - attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. - attr_reader :iban_last4 - # Preferred language of the Sofort authorization page that the customer is redirected to. - # Can be one of `en`, `de`, `fr`, or `nl` - attr_reader :preferred_language - # Owner's verified full name. Values are verified or provided by Sofort directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_name + attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name end class UsBankAccount < Stripe::StripeObject; end - # Attribute for field acss_debit - attr_reader :acss_debit - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field au_becs_debit - attr_reader :au_becs_debit - # Attribute for field bacs_debit - attr_reader :bacs_debit - # Attribute for field bancontact - attr_reader :bancontact - # Attribute for field boleto - attr_reader :boleto - # Attribute for field card - attr_reader :card - # Attribute for field card_present - attr_reader :card_present - # Attribute for field cashapp - attr_reader :cashapp - # Attribute for field id_bank_transfer - attr_reader :id_bank_transfer - # Attribute for field ideal - attr_reader :ideal - # Attribute for field kakao_pay - attr_reader :kakao_pay - # Attribute for field klarna - attr_reader :klarna - # Attribute for field kr_card - attr_reader :kr_card - # Attribute for field link - attr_reader :link - # Attribute for field paypal - attr_reader :paypal - # Attribute for field payto - attr_reader :payto - # Attribute for field revolut_pay - attr_reader :revolut_pay - # Attribute for field sepa_debit - attr_reader :sepa_debit - # Attribute for field sofort - attr_reader :sofort - # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :card_present, :cashapp, :id_bank_transfer, :ideal, :kakao_pay, :klarna, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :sofort, :type, :us_bank_account end class SetupError < Stripe::StripeObject - # For card errors, the ID of the failed charge. - attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. - attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. - attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. - attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. - attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. - attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) - attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). - attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. - attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. - attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) - attr_reader :setup_intent - # Attribute for field source - attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` - attr_reader :type + attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type end # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. attr_reader :application - # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. attr_reader :attach_to_self - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. attr_reader :customer - # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. attr_reader :flow_directions - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. attr_reader :on_behalf_of - # ID of the payment method used with this SetupAttempt. attr_reader :payment_method - # Attribute for field payment_method_details attr_reader :payment_method_details - # The error encountered during this attempt to confirm the SetupIntent, if any. attr_reader :setup_error - # ID of the SetupIntent that this attempt belongs to. attr_reader :setup_intent - # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. attr_reader :status - # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. attr_reader :usage diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb index b7ef78516..97935fb17 100644 --- a/lib/stripe/resources/setup_intent.rb +++ b/lib/stripe/resources/setup_intent.rb @@ -34,374 +34,154 @@ def self.object_name end class AutomaticPaymentMethods < Stripe::StripeObject - # Controls whether this SetupIntent will accept redirect-based payment methods. - # - # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. - attr_reader :allow_redirects - # Automatically calculates compatible payment methods - attr_reader :enabled + attr_reader :allow_redirects, :enabled end class LastSetupError < Stripe::StripeObject - # For card errors, the ID of the failed charge. - attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. - attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. - attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. - attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. - attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. - attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. - attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) - attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). - attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. - attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. - attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) - attr_reader :setup_intent - # Attribute for field source - attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` - attr_reader :type + attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type end class NextAction < Stripe::StripeObject class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - # The date (unix timestamp) when the QR code expires. - attr_reader :expires_at - # The image_url_png string used to render QR code - attr_reader :image_url_png - # The image_url_svg string used to render QR code - attr_reader :image_url_svg + attr_reader :expires_at, :image_url_png, :image_url_svg end - # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. - attr_reader :hosted_instructions_url - # The url for mobile redirect based auth - attr_reader :mobile_auth_url - # Attribute for field qr_code - attr_reader :qr_code + attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code end class RedirectToUrl < Stripe::StripeObject - # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. - attr_reader :return_url - # The URL you must redirect your customer to in order to authenticate. - attr_reader :url + attr_reader :return_url, :url end class VerifyWithMicrodeposits < Stripe::StripeObject - # The timestamp when the microdeposits are expected to land. - attr_reader :arrival_date - # The URL for the hosted verification page, which allows customers to verify their bank account. - attr_reader :hosted_verification_url - # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. - attr_reader :microdeposit_type + attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type end - # Attribute for field cashapp_handle_redirect_or_display_qr_code - attr_reader :cashapp_handle_redirect_or_display_qr_code - # Attribute for field redirect_to_url - attr_reader :redirect_to_url - # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. - attr_reader :type - # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. - attr_reader :use_stripe_sdk - # Attribute for field verify_with_microdeposits - attr_reader :verify_with_microdeposits + attr_reader :cashapp_handle_redirect_or_display_qr_code, :redirect_to_url, :type, :use_stripe_sdk, :verify_with_microdeposits end class PaymentMethodConfigurationDetails < Stripe::StripeObject - # ID of the payment method configuration used. - attr_reader :id - # ID of the parent payment method configuration used. - attr_reader :parent + attr_reader :id, :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # A URL for custom mandate text - attr_reader :custom_mandate_url - # List of Stripe products where this mandate can be selected automatically. - attr_reader :default_for - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. - attr_reader :interval_description - # Payment schedule for the mandate. - attr_reader :payment_schedule - # Transaction type of the mandate. - attr_reader :transaction_type + attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type end - # Currency supported by the bank account - attr_reader :currency - # Attribute for field mandate_options - attr_reader :mandate_options - # Bank account verification method. - attr_reader :verification_method + attr_reader :currency, :mandate_options, :verification_method end class AmazonPay < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options attr_reader :mandate_options end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount to be charged for future payments. - attr_reader :amount - # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - attr_reader :amount_type - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # A description of the mandate or subscription that is meant to be displayed to the customer. - attr_reader :description - # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - attr_reader :end_date - # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - attr_reader :interval - # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - attr_reader :interval_count - # Unique identifier for the mandate or subscription. - attr_reader :reference - # Start date of the mandate or subscription. Start date should not be lesser than yesterday. - attr_reader :start_date - # Specifies the type of mandates supported. Possible values are `india`. - attr_reader :supported_types + attr_reader :amount, :amount_type, :currency, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types end - # Configuration options for setting up an eMandate for cards issued in India. - attr_reader :mandate_options - # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. - attr_reader :network - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - attr_reader :request_three_d_secure + attr_reader :mandate_options, :network, :request_three_d_secure end class CardPresent < Stripe::StripeObject; end class Link < Stripe::StripeObject - # [Deprecated] This is a legacy parameter that no longer has any function. attr_reader :persistent_token end class Paypal < Stripe::StripeObject - # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - attr_reader :billing_agreement_id - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - attr_reader :subsellers + attr_reader :billing_agreement_id, :currency, :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount that will be collected. It is required when `amount_type` is `fixed`. - attr_reader :amount - # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - attr_reader :amount_type - # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - attr_reader :end_date - # The periodicity at which payments will be collected. - attr_reader :payment_schedule - # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - attr_reader :payments_per_period - # The purpose for which payments are made. Defaults to retail. - attr_reader :purpose - # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - attr_reader :start_date + attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date end - # Attribute for field mandate_options attr_reader :mandate_options end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options attr_reader :mandate_options end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. - attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. - attr_reader :institution + attr_reader :account_subcategories, :institution end class ManualEntry < Stripe::StripeObject - # Settings for configuring manual entry of account details. attr_reader :mode end - # Attribute for field filters - attr_reader :filters - # Attribute for field manual_entry - attr_reader :manual_entry - # The list of permissions to request. The `payment_method` permission must be included. - attr_reader :permissions - # Data features requested to be retrieved upon account creation. - attr_reader :prefetch - # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - attr_reader :return_url + attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url end class MandateOptions < Stripe::StripeObject - # Mandate collection method attr_reader :collection_method end - # Attribute for field financial_connections - attr_reader :financial_connections - # Attribute for field mandate_options - attr_reader :mandate_options - # Bank account verification method. - attr_reader :verification_method + attr_reader :financial_connections, :mandate_options, :verification_method end - # Attribute for field acss_debit - attr_reader :acss_debit - # Attribute for field amazon_pay - attr_reader :amazon_pay - # Attribute for field bacs_debit - attr_reader :bacs_debit - # Attribute for field card - attr_reader :card - # Attribute for field card_present - attr_reader :card_present - # Attribute for field link - attr_reader :link - # Attribute for field paypal - attr_reader :paypal - # Attribute for field payto - attr_reader :payto - # Attribute for field sepa_debit - attr_reader :sepa_debit - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :acss_debit, :amazon_pay, :bacs_debit, :card, :card_present, :link, :paypal, :payto, :sepa_debit, :us_bank_account end # ID of the Connect application that created the SetupIntent. attr_reader :application - # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. attr_reader :attach_to_self - # Settings for dynamic payment methods compatible with this Setup Intent attr_reader :automatic_payment_methods - # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. attr_reader :cancellation_reason - # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. attr_reader :client_secret - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # ID of the Customer this SetupIntent belongs to, if one exists. # # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. attr_reader :customer - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. attr_reader :flow_directions - # Unique identifier for the object. attr_reader :id - # The error encountered in the previous SetupIntent confirmation. attr_reader :last_setup_error - # The most recent SetupAttempt for this SetupIntent. attr_reader :latest_attempt - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # ID of the multi use Mandate generated by the SetupIntent. attr_reader :mandate - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # If present, this property tells you what actions you need to take in order for your customer to continue payment setup. attr_reader :next_action - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account (if any) for which the setup is intended. attr_reader :on_behalf_of - # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. attr_reader :payment_method - # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. attr_reader :payment_method_configuration_details - # Payment method-specific configuration for this SetupIntent. attr_reader :payment_method_options - # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. attr_reader :payment_method_types - # ID of the single_use Mandate generated by the SetupIntent. attr_reader :single_use_mandate - # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. attr_reader :status - # Indicates how the payment method is intended to be used in the future. # # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. diff --git a/lib/stripe/resources/shipping_rate.rb b/lib/stripe/resources/shipping_rate.rb index d7877f956..d3d42f641 100644 --- a/lib/stripe/resources/shipping_rate.rb +++ b/lib/stripe/resources/shipping_rate.rb @@ -16,71 +16,43 @@ def self.object_name class DeliveryEstimate < Stripe::StripeObject class Maximum < Stripe::StripeObject - # A unit of time. - attr_reader :unit - # Must be greater than 0. - attr_reader :value + attr_reader :unit, :value end class Minimum < Stripe::StripeObject - # A unit of time. - attr_reader :unit - # Must be greater than 0. - attr_reader :value + attr_reader :unit, :value end - # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - attr_reader :maximum - # The lower bound of the estimated range. If empty, represents no lower bound. - attr_reader :minimum + attr_reader :maximum, :minimum end class FixedAmount < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject - # A non-negative integer in cents representing how much to charge. - attr_reader :amount - # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - attr_reader :tax_behavior + attr_reader :amount, :tax_behavior end - # A non-negative integer in cents representing how much to charge. - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency_options + attr_reader :amount, :currency, :currency_options end # Whether the shipping rate can be used for new purchases. Defaults to `true`. attr_reader :active - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. attr_reader :delivery_estimate - # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. attr_reader :display_name - # Attribute for field fixed_amount attr_reader :fixed_amount - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. attr_reader :tax_behavior - # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. attr_reader :tax_code - # The type of calculation to use on the shipping rate. attr_reader :type diff --git a/lib/stripe/resources/sigma/scheduled_query_run.rb b/lib/stripe/resources/sigma/scheduled_query_run.rb index 9443a693b..08cdacc6a 100644 --- a/lib/stripe/resources/sigma/scheduled_query_run.rb +++ b/lib/stripe/resources/sigma/scheduled_query_run.rb @@ -16,39 +16,28 @@ def self.object_name end class Error < Stripe::StripeObject - # Information about the run failure. attr_reader :message end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # When the query was run, Sigma contained a snapshot of your Stripe data at this time. attr_reader :data_load_time - # Attribute for field error attr_reader :error - # The file object representing the results of the query. attr_reader :file - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Time at which the result expires and is no longer available for download. attr_reader :result_available_until - # SQL for the query. attr_reader :sql - # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. attr_reader :status - # Title of the query. attr_reader :title diff --git a/lib/stripe/resources/source.rb b/lib/stripe/resources/source.rb index 5ef265e9a..d6e752320 100644 --- a/lib/stripe/resources/source.rb +++ b/lib/stripe/resources/source.rb @@ -25,679 +25,197 @@ def self.object_name nested_resource_class_methods :source_transaction, operations: %i[retrieve list] class AchCreditTransfer < Stripe::StripeObject - # Attribute for field account_number - attr_reader :account_number - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field refund_account_holder_name - attr_reader :refund_account_holder_name - # Attribute for field refund_account_holder_type - attr_reader :refund_account_holder_type - # Attribute for field refund_routing_number - attr_reader :refund_routing_number - # Attribute for field routing_number - attr_reader :routing_number - # Attribute for field swift_code - attr_reader :swift_code + attr_reader :account_number, :bank_name, :fingerprint, :refund_account_holder_name, :refund_account_holder_type, :refund_routing_number, :routing_number, :swift_code end class AchDebit < Stripe::StripeObject - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field country - attr_reader :country - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field last4 - attr_reader :last4 - # Attribute for field routing_number - attr_reader :routing_number - # Attribute for field type - attr_reader :type + attr_reader :bank_name, :country, :fingerprint, :last4, :routing_number, :type end class AcssDebit < Stripe::StripeObject - # Attribute for field bank_address_city - attr_reader :bank_address_city - # Attribute for field bank_address_line_1 - attr_reader :bank_address_line_1 - # Attribute for field bank_address_line_2 - attr_reader :bank_address_line_2 - # Attribute for field bank_address_postal_code - attr_reader :bank_address_postal_code - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field category - attr_reader :category - # Attribute for field country - attr_reader :country - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field last4 - attr_reader :last4 - # Attribute for field routing_number - attr_reader :routing_number + attr_reader :bank_address_city, :bank_address_line_1, :bank_address_line_2, :bank_address_postal_code, :bank_name, :category, :country, :fingerprint, :last4, :routing_number end class Alipay < Stripe::StripeObject - # Attribute for field data_string - attr_reader :data_string - # Attribute for field native_url - attr_reader :native_url - # Attribute for field statement_descriptor - attr_reader :statement_descriptor + attr_reader :data_string, :native_url, :statement_descriptor end class AuBecsDebit < Stripe::StripeObject - # Attribute for field bsb_number - attr_reader :bsb_number - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field last4 - attr_reader :last4 + attr_reader :bsb_number, :fingerprint, :last4 end class Bancontact < Stripe::StripeObject - # Attribute for field bank_code - attr_reader :bank_code - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field bic - attr_reader :bic - # Attribute for field iban_last4 - attr_reader :iban_last4 - # Attribute for field preferred_language - attr_reader :preferred_language - # Attribute for field statement_descriptor - attr_reader :statement_descriptor + attr_reader :bank_code, :bank_name, :bic, :iban_last4, :preferred_language, :statement_descriptor end class Card < Stripe::StripeObject - # Attribute for field address_line1_check - attr_reader :address_line1_check - # Attribute for field address_zip_check - attr_reader :address_zip_check - # Attribute for field brand - attr_reader :brand - # Attribute for field country - attr_reader :country - # Attribute for field cvc_check - attr_reader :cvc_check - # Attribute for field description - attr_reader :description - # Attribute for field dynamic_last4 - attr_reader :dynamic_last4 - # Attribute for field exp_month - attr_reader :exp_month - # Attribute for field exp_year - attr_reader :exp_year - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field funding - attr_reader :funding - # Attribute for field iin - attr_reader :iin - # Attribute for field issuer - attr_reader :issuer - # Attribute for field last4 - attr_reader :last4 - # Attribute for field name - attr_reader :name - # Attribute for field three_d_secure - attr_reader :three_d_secure - # Attribute for field tokenization_method - attr_reader :tokenization_method + attr_reader :address_line1_check, :address_zip_check, :brand, :country, :cvc_check, :description, :dynamic_last4, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :name, :three_d_secure, :tokenization_method end class CardPresent < Stripe::StripeObject - # Attribute for field application_cryptogram - attr_reader :application_cryptogram - # Attribute for field application_preferred_name - attr_reader :application_preferred_name - # Attribute for field authorization_code - attr_reader :authorization_code - # Attribute for field authorization_response_code - attr_reader :authorization_response_code - # Attribute for field brand - attr_reader :brand - # Attribute for field country - attr_reader :country - # Attribute for field cvm_type - attr_reader :cvm_type - # Attribute for field data_type - attr_reader :data_type - # Attribute for field dedicated_file_name - attr_reader :dedicated_file_name - # Attribute for field description - attr_reader :description - # Attribute for field emv_auth_data - attr_reader :emv_auth_data - # Attribute for field evidence_customer_signature - attr_reader :evidence_customer_signature - # Attribute for field evidence_transaction_certificate - attr_reader :evidence_transaction_certificate - # Attribute for field exp_month - attr_reader :exp_month - # Attribute for field exp_year - attr_reader :exp_year - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field funding - attr_reader :funding - # Attribute for field iin - attr_reader :iin - # Attribute for field issuer - attr_reader :issuer - # Attribute for field last4 - attr_reader :last4 - # Attribute for field pos_device_id - attr_reader :pos_device_id - # Attribute for field pos_entry_mode - attr_reader :pos_entry_mode - # Attribute for field read_method - attr_reader :read_method - # Attribute for field reader - attr_reader :reader - # Attribute for field terminal_verification_results - attr_reader :terminal_verification_results - # Attribute for field transaction_status_information - attr_reader :transaction_status_information + attr_reader :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :brand, :country, :cvm_type, :data_type, :dedicated_file_name, :description, :emv_auth_data, :evidence_customer_signature, :evidence_transaction_certificate, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :pos_device_id, :pos_entry_mode, :read_method, :reader, :terminal_verification_results, :transaction_status_information end class CodeVerification < Stripe::StripeObject - # The number of attempts remaining to authenticate the source object with a verification code. - attr_reader :attempts_remaining - # The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). - attr_reader :status + attr_reader :attempts_remaining, :status end class Eps < Stripe::StripeObject - # Attribute for field reference - attr_reader :reference - # Attribute for field statement_descriptor - attr_reader :statement_descriptor + attr_reader :reference, :statement_descriptor end class Giropay < Stripe::StripeObject - # Attribute for field bank_code - attr_reader :bank_code - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field bic - attr_reader :bic - # Attribute for field statement_descriptor - attr_reader :statement_descriptor + attr_reader :bank_code, :bank_name, :bic, :statement_descriptor end class Ideal < Stripe::StripeObject - # Attribute for field bank - attr_reader :bank - # Attribute for field bic - attr_reader :bic - # Attribute for field iban_last4 - attr_reader :iban_last4 - # Attribute for field statement_descriptor - attr_reader :statement_descriptor + attr_reader :bank, :bic, :iban_last4, :statement_descriptor end class Klarna < Stripe::StripeObject - # Attribute for field background_image_url - attr_reader :background_image_url - # Attribute for field client_token - attr_reader :client_token - # Attribute for field first_name - attr_reader :first_name - # Attribute for field last_name - attr_reader :last_name - # Attribute for field locale - attr_reader :locale - # Attribute for field logo_url - attr_reader :logo_url - # Attribute for field page_title - attr_reader :page_title - # Attribute for field pay_later_asset_urls_descriptive - attr_reader :pay_later_asset_urls_descriptive - # Attribute for field pay_later_asset_urls_standard - attr_reader :pay_later_asset_urls_standard - # Attribute for field pay_later_name - attr_reader :pay_later_name - # Attribute for field pay_later_redirect_url - attr_reader :pay_later_redirect_url - # Attribute for field pay_now_asset_urls_descriptive - attr_reader :pay_now_asset_urls_descriptive - # Attribute for field pay_now_asset_urls_standard - attr_reader :pay_now_asset_urls_standard - # Attribute for field pay_now_name - attr_reader :pay_now_name - # Attribute for field pay_now_redirect_url - attr_reader :pay_now_redirect_url - # Attribute for field pay_over_time_asset_urls_descriptive - attr_reader :pay_over_time_asset_urls_descriptive - # Attribute for field pay_over_time_asset_urls_standard - attr_reader :pay_over_time_asset_urls_standard - # Attribute for field pay_over_time_name - attr_reader :pay_over_time_name - # Attribute for field pay_over_time_redirect_url - attr_reader :pay_over_time_redirect_url - # Attribute for field payment_method_categories - attr_reader :payment_method_categories - # Attribute for field purchase_country - attr_reader :purchase_country - # Attribute for field purchase_type - attr_reader :purchase_type - # Attribute for field redirect_url - attr_reader :redirect_url - # Attribute for field shipping_delay - attr_reader :shipping_delay - # Attribute for field shipping_first_name - attr_reader :shipping_first_name - # Attribute for field shipping_last_name - attr_reader :shipping_last_name + attr_reader :background_image_url, :client_token, :first_name, :last_name, :locale, :logo_url, :page_title, :pay_later_asset_urls_descriptive, :pay_later_asset_urls_standard, :pay_later_name, :pay_later_redirect_url, :pay_now_asset_urls_descriptive, :pay_now_asset_urls_standard, :pay_now_name, :pay_now_redirect_url, :pay_over_time_asset_urls_descriptive, :pay_over_time_asset_urls_standard, :pay_over_time_name, :pay_over_time_redirect_url, :payment_method_categories, :purchase_country, :purchase_type, :redirect_url, :shipping_delay, :shipping_first_name, :shipping_last_name end class Multibanco < Stripe::StripeObject - # Attribute for field entity - attr_reader :entity - # Attribute for field reference - attr_reader :reference - # Attribute for field refund_account_holder_address_city - attr_reader :refund_account_holder_address_city - # Attribute for field refund_account_holder_address_country - attr_reader :refund_account_holder_address_country - # Attribute for field refund_account_holder_address_line1 - attr_reader :refund_account_holder_address_line1 - # Attribute for field refund_account_holder_address_line2 - attr_reader :refund_account_holder_address_line2 - # Attribute for field refund_account_holder_address_postal_code - attr_reader :refund_account_holder_address_postal_code - # Attribute for field refund_account_holder_address_state - attr_reader :refund_account_holder_address_state - # Attribute for field refund_account_holder_name - attr_reader :refund_account_holder_name - # Attribute for field refund_iban - attr_reader :refund_iban + attr_reader :entity, :reference, :refund_account_holder_address_city, :refund_account_holder_address_country, :refund_account_holder_address_line1, :refund_account_holder_address_line2, :refund_account_holder_address_postal_code, :refund_account_holder_address_state, :refund_account_holder_name, :refund_iban end class Owner < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class VerifiedAddress < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Owner's address. - attr_reader :address - # Owner's email address. - attr_reader :email - # Owner's full name. - attr_reader :name - # Owner's phone number (including extension). - attr_reader :phone - # Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_address - # Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_email - # Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_name - # Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. - attr_reader :verified_phone + attr_reader :address, :email, :name, :phone, :verified_address, :verified_email, :verified_name, :verified_phone end class P24 < Stripe::StripeObject - # Attribute for field reference attr_reader :reference end class Paypal < Stripe::StripeObject - # Attribute for field billing_agreement - attr_reader :billing_agreement - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field payer_id - attr_reader :payer_id - # Attribute for field reference_id - attr_reader :reference_id - # Attribute for field reference_transaction_amount - attr_reader :reference_transaction_amount - # Attribute for field reference_transaction_charged - attr_reader :reference_transaction_charged - # Attribute for field statement_descriptor - attr_reader :statement_descriptor - # Attribute for field transaction_id - attr_reader :transaction_id - # Attribute for field verified_email - attr_reader :verified_email + attr_reader :billing_agreement, :fingerprint, :payer_id, :reference_id, :reference_transaction_amount, :reference_transaction_charged, :statement_descriptor, :transaction_id, :verified_email end class Receiver < Stripe::StripeObject - # The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. - attr_reader :address - # The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. - attr_reader :amount_charged - # The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. - attr_reader :amount_received - # The total amount that was returned to the customer. The amount returned is expressed in the source's currency. - attr_reader :amount_returned - # Type of refund attribute method, one of `email`, `manual`, or `none`. - attr_reader :refund_attributes_method - # Type of refund attribute status, one of `missing`, `requested`, or `available`. - attr_reader :refund_attributes_status + attr_reader :address, :amount_charged, :amount_received, :amount_returned, :refund_attributes_method, :refund_attributes_status end class Redirect < Stripe::StripeObject - # The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. - attr_reader :failure_reason - # The URL you provide to redirect the customer to after they authenticated their payment. - attr_reader :return_url - # The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). - attr_reader :status - # The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. - attr_reader :url + attr_reader :failure_reason, :return_url, :status, :url end class SepaCreditTransfer < Stripe::StripeObject - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field bic - attr_reader :bic - # Attribute for field iban - attr_reader :iban - # Attribute for field refund_account_holder_address_city - attr_reader :refund_account_holder_address_city - # Attribute for field refund_account_holder_address_country - attr_reader :refund_account_holder_address_country - # Attribute for field refund_account_holder_address_line1 - attr_reader :refund_account_holder_address_line1 - # Attribute for field refund_account_holder_address_line2 - attr_reader :refund_account_holder_address_line2 - # Attribute for field refund_account_holder_address_postal_code - attr_reader :refund_account_holder_address_postal_code - # Attribute for field refund_account_holder_address_state - attr_reader :refund_account_holder_address_state - # Attribute for field refund_account_holder_name - attr_reader :refund_account_holder_name - # Attribute for field refund_iban - attr_reader :refund_iban + attr_reader :bank_name, :bic, :iban, :refund_account_holder_address_city, :refund_account_holder_address_country, :refund_account_holder_address_line1, :refund_account_holder_address_line2, :refund_account_holder_address_postal_code, :refund_account_holder_address_state, :refund_account_holder_name, :refund_iban end class SepaDebit < Stripe::StripeObject - # Attribute for field bank_code - attr_reader :bank_code - # Attribute for field branch_code - attr_reader :branch_code - # Attribute for field country - attr_reader :country - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field last4 - attr_reader :last4 - # Attribute for field mandate_reference - attr_reader :mandate_reference - # Attribute for field mandate_url - attr_reader :mandate_url + attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate_reference, :mandate_url end class Sofort < Stripe::StripeObject - # Attribute for field bank_code - attr_reader :bank_code - # Attribute for field bank_name - attr_reader :bank_name - # Attribute for field bic - attr_reader :bic - # Attribute for field country - attr_reader :country - # Attribute for field iban_last4 - attr_reader :iban_last4 - # Attribute for field preferred_language - attr_reader :preferred_language - # Attribute for field statement_descriptor - attr_reader :statement_descriptor + attr_reader :bank_code, :bank_name, :bic, :country, :iban_last4, :preferred_language, :statement_descriptor end class SourceOrder < Stripe::StripeObject class Item < Stripe::StripeObject - # The amount (price) for this order item. - attr_reader :amount - # This currency of this order item. Required when `amount` is present. - attr_reader :currency - # Human-readable description for this order item. - attr_reader :description - # The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). - attr_reader :parent - # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. - attr_reader :quantity - # The type of this order item. Must be `sku`, `tax`, or `shipping`. - attr_reader :type + attr_reader :amount, :currency, :description, :parent, :quantity, :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - attr_reader :carrier - # Recipient name. - attr_reader :name - # Recipient phone (including extension). - attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - attr_reader :tracking_number + attr_reader :address, :carrier, :name, :phone, :tracking_number end - # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. - attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # The email address of the customer placing the order. - attr_reader :email - # List of items constituting the order. - attr_reader :items - # Attribute for field shipping - attr_reader :shipping + attr_reader :amount, :currency, :email, :items, :shipping end class ThreeDSecure < Stripe::StripeObject - # Attribute for field address_line1_check - attr_reader :address_line1_check - # Attribute for field address_zip_check - attr_reader :address_zip_check - # Attribute for field authenticated - attr_reader :authenticated - # Attribute for field brand - attr_reader :brand - # Attribute for field card - attr_reader :card - # Attribute for field country - attr_reader :country - # Attribute for field customer - attr_reader :customer - # Attribute for field cvc_check - attr_reader :cvc_check - # Attribute for field description - attr_reader :description - # Attribute for field dynamic_last4 - attr_reader :dynamic_last4 - # Attribute for field exp_month - attr_reader :exp_month - # Attribute for field exp_year - attr_reader :exp_year - # Attribute for field fingerprint - attr_reader :fingerprint - # Attribute for field funding - attr_reader :funding - # Attribute for field iin - attr_reader :iin - # Attribute for field issuer - attr_reader :issuer - # Attribute for field last4 - attr_reader :last4 - # Attribute for field name - attr_reader :name - # Attribute for field three_d_secure - attr_reader :three_d_secure - # Attribute for field tokenization_method - attr_reader :tokenization_method + attr_reader :address_line1_check, :address_zip_check, :authenticated, :brand, :card, :country, :customer, :cvc_check, :description, :dynamic_last4, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :name, :three_d_secure, :tokenization_method end class Wechat < Stripe::StripeObject - # Attribute for field prepay_id - attr_reader :prepay_id - # Attribute for field qr_code_url - attr_reader :qr_code_url - # Attribute for field statement_descriptor - attr_reader :statement_descriptor + attr_reader :prepay_id, :qr_code_url, :statement_descriptor end # Attribute for field ach_credit_transfer attr_reader :ach_credit_transfer - # Attribute for field ach_debit attr_reader :ach_debit - # Attribute for field acss_debit attr_reader :acss_debit - # Attribute for field alipay attr_reader :alipay - # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. attr_reader :amount - # Attribute for field au_becs_debit attr_reader :au_becs_debit - # Attribute for field bancontact attr_reader :bancontact - # Attribute for field card attr_reader :card - # Attribute for field card_present attr_reader :card_present - # The client secret of the source. Used for client-side retrieval using a publishable key. attr_reader :client_secret - # Attribute for field code_verification attr_reader :code_verification - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. attr_reader :currency - # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. attr_reader :customer - # Attribute for field eps attr_reader :eps - # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. attr_reader :flow - # Attribute for field giropay attr_reader :giropay - # Unique identifier for the object. attr_reader :id - # Attribute for field ideal attr_reader :ideal - # Attribute for field klarna attr_reader :klarna - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Attribute for field multibanco attr_reader :multibanco - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Information about the owner of the payment instrument that may be used or required by particular source types. attr_reader :owner - # Attribute for field p24 attr_reader :p24 - # Attribute for field paypal attr_reader :paypal - # Attribute for field receiver attr_reader :receiver - # Attribute for field redirect attr_reader :redirect - # Attribute for field sepa_credit_transfer attr_reader :sepa_credit_transfer - # Attribute for field sepa_debit attr_reader :sepa_debit - # Attribute for field sofort attr_reader :sofort - # Attribute for field source_order attr_reader :source_order - # Extra information about a source. This will appear on your customer's statement every time you charge the source. attr_reader :statement_descriptor - # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. attr_reader :status - # Attribute for field three_d_secure attr_reader :three_d_secure - # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. attr_reader :type - # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. attr_reader :usage - # Attribute for field wechat attr_reader :wechat diff --git a/lib/stripe/resources/source_mandate_notification.rb b/lib/stripe/resources/source_mandate_notification.rb index e9342a5ac..ae94aec0c 100644 --- a/lib/stripe/resources/source_mandate_notification.rb +++ b/lib/stripe/resources/source_mandate_notification.rb @@ -12,50 +12,34 @@ def self.object_name end class AcssDebit < Stripe::StripeObject - # The statement descriptor associate with the debit. attr_reader :statement_descriptor end class BacsDebit < Stripe::StripeObject - # Last 4 digits of the account number associated with the debit. attr_reader :last4 end class SepaDebit < Stripe::StripeObject - # SEPA creditor ID. - attr_reader :creditor_identifier - # Last 4 digits of the account number associated with the debit. - attr_reader :last4 - # Mandate reference associated with the debit. - attr_reader :mandate_reference + attr_reader :creditor_identifier, :last4, :mandate_reference end # Attribute for field acss_debit attr_reader :acss_debit - # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. attr_reader :amount - # Attribute for field bacs_debit attr_reader :bacs_debit - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. attr_reader :reason - # Attribute for field sepa_debit attr_reader :sepa_debit - # `Source` objects allow you to accept a variety of payment methods. They # represent a customer's payment instrument, and can be used with the Stripe API # just like a `Card` object: once chargeable, they can be charged, or can be @@ -67,10 +51,8 @@ class SepaDebit < Stripe::StripeObject # # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). attr_reader :source - # The status of the mandate notification. Valid statuses are `pending` or `submitted`. attr_reader :status - # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. attr_reader :type end diff --git a/lib/stripe/resources/source_transaction.rb b/lib/stripe/resources/source_transaction.rb index 85f4b5e08..028cf0afc 100644 --- a/lib/stripe/resources/source_transaction.rb +++ b/lib/stripe/resources/source_transaction.rb @@ -13,100 +13,50 @@ def self.object_name end class AchCreditTransfer < Stripe::StripeObject - # Customer data associated with the transfer. - attr_reader :customer_data - # Bank account fingerprint associated with the transfer. - attr_reader :fingerprint - # Last 4 digits of the account number associated with the transfer. - attr_reader :last4 - # Routing number associated with the transfer. - attr_reader :routing_number + attr_reader :customer_data, :fingerprint, :last4, :routing_number end class ChfCreditTransfer < Stripe::StripeObject - # Reference associated with the transfer. - attr_reader :reference - # Sender's country address. - attr_reader :sender_address_country - # Sender's line 1 address. - attr_reader :sender_address_line1 - # Sender's bank account IBAN. - attr_reader :sender_iban - # Sender's name. - attr_reader :sender_name + attr_reader :reference, :sender_address_country, :sender_address_line1, :sender_iban, :sender_name end class GbpCreditTransfer < Stripe::StripeObject - # Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. - attr_reader :fingerprint - # The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. - attr_reader :funding_method - # Last 4 digits of sender account number associated with the transfer. - attr_reader :last4 - # Sender entered arbitrary information about the transfer. - attr_reader :reference - # Sender account number associated with the transfer. - attr_reader :sender_account_number - # Sender name associated with the transfer. - attr_reader :sender_name - # Sender sort code associated with the transfer. - attr_reader :sender_sort_code + attr_reader :fingerprint, :funding_method, :last4, :reference, :sender_account_number, :sender_name, :sender_sort_code end class PaperCheck < Stripe::StripeObject - # Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. - attr_reader :available_at - # Comma-separated list of invoice IDs associated with the paper check. - attr_reader :invoices + attr_reader :available_at, :invoices end class SepaCreditTransfer < Stripe::StripeObject - # Reference associated with the transfer. - attr_reader :reference - # Sender's bank account IBAN. - attr_reader :sender_iban - # Sender's name. - attr_reader :sender_name + attr_reader :reference, :sender_iban, :sender_name end # Attribute for field ach_credit_transfer attr_reader :ach_credit_transfer - # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. attr_reader :amount - # Attribute for field chf_credit_transfer attr_reader :chf_credit_transfer - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # Attribute for field gbp_credit_transfer attr_reader :gbp_credit_transfer - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field paper_check attr_reader :paper_check - # Attribute for field sepa_credit_transfer attr_reader :sepa_credit_transfer - # The ID of the source this transaction is attached to. attr_reader :source - # The status of the transaction, one of `succeeded`, `pending`, or `failed`. attr_reader :status - # The type of source this transaction is attached to. attr_reader :type end diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index c2e07c430..c883c940e 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -18,131 +18,69 @@ def self.object_name class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Whether Stripe automatically computes tax on this subscription. - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability + attr_reader :disabled_reason, :enabled, :liability end class BillingCycleAnchorConfig < Stripe::StripeObject - # The day of the month of the billing_cycle_anchor. - attr_reader :day_of_month - # The hour of the day of the billing_cycle_anchor. - attr_reader :hour - # The minute of the hour of the billing_cycle_anchor. - attr_reader :minute - # The month to start full cycle billing periods. - attr_reader :month - # The second of the minute of the billing_cycle_anchor. - attr_reader :second + attr_reader :day_of_month, :hour, :minute, :month, :second end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice - attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. - attr_reader :reset_billing_cycle_anchor + attr_reader :amount_gte, :reset_billing_cycle_anchor end class CancellationDetails < Stripe::StripeObject - # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. - attr_reader :comment - # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. - attr_reader :feedback - # Why this subscription was canceled. - attr_reader :reason + attr_reader :comment, :feedback, :reason end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. - attr_reader :account_tax_ids - # Attribute for field issuer - attr_reader :issuer + attr_reader :account_tax_ids, :issuer end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - # The original price to be migrated. - attr_reader :source_price - # The intended resulting price of the migration. - attr_reader :target_price + attr_reader :source_price, :target_price end - # The time at which the price migration encountered an error. - attr_reader :errored_at - # The involved price pairs in each failed transition. - attr_reader :failed_transitions - # The type of error encountered by the price migration. - attr_reader :type + attr_reader :errored_at, :failed_transitions, :type end class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - attr_reader :behavior - # The time after which the subscription will resume collecting payments. - attr_reader :resumes_at + attr_reader :behavior, :resumes_at end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Transaction type of the mandate. attr_reader :transaction_type end - # Attribute for field mandate_options - attr_reader :mandate_options - # Bank account verification method. - attr_reader :verification_method + attr_reader :mandate_options, :verification_method end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount to be charged for future payments. - attr_reader :amount - # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - attr_reader :amount_type - # A description of the mandate or subscription that is meant to be displayed to the customer. - attr_reader :description + attr_reader :amount, :amount_type, :description end - # Attribute for field mandate_options - attr_reader :mandate_options - # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. - attr_reader :network - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - attr_reader :request_three_d_secure + attr_reader :mandate_options, :network, :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - # Attribute for field eu_bank_transfer - attr_reader :eu_bank_transfer - # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - attr_reader :type + attr_reader :eu_bank_transfer, :type end - # Attribute for field bank_transfer - attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - attr_reader :funding_type + attr_reader :bank_transfer, :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -152,222 +90,123 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. - attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. - attr_reader :institution + attr_reader :account_subcategories, :institution end - # Attribute for field filters - attr_reader :filters - # The list of permissions to request. The `payment_method` permission must be included. - attr_reader :permissions - # Data features requested to be retrieved upon account creation. - attr_reader :prefetch + attr_reader :filters, :permissions, :prefetch end - # Attribute for field financial_connections - attr_reader :financial_connections - # Bank account verification method. - attr_reader :verification_method + attr_reader :financial_connections, :verification_method end - # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. - attr_reader :acss_debit - # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. - attr_reader :bancontact - # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. - attr_reader :card - # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. - attr_reader :customer_balance - # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. - attr_reader :id_bank_transfer - # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. - attr_reader :konbini - # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. - attr_reader :sepa_debit - # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. - attr_reader :us_bank_account + attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account end - # Payment-method-specific configuration to provide to invoices created by the subscription. - attr_reader :payment_method_options - # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). - attr_reader :payment_method_types - # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. - attr_reader :save_default_payment_method + attr_reader :payment_method_options, :payment_method_types, :save_default_payment_method end class PendingInvoiceItemInterval < Stripe::StripeObject - # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - attr_reader :interval - # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - attr_reader :interval_count + attr_reader :interval, :interval_count end class PendingUpdate < Stripe::StripeObject - # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. - attr_reader :billing_cycle_anchor - # The point after which the changes reflected by this update will be discarded and no longer applied. - attr_reader :expires_at - # The number of iterations of prebilling to apply. - attr_reader :prebilling_iterations - # List of subscription items, each with an attached plan, that will be set if the update is applied. - attr_reader :subscription_items - # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. - attr_reader :trial_end - # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - attr_reader :trial_from_plan + attr_reader :billing_cycle_anchor, :expires_at, :prebilling_iterations, :subscription_items, :trial_end, :trial_from_plan end class Prebilling < Stripe::StripeObject - # ID of the prebilling invoice. - attr_reader :invoice - # The end of the last period for which the invoice pre-bills. - attr_reader :period_end - # The start of the first period for which the invoice pre-bills. - attr_reader :period_start - # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. - attr_reader :update_behavior + attr_reader :invoice, :period_end, :period_start, :update_behavior end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. - attr_reader :destination + attr_reader :amount_percent, :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. attr_reader :missing_payment_method end - # Defines how a subscription behaves when a free trial ends. attr_reader :end_behavior end # ID of the Connect Application that created the subscription. attr_reader :application - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. attr_reader :application_fee_percent - # Attribute for field automatic_tax attr_reader :automatic_tax - # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. attr_reader :billing_cycle_anchor - # The fixed values used to calculate the `billing_cycle_anchor`. attr_reader :billing_cycle_anchor_config - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period attr_reader :billing_thresholds - # A date in the future at which the subscription will automatically get canceled attr_reader :cancel_at - # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. attr_reader :cancel_at_period_end - # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. attr_reader :canceled_at - # Details about why this subscription was cancelled attr_reader :cancellation_details - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. attr_reader :collection_method - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. attr_reader :current_period_end - # Start of the current period that the subscription has been invoiced for. attr_reader :current_period_start - # ID of the customer who owns the subscription. attr_reader :customer - # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. attr_reader :days_until_due - # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). attr_reader :default_payment_method - # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). attr_reader :default_source - # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. attr_reader :default_tax_rates - # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. attr_reader :description - # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. attr_reader :discount - # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - # If the subscription has ended, the date the subscription ended. attr_reader :ended_at - # Unique identifier for the object. attr_reader :id - # Attribute for field invoice_settings attr_reader :invoice_settings - # List of subscription items, each with an attached price. attr_reader :items - # Details of the most recent price migration that failed for the subscription. attr_reader :last_price_migration_error - # The most recent invoice this subscription has generated. attr_reader :latest_invoice - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. attr_reader :next_pending_invoice_item_invoice - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. attr_reader :on_behalf_of - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). attr_reader :pause_collection - # Payment settings passed on to invoices created by the subscription. attr_reader :payment_settings - # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. attr_reader :pending_invoice_item_interval - # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). attr_reader :pending_setup_intent - # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. attr_reader :pending_update - # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling - # The schedule attached to the subscription attr_reader :schedule - # Date when the subscription was first created. The date might differ from the `created` date due to backdating. attr_reader :start_date - # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. # # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. @@ -380,19 +219,14 @@ class EndBehavior < Stripe::StripeObject # # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. attr_reader :status - # ID of the test clock this subscription belongs to. attr_reader :test_clock - # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. attr_reader :transfer_data - # If the subscription has a trial, the end of that trial. attr_reader :trial_end - # Settings related to subscription trials. attr_reader :trial_settings - # If the subscription has a trial, the beginning of that trial. attr_reader :trial_start diff --git a/lib/stripe/resources/subscription_item.rb b/lib/stripe/resources/subscription_item.rb index 8b8b4bdaa..053b0f159 100644 --- a/lib/stripe/resources/subscription_item.rb +++ b/lib/stripe/resources/subscription_item.rb @@ -22,34 +22,24 @@ def self.object_name resource_plural: "usage_record_summaries" class BillingThresholds < Stripe::StripeObject - # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. - attr_reader :converts_to - # Determines the type of trial for this item. - attr_reader :type + attr_reader :converts_to, :type end # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period attr_reader :billing_thresholds - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - # Unique identifier for the object. attr_reader :id - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. # # Plans define the base price, currency, and billing cycle for recurring purchases of products. @@ -59,7 +49,6 @@ class Trial < Stripe::StripeObject # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). attr_reader :plan - # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. # @@ -67,19 +56,14 @@ class Trial < Stripe::StripeObject # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). attr_reader :price - # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. attr_reader :quantity - # The `subscription` this `subscription_item` belongs to. attr_reader :subscription - # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. attr_reader :tax_rates - # Options that configure the trial on the subscription item. attr_reader :trial - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index 05a9827b1..5139ed7ae 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -16,358 +16,155 @@ def self.object_name end class CurrentPhase < Stripe::StripeObject - # The end of this phase of the subscription schedule. - attr_reader :end_date - # The start of this phase of the subscription schedule. - attr_reader :start_date + attr_reader :end_date, :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Whether Stripe automatically computes tax on invoices created during this phase. - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability + attr_reader :disabled_reason, :enabled, :liability end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice - attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. - attr_reader :reset_billing_cycle_anchor + attr_reader :amount_gte, :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. - attr_reader :account_tax_ids - # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - attr_reader :days_until_due - # Attribute for field issuer - attr_reader :issuer + attr_reader :account_tax_ids, :days_until_due, :issuer end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. - attr_reader :destination + attr_reader :amount_percent, :destination end - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. - attr_reader :application_fee_percent - # Attribute for field automatic_tax - attr_reader :automatic_tax - # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - attr_reader :billing_cycle_anchor - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period - attr_reader :billing_thresholds - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. - attr_reader :collection_method - # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - attr_reader :default_payment_method - # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - attr_reader :description - # Attribute for field invoice_settings - attr_reader :invoice_settings - # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. - attr_reader :on_behalf_of - # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. - attr_reader :transfer_data + attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - # The original price to be migrated. - attr_reader :source_price - # The intended resulting price of the migration. - attr_reader :target_price + attr_reader :source_price, :target_price end - # The time at which the price migration encountered an error. - attr_reader :errored_at - # The involved price pairs in each failed transition. - attr_reader :failed_transitions - # The type of error encountered by the price migration. - attr_reader :type + attr_reader :errored_at, :failed_transitions, :type end class Phase < Stripe::StripeObject class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end - # The stackable discounts that will be applied to the item. - attr_reader :discounts - # ID of the price used to generate the invoice item. - attr_reader :price - # The quantity of the invoice item. - attr_reader :quantity - # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - attr_reader :tax_rates + attr_reader :discounts, :price, :quantity, :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # Whether Stripe automatically computes tax on invoices created during this phase. - attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - attr_reader :liability + attr_reader :disabled_reason, :enabled, :liability end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice - attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. - attr_reader :reset_billing_cycle_anchor + attr_reader :amount_gte, :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. - attr_reader :account - # Type of the account referenced. - attr_reader :type + attr_reader :account, :type end - # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. - attr_reader :account_tax_ids - # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - attr_reader :days_until_due - # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - attr_reader :issuer + attr_reader :account_tax_ids, :days_until_due, :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject - # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. - attr_reader :timestamp - # The discount end type. - attr_reader :type + attr_reader :timestamp, :type end - # ID of the coupon to create a new discount for. - attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. - attr_reader :discount - # Details to determine how long the discount should be applied for. - attr_reader :discount_end - # ID of the promotion code to create a new discount for. - attr_reader :promotion_code + attr_reader :coupon, :discount, :discount_end, :promotion_code end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. - attr_reader :converts_to - # Determines the type of trial for this item. - attr_reader :type + attr_reader :converts_to, :type end - # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period - attr_reader :billing_thresholds - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. - attr_reader :discounts - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. - attr_reader :metadata - # ID of the plan to which the customer should be subscribed. - attr_reader :plan - # ID of the price to which the customer should be subscribed. - attr_reader :price - # Quantity of the plan to which the customer should be subscribed. - attr_reader :quantity - # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. - attr_reader :tax_rates - # Options that configure the trial on the subscription item. - attr_reader :trial + attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial end class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. - attr_reader :destination + attr_reader :amount_percent, :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end - # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end - # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. - attr_reader :add_invoice_items - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. - attr_reader :application_fee_percent - # Attribute for field automatic_tax - attr_reader :automatic_tax - # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - attr_reader :billing_cycle_anchor - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period - attr_reader :billing_thresholds - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. - attr_reader :collection_method - # ID of the coupon to use during this phase of the subscription schedule. - attr_reader :coupon - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - attr_reader :default_payment_method - # The default tax rates to apply to the subscription during this phase of the subscription schedule. - attr_reader :default_tax_rates - # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - attr_reader :description - # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. - attr_reader :discounts - # The end of this phase of the subscription schedule. - attr_reader :end_date - # The invoice settings applicable during this phase. - attr_reader :invoice_settings - # Subscription items to configure the subscription to during this phase of the subscription schedule. - attr_reader :items - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. - attr_reader :metadata - # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. - attr_reader :on_behalf_of - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - attr_reader :pause_collection - # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. - attr_reader :proration_behavior - # The start of this phase of the subscription schedule. - attr_reader :start_date - # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. - attr_reader :transfer_data - # Specify behavior of the trial when crossing schedule phase boundaries - attr_reader :trial_continuation - # When the trial ends within the phase. - attr_reader :trial_end - # Settings related to any trials on the subscription during this phase. - attr_reader :trial_settings + attr_reader :add_invoice_items, :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :coupon, :currency, :default_payment_method, :default_tax_rates, :description, :discounts, :end_date, :invoice_settings, :items, :metadata, :on_behalf_of, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings end class Prebilling < Stripe::StripeObject - # ID of the prebilling invoice. - attr_reader :invoice - # The end of the last period for which the invoice pre-bills. - attr_reader :period_end - # The start of the first period for which the invoice pre-bills. - attr_reader :period_start - # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. - attr_reader :update_behavior + attr_reader :invoice, :period_end, :period_start, :update_behavior end # ID of the Connect Application that created the schedule. attr_reader :application - # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_reader :billing_behavior - # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at - # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. attr_reader :completed_at - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. attr_reader :current_phase - # ID of the customer who owns the subscription schedule. attr_reader :customer - # Attribute for field default_settings attr_reader :default_settings - # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. attr_reader :end_behavior - # Unique identifier for the object. attr_reader :id - # Details of the most recent price migration that failed for the subscription schedule. attr_reader :last_price_migration_error - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Configuration for the subscription schedule's phases. attr_reader :phases - # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling - # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. attr_reader :released_at - # ID of the subscription once managed by the subscription schedule (if it is released). attr_reader :released_subscription - # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). attr_reader :status - # ID of the subscription managed by the subscription schedule. attr_reader :subscription - # ID of the test clock this subscription schedule belongs to. attr_reader :test_clock diff --git a/lib/stripe/resources/tax/association.rb b/lib/stripe/resources/tax/association.rb index 1379412dd..7c2d100d1 100644 --- a/lib/stripe/resources/tax/association.rb +++ b/lib/stripe/resources/tax/association.rb @@ -15,56 +15,34 @@ class Committed < Stripe::StripeObject class Reversal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject class Committed < Stripe::StripeObject - # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) attr_reader :transaction end class Errored < Stripe::StripeObject - # Details on why we could not commit the reversal Tax Transaction - attr_reader :reason - # The [Refund](https://stripe.com/docs/api/refunds/object) ID that should have created a tax reversal. - attr_reader :refund_id + attr_reader :reason, :refund_id end - # Attribute for field committed - attr_reader :committed - # Attribute for field errored - attr_reader :errored + attr_reader :committed, :errored end - # Status of the attempted Tax Transaction reversal. - attr_reader :status - # Attribute for field status_details - attr_reader :status_details + attr_reader :status, :status_details end - # Attempts to create Tax Transaction reversals - attr_reader :reversals - # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) - attr_reader :transaction + attr_reader :reversals, :transaction end class Errored < Stripe::StripeObject - # Details on why we could not commit the Tax Transaction attr_reader :reason end - # Attribute for field committed - attr_reader :committed - # Attribute for field errored - attr_reader :errored + attr_reader :committed, :errored end # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. attr_reader :calculation - # Unique identifier for the object. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. attr_reader :payment_intent - # Status of the Tax Association. attr_reader :status - # Attribute for field status_details attr_reader :status_details diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb index 241bba6c8..78abe4454 100644 --- a/lib/stripe/resources/tax/calculation.rb +++ b/lib/stripe/resources/tax/calculation.rb @@ -16,179 +16,73 @@ def self.object_name class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` - attr_reader :type - # The value of the tax ID. - attr_reader :value + attr_reader :type, :value end - # The customer's postal address (for example, home or business location). - attr_reader :address - # The type of customer address provided. - attr_reader :address_source - # The customer's IP address (IPv4 or IPv6). - attr_reader :ip_address - # The customer's tax IDs (for example, EU VAT numbers). - attr_reader :tax_ids - # The taxability override used for taxation. - attr_reader :taxability_override + attr_reader :address, :address_source, :ip_address, :tax_ids, :taxability_override end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # A human-readable name for the jurisdiction imposing the tax. - attr_reader :display_name - # Indicates the level of the jurisdiction imposing the tax. - attr_reader :level - # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - attr_reader :state + attr_reader :country, :display_name, :level, :state end class TaxRateDetails < Stripe::StripeObject - # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". - attr_reader :display_name - # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". - attr_reader :percentage_decimal - # The tax type, such as `vat` or `sales_tax`. - attr_reader :tax_type + attr_reader :display_name, :percentage_decimal, :tax_type end - # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount - # Attribute for field jurisdiction - attr_reader :jurisdiction - # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). - attr_reader :sourcing - # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. - attr_reader :tax_rate_details - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :taxable_amount + attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount end - # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. - attr_reader :amount - # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount_tax - # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). - attr_reader :shipping_rate - # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. - attr_reader :tax_behavior - # Detailed account of taxes relevant to shipping cost. - attr_reader :tax_breakdown - # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. - attr_reader :tax_code + attr_reader :amount, :amount_tax, :shipping_rate, :tax_behavior, :tax_breakdown, :tax_code end class TaxBreakdown < Stripe::StripeObject class TaxRateDetails < Stripe::StripeObject class FlatAmount < Stripe::StripeObject - # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - attr_reader :amount - # Three-letter ISO currency code, in lowercase. - attr_reader :currency + attr_reader :amount, :currency end - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. - attr_reader :flat_amount - # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. - attr_reader :percentage_decimal - # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. - attr_reader :rate_type - # State, county, province, or region. - attr_reader :state - # The tax type, such as `vat` or `sales_tax`. - attr_reader :tax_type + attr_reader :country, :flat_amount, :percentage_decimal, :rate_type, :state, :tax_type end - # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount - # Specifies whether the tax amount is included in the line item amount. - attr_reader :inclusive - # Attribute for field tax_rate_details - attr_reader :tax_rate_details - # The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. - attr_reader :taxability_reason - # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :taxable_amount + attr_reader :amount, :inclusive, :tax_rate_details, :taxability_reason, :taxable_amount end # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_total - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. attr_reader :customer - # Attribute for field customer_details attr_reader :customer_details - # Timestamp of date at which the tax calculation will expire. attr_reader :expires_at - # Unique identifier for the calculation. attr_reader :id - # The list of items the customer is purchasing. attr_reader :line_items - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The details of the ship from location, such as the address. attr_reader :ship_from_details - # The shipping cost details for the calculation. attr_reader :shipping_cost - # The amount of tax to be collected on top of the line item prices. attr_reader :tax_amount_exclusive - # The amount of tax already included in the line item prices. attr_reader :tax_amount_inclusive - # Breakdown of individual tax amounts that add up to the total. attr_reader :tax_breakdown - # Timestamp of date at which the tax rules and rates in effect applies for the calculation. attr_reader :tax_date diff --git a/lib/stripe/resources/tax/calculation_line_item.rb b/lib/stripe/resources/tax/calculation_line_item.rb index 48f167961..ebaf3d4ff 100644 --- a/lib/stripe/resources/tax/calculation_line_item.rb +++ b/lib/stripe/resources/tax/calculation_line_item.rb @@ -11,67 +11,34 @@ def self.object_name class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # A human-readable name for the jurisdiction imposing the tax. - attr_reader :display_name - # Indicates the level of the jurisdiction imposing the tax. - attr_reader :level - # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - attr_reader :state + attr_reader :country, :display_name, :level, :state end class TaxRateDetails < Stripe::StripeObject - # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". - attr_reader :display_name - # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". - attr_reader :percentage_decimal - # The tax type, such as `vat` or `sales_tax`. - attr_reader :tax_type + attr_reader :display_name, :percentage_decimal, :tax_type end - # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount - # Attribute for field jurisdiction - attr_reader :jurisdiction - # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). - attr_reader :sourcing - # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. - attr_reader :tax_rate_details - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :taxable_amount + attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount end # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. attr_reader :amount - # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_tax - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The ID of an existing [Product](https://stripe.com/docs/api/products/object). attr_reader :product - # The number of units of the item being purchased. For reversals, this is the quantity reversed. attr_reader :quantity - # A custom identifier for this line item. attr_reader :reference - # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. attr_reader :tax_behavior - # Detailed account of taxes relevant to this line item. attr_reader :tax_breakdown - # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. attr_reader :tax_code end diff --git a/lib/stripe/resources/tax/form.rb b/lib/stripe/resources/tax/form.rb index 009f10d53..e519aff9f 100644 --- a/lib/stripe/resources/tax/form.rb +++ b/lib/stripe/resources/tax/form.rb @@ -15,125 +15,77 @@ def self.object_name end class AuSerr < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_start_date + attr_reader :reporting_period_end_date, :reporting_period_start_date end class CaMrdp < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_start_date + attr_reader :reporting_period_end_date, :reporting_period_start_date end class EuDac7 < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_start_date + attr_reader :reporting_period_end_date, :reporting_period_start_date end class FilingStatus < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Always `US`. - attr_reader :country - # Indicates the level of the jurisdiction where the form was filed. - attr_reader :level - # [ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, "NY" for New York, United States. - attr_reader :state + attr_reader :country, :level, :state end - # Time when the filing status was updated. - attr_reader :effective_at - # Attribute for field jurisdiction - attr_reader :jurisdiction - # The current status of the filed form. - attr_reader :value + attr_reader :effective_at, :jurisdiction, :value end class GbMrdp < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_start_date + attr_reader :reporting_period_end_date, :reporting_period_start_date end class NzMrdp < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. - attr_reader :reporting_period_start_date + attr_reader :reporting_period_end_date, :reporting_period_start_date end class Payee < Stripe::StripeObject - # The ID of the payee's Stripe account. - attr_reader :account - # The external reference to this payee. - attr_reader :external_reference - # Either `account` or `external_reference`. - attr_reader :type + attr_reader :account, :external_reference, :type end class Us1099K < Stripe::StripeObject - # Year represented by the information reported on the tax form. attr_reader :reporting_year end class Us1099Misc < Stripe::StripeObject - # Year represented by the information reported on the tax form. attr_reader :reporting_year end class Us1099Nec < Stripe::StripeObject - # Year represented by the information reported on the tax form. attr_reader :reporting_year end # Attribute for field au_serr attr_reader :au_serr - # Attribute for field ca_mrdp attr_reader :ca_mrdp - # The form that corrects this form, if any. attr_reader :corrected_by - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Attribute for field eu_dac7 attr_reader :eu_dac7 - # A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. attr_reader :filing_statuses - # Attribute for field gb_mrdp attr_reader :gb_mrdp - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Attribute for field nz_mrdp attr_reader :nz_mrdp - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field payee attr_reader :payee - # The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. attr_reader :type - # Attribute for field us_1099_k attr_reader :us_1099_k - # Attribute for field us_1099_misc attr_reader :us_1099_misc - # Attribute for field us_1099_nec attr_reader :us_1099_nec diff --git a/lib/stripe/resources/tax/registration.rb b/lib/stripe/resources/tax/registration.rb index 66a4bb9f3..08d2e9534 100644 --- a/lib/stripe/resources/tax/registration.rb +++ b/lib/stripe/resources/tax/registration.rb @@ -20,680 +20,380 @@ def self.object_name class CountryOptions < Stripe::StripeObject class Ae < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class At < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Au < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Be < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Bg < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Bh < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class By < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Ca < Stripe::StripeObject class ProvinceStandard < Stripe::StripeObject - # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). attr_reader :province end - # Attribute for field province_standard - attr_reader :province_standard - # Type of registration in Canada. - attr_reader :type + attr_reader :province_standard, :type end class Ch < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Cl < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Co < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Cr < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Cy < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Cz < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class De < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Dk < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Ec < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Ee < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Eg < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Es < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Fi < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Fr < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Gb < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Ge < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Gr < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Hr < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Hu < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Id < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Ie < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Is < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class It < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Jp < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Ke < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Kr < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Kz < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Lt < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Lu < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Lv < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Ma < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Md < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Mt < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Mx < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class My < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Ng < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Nl < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class No < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Nz < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Om < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Pl < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Pt < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Ro < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Rs < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Ru < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Sa < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Se < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Sg < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Si < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Sk < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - # Attribute for field standard - attr_reader :standard - # Type of registration in an EU country. - attr_reader :type + attr_reader :standard, :type end class Th < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Tr < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Tz < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Us < Stripe::StripeObject class LocalAmusementTax < Stripe::StripeObject - # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. attr_reader :jurisdiction end class LocalLeaseTax < Stripe::StripeObject - # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. attr_reader :jurisdiction end class StateSalesTax < Stripe::StripeObject class Election < Stripe::StripeObject - # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. - attr_reader :jurisdiction - # The type of the election for the state sales tax registration. - attr_reader :type + attr_reader :jurisdiction, :type end - # Elections for the state sales tax registration. attr_reader :elections end - # Attribute for field local_amusement_tax - attr_reader :local_amusement_tax - # Attribute for field local_lease_tax - attr_reader :local_lease_tax - # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - attr_reader :state - # Attribute for field state_sales_tax - attr_reader :state_sales_tax - # Type of registration in the US. - attr_reader :type + attr_reader :local_amusement_tax, :local_lease_tax, :state, :state_sales_tax, :type end class Uz < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Vn < Stripe::StripeObject - # Type of registration in `country`. attr_reader :type end class Za < Stripe::StripeObject - # Type of registration in `country`. - attr_reader :type - end - # Attribute for field ae - attr_reader :ae - # Attribute for field at - attr_reader :at - # Attribute for field au - attr_reader :au - # Attribute for field be - attr_reader :be - # Attribute for field bg - attr_reader :bg - # Attribute for field bh - attr_reader :bh - # Attribute for field by - attr_reader :by - # Attribute for field ca - attr_reader :ca - # Attribute for field ch - attr_reader :ch - # Attribute for field cl - attr_reader :cl - # Attribute for field co - attr_reader :co - # Attribute for field cr - attr_reader :cr - # Attribute for field cy - attr_reader :cy - # Attribute for field cz - attr_reader :cz - # Attribute for field de - attr_reader :de - # Attribute for field dk - attr_reader :dk - # Attribute for field ec - attr_reader :ec - # Attribute for field ee - attr_reader :ee - # Attribute for field eg - attr_reader :eg - # Attribute for field es - attr_reader :es - # Attribute for field fi - attr_reader :fi - # Attribute for field fr - attr_reader :fr - # Attribute for field gb - attr_reader :gb - # Attribute for field ge - attr_reader :ge - # Attribute for field gr - attr_reader :gr - # Attribute for field hr - attr_reader :hr - # Attribute for field hu - attr_reader :hu - # Attribute for field id - attr_reader :id - # Attribute for field ie - attr_reader :ie - # Attribute for field is - attr_reader :is - # Attribute for field it - attr_reader :it - # Attribute for field jp - attr_reader :jp - # Attribute for field ke - attr_reader :ke - # Attribute for field kr - attr_reader :kr - # Attribute for field kz - attr_reader :kz - # Attribute for field lt - attr_reader :lt - # Attribute for field lu - attr_reader :lu - # Attribute for field lv - attr_reader :lv - # Attribute for field ma - attr_reader :ma - # Attribute for field md - attr_reader :md - # Attribute for field mt - attr_reader :mt - # Attribute for field mx - attr_reader :mx - # Attribute for field my - attr_reader :my - # Attribute for field ng - attr_reader :ng - # Attribute for field nl - attr_reader :nl - # Attribute for field no - attr_reader :no - # Attribute for field nz - attr_reader :nz - # Attribute for field om - attr_reader :om - # Attribute for field pl - attr_reader :pl - # Attribute for field pt - attr_reader :pt - # Attribute for field ro - attr_reader :ro - # Attribute for field rs - attr_reader :rs - # Attribute for field ru - attr_reader :ru - # Attribute for field sa - attr_reader :sa - # Attribute for field se - attr_reader :se - # Attribute for field sg - attr_reader :sg - # Attribute for field si - attr_reader :si - # Attribute for field sk - attr_reader :sk - # Attribute for field th - attr_reader :th - # Attribute for field tr - attr_reader :tr - # Attribute for field tz - attr_reader :tz - # Attribute for field us - attr_reader :us - # Attribute for field uz - attr_reader :uz - # Attribute for field vn - attr_reader :vn - # Attribute for field za - attr_reader :za + attr_reader :type + end + attr_reader :ae, :at, :au, :be, :bg, :bh, :by, :ca, :ch, :cl, :co, :cr, :cy, :cz, :de, :dk, :ec, :ee, :eg, :es, :fi, :fr, :gb, :ge, :gr, :hr, :hu, :id, :ie, :is, :it, :jp, :ke, :kr, :kz, :lt, :lu, :lv, :ma, :md, :mt, :mx, :my, :ng, :nl, :no, :nz, :om, :pl, :pt, :ro, :rs, :ru, :sa, :se, :sg, :si, :sk, :th, :tr, :tz, :us, :uz, :vn, :za end # Time at which the registration becomes active. Measured in seconds since the Unix epoch. attr_reader :active_from - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country - # Attribute for field country_options attr_reader :country_options - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. attr_reader :expires_at - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. attr_reader :status diff --git a/lib/stripe/resources/tax/settings.rb b/lib/stripe/resources/tax/settings.rb index 2a8048b7c..d7e9cf3a3 100644 --- a/lib/stripe/resources/tax/settings.rb +++ b/lib/stripe/resources/tax/settings.rb @@ -15,28 +15,13 @@ def self.object_name end class Defaults < Stripe::StripeObject - # Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. - attr_reader :tax_behavior - # Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. - attr_reader :tax_code + attr_reader :tax_behavior, :tax_code end class HeadOffice < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address attr_reader :address end @@ -44,29 +29,20 @@ class StatusDetails < Stripe::StripeObject class Active < Stripe::StripeObject; end class Pending < Stripe::StripeObject - # The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. attr_reader :missing_fields end - # Attribute for field active - attr_reader :active - # Attribute for field pending - attr_reader :pending + attr_reader :active, :pending end # Attribute for field defaults attr_reader :defaults - # The place where your business is located. attr_reader :head_office - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The status of the Tax `Settings`. attr_reader :status - # Attribute for field status_details attr_reader :status_details end diff --git a/lib/stripe/resources/tax/transaction.rb b/lib/stripe/resources/tax/transaction.rb index 67b1c0c52..c9620bccd 100644 --- a/lib/stripe/resources/tax/transaction.rb +++ b/lib/stripe/resources/tax/transaction.rb @@ -14,154 +14,69 @@ def self.object_name class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` - attr_reader :type - # The value of the tax ID. - attr_reader :value + attr_reader :type, :value end - # The customer's postal address (for example, home or business location). - attr_reader :address - # The type of customer address provided. - attr_reader :address_source - # The customer's IP address (IPv4 or IPv6). - attr_reader :ip_address - # The customer's tax IDs (for example, EU VAT numbers). - attr_reader :tax_ids - # The taxability override used for taxation. - attr_reader :taxability_override + attr_reader :address, :address_source, :ip_address, :tax_ids, :taxability_override end class Reversal < Stripe::StripeObject - # The `id` of the reversed `Transaction` object. attr_reader :original_transaction end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # A human-readable name for the jurisdiction imposing the tax. - attr_reader :display_name - # Indicates the level of the jurisdiction imposing the tax. - attr_reader :level - # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - attr_reader :state + attr_reader :country, :display_name, :level, :state end class TaxRateDetails < Stripe::StripeObject - # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". - attr_reader :display_name - # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". - attr_reader :percentage_decimal - # The tax type, such as `vat` or `sales_tax`. - attr_reader :tax_type + attr_reader :display_name, :percentage_decimal, :tax_type end - # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount - # Attribute for field jurisdiction - attr_reader :jurisdiction - # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). - attr_reader :sourcing - # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. - attr_reader :tax_rate_details - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - attr_reader :taxability_reason - # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :taxable_amount + attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount end - # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. - attr_reader :amount - # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount_tax - # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). - attr_reader :shipping_rate - # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. - attr_reader :tax_behavior - # Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) - attr_reader :tax_breakdown - # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. - attr_reader :tax_code + attr_reader :amount, :amount_tax, :shipping_rate, :tax_behavior, :tax_breakdown, :tax_code end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. attr_reader :customer - # Attribute for field customer_details attr_reader :customer_details - # Unique identifier for the transaction. attr_reader :id - # The tax collected or refunded, by line item. attr_reader :line_items - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The Unix timestamp representing when the tax liability is assumed or reduced. attr_reader :posted_at - # A custom unique identifier, such as 'myOrder_123'. attr_reader :reference - # If `type=reversal`, contains information about what was reversed. attr_reader :reversal - # The details of the ship from location, such as the address. attr_reader :ship_from_details - # The shipping cost details for the transaction. attr_reader :shipping_cost - # Timestamp of date at which the tax rules and rates in effect applies for the calculation. attr_reader :tax_date - # If `reversal`, this transaction reverses an earlier transaction. attr_reader :type diff --git a/lib/stripe/resources/tax/transaction_line_item.rb b/lib/stripe/resources/tax/transaction_line_item.rb index 08db51f98..0ccae0f7d 100644 --- a/lib/stripe/resources/tax/transaction_line_item.rb +++ b/lib/stripe/resources/tax/transaction_line_item.rb @@ -10,45 +10,32 @@ def self.object_name end class Reversal < Stripe::StripeObject - # The `id` of the line item to reverse in the original transaction. attr_reader :original_line_item end # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. attr_reader :amount - # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_tax - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The ID of an existing [Product](https://stripe.com/docs/api/products/object). attr_reader :product - # The number of units of the item being purchased. For reversals, this is the quantity reversed. attr_reader :quantity - # A custom identifier for this line item in the transaction. attr_reader :reference - # If `type=reversal`, contains information about what was reversed. attr_reader :reversal - # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. attr_reader :tax_behavior - # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. attr_reader :tax_code - # If `reversal`, this line item reverses an earlier transaction. attr_reader :type end diff --git a/lib/stripe/resources/tax_code.rb b/lib/stripe/resources/tax_code.rb index 952eae56d..f8fcee6f6 100644 --- a/lib/stripe/resources/tax_code.rb +++ b/lib/stripe/resources/tax_code.rb @@ -13,13 +13,10 @@ def self.object_name # A detailed description of which types of products the tax code represents. attr_reader :description - # Unique identifier for the object. attr_reader :id - # A short name for the tax code. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object diff --git a/lib/stripe/resources/tax_deducted_at_source.rb b/lib/stripe/resources/tax_deducted_at_source.rb index 901aa4c72..a504a626b 100644 --- a/lib/stripe/resources/tax_deducted_at_source.rb +++ b/lib/stripe/resources/tax_deducted_at_source.rb @@ -10,16 +10,12 @@ def self.object_name # Unique identifier for the object. attr_reader :id - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. attr_reader :period_end - # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. attr_reader :period_start - # The TAN that was supplied to Stripe when TDS was assessed attr_reader :tax_deduction_account_number end diff --git a/lib/stripe/resources/tax_id.rb b/lib/stripe/resources/tax_id.rb index 169fe1df8..20f1c29cc 100644 --- a/lib/stripe/resources/tax_id.rb +++ b/lib/stripe/resources/tax_id.rb @@ -17,54 +17,32 @@ def self.object_name end class Owner < Stripe::StripeObject - # The account being referenced when `type` is `account`. - attr_reader :account - # The Connect Application being referenced when `type` is `application`. - attr_reader :application - # The customer being referenced when `type` is `customer`. - attr_reader :customer - # Type of owner referenced. - attr_reader :type + attr_reader :account, :application, :customer, :type end class Verification < Stripe::StripeObject - # Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. - attr_reader :status - # Verified address. - attr_reader :verified_address - # Verified name. - attr_reader :verified_name + attr_reader :status, :verified_address, :verified_name end # Two-letter ISO code representing the country of the tax ID. attr_reader :country - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # ID of the customer. attr_reader :customer - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The account or customer the tax ID belongs to. attr_reader :owner - # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` attr_reader :type - # Value of the tax ID. attr_reader :value - # Tax ID verification information. attr_reader :verification - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/tax_rate.rb b/lib/stripe/resources/tax_rate.rb index f566e95b7..6fbcbe304 100644 --- a/lib/stripe/resources/tax_rate.rb +++ b/lib/stripe/resources/tax_rate.rb @@ -16,64 +16,44 @@ def self.object_name end class FlatAmount < Stripe::StripeObject - # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - attr_reader :amount - # Three-letter ISO currency code, in lowercase. - attr_reader :currency + attr_reader :amount, :currency end # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. attr_reader :active - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. attr_reader :description - # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. attr_reader :display_name - # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, # this percentage reflects the rate actually used to calculate tax based on the product's taxability # and whether the user is registered to collect taxes in the corresponding jurisdiction. attr_reader :effective_percentage - # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. attr_reader :flat_amount - # Unique identifier for the object. attr_reader :id - # This specifies if the tax rate is inclusive or exclusive. attr_reader :inclusive - # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. attr_reader :jurisdiction - # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. attr_reader :jurisdiction_level - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. attr_reader :percentage - # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. attr_reader :rate_type - # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. attr_reader :state - # The high-level tax type, such as `vat` or `sales_tax`. attr_reader :tax_type diff --git a/lib/stripe/resources/terminal/configuration.rb b/lib/stripe/resources/terminal/configuration.rb index f7b7d2ae1..1788977a8 100644 --- a/lib/stripe/resources/terminal/configuration.rb +++ b/lib/stripe/resources/terminal/configuration.rb @@ -16,231 +16,109 @@ def self.object_name end class BbposWiseposE < Stripe::StripeObject - # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end class Offline < Stripe::StripeObject - # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. attr_reader :enabled end class RebootWindow < Stripe::StripeObject - # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. - attr_reader :end_hour - # Integer between 0 to 23 that represents the start hour of the reboot time window. - attr_reader :start_hour + attr_reader :end_hour, :start_hour end class StripeS700 < Stripe::StripeObject - # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end class Tipping < Stripe::StripeObject class Aud < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Cad < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Chf < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Czk < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Dkk < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Eur < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Gbp < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Hkd < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Myr < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Nok < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Nzd < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Pln < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Sek < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Sgd < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end class Usd < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip - attr_reader :fixed_amounts - # Percentages displayed when collecting a tip - attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - attr_reader :smart_tip_threshold + attr_reader :fixed_amounts, :percentages, :smart_tip_threshold end - # Attribute for field aud - attr_reader :aud - # Attribute for field cad - attr_reader :cad - # Attribute for field chf - attr_reader :chf - # Attribute for field czk - attr_reader :czk - # Attribute for field dkk - attr_reader :dkk - # Attribute for field eur - attr_reader :eur - # Attribute for field gbp - attr_reader :gbp - # Attribute for field hkd - attr_reader :hkd - # Attribute for field myr - attr_reader :myr - # Attribute for field nok - attr_reader :nok - # Attribute for field nzd - attr_reader :nzd - # Attribute for field pln - attr_reader :pln - # Attribute for field sek - attr_reader :sek - # Attribute for field sgd - attr_reader :sgd - # Attribute for field usd - attr_reader :usd + attr_reader :aud, :cad, :chf, :czk, :dkk, :eur, :gbp, :hkd, :myr, :nok, :nzd, :pln, :sek, :sgd, :usd end class VerifoneP400 < Stripe::StripeObject - # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end # Attribute for field bbpos_wisepos_e attr_reader :bbpos_wisepos_e - # Unique identifier for the object. attr_reader :id - # Whether this Configuration is the default for your account attr_reader :is_account_default - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String indicating the name of the Configuration object, set by the user attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field offline attr_reader :offline - # Attribute for field reboot_window attr_reader :reboot_window - # Attribute for field stripe_s700 attr_reader :stripe_s700 - # Attribute for field tipping attr_reader :tipping - # Attribute for field verifone_p400 attr_reader :verifone_p400 - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/terminal/connection_token.rb b/lib/stripe/resources/terminal/connection_token.rb index 27f6bc24b..4ed31ccb2 100644 --- a/lib/stripe/resources/terminal/connection_token.rb +++ b/lib/stripe/resources/terminal/connection_token.rb @@ -16,10 +16,8 @@ def self.object_name # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). attr_reader :location - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Your application should pass this token to the Stripe Terminal SDK. attr_reader :secret diff --git a/lib/stripe/resources/terminal/location.rb b/lib/stripe/resources/terminal/location.rb index b5bbfd9e5..b6645ab85 100644 --- a/lib/stripe/resources/terminal/location.rb +++ b/lib/stripe/resources/terminal/location.rb @@ -18,40 +18,22 @@ def self.object_name end class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end # Attribute for field address attr_reader :address - # The ID of a configuration that will be used to customize all readers in this location. attr_reader :configuration_overrides - # The display name of the location. attr_reader :display_name - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index 493b031d6..c57b5f984 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -21,271 +21,117 @@ class Action < Stripe::StripeObject class CollectInputs < Stripe::StripeObject class Input < Stripe::StripeObject class CustomText < Stripe::StripeObject - # Customize the default description for this input - attr_reader :description - # Customize the default label for this input's skip button - attr_reader :skip_button - # Customize the default label for this input's submit button - attr_reader :submit_button - # Customize the default title for this input - attr_reader :title + attr_reader :description, :skip_button, :submit_button, :title end class Email < Stripe::StripeObject - # The collected email address attr_reader :value end class Numeric < Stripe::StripeObject - # The collected number attr_reader :value end class Phone < Stripe::StripeObject - # The collected phone number attr_reader :value end class Selection < Stripe::StripeObject class Choice < Stripe::StripeObject - # The button style for the choice - attr_reader :style - # A value to be selected - attr_reader :value + attr_reader :style, :value end - # List of possible choices to be selected - attr_reader :choices - # The value of the selected choice - attr_reader :value + attr_reader :choices, :value end class Signature < Stripe::StripeObject - # The File ID of a collected signature image attr_reader :value end class Text < Stripe::StripeObject - # The collected text value attr_reader :value end class Toggle < Stripe::StripeObject - # The toggle's default value - attr_reader :default_value - # The toggle's description text - attr_reader :description - # The toggle's title text - attr_reader :title - # The toggle's collected value - attr_reader :value + attr_reader :default_value, :description, :title, :value end - # Default text of input being collected. - attr_reader :custom_text - # Information about a email being collected using a reader - attr_reader :email - # Information about a number being collected using a reader - attr_reader :numeric - # Information about a phone number being collected using a reader - attr_reader :phone - # Indicate that this input is required, disabling the skip button. - attr_reader :required - # Information about a selection being collected using a reader - attr_reader :selection - # Information about a signature being collected using a reader - attr_reader :signature - # Indicate that this input was skipped by the user. - attr_reader :skipped - # Information about text being collected using a reader - attr_reader :text - # List of toggles being collected. Values are present if collection is complete. - attr_reader :toggles - # Type of input being collected. - attr_reader :type + attr_reader :custom_text, :email, :numeric, :phone, :required, :selection, :signature, :skipped, :text, :toggles, :type end - # List of inputs to be collected. - attr_reader :inputs - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - attr_reader :metadata + attr_reader :inputs, :metadata end class CollectPaymentMethod < Stripe::StripeObject class CollectConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject - # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). attr_reader :amount_eligible end - # Enable customer initiated cancellation when processing this payment. - attr_reader :enable_customer_cancellation - # Override showing a tipping selection screen on this transaction. - attr_reader :skip_tipping - # Represents a per-transaction tipping configuration - attr_reader :tipping + attr_reader :enable_customer_cancellation, :skip_tipping, :tipping end - # Represents a per-transaction override of a reader configuration - attr_reader :collect_config - # Most recent PaymentIntent processed by the reader. - attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). - attr_reader :payment_method - # Attribute for field stripe_account - attr_reader :stripe_account + attr_reader :collect_config, :payment_intent, :payment_method, :stripe_account end class ConfirmPaymentIntent < Stripe::StripeObject - # Most recent PaymentIntent processed by the reader. - attr_reader :payment_intent - # Attribute for field stripe_account - attr_reader :stripe_account + attr_reader :payment_intent, :stripe_account end class ProcessPaymentIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject - # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). attr_reader :amount_eligible end - # Enable customer initiated cancellation when processing this payment. - attr_reader :enable_customer_cancellation - # Override showing a tipping selection screen on this transaction. - attr_reader :skip_tipping - # Represents a per-transaction tipping configuration - attr_reader :tipping + attr_reader :enable_customer_cancellation, :skip_tipping, :tipping end - # Most recent PaymentIntent processed by the reader. - attr_reader :payment_intent - # Represents a per-transaction override of a reader configuration - attr_reader :process_config - # Attribute for field stripe_account - attr_reader :stripe_account + attr_reader :payment_intent, :process_config, :stripe_account end class ProcessSetupIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject - # Enable customer initiated cancellation when processing this SetupIntent. attr_reader :enable_customer_cancellation end - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. - attr_reader :generated_card - # Represents a per-setup override of a reader configuration - attr_reader :process_config - # Most recent SetupIntent processed by the reader. - attr_reader :setup_intent + attr_reader :generated_card, :process_config, :setup_intent end class RefundPayment < Stripe::StripeObject class RefundPaymentConfig < Stripe::StripeObject - # Enable customer initiated cancellation when refunding this payment. attr_reader :enable_customer_cancellation end - # The amount being refunded. - attr_reader :amount - # Charge that is being refunded. - attr_reader :charge - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - attr_reader :metadata - # Payment intent that is being refunded. - attr_reader :payment_intent - # The reason for the refund. - attr_reader :reason - # Unique identifier for the refund object. - attr_reader :refund - # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. - attr_reader :refund_application_fee - # Represents a per-transaction override of a reader configuration - attr_reader :refund_payment_config - # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. - attr_reader :reverse_transfer - # Attribute for field stripe_account - attr_reader :stripe_account + attr_reader :amount, :charge, :metadata, :payment_intent, :reason, :refund, :refund_application_fee, :refund_payment_config, :reverse_transfer, :stripe_account end class SetReaderDisplay < Stripe::StripeObject class Cart < Stripe::StripeObject class LineItem < Stripe::StripeObject - # The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :amount - # Description of the line item. - attr_reader :description - # The quantity of the line item. - attr_reader :quantity + attr_reader :amount, :description, :quantity end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - # List of line items in the cart. - attr_reader :line_items - # Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :tax - # Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - attr_reader :total + attr_reader :currency, :line_items, :tax, :total end - # Cart object to be displayed by the reader. - attr_reader :cart - # Type of information to be displayed by the reader. - attr_reader :type + attr_reader :cart, :type end - # Represents a reader action to collect customer inputs - attr_reader :collect_inputs - # Represents a reader action to collect a payment method - attr_reader :collect_payment_method - # Represents a reader action to confirm a payment - attr_reader :confirm_payment_intent - # Failure code, only set if status is `failed`. - attr_reader :failure_code - # Detailed failure message, only set if status is `failed`. - attr_reader :failure_message - # Represents a reader action to process a payment intent - attr_reader :process_payment_intent - # Represents a reader action to process a setup intent - attr_reader :process_setup_intent - # Represents a reader action to refund a payment - attr_reader :refund_payment - # Represents a reader action to set the reader display - attr_reader :set_reader_display - # Status of the action performed by the reader. - attr_reader :status - # Type of action performed by the reader. - attr_reader :type + attr_reader :collect_inputs, :collect_payment_method, :confirm_payment_intent, :failure_code, :failure_message, :process_payment_intent, :process_setup_intent, :refund_payment, :set_reader_display, :status, :type end # The most recent action performed by the reader. attr_reader :action - # The current software version of the reader. attr_reader :device_sw_version - # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. attr_reader :device_type - # Unique identifier for the object. attr_reader :id - # The local IP address of the reader. attr_reader :ip_address - # Custom label given to the reader for easier identification. attr_reader :label - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The location identifier of the reader. attr_reader :location - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Serial number of the reader. attr_reader :serial_number - # The networking status of the reader. We do not recommend using this field in flows that may block taking payments. attr_reader :status - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/terminal/reader_collected_data.rb b/lib/stripe/resources/terminal/reader_collected_data.rb index e890cd496..4f9d1afaa 100644 --- a/lib/stripe/resources/terminal/reader_collected_data.rb +++ b/lib/stripe/resources/terminal/reader_collected_data.rb @@ -11,24 +11,18 @@ def self.object_name end class Magstripe < Stripe::StripeObject - # The raw magstripe data collected by the reader. attr_reader :data end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The magstripe data collected by the reader. attr_reader :magstripe - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The type of data collected by the reader. attr_reader :type end diff --git a/lib/stripe/resources/test_helpers/test_clock.rb b/lib/stripe/resources/test_helpers/test_clock.rb index 9cfd48451..267261301 100644 --- a/lib/stripe/resources/test_helpers/test_clock.rb +++ b/lib/stripe/resources/test_helpers/test_clock.rb @@ -18,39 +18,28 @@ def self.object_name class StatusDetails < Stripe::StripeObject class Advancing < Stripe::StripeObject - # The `frozen_time` that the Test Clock is advancing towards. attr_reader :target_frozen_time end - # Attribute for field advancing attr_reader :advancing end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Time at which this clock is scheduled to auto delete. attr_reader :deletes_after - # Time at which all objects belonging to this clock are frozen. attr_reader :frozen_time - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The custom name supplied at creation. attr_reader :name - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The status of the Test Clock. attr_reader :status - # Attribute for field status_details attr_reader :status_details - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb index 967c7c186..afa3ab24e 100644 --- a/lib/stripe/resources/token.rb +++ b/lib/stripe/resources/token.rb @@ -38,32 +38,24 @@ def self.object_name # # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) attr_reader :bank_account - # You can store multiple cards on a customer in order to charge the customer # later. You can also store multiple debit cards on a recipient in order to # transfer to those cards later. # # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) attr_reader :card - # IP address of the client that generates the token. attr_reader :client_ip - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Type of the token: `account`, `bank_account`, `card`, or `pii`. attr_reader :type - # Determines if you have already used this token (you can only use tokens once). attr_reader :used diff --git a/lib/stripe/resources/topup.rb b/lib/stripe/resources/topup.rb index 82857279f..b3366fb3a 100644 --- a/lib/stripe/resources/topup.rb +++ b/lib/stripe/resources/topup.rb @@ -19,49 +19,34 @@ def self.object_name # Amount transferred. attr_reader :amount - # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. attr_reader :balance_transaction - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. attr_reader :expected_availability_date - # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). attr_reader :failure_code - # Message to user further explaining reason for top-up failure if available. attr_reader :failure_message - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The source field is deprecated. It might not always be present in the API response. attr_reader :source - # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. attr_reader :statement_descriptor - # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. attr_reader :status - # A string that identifies this top-up as part of a group. attr_reader :transfer_group diff --git a/lib/stripe/resources/transfer.rb b/lib/stripe/resources/transfer.rb index 6b37c649a..2473544fa 100644 --- a/lib/stripe/resources/transfer.rb +++ b/lib/stripe/resources/transfer.rb @@ -27,52 +27,36 @@ def self.object_name # Amount in cents (or local equivalent) to be transferred. attr_reader :amount - # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). attr_reader :amount_reversed - # Balance transaction that describes the impact of this transfer on your account balance. attr_reader :balance_transaction - # Time that this record of the transfer was first created. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # ID of the Stripe account the transfer was sent to. attr_reader :destination - # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. attr_reader :destination_payment - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # A list of reversals that have been applied to the transfer. attr_reader :reversals - # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. attr_reader :reversed - # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. attr_reader :source_transaction - # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. attr_reader :source_type - # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. attr_reader :transfer_group diff --git a/lib/stripe/resources/treasury/credit_reversal.rb b/lib/stripe/resources/treasury/credit_reversal.rb index 33444780c..c16a48a7b 100644 --- a/lib/stripe/resources/treasury/credit_reversal.rb +++ b/lib/stripe/resources/treasury/credit_reversal.rb @@ -14,48 +14,34 @@ def self.object_name end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when the CreditReversal changed status to `posted` attr_reader :posted_at end # Amount (in cents) transferred. attr_reader :amount - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The FinancialAccount to reverse funds from. attr_reader :financial_account - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The rails used to reverse the funds. attr_reader :network - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The ReceivedCredit being reversed. attr_reader :received_credit - # Status of the CreditReversal attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/debit_reversal.rb b/lib/stripe/resources/treasury/debit_reversal.rb index f87c5bfe0..394f649e1 100644 --- a/lib/stripe/resources/treasury/debit_reversal.rb +++ b/lib/stripe/resources/treasury/debit_reversal.rb @@ -14,56 +14,40 @@ def self.object_name end class LinkedFlows < Stripe::StripeObject - # Set if there is an Issuing dispute associated with the DebitReversal. attr_reader :issuing_dispute end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when the DebitReversal changed status to `completed`. attr_reader :completed_at end # Amount (in cents) transferred. attr_reader :amount - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # The FinancialAccount to reverse funds from. attr_reader :financial_account - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - # Unique identifier for the object. attr_reader :id - # Other flows linked to a DebitReversal. attr_reader :linked_flows - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # The rails used to reverse the funds. attr_reader :network - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The ReceivedDebit being reversed. attr_reader :received_debit - # Status of the DebitReversal attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/financial_account.rb b/lib/stripe/resources/treasury/financial_account.rb index 275f8c2ff..9e1ba838a 100644 --- a/lib/stripe/resources/treasury/financial_account.rb +++ b/lib/stripe/resources/treasury/financial_account.rb @@ -16,99 +16,59 @@ def self.object_name end class Balance < Stripe::StripeObject - # Funds the user can spend right now. - attr_reader :cash - # Funds not spendable yet, but will become available at a later time. - attr_reader :inbound_pending - # Funds in the account, but not spendable because they are being held for pending outbound flows. - attr_reader :outbound_pending + attr_reader :cash, :inbound_pending, :outbound_pending end class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject - # The name of the person or business that owns the bank account. - attr_reader :account_holder_name - # The account number. - attr_reader :account_number - # The last four characters of the account number. - attr_reader :account_number_last4 - # Name of the bank. - attr_reader :bank_name - # Routing number for the account. - attr_reader :routing_number + attr_reader :account_holder_name, :account_number, :account_number_last4, :bank_name, :routing_number end - # ABA Records contain U.S. bank account details per the ABA format. - attr_reader :aba - # The list of networks that the address supports - attr_reader :supported_networks - # The type of financial address - attr_reader :type + attr_reader :aba, :supported_networks, :type end class PlatformRestrictions < Stripe::StripeObject - # Restricts all inbound money movement. - attr_reader :inbound_flows - # Restricts all outbound money movement. - attr_reader :outbound_flows + attr_reader :inbound_flows, :outbound_flows end class StatusDetails < Stripe::StripeObject class Closed < Stripe::StripeObject - # The array that contains reasons for a FinancialAccount closure. attr_reader :reasons end - # Details related to the closure of this FinancialAccount attr_reader :closed end # The array of paths to active Features in the Features hash. attr_reader :active_features - # Balance information for the FinancialAccount attr_reader :balance - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. attr_reader :display_name - # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. # Stripe or the platform can control Features via the requested field. attr_reader :features - # The set of credentials that resolve to a FinancialAccount. attr_reader :financial_addresses - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The array of paths to pending Features in the Features hash. attr_reader :pending_features - # The set of functionalities that the platform can restrict on the FinancialAccount. attr_reader :platform_restrictions - # The array of paths to restricted Features in the Features hash. attr_reader :restricted_features - # Status of this FinancialAccount. attr_reader :status - # Attribute for field status_details attr_reader :status_details - # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. attr_reader :supported_currencies diff --git a/lib/stripe/resources/treasury/financial_account_features.rb b/lib/stripe/resources/treasury/financial_account_features.rb index 02f159ff0..716dab225 100644 --- a/lib/stripe/resources/treasury/financial_account_features.rb +++ b/lib/stripe/resources/treasury/financial_account_features.rb @@ -13,199 +13,92 @@ def self.object_name class CardIssuing < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :requested, :status, :status_details end class DepositInsurance < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :requested, :status, :status_details end class FinancialAddresses < Stripe::StripeObject class Aba < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Requested bank partner for this Financial Account - attr_reader :bank - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :bank, :requested, :status, :status_details end - # Toggle settings for enabling/disabling the ABA address feature attr_reader :aba end class InboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :requested, :status, :status_details end - # Toggle settings for enabling/disabling an ACH specific feature attr_reader :ach end class IntraStripeFlows < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :requested, :status, :status_details end class OutboundPayments < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :requested, :status, :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :requested, :status, :status_details end - # Toggle settings for enabling/disabling an ACH specific feature - attr_reader :ach - # Toggle settings for enabling/disabling a feature - attr_reader :us_domestic_wire + attr_reader :ach, :us_domestic_wire end class OutboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :requested, :status, :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. - attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. - attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. - attr_reader :restriction + attr_reader :code, :resolution, :restriction end - # Whether the FinancialAccount should have the Feature. - attr_reader :requested - # Whether the Feature is operational. - attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. - attr_reader :status_details + attr_reader :requested, :status, :status_details end - # Toggle settings for enabling/disabling an ACH specific feature - attr_reader :ach - # Toggle settings for enabling/disabling a feature - attr_reader :us_domestic_wire + attr_reader :ach, :us_domestic_wire end # Toggle settings for enabling/disabling a feature attr_reader :card_issuing - # Toggle settings for enabling/disabling a feature attr_reader :deposit_insurance - # Settings related to Financial Addresses features on a Financial Account attr_reader :financial_addresses - # InboundTransfers contains inbound transfers features for a FinancialAccount. attr_reader :inbound_transfers - # Toggle settings for enabling/disabling a feature attr_reader :intra_stripe_flows - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Settings related to Outbound Payments features on a Financial Account attr_reader :outbound_payments - # OutboundTransfers contains outbound transfers features for a FinancialAccount. attr_reader :outbound_transfers end diff --git a/lib/stripe/resources/treasury/inbound_transfer.rb b/lib/stripe/resources/treasury/inbound_transfer.rb index 3deb0bb8f..8053b926c 100644 --- a/lib/stripe/resources/treasury/inbound_transfer.rb +++ b/lib/stripe/resources/treasury/inbound_transfer.rb @@ -16,130 +16,68 @@ def self.object_name end class FailureDetails < Stripe::StripeObject - # Reason for the failure. attr_reader :code end class LinkedFlows < Stripe::StripeObject - # If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. attr_reader :received_debit end class OriginPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # Email address. - attr_reader :email - # Full name. - attr_reader :name + attr_reader :address, :email, :name end class UsBankAccount < Stripe::StripeObject - # Account holder type: individual or company. - attr_reader :account_holder_type - # Account type: checkings or savings. Defaults to checking if omitted. - attr_reader :account_type - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # ID of the mandate used to make this payment. - attr_reader :mandate - # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - attr_reader :network - # Routing number of the bank account. - attr_reader :routing_number + attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number end - # Attribute for field billing_details - attr_reader :billing_details - # The type of the payment method used in the InboundTransfer. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :billing_details, :type, :us_bank_account end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when an InboundTransfer changed status to `canceled`. - attr_reader :canceled_at - # Timestamp describing when an InboundTransfer changed status to `failed`. - attr_reader :failed_at - # Timestamp describing when an InboundTransfer changed status to `succeeded`. - attr_reader :succeeded_at + attr_reader :canceled_at, :failed_at, :succeeded_at end # Amount (in cents) transferred. attr_reader :amount - # Returns `true` if the InboundTransfer is able to be canceled. attr_reader :cancelable - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Details about this InboundTransfer's failure. Only set when status is `failed`. attr_reader :failure_details - # The FinancialAccount that received the funds. attr_reader :financial_account - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - # Unique identifier for the object. attr_reader :id - # Attribute for field linked_flows attr_reader :linked_flows - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The origin payment method to be debited for an InboundTransfer. attr_reader :origin_payment_method - # Details about the PaymentMethod for an InboundTransfer. attr_reader :origin_payment_method_details - # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. attr_reader :returned - # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. attr_reader :statement_descriptor - # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/outbound_payment.rb b/lib/stripe/resources/treasury/outbound_payment.rb index 8878731a5..9e62d2575 100644 --- a/lib/stripe/resources/treasury/outbound_payment.rb +++ b/lib/stripe/resources/treasury/outbound_payment.rb @@ -20,171 +20,85 @@ def self.object_name class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # Email address. - attr_reader :email - # Full name. - attr_reader :name + attr_reader :address, :email, :name end class FinancialAccount < Stripe::StripeObject - # Token of the FinancialAccount. - attr_reader :id - # The rails used to send funds. - attr_reader :network + attr_reader :id, :network end class UsBankAccount < Stripe::StripeObject - # Account holder type: individual or company. - attr_reader :account_holder_type - # Account type: checkings or savings. Defaults to checking if omitted. - attr_reader :account_type - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # ID of the mandate used to make this payment. - attr_reader :mandate - # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - attr_reader :network - # Routing number of the bank account. - attr_reader :routing_number + attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number end - # Attribute for field billing_details - attr_reader :billing_details - # Attribute for field financial_account - attr_reader :financial_account - # The type of the payment method used in the OutboundPayment. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :billing_details, :financial_account, :type, :us_bank_account end class EndUserDetails < Stripe::StripeObject - # IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. - attr_reader :ip_address - # `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. - attr_reader :present + attr_reader :ip_address, :present end class ReturnedDetails < Stripe::StripeObject - # Reason for the return. - attr_reader :code - # The Transaction associated with this object. - attr_reader :transaction + attr_reader :code, :transaction end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when an OutboundPayment changed status to `canceled`. - attr_reader :canceled_at - # Timestamp describing when an OutboundPayment changed status to `failed`. - attr_reader :failed_at - # Timestamp describing when an OutboundPayment changed status to `posted`. - attr_reader :posted_at - # Timestamp describing when an OutboundPayment changed status to `returned`. - attr_reader :returned_at + attr_reader :canceled_at, :failed_at, :posted_at, :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH trace ID of the OutboundPayment for payments sent over the `ach` network. attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject - # CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. - attr_reader :chips - # IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. - attr_reader :imad - # OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. - attr_reader :omad + attr_reader :chips, :imad, :omad end - # Attribute for field ach - attr_reader :ach - # The US bank account network used to send funds. - attr_reader :type - # Attribute for field us_domestic_wire - attr_reader :us_domestic_wire + attr_reader :ach, :type, :us_domestic_wire end # Amount (in cents) transferred. attr_reader :amount - # Returns `true` if the object can be canceled, and `false` otherwise. attr_reader :cancelable - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. attr_reader :customer - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. attr_reader :destination_payment_method - # Details about the PaymentMethod for an OutboundPayment. attr_reader :destination_payment_method_details - # Details about the end user. attr_reader :end_user_details - # The date when funds are expected to arrive in the destination account. attr_reader :expected_arrival_date - # The FinancialAccount that funds were pulled from. attr_reader :financial_account - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Details about a returned OutboundPayment. Only set when the status is `returned`. attr_reader :returned_details - # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). attr_reader :statement_descriptor - # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # Details about network-specific tracking information if available. attr_reader :tracking_details - # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/outbound_transfer.rb b/lib/stripe/resources/treasury/outbound_transfer.rb index 490fd9ccf..96bbc7d31 100644 --- a/lib/stripe/resources/treasury/outbound_transfer.rb +++ b/lib/stripe/resources/treasury/outbound_transfer.rb @@ -20,163 +20,82 @@ def self.object_name class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # Email address. - attr_reader :email - # Full name. - attr_reader :name + attr_reader :address, :email, :name end class UsBankAccount < Stripe::StripeObject - # Account holder type: individual or company. - attr_reader :account_holder_type - # Account type: checkings or savings. Defaults to checking if omitted. - attr_reader :account_type - # Name of the bank associated with the bank account. - attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. - attr_reader :fingerprint - # Last four digits of the bank account number. - attr_reader :last4 - # ID of the mandate used to make this payment. - attr_reader :mandate - # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - attr_reader :network - # Routing number of the bank account. - attr_reader :routing_number + attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number end - # Attribute for field billing_details - attr_reader :billing_details - # The type of the payment method used in the OutboundTransfer. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :billing_details, :type, :us_bank_account end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH Addenda record attr_reader :addenda end - # Details about an ACH transaction. - attr_reader :ach - # The type of flow that originated the OutboundTransfer. - attr_reader :type + attr_reader :ach, :type end class ReturnedDetails < Stripe::StripeObject - # Reason for the return. - attr_reader :code - # The Transaction associated with this object. - attr_reader :transaction + attr_reader :code, :transaction end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when an OutboundTransfer changed status to `canceled` - attr_reader :canceled_at - # Timestamp describing when an OutboundTransfer changed status to `failed` - attr_reader :failed_at - # Timestamp describing when an OutboundTransfer changed status to `posted` - attr_reader :posted_at - # Timestamp describing when an OutboundTransfer changed status to `returned` - attr_reader :returned_at + attr_reader :canceled_at, :failed_at, :posted_at, :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject - # CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. - attr_reader :chips - # IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. - attr_reader :imad - # OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. - attr_reader :omad + attr_reader :chips, :imad, :omad end - # Attribute for field ach - attr_reader :ach - # The US bank account network used to send funds. - attr_reader :type - # Attribute for field us_domestic_wire - attr_reader :us_domestic_wire + attr_reader :ach, :type, :us_domestic_wire end # Amount (in cents) transferred. attr_reader :amount - # Returns `true` if the object can be canceled, and `false` otherwise. attr_reader :cancelable - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # The PaymentMethod used as the payment instrument for an OutboundTransfer. attr_reader :destination_payment_method - # Attribute for field destination_payment_method_details attr_reader :destination_payment_method_details - # The date when funds are expected to arrive in the destination account. attr_reader :expected_arrival_date - # The FinancialAccount that funds were pulled from. attr_reader :financial_account - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # Details about the network used for the OutboundTransfer. attr_reader :network_details - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Details about a returned OutboundTransfer. Only set when the status is `returned`. attr_reader :returned_details - # Information about the OutboundTransfer to be sent to the recipient account. attr_reader :statement_descriptor - # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions - # Details about network-specific tracking information if available. attr_reader :tracking_details - # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/received_credit.rb b/lib/stripe/resources/treasury/received_credit.rb index 635915590..fe157d2c6 100644 --- a/lib/stripe/resources/treasury/received_credit.rb +++ b/lib/stripe/resources/treasury/received_credit.rb @@ -15,157 +15,70 @@ def self.object_name class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # Email address. - attr_reader :email - # Full name. - attr_reader :name + attr_reader :address, :email, :name end class FinancialAccount < Stripe::StripeObject - # The FinancialAccount ID. - attr_reader :id - # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. - attr_reader :network + attr_reader :id, :network end class UsBankAccount < Stripe::StripeObject - # Bank name. - attr_reader :bank_name - # The last four digits of the bank account number. - attr_reader :last4 - # The routing number for the bank account. - attr_reader :routing_number + attr_reader :bank_name, :last4, :routing_number end - # Set when `type` is `balance`. - attr_reader :balance - # Attribute for field billing_details - attr_reader :billing_details - # Attribute for field financial_account - attr_reader :financial_account - # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. - attr_reader :issuing_card - # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :balance, :billing_details, :financial_account, :issuing_card, :type, :us_bank_account end class LinkedFlows < Stripe::StripeObject class SourceFlowDetails < Stripe::StripeObject - # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. - attr_reader :credit_reversal - # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). - # - # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) - attr_reader :outbound_payment - # A `Payout` object is created when you receive funds from Stripe, or when you - # initiate a payout to either a bank account or debit card of a [connected - # Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, - # and list all payouts. Payouts are made on [varying - # schedules](/docs/connect/manage-payout-schedule), depending on your country and - # industry. - # - # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) - attr_reader :payout - # The type of the source flow that originated the ReceivedCredit. - attr_reader :type + attr_reader :credit_reversal, :outbound_payment, :payout, :type end - # The CreditReversal created as a result of this ReceivedCredit being reversed. - attr_reader :credit_reversal - # Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. - attr_reader :issuing_authorization - # Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. - attr_reader :issuing_transaction - # ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. - attr_reader :source_flow - # The expandable object of the source flow. - attr_reader :source_flow_details - # The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). - attr_reader :source_flow_type + attr_reader :credit_reversal, :issuing_authorization, :issuing_transaction, :source_flow, :source_flow_details, :source_flow_type end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH Addenda record attr_reader :addenda end - # Details about an ACH transaction. - attr_reader :ach - # The type of flow that originated the ReceivedCredit. - attr_reader :type + attr_reader :ach, :type end class ReversalDetails < Stripe::StripeObject - # Time before which a ReceivedCredit can be reversed. - attr_reader :deadline - # Set if a ReceivedCredit cannot be reversed. - attr_reader :restricted_reason + attr_reader :deadline, :restricted_reason end # Amount (in cents) transferred. attr_reader :amount - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. attr_reader :failure_code - # The FinancialAccount that received the funds. attr_reader :financial_account - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - # Unique identifier for the object. attr_reader :id - # Attribute for field initiating_payment_method_details attr_reader :initiating_payment_method_details - # Attribute for field linked_flows attr_reader :linked_flows - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The rails used to send the funds. attr_reader :network - # Details specific to the money movement rails. attr_reader :network_details - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Details describing when a ReceivedCredit may be reversed. attr_reader :reversal_details - # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. attr_reader :status - # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/received_debit.rb b/lib/stripe/resources/treasury/received_debit.rb index f89784ebf..7fb18fa1a 100644 --- a/lib/stripe/resources/treasury/received_debit.rb +++ b/lib/stripe/resources/treasury/received_debit.rb @@ -15,136 +15,67 @@ def self.object_name class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. - attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). - attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). - attr_reader :line2 - # ZIP or postal code. - attr_reader :postal_code - # State, county, province, or region. - attr_reader :state + attr_reader :city, :country, :line1, :line2, :postal_code, :state end - # Attribute for field address - attr_reader :address - # Email address. - attr_reader :email - # Full name. - attr_reader :name + attr_reader :address, :email, :name end class FinancialAccount < Stripe::StripeObject - # The FinancialAccount ID. - attr_reader :id - # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. - attr_reader :network + attr_reader :id, :network end class UsBankAccount < Stripe::StripeObject - # Bank name. - attr_reader :bank_name - # The last four digits of the bank account number. - attr_reader :last4 - # The routing number for the bank account. - attr_reader :routing_number + attr_reader :bank_name, :last4, :routing_number end - # Set when `type` is `balance`. - attr_reader :balance - # Attribute for field billing_details - attr_reader :billing_details - # Attribute for field financial_account - attr_reader :financial_account - # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. - attr_reader :issuing_card - # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. - attr_reader :type - # Attribute for field us_bank_account - attr_reader :us_bank_account + attr_reader :balance, :billing_details, :financial_account, :issuing_card, :type, :us_bank_account end class LinkedFlows < Stripe::StripeObject - # The DebitReversal created as a result of this ReceivedDebit being reversed. - attr_reader :debit_reversal - # Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. - attr_reader :inbound_transfer - # Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. - attr_reader :issuing_authorization - # Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. - attr_reader :issuing_transaction - # Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. - attr_reader :payout - # The ReceivedCredit that Capital withheld from - attr_reader :received_credit_capital_withholding + attr_reader :debit_reversal, :inbound_transfer, :issuing_authorization, :issuing_transaction, :payout, :received_credit_capital_withholding end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH Addenda record attr_reader :addenda end - # Details about an ACH transaction. - attr_reader :ach - # The type of flow that originated the ReceivedDebit. - attr_reader :type + attr_reader :ach, :type end class ReversalDetails < Stripe::StripeObject - # Time before which a ReceivedDebit can be reversed. - attr_reader :deadline - # Set if a ReceivedDebit can't be reversed. - attr_reader :restricted_reason + attr_reader :deadline, :restricted_reason end # Amount (in cents) transferred. attr_reader :amount - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. attr_reader :failure_code - # The FinancialAccount that funds were pulled from. attr_reader :financial_account - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - # Unique identifier for the object. attr_reader :id - # Attribute for field initiating_payment_method_details attr_reader :initiating_payment_method_details - # Attribute for field linked_flows attr_reader :linked_flows - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # The network used for the ReceivedDebit. attr_reader :network - # Details specific to the money movement rails. attr_reader :network_details - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Details describing when a ReceivedDebit might be reversed. attr_reader :reversal_details - # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. attr_reader :status - # The Transaction associated with this object. attr_reader :transaction diff --git a/lib/stripe/resources/treasury/transaction.rb b/lib/stripe/resources/treasury/transaction.rb index 3d2dbf77f..5ec9f7c4d 100644 --- a/lib/stripe/resources/treasury/transaction.rb +++ b/lib/stripe/resources/treasury/transaction.rb @@ -13,97 +13,44 @@ def self.object_name end class BalanceImpact < Stripe::StripeObject - # The change made to funds the user can spend right now. - attr_reader :cash - # The change made to funds that are not spendable yet, but will become available at a later time. - attr_reader :inbound_pending - # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. - attr_reader :outbound_pending + attr_reader :cash, :inbound_pending, :outbound_pending end class FlowDetails < Stripe::StripeObject - # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. - attr_reader :credit_reversal - # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. - attr_reader :debit_reversal - # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. - # - # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) - attr_reader :inbound_transfer - # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` - # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the - # purchase to be completed successfully. - # - # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) - attr_reader :issuing_authorization - # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). - # - # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) - attr_reader :outbound_payment - # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. - # - # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) - attr_reader :outbound_transfer - # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. - attr_reader :received_credit - # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. - attr_reader :received_debit - # Type of the flow that created the Transaction. Set to the same value as `flow_type`. - attr_reader :type + attr_reader :credit_reversal, :debit_reversal, :inbound_transfer, :issuing_authorization, :outbound_payment, :outbound_transfer, :received_credit, :received_debit, :type end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when the Transaction changed status to `posted`. - attr_reader :posted_at - # Timestamp describing when the Transaction changed status to `void`. - attr_reader :void_at + attr_reader :posted_at, :void_at end # Amount (in cents) transferred. attr_reader :amount - # Change to a FinancialAccount's balance attr_reader :balance_impact - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. attr_reader :entries - # The FinancialAccount associated with this object. attr_reader :financial_account - # ID of the flow that created the Transaction. attr_reader :flow - # Details of the flow that created the Transaction. attr_reader :flow_details - # Type of the flow that created the Transaction. attr_reader :flow_type - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Status of the Transaction. attr_reader :status - # Attribute for field status_transitions attr_reader :status_transitions diff --git a/lib/stripe/resources/treasury/transaction_entry.rb b/lib/stripe/resources/treasury/transaction_entry.rb index 81f724ac9..a5d49a33c 100644 --- a/lib/stripe/resources/treasury/transaction_entry.rb +++ b/lib/stripe/resources/treasury/transaction_entry.rb @@ -13,84 +13,36 @@ def self.object_name end class BalanceImpact < Stripe::StripeObject - # The change made to funds the user can spend right now. - attr_reader :cash - # The change made to funds that are not spendable yet, but will become available at a later time. - attr_reader :inbound_pending - # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. - attr_reader :outbound_pending + attr_reader :cash, :inbound_pending, :outbound_pending end class FlowDetails < Stripe::StripeObject - # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. - attr_reader :credit_reversal - # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. - attr_reader :debit_reversal - # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. - # - # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) - attr_reader :inbound_transfer - # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` - # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the - # purchase to be completed successfully. - # - # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) - attr_reader :issuing_authorization - # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). - # - # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) - attr_reader :outbound_payment - # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. - # - # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) - attr_reader :outbound_transfer - # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. - attr_reader :received_credit - # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. - attr_reader :received_debit - # Type of the flow that created the Transaction. Set to the same value as `flow_type`. - attr_reader :type + attr_reader :credit_reversal, :debit_reversal, :inbound_transfer, :issuing_authorization, :outbound_payment, :outbound_transfer, :received_credit, :received_debit, :type end # Change to a FinancialAccount's balance attr_reader :balance_impact - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - # When the TransactionEntry will impact the FinancialAccount's balance. attr_reader :effective_at - # The FinancialAccount associated with this object. attr_reader :financial_account - # Token of the flow associated with the TransactionEntry. attr_reader :flow - # Details of the flow associated with the TransactionEntry. attr_reader :flow_details - # Type of the flow associated with the TransactionEntry. attr_reader :flow_type - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The Transaction associated with this object. attr_reader :transaction - # The specific money movement that generated the TransactionEntry. attr_reader :type diff --git a/lib/stripe/resources/usage_record.rb b/lib/stripe/resources/usage_record.rb index 4ee5ee93c..a3b235383 100644 --- a/lib/stripe/resources/usage_record.rb +++ b/lib/stripe/resources/usage_record.rb @@ -16,19 +16,14 @@ def self.object_name # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The usage quantity for the specified date. attr_reader :quantity - # The ID of the subscription item this usage record contains data for. attr_reader :subscription_item - # The timestamp when this usage occurred. attr_reader :timestamp end diff --git a/lib/stripe/resources/usage_record_summary.rb b/lib/stripe/resources/usage_record_summary.rb index 10c875ee3..78e1fb4af 100644 --- a/lib/stripe/resources/usage_record_summary.rb +++ b/lib/stripe/resources/usage_record_summary.rb @@ -10,29 +10,20 @@ def self.object_name end class Period < Stripe::StripeObject - # The end date of this usage period. All usage up to and including this point in time is included. - attr_reader :end - # The start date of this usage period. All usage after this point in time is included. - attr_reader :start + attr_reader :end, :start end # Unique identifier for the object. attr_reader :id - # The invoice in which this usage period has been billed for. attr_reader :invoice - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # Attribute for field period attr_reader :period - # The ID of the subscription item this summary is describing. attr_reader :subscription_item - # The total usage within this usage period. attr_reader :total_usage end diff --git a/lib/stripe/resources/v2/billing/meter_event.rb b/lib/stripe/resources/v2/billing/meter_event.rb index 4828d3b59..108f37f4b 100644 --- a/lib/stripe/resources/v2/billing/meter_event.rb +++ b/lib/stripe/resources/v2/billing/meter_event.rb @@ -13,24 +13,18 @@ def self.object_name # The creation time of this meter event. attr_reader :created - # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name - # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. attr_reader :identifier - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - # The payload of the event. This must contain the fields corresponding to a meter’s # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and # `value_settings.event_payload_key` (default is `value`). Read more about the payload. attr_reader :payload - # The time of the event. Must be within the past 35 calendar days or up to # 5 minutes in the future. Defaults to current timestamp if not specified. attr_reader :timestamp diff --git a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb index 85c44b302..6a2ce37f8 100644 --- a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +++ b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb @@ -11,30 +11,22 @@ def self.object_name end class Cancel < Stripe::StripeObject - # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. attr_reader :identifier end # Specifies which event to cancel. attr_reader :cancel - # The time the adjustment was created. attr_reader :created - # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name - # The unique id of this meter event adjustment. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - # Open Enum. The meter event adjustment’s status. attr_reader :status - # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. attr_reader :type end diff --git a/lib/stripe/resources/v2/billing/meter_event_session.rb b/lib/stripe/resources/v2/billing/meter_event_session.rb index 295dfe22e..b3c713557 100644 --- a/lib/stripe/resources/v2/billing/meter_event_session.rb +++ b/lib/stripe/resources/v2/billing/meter_event_session.rb @@ -13,19 +13,14 @@ def self.object_name # The authentication token for this session. Use this token when calling the # high-throughput meter event API. attr_reader :authentication_token - # The creation time of this session. attr_reader :created - # The time at which this session will expire. attr_reader :expires_at - # The unique id of this auth session. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object end diff --git a/lib/stripe/resources/v2/event.rb b/lib/stripe/resources/v2/event.rb index da00e6243..2746c4bf4 100644 --- a/lib/stripe/resources/v2/event.rb +++ b/lib/stripe/resources/v2/event.rb @@ -11,34 +11,22 @@ def self.object_name class Reason < Stripe::StripeObject class Request < Stripe::StripeObject - # ID of the API request that caused the event. - attr_reader :id - # The idempotency key transmitted during the request. - attr_reader :idempotency_key + attr_reader :id, :idempotency_key end - # Event reason type. - attr_reader :type - # Information on the API request that instigated the event. - attr_reader :request + attr_reader :type, :request end # Authentication context needed to fetch the event or related object. attr_reader :context - # Time at which the object was created. attr_reader :created - # Unique identifier for the event. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - # Reason for the event. attr_reader :reason - # The type of the event. attr_reader :type end diff --git a/lib/stripe/resources/v2/event_destination.rb b/lib/stripe/resources/v2/event_destination.rb index 060914691..a32bff467 100644 --- a/lib/stripe/resources/v2/event_destination.rb +++ b/lib/stripe/resources/v2/event_destination.rb @@ -11,76 +11,50 @@ def self.object_name class StatusDetails < Stripe::StripeObject class Disabled < Stripe::StripeObject - # Reason event destination has been disabled. attr_reader :reason end - # Details about why the event destination has been disabled. attr_reader :disabled end class AmazonEventbridge < Stripe::StripeObject - # The AWS account ID. - attr_reader :aws_account_id - # The ARN of the AWS event source. - attr_reader :aws_event_source_arn - # The state of the AWS event source. - attr_reader :aws_event_source_status + attr_reader :aws_account_id, :aws_event_source_arn, :aws_event_source_status end class WebhookEndpoint < Stripe::StripeObject - # The signing secret of the webhook endpoint, only includable on creation. - attr_reader :signing_secret - # The URL of the webhook endpoint, includable. - attr_reader :url + attr_reader :signing_secret, :url end # Time at which the object was created. attr_reader :created - # An optional description of what the event destination is used for. attr_reader :description - # The list of events to enable for this endpoint. attr_reader :enabled_events - # Payload type of events being subscribed to. attr_reader :event_payload - # Where events should be routed from. attr_reader :events_from - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Metadata. attr_reader :metadata - # Event destination name. attr_reader :name - # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - # If using the snapshot event payload, the API version events are rendered as. attr_reader :snapshot_api_version - # Status. It can be set to either enabled or disabled. attr_reader :status - # Additional information about event destination status. attr_reader :status_details - # Event destination type. attr_reader :type - # Time at which the object was last updated. attr_reader :updated - # Amazon EventBridge configuration. attr_reader :amazon_eventbridge - # Webhook endpoint configuration. attr_reader :webhook_endpoint end diff --git a/lib/stripe/resources/webhook_endpoint.rb b/lib/stripe/resources/webhook_endpoint.rb index c5a6eb774..ae594fb04 100644 --- a/lib/stripe/resources/webhook_endpoint.rb +++ b/lib/stripe/resources/webhook_endpoint.rb @@ -22,40 +22,28 @@ def self.object_name # The API version events are rendered as for this webhook endpoint. attr_reader :api_version - # The ID of the associated Connect application. attr_reader :application - # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - # An optional description of what the webhook is used for. attr_reader :description - # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. attr_reader :enabled_events - # Unique identifier for the object. attr_reader :id - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value. attr_reader :object - # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. attr_reader :secret - # The status of the webhook. It can be `enabled` or `disabled`. attr_reader :status - # The URL of the webhook endpoint. attr_reader :url - # Always true for a deleted object attr_reader :deleted diff --git a/lib/stripe/services/billing/credit_balance_summary_service.rb b/lib/stripe/services/billing/credit_balance_summary_service.rb index b86ad906b..8ddc26271 100644 --- a/lib/stripe/services/billing/credit_balance_summary_service.rb +++ b/lib/stripe/services/billing/credit_balance_summary_service.rb @@ -4,7 +4,7 @@ module Stripe module Billing class CreditBalanceSummaryService < StripeService - # Retrieves the credit balance summary for a customer + # Retrieves the credit balance summary for a customer. def retrieve(params = {}, opts = {}) request( method: :get, diff --git a/lib/stripe/services/billing/credit_balance_transaction_service.rb b/lib/stripe/services/billing/credit_balance_transaction_service.rb index 399f880d3..7bba1bf45 100644 --- a/lib/stripe/services/billing/credit_balance_transaction_service.rb +++ b/lib/stripe/services/billing/credit_balance_transaction_service.rb @@ -4,7 +4,7 @@ module Stripe module Billing class CreditBalanceTransactionService < StripeService - # Retrieve a list of credit balance transactions + # Retrieve a list of credit balance transactions. def list(params = {}, opts = {}) request( method: :get, @@ -15,7 +15,7 @@ def list(params = {}, opts = {}) ) end - # Retrieves a credit balance transaction + # Retrieves a credit balance transaction. def retrieve(id, params = {}, opts = {}) request( method: :get, diff --git a/lib/stripe/services/billing/credit_grant_service.rb b/lib/stripe/services/billing/credit_grant_service.rb index 78a92b1b1..ccb7414b0 100644 --- a/lib/stripe/services/billing/credit_grant_service.rb +++ b/lib/stripe/services/billing/credit_grant_service.rb @@ -4,7 +4,7 @@ module Stripe module Billing class CreditGrantService < StripeService - # Creates a credit grant + # Creates a credit grant. def create(params = {}, opts = {}) request( method: :post, @@ -37,7 +37,7 @@ def list(params = {}, opts = {}) ) end - # Retrieves a credit grant + # Retrieves a credit grant. def retrieve(id, params = {}, opts = {}) request( method: :get, @@ -48,7 +48,7 @@ def retrieve(id, params = {}, opts = {}) ) end - # Updates a credit grant + # Updates a credit grant. def update(id, params = {}, opts = {}) request( method: :post, diff --git a/lib/stripe/services/billing/meter_event_adjustment_service.rb b/lib/stripe/services/billing/meter_event_adjustment_service.rb index 147b8c0d0..f38e0d9ac 100644 --- a/lib/stripe/services/billing/meter_event_adjustment_service.rb +++ b/lib/stripe/services/billing/meter_event_adjustment_service.rb @@ -4,7 +4,7 @@ module Stripe module Billing class MeterEventAdjustmentService < StripeService - # Creates a billing meter event adjustment + # Creates a billing meter event adjustment. def create(params = {}, opts = {}) request( method: :post, diff --git a/lib/stripe/services/billing/meter_event_service.rb b/lib/stripe/services/billing/meter_event_service.rb index d12445ce0..bf67a6529 100644 --- a/lib/stripe/services/billing/meter_event_service.rb +++ b/lib/stripe/services/billing/meter_event_service.rb @@ -4,7 +4,7 @@ module Stripe module Billing class MeterEventService < StripeService - # Creates a billing meter event + # Creates a billing meter event. def create(params = {}, opts = {}) request( method: :post, diff --git a/lib/stripe/services/billing/meter_service.rb b/lib/stripe/services/billing/meter_service.rb index dbb2d2f49..6d9001393 100644 --- a/lib/stripe/services/billing/meter_service.rb +++ b/lib/stripe/services/billing/meter_service.rb @@ -11,7 +11,7 @@ def initialize(requestor) @event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor) end - # Creates a billing meter + # Creates a billing meter. def create(params = {}, opts = {}) request( method: :post, @@ -22,7 +22,7 @@ def create(params = {}, opts = {}) ) end - # Deactivates a billing meter + # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. def deactivate(id, params = {}, opts = {}) request( method: :post, @@ -44,7 +44,7 @@ def list(params = {}, opts = {}) ) end - # Reactivates a billing meter + # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. def reactivate(id, params = {}, opts = {}) request( method: :post, @@ -55,7 +55,7 @@ def reactivate(id, params = {}, opts = {}) ) end - # Retrieves a billing meter given an ID + # Retrieves a billing meter given an ID. def retrieve(id, params = {}, opts = {}) request( method: :get, @@ -66,7 +66,7 @@ def retrieve(id, params = {}, opts = {}) ) end - # Updates a billing meter + # Updates a billing meter. def update(id, params = {}, opts = {}) request( method: :post, diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index e4a909925..031d7b4bd 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -18,911 +18,652 @@ module Stripe class Account < APIResource class BusinessProfile < Stripe::StripeObject class AnnualRevenue < Stripe::StripeObject - # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency - # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. sig { returns(T.nilable(String)) } attr_reader :fiscal_year_end end class MonthlyEstimatedRevenue < Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end class SupportAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # The applicant's gross annual revenue for its preceding fiscal year. sig { returns(T.nilable(AnnualRevenue)) } attr_reader :annual_revenue - # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. sig { returns(T.nilable(Integer)) } attr_reader :estimated_worker_count - # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. sig { returns(T.nilable(String)) } attr_reader :mcc - # Attribute for field monthly_estimated_revenue sig { returns(MonthlyEstimatedRevenue) } attr_reader :monthly_estimated_revenue - # The customer-facing business name. sig { returns(T.nilable(String)) } attr_reader :name - # Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. sig { returns(T.nilable(String)) } attr_reader :product_description - # A publicly available mailing address for sending support issues to. sig { returns(T.nilable(SupportAddress)) } attr_reader :support_address - # A publicly available email address for sending support issues to. sig { returns(T.nilable(String)) } attr_reader :support_email - # A publicly available phone number to call with support issues. sig { returns(T.nilable(String)) } attr_reader :support_phone - # A publicly available website for handling support issues. sig { returns(T.nilable(String)) } attr_reader :support_url - # The business's publicly available website. sig { returns(T.nilable(String)) } attr_reader :url end class Capabilities < Stripe::StripeObject - # The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. sig { returns(String) } attr_reader :acss_debit_payments - # The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. sig { returns(String) } attr_reader :affirm_payments - # The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. sig { returns(String) } attr_reader :afterpay_clearpay_payments - # The status of the Alma capability of the account, or whether the account can directly process Alma payments. sig { returns(String) } attr_reader :alma_payments - # The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. sig { returns(String) } attr_reader :amazon_pay_payments - # The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. sig { returns(String) } attr_reader :au_becs_debit_payments - # The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. + sig { returns(String) } + attr_reader :automatic_indirect_tax sig { returns(String) } attr_reader :bacs_debit_payments - # The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. sig { returns(String) } attr_reader :bancontact_payments - # The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. sig { returns(String) } attr_reader :bank_transfer_payments - # The status of the blik payments capability of the account, or whether the account can directly process blik charges. sig { returns(String) } attr_reader :blik_payments - # The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. sig { returns(String) } attr_reader :boleto_payments - # The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards sig { returns(String) } attr_reader :card_issuing - # The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. sig { returns(String) } attr_reader :card_payments - # The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. sig { returns(String) } attr_reader :cartes_bancaires_payments - # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. sig { returns(String) } attr_reader :cashapp_payments - # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. sig { returns(String) } attr_reader :eps_payments - # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. sig { returns(String) } attr_reader :fpx_payments - # The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. sig { returns(String) } attr_reader :gb_bank_transfer_payments - # The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. sig { returns(String) } attr_reader :giropay_payments - # The status of the Gopay capability of the account, or whether the account can directly process Gopay payments. sig { returns(String) } attr_reader :gopay_payments - # The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. sig { returns(String) } attr_reader :grabpay_payments - # The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges. sig { returns(String) } attr_reader :id_bank_transfer_payments - # The status of Bank BCA onboarding of the account. sig { returns(String) } attr_reader :id_bank_transfer_payments_bca - # The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. sig { returns(String) } attr_reader :ideal_payments - # The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. sig { returns(String) } attr_reader :india_international_payments - # The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. sig { returns(String) } attr_reader :jcb_payments - # The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. sig { returns(String) } attr_reader :jp_bank_transfer_payments - # The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. sig { returns(String) } attr_reader :kakao_pay_payments - # The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. sig { returns(String) } attr_reader :klarna_payments - # The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. sig { returns(String) } attr_reader :konbini_payments - # The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. sig { returns(String) } attr_reader :kr_card_payments - # The status of the legacy payments capability of the account. sig { returns(String) } attr_reader :legacy_payments - # The status of the link_payments capability of the account, or whether the account can directly process Link charges. sig { returns(String) } attr_reader :link_payments - # The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. sig { returns(String) } attr_reader :mb_way_payments - # The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. sig { returns(String) } attr_reader :mobilepay_payments - # The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. sig { returns(String) } attr_reader :multibanco_payments - # The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. sig { returns(String) } attr_reader :mx_bank_transfer_payments - # The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. sig { returns(String) } attr_reader :naver_pay_payments - # The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. sig { returns(String) } attr_reader :oxxo_payments - # The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. sig { returns(String) } attr_reader :p24_payments - # The status of the Payco capability of the account, or whether the account can directly process Payco payments. sig { returns(String) } attr_reader :payco_payments - # The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. sig { returns(String) } attr_reader :paynow_payments - # The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges. sig { returns(String) } attr_reader :paypal_payments - # The status of the PayTo capability of the account, or whether the account can directly process PayTo charges. sig { returns(String) } attr_reader :payto_payments - # The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. sig { returns(String) } attr_reader :promptpay_payments - # The status of the Qris capability of the account, or whether the account can directly process Qris payments. sig { returns(String) } attr_reader :qris_payments - # The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments. sig { returns(String) } attr_reader :rechnung_payments - # The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. sig { returns(String) } attr_reader :revolut_pay_payments - # The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. sig { returns(String) } attr_reader :samsung_pay_payments - # The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. sig { returns(String) } attr_reader :sepa_bank_transfer_payments - # The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. sig { returns(String) } attr_reader :sepa_debit_payments - # The status of the ShopeePay capability of the account, or whether the account can directly process ShopeePay payments. sig { returns(String) } attr_reader :shopeepay_payments - # The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. sig { returns(String) } attr_reader :sofort_payments - # The status of the Swish capability of the account, or whether the account can directly process Swish payments. sig { returns(String) } attr_reader :swish_payments - # The status of the tax reporting 1099-K (US) capability of the account. sig { returns(String) } attr_reader :tax_reporting_us_1099_k - # The status of the tax reporting 1099-MISC (US) capability of the account. sig { returns(String) } attr_reader :tax_reporting_us_1099_misc - # The status of the transfers capability of the account, or whether your platform can transfer funds to the account. sig { returns(String) } attr_reader :transfers - # The status of the banking capability, or whether the account can have bank accounts. sig { returns(String) } attr_reader :treasury - # The status of the treasury_evolve capability of the account. sig { returns(String) } attr_reader :treasury_evolve - # The status of the treasury_fifth_third capability of the account. sig { returns(String) } attr_reader :treasury_fifth_third - # The status of the treasury_goldman_sachs capability of the account. sig { returns(String) } attr_reader :treasury_goldman_sachs - # The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. sig { returns(String) } attr_reader :twint_payments - # The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. sig { returns(String) } attr_reader :us_bank_account_ach_payments - # The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. sig { returns(String) } attr_reader :us_bank_transfer_payments - # The status of the Zip capability of the account, or whether the account can directly process Zip charges. sig { returns(String) } attr_reader :zip_payments end class Company < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressKana < Stripe::StripeObject - # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 - # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state - # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class AddressKanji < Stripe::StripeObject - # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 - # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state - # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class OwnershipDeclaration < Stripe::StripeObject - # The Unix timestamp marking when the beneficial owner attestation was made. sig { returns(T.nilable(Integer)) } attr_reader :date - # The IP address from which the beneficial owner attestation was made. sig { returns(T.nilable(String)) } attr_reader :ip - # The user-agent string from the browser where the beneficial owner attestation was made. sig { returns(T.nilable(String)) } attr_reader :user_agent end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject - # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back - # A user-displayable string describing the verification state of this document. sig { returns(T.nilable(String)) } attr_reader :details - # One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code - # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end - # Attribute for field document sig { returns(Document) } attr_reader :document end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The Kana variation of the company's primary address (Japan only). sig { returns(T.nilable(AddressKana)) } attr_reader :address_kana - # The Kanji variation of the company's primary address (Japan only). sig { returns(T.nilable(AddressKanji)) } attr_reader :address_kanji - # Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). sig { returns(T::Boolean) } attr_reader :directors_provided - # Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. sig { returns(T::Boolean) } attr_reader :executives_provided - # The export license ID number of the company, also referred as Import Export Code (India only). sig { returns(String) } attr_reader :export_license_id - # The purpose code to use for export transactions (India only). sig { returns(String) } attr_reader :export_purpose_code - # The company's legal name. sig { returns(T.nilable(String)) } attr_reader :name - # The Kana variation of the company's legal name (Japan only). sig { returns(T.nilable(String)) } attr_reader :name_kana - # The Kanji variation of the company's legal name (Japan only). sig { returns(T.nilable(String)) } attr_reader :name_kanji - # Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). sig { returns(T::Boolean) } attr_reader :owners_provided - # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. sig { returns(T.nilable(OwnershipDeclaration)) } attr_reader :ownership_declaration - # The company's phone number (used for verification). sig { returns(T.nilable(String)) } attr_reader :phone - # The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. sig { returns(String) } attr_reader :structure - # Whether the company's business ID number was provided. sig { returns(T::Boolean) } attr_reader :tax_id_provided - # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). sig { returns(String) } attr_reader :tax_id_registrar - # Whether the company's business VAT number was provided. sig { returns(T::Boolean) } attr_reader :vat_id_provided - # Information on the verification state of the company. sig { returns(T.nilable(Verification)) } attr_reader :verification end class Controller < Stripe::StripeObject class Application < Stripe::StripeObject - # `true` if the Connect application is responsible for negative balances and should manage credit and fraud risk on the account. sig { returns(T::Boolean) } attr_reader :loss_liable - # `true` if the Connect application is responsible for onboarding the account. sig { returns(T::Boolean) } attr_reader :onboarding_owner - # `true` if the Connect application is responsible for paying Stripe fees on pricing-control eligible products. sig { returns(T::Boolean) } attr_reader :pricing_controls end class Dashboard < Stripe::StripeObject - # Whether this account has access to the full Stripe dashboard (`full`), to the Express dashboard (`express`), or to no dashboard (`none`). sig { returns(String) } attr_reader :type end class Fees < Stripe::StripeObject - # A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). sig { returns(String) } attr_reader :payer end class Losses < Stripe::StripeObject - # A value indicating who is liable when this account can't pay back negative balances from payments. sig { returns(String) } attr_reader :payments end class StripeDashboard < Stripe::StripeObject - # A value indicating the Stripe dashboard this account has access to independent of the Connect application. sig { returns(String) } attr_reader :type end - # Attribute for field application sig { returns(Application) } attr_reader :application - # Attribute for field dashboard sig { returns(Dashboard) } attr_reader :dashboard - # Attribute for field fees sig { returns(Fees) } attr_reader :fees - # `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. sig { returns(T::Boolean) } attr_reader :is_controller - # Attribute for field losses sig { returns(Losses) } attr_reader :losses - # A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. sig { returns(String) } attr_reader :requirement_collection - # Attribute for field stripe_dashboard sig { returns(StripeDashboard) } attr_reader :stripe_dashboard - # The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. sig { returns(String) } attr_reader :type end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. sig { returns(String) } attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives - # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline - # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due - # This is typed as an enum for consistency with `requirements.disabled_reason`. sig { returns(T.nilable(String)) } attr_reader :disabled_reason - # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. sig { returns(T.nilable(T::Array[String])) } attr_reader :eventually_due - # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class Groups < Stripe::StripeObject - # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. sig { returns(T.nilable(String)) } attr_reader :payments_pricing end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. sig { returns(String) } attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives - # Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline - # Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due - # If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). sig { returns(T.nilable(String)) } attr_reader :disabled_reason - # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. sig { returns(T.nilable(T::Array[String])) } attr_reader :eventually_due - # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class RiskControls < Stripe::StripeObject class Charges < Stripe::StripeObject - # Whether a pause of the risk control has been requested. sig { returns(T::Boolean) } attr_reader :pause_requested end class Payouts < Stripe::StripeObject - # Whether a pause of the risk control has been requested. sig { returns(T::Boolean) } attr_reader :pause_requested end - # Attribute for field charges sig { returns(Charges) } attr_reader :charges - # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts end class Settings < Stripe::StripeObject class BacsDebitPayments < Stripe::StripeObject - # The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. sig { returns(T.nilable(String)) } attr_reader :display_name - # The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. sig { returns(T.nilable(String)) } attr_reader :service_user_number end class BankBcaOnboarding < Stripe::StripeObject - # Bank BCA business account holder name. sig { returns(String) } attr_reader :account_holder_name - # Bank BCA business account number. sig { returns(String) } attr_reader :business_account_number end class Branding < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :icon - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :logo - # A CSS hex color value representing the primary branding color for this account sig { returns(T.nilable(String)) } attr_reader :primary_color - # A CSS hex color value representing the secondary branding color for this account sig { returns(T.nilable(String)) } attr_reader :secondary_color end class Capital < Stripe::StripeObject - # Per-currency mapping of user-selected destination accounts used to pay out loans. sig { returns(T::Hash[String, String]) } attr_reader :payout_destination - # Per-currency mapping of all destination accounts eligible to receive loan payouts. sig { returns(T::Hash[String, T::Array[String]]) } attr_reader :payout_destination_selector end class CardIssuing < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject - # The Unix timestamp marking when the account representative accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date - # The IP address from which the account representative accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip - # The user agent of the browser from which the account representative accepted the service agreement. sig { returns(String) } attr_reader :user_agent end - # Attribute for field tos_acceptance sig { returns(TosAcceptance) } attr_reader :tos_acceptance end class CardPayments < Stripe::StripeObject class DeclineOn < Stripe::StripeObject - # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. sig { returns(T::Boolean) } attr_reader :avs_failure - # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. sig { returns(T::Boolean) } attr_reader :cvc_failure end - # Attribute for field decline_on sig { returns(DeclineOn) } attr_reader :decline_on - # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix - # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kana - # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kanji end class Dashboard < Stripe::StripeObject - # The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. sig { returns(T.nilable(String)) } attr_reader :display_name - # The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). sig { returns(T.nilable(String)) } attr_reader :timezone end class Invoices < Stripe::StripeObject - # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :default_account_tax_ids end class Payments < Stripe::StripeObject - # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_kana - # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_kanji - # The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kana - # The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kanji end class Payouts < Stripe::StripeObject class Schedule < Stripe::StripeObject - # The number of days charges for the account will be held before being paid out. sig { returns(Integer) } attr_reader :delay_days - # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. sig { returns(String) } attr_reader :interval - # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. sig { returns(Integer) } attr_reader :monthly_anchor - # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. sig { returns(String) } attr_reader :weekly_anchor end - # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. sig { returns(T::Boolean) } attr_reader :debit_negative_balances - # Attribute for field schedule sig { returns(Schedule) } attr_reader :schedule - # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class SepaDebitPayments < Stripe::StripeObject - # SEPA creditor identifier that identifies the company making the payment. sig { returns(String) } attr_reader :creditor_id end class TaxForms < Stripe::StripeObject - # Whether the account opted out of receiving their tax forms by postal delivery. sig { returns(T::Boolean) } attr_reader :consented_to_paperless_delivery end class Treasury < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject - # The Unix timestamp marking when the account representative accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date - # The IP address from which the account representative accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip - # The user agent of the browser from which the account representative accepted the service agreement. sig { returns(String) } attr_reader :user_agent end - # Attribute for field tos_acceptance sig { returns(TosAcceptance) } attr_reader :tos_acceptance end - # Attribute for field bacs_debit_payments sig { returns(BacsDebitPayments) } attr_reader :bacs_debit_payments - # Attribute for field bank_bca_onboarding sig { returns(BankBcaOnboarding) } attr_reader :bank_bca_onboarding - # Attribute for field branding sig { returns(Branding) } attr_reader :branding - # Attribute for field capital sig { returns(Capital) } attr_reader :capital - # Attribute for field card_issuing sig { returns(CardIssuing) } attr_reader :card_issuing - # Attribute for field card_payments sig { returns(CardPayments) } attr_reader :card_payments - # Attribute for field dashboard sig { returns(Dashboard) } attr_reader :dashboard - # Attribute for field invoices sig { returns(Invoices) } attr_reader :invoices - # Attribute for field payments sig { returns(Payments) } attr_reader :payments - # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts - # Attribute for field sepa_debit_payments sig { returns(SepaDebitPayments) } attr_reader :sepa_debit_payments - # Attribute for field tax_forms sig { returns(TaxForms) } attr_reader :tax_forms - # Attribute for field treasury sig { returns(Treasury) } attr_reader :treasury end class TosAcceptance < Stripe::StripeObject - # The Unix timestamp marking when the account representative accepted their service agreement sig { returns(T.nilable(Integer)) } attr_reader :date - # The IP address from which the account representative accepted their service agreement sig { returns(T.nilable(String)) } attr_reader :ip - # The user's service agreement type sig { returns(String) } attr_reader :service_agreement - # The user agent of the browser from which the account representative accepted their service agreement sig { returns(T.nilable(String)) } attr_reader :user_agent end - # Business information about the account. sig { returns(T.nilable(BusinessProfile)) } + # Business information about the account. attr_reader :business_profile - - # The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. sig { returns(T.nilable(String)) } + # The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :business_type - - # Attribute for field capabilities sig { returns(Capabilities) } + # Attribute for field capabilities attr_reader :capabilities - - # Whether the account can process charges. sig { returns(T::Boolean) } + # Whether the account can process charges. attr_reader :charges_enabled - - # Attribute for field company sig { returns(Company) } + # Attribute for field company attr_reader :company - - # Attribute for field controller sig { returns(Controller) } + # Attribute for field controller attr_reader :controller - - # The account's country. sig { returns(String) } + # The account's country. attr_reader :country - - # Time at which the account was connected. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the account was connected. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). sig { returns(String) } + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). attr_reader :default_currency - - # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. sig { returns(T::Boolean) } + # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. attr_reader :details_submitted - - # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. sig { returns(T.nilable(String)) } + # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. attr_reader :email - - # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. sig { returns(Stripe::ListObject) } + # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. attr_reader :external_accounts - - # Attribute for field future_requirements sig { returns(FutureRequirements) } + # Attribute for field future_requirements attr_reader :future_requirements - - # The groups associated with the account. sig { returns(T.nilable(Groups)) } + # The groups associated with the account. attr_reader :groups - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - + sig { returns(Stripe::Person) } # This is an object representing a person associated with a Stripe account. # # A platform cannot access a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. # # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). - sig { returns(Stripe::Person) } attr_reader :individual - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Whether the funds in this account can be paid out. sig { returns(T::Boolean) } + # Whether the funds in this account can be paid out. attr_reader :payouts_enabled - - # Attribute for field requirements sig { returns(Requirements) } + # Attribute for field requirements attr_reader :requirements - - # Attribute for field risk_controls sig { returns(RiskControls) } + # Attribute for field risk_controls attr_reader :risk_controls - - # Options for customizing how the account functions within Stripe. sig { returns(T.nilable(Settings)) } + # Options for customizing how the account functions within Stripe. attr_reader :settings - - # Attribute for field tos_acceptance sig { returns(TosAcceptance) } + # Attribute for field tos_acceptance attr_reader :tos_acceptance - - # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. sig { returns(String) } + # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. attr_reader :type - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_link.rbi b/rbi/stripe/resources/account_link.rbi index 219338709..63551fb51 100644 --- a/rbi/stripe/resources/account_link.rbi +++ b/rbi/stripe/resources/account_link.rbi @@ -8,20 +8,17 @@ module Stripe # # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) class AccountLink < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The timestamp at which this account link will expire. sig { returns(Integer) } + # The timestamp at which this account link will expire. attr_reader :expires_at - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The URL for the account link. sig { returns(String) } + # The URL for the account link. attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_notice.rbi b/rbi/stripe/resources/account_notice.rbi index 6b418ad8d..430ba2ecb 100644 --- a/rbi/stripe/resources/account_notice.rbi +++ b/rbi/stripe/resources/account_notice.rbi @@ -8,65 +8,50 @@ module Stripe # See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts. class AccountNotice < APIResource class Email < Stripe::StripeObject - # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. sig { returns(String) } attr_reader :plain_text - # Email address of the recipient. sig { returns(String) } attr_reader :recipient - # Subject of the email. sig { returns(String) } attr_reader :subject end class LinkedObjects < Stripe::StripeObject - # Associated [Capability](https://stripe.com/docs/api/capabilities) sig { returns(T.nilable(String)) } attr_reader :capability - # Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record) sig { returns(T.nilable(String)) } attr_reader :issuing_credit_underwriting_record - # Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes) sig { returns(T.nilable(String)) } attr_reader :issuing_dispute end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # When present, the deadline for sending the notice to meet the relevant regulations. sig { returns(T.nilable(Integer)) } + # When present, the deadline for sending the notice to meet the relevant regulations. attr_reader :deadline - - # Information about the email when sent. sig { returns(T.nilable(Email)) } + # Information about the email when sent. attr_reader :email - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Information about objects related to the notice. sig { returns(T.nilable(LinkedObjects)) } + # Information about objects related to the notice. attr_reader :linked_objects - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. sig { returns(String) } + # Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. attr_reader :reason - - # Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. sig { returns(T.nilable(Integer)) } + # Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. attr_reader :sent_at end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_session.rbi b/rbi/stripe/resources/account_session.rbi index ed8dd924f..8010a1450 100644 --- a/rbi/stripe/resources/account_session.rbi +++ b/rbi/stripe/resources/account_session.rbi @@ -14,278 +14,207 @@ module Stripe class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class Balances < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :standard_payouts end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancing < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancingApplication < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancingPromotion < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class Documents < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class PaymentDetails < Stripe::StripeObject class Features < Stripe::StripeObject - # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class Payments < Stripe::StripeObject class Features < Stripe::StripeObject - # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments - # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management - # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management - # Whether to allow sending refunds. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject - # Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication - # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :edit_payout_schedule - # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection - # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :instant_payouts - # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :standard_payouts end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class PayoutsList < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class TaxRegistrations < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end class TaxSettings < Stripe::StripeObject class Features < Stripe::StripeObject; end - # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field features sig { returns(Features) } attr_reader :features end - # Attribute for field account_management sig { returns(AccountManagement) } attr_reader :account_management - # Attribute for field account_onboarding sig { returns(AccountOnboarding) } attr_reader :account_onboarding - # Attribute for field balances sig { returns(Balances) } attr_reader :balances - # Attribute for field capital_financing sig { returns(T.nilable(CapitalFinancing)) } attr_reader :capital_financing - # Attribute for field capital_financing_application sig { returns(T.nilable(CapitalFinancingApplication)) } attr_reader :capital_financing_application - # Attribute for field capital_financing_promotion sig { returns(T.nilable(CapitalFinancingPromotion)) } attr_reader :capital_financing_promotion - # Attribute for field documents sig { returns(Documents) } attr_reader :documents - # Attribute for field notification_banner sig { returns(NotificationBanner) } attr_reader :notification_banner - # Attribute for field payment_details sig { returns(PaymentDetails) } attr_reader :payment_details - # Attribute for field payments sig { returns(Payments) } attr_reader :payments - # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts - # Attribute for field payouts_list sig { returns(PayoutsList) } attr_reader :payouts_list - # Attribute for field tax_registrations sig { returns(TaxRegistrations) } attr_reader :tax_registrations - # Attribute for field tax_settings sig { returns(TaxSettings) } attr_reader :tax_settings end - # The ID of the account the AccountSession was created for sig { returns(String) } + # The ID of the account the AccountSession was created for attr_reader :account - + sig { returns(String) } # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. # # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. - sig { returns(String) } attr_reader :client_secret - - # Attribute for field components sig { returns(Components) } + # Attribute for field components attr_reader :components - - # The timestamp at which this AccountSession will expire. sig { returns(Integer) } + # The timestamp at which this AccountSession will expire. attr_reader :expires_at - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/apple_pay_domain.rbi b/rbi/stripe/resources/apple_pay_domain.rbi index 3d0a10822..ccead41a3 100644 --- a/rbi/stripe/resources/apple_pay_domain.rbi +++ b/rbi/stripe/resources/apple_pay_domain.rbi @@ -5,28 +5,23 @@ module Stripe # Domains registered for Apple Pay on the Web class ApplePayDomain < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Attribute for field domain_name sig { returns(String) } + # Attribute for field domain_name attr_reader :domain_name - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/application.rbi b/rbi/stripe/resources/application.rbi index 45d8431f8..8db61fc11 100644 --- a/rbi/stripe/resources/application.rbi +++ b/rbi/stripe/resources/application.rbi @@ -4,20 +4,17 @@ # typed: true module Stripe class Application < APIResource - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The name of the application. sig { returns(T.nilable(String)) } + # The name of the application. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee.rbi b/rbi/stripe/resources/application_fee.rbi index c1a4414d9..f12fa1dcd 100644 --- a/rbi/stripe/resources/application_fee.rbi +++ b/rbi/stripe/resources/application_fee.rbi @@ -5,74 +5,57 @@ module Stripe class ApplicationFee < APIResource class FeeSource < Stripe::StripeObject - # Charge ID that created this application fee. sig { returns(String) } attr_reader :charge - # Payout ID that created this application fee. sig { returns(String) } attr_reader :payout - # Type of object that created the application fee, either `charge` or `payout`. sig { returns(String) } attr_reader :type end - # ID of the Stripe account this fee was taken from. sig { returns(T.any(String, Stripe::Account)) } + # ID of the Stripe account this fee was taken from. attr_reader :account - - # Amount earned, in cents (or local equivalent). sig { returns(Integer) } + # Amount earned, in cents (or local equivalent). attr_reader :amount - - # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) sig { returns(Integer) } + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) attr_reader :amount_refunded - - # ID of the Connect application that earned the fee. sig { returns(T.any(String, Stripe::Application)) } + # ID of the Connect application that earned the fee. attr_reader :application - - # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). attr_reader :balance_transaction - - # ID of the charge that the application fee was taken from. sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge that the application fee was taken from. attr_reader :charge - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. sig { returns(T.nilable(FeeSource)) } + # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. attr_reader :fee_source - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. attr_reader :originating_transaction - - # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. sig { returns(T::Boolean) } + # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. attr_reader :refunded - - # A list of refunds that have been applied to the fee. sig { returns(Stripe::ListObject) } + # A list of refunds that have been applied to the fee. attr_reader :refunds end end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee_refund.rbi b/rbi/stripe/resources/application_fee_refund.rbi index f39f239a6..571351dfe 100644 --- a/rbi/stripe/resources/application_fee_refund.rbi +++ b/rbi/stripe/resources/application_fee_refund.rbi @@ -9,36 +9,29 @@ module Stripe # # Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) class ApplicationFeeRefund < APIResource - # Amount, in cents (or local equivalent). sig { returns(Integer) } + # Amount, in cents (or local equivalent). attr_reader :amount - - # Balance transaction that describes the impact on your account balance. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # ID of the application fee that was refunded. sig { returns(T.any(String, Stripe::ApplicationFee)) } + # ID of the application fee that was refunded. attr_reader :fee - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/apps/secret.rbi b/rbi/stripe/resources/apps/secret.rbi index ba2df56e8..62bb75da3 100644 --- a/rbi/stripe/resources/apps/secret.rbi +++ b/rbi/stripe/resources/apps/secret.rbi @@ -15,47 +15,37 @@ module Stripe # Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects) class Secret < APIResource class Scope < Stripe::StripeObject - # The secret scope type. sig { returns(String) } attr_reader :type - # The user ID, if type is set to "user" sig { returns(String) } attr_reader :user end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # If true, indicates that this secret has been deleted sig { returns(T::Boolean) } + # If true, indicates that this secret has been deleted attr_reader :deleted - - # The Unix timestamp for the expiry time of the secret, after which the secret deletes. sig { returns(T.nilable(Integer)) } + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. attr_reader :expires_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # A name for the secret that's unique within the scope. sig { returns(String) } + # A name for the secret that's unique within the scope. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The plaintext secret value to be stored. sig { returns(T.nilable(String)) } + # The plaintext secret value to be stored. attr_reader :payload - - # Attribute for field scope sig { returns(Scope) } + # Attribute for field scope attr_reader :scope end end diff --git a/rbi/stripe/resources/balance.rbi b/rbi/stripe/resources/balance.rbi index bf1a9390d..aa4dfd063 100644 --- a/rbi/stripe/resources/balance.rbi +++ b/rbi/stripe/resources/balance.rbi @@ -17,170 +17,126 @@ module Stripe class Balance < SingletonAPIResource class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account - # Amount for card. sig { returns(Integer) } attr_reader :card - # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end - # Balance amount. sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class ConnectReserved < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account - # Amount for card. sig { returns(Integer) } attr_reader :card - # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end - # Balance amount. sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class InstantAvailable < Stripe::StripeObject class NetAvailable < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account - # Amount for card. sig { returns(Integer) } attr_reader :card - # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end - # Net balance amount, subtracting fees from platform-set pricing. sig { returns(Integer) } attr_reader :amount - # ID of the external account for this net balance (not expandable). sig { returns(String) } attr_reader :destination - # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class SourceTypes < Stripe::StripeObject - # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account - # Amount for card. sig { returns(Integer) } attr_reader :card - # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end - # Balance amount. sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # Breakdown of balance by destination. sig { returns(T::Array[NetAvailable]) } attr_reader :net_available - # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class Issuing < Stripe::StripeObject class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account - # Amount for card. sig { returns(Integer) } attr_reader :card - # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end - # Balance amount. sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end - # Funds that are available for use. sig { returns(T::Array[Available]) } attr_reader :available end class Pending < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account - # Amount for card. sig { returns(Integer) } attr_reader :card - # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end - # Balance amount. sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end - # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. sig { returns(T::Array[Available]) } + # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. attr_reader :available - - # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. sig { returns(T::Array[ConnectReserved]) } + # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. attr_reader :connect_reserved - - # Funds that you can pay out using Instant Payouts. sig { returns(T::Array[InstantAvailable]) } + # Funds that you can pay out using Instant Payouts. attr_reader :instant_available - - # Attribute for field issuing sig { returns(Issuing) } + # Attribute for field issuing attr_reader :issuing - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. sig { returns(T::Array[Pending]) } + # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. attr_reader :pending end end \ No newline at end of file diff --git a/rbi/stripe/resources/balance_transaction.rbi b/rbi/stripe/resources/balance_transaction.rbi index 13894f289..8c37fce23 100644 --- a/rbi/stripe/resources/balance_transaction.rbi +++ b/rbi/stripe/resources/balance_transaction.rbi @@ -9,82 +9,63 @@ module Stripe # Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) class BalanceTransaction < APIResource class FeeDetail < Stripe::StripeObject - # Amount of the fee, in cents. sig { returns(Integer) } attr_reader :amount - # ID of the Connect application that earned the fee. sig { returns(T.nilable(String)) } attr_reader :application - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description - # Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. sig { returns(String) } attr_reader :type end - # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. sig { returns(Integer) } + # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. attr_reader :amount - - # The date that the transaction's net funds become available in the Stripe balance. sig { returns(Integer) } + # The date that the transaction's net funds become available in the Stripe balance. attr_reader :available_on - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. sig { returns(T.nilable(Float)) } + # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. attr_reader :exchange_rate - - # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. sig { returns(Integer) } + # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. attr_reader :fee - - # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. sig { returns(T::Array[FeeDetail]) } + # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. attr_reader :fee_details - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` sig { returns(Integer) } + # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` attr_reader :net - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. sig { returns(String) } + # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. attr_reader :reporting_category - - # This transaction relates to the Stripe object. sig { returns(T.nilable(T.any(String, T.any(Stripe::ApplicationFee, Stripe::Charge, Stripe::ConnectCollectionTransfer, Stripe::CustomerCashBalanceTransaction, Stripe::Dispute, Stripe::ApplicationFeeRefund, Stripe::Issuing::Authorization, Stripe::Issuing::Dispute, Stripe::Issuing::Transaction, Stripe::Payout, Stripe::Refund, Stripe::ReserveTransaction, Stripe::TaxDeductedAtSource, Stripe::Topup, Stripe::Transfer, Stripe::Reversal)))) } + # This transaction relates to the Stripe object. attr_reader :source - - # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. sig { returns(String) } + # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. attr_reader :status - - # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. sig { returns(String) } + # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/bank_account.rbi b/rbi/stripe/resources/bank_account.rbi index 2bab2b54a..f9fe18ff0 100644 --- a/rbi/stripe/resources/bank_account.rbi +++ b/rbi/stripe/resources/bank_account.rbi @@ -13,134 +13,101 @@ module Stripe class BankAccount < APIResource class FutureRequirements < Stripe::StripeObject class Error < Stripe::StripeObject - # The code for the type of error. sig { returns(String) } attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end - # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due - # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors - # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Error < Stripe::StripeObject - # The code for the type of error. sig { returns(String) } attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end - # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due - # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors - # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end - # The ID of the account that the bank account is associated with. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The ID of the account that the bank account is associated with. attr_reader :account - - # The name of the person or business that owns the bank account. sig { returns(T.nilable(String)) } + # The name of the person or business that owns the bank account. attr_reader :account_holder_name - - # The type of entity that holds the account. This can be either `individual` or `company`. sig { returns(T.nilable(String)) } + # The type of entity that holds the account. This can be either `individual` or `company`. attr_reader :account_holder_type - - # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. attr_reader :account_type - - # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. sig { returns(T.nilable(T::Array[String])) } + # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. attr_reader :available_payout_methods - - # Name of the bank associated with the routing number (e.g., `WELLS FARGO`). sig { returns(T.nilable(String)) } + # Name of the bank associated with the routing number (e.g., `WELLS FARGO`). attr_reader :bank_name - - # Two-letter ISO code representing the country the bank account is located in. sig { returns(String) } + # Two-letter ISO code representing the country the bank account is located in. attr_reader :country - - # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. sig { returns(String) } + # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. attr_reader :currency - - # The ID of the customer that the bank account is associated with. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer that the bank account is associated with. attr_reader :customer - - # Whether this bank account is the default external account for its currency. sig { returns(T.nilable(T::Boolean)) } + # Whether this bank account is the default external account for its currency. attr_reader :default_for_currency - - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. attr_reader :fingerprint - - # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. sig { returns(T.nilable(FutureRequirements)) } + # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. attr_reader :future_requirements - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The last four digits of the bank account number. sig { returns(String) } + # The last four digits of the bank account number. attr_reader :last4 - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Information about the requirements for the bank account, including what information needs to be collected. sig { returns(T.nilable(Requirements)) } + # Information about the requirements for the bank account, including what information needs to be collected. attr_reader :requirements - - # The routing transit number for the bank account. sig { returns(T.nilable(String)) } + # The routing transit number for the bank account. attr_reader :routing_number - + sig { returns(String) } # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. # # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. - sig { returns(String) } attr_reader :status - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/alert.rbi b/rbi/stripe/resources/billing/alert.rbi index 2d57f7eb5..a7e474c41 100644 --- a/rbi/stripe/resources/billing/alert.rbi +++ b/rbi/stripe/resources/billing/alert.rbi @@ -8,52 +8,40 @@ module Stripe class Alert < APIResource class UsageThreshold < Stripe::StripeObject class Filter < Stripe::StripeObject - # Limit the scope of the alert to this customer ID sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - # Attribute for field type sig { returns(String) } attr_reader :type end - # The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. sig { returns(T.nilable(T::Array[Filter])) } attr_reader :filters - # The value at which this alert will trigger. sig { returns(Integer) } attr_reader :gte - # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. sig { returns(T.any(String, Stripe::Billing::Meter)) } attr_reader :meter - # Defines how the alert will behave. sig { returns(String) } attr_reader :recurrence end - # Defines the type of the alert. sig { returns(String) } + # Defines the type of the alert. attr_reader :alert_type - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Status of the alert. This can be active, inactive or archived. sig { returns(T.nilable(String)) } + # Status of the alert. This can be active, inactive or archived. attr_reader :status - - # Title of the alert. sig { returns(String) } + # Title of the alert. attr_reader :title - - # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). sig { returns(T.nilable(UsageThreshold)) } + # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). attr_reader :usage_threshold end end diff --git a/rbi/stripe/resources/billing/alert_triggered.rbi b/rbi/stripe/resources/billing/alert_triggered.rbi index 7b7001aeb..0dd1d6dd6 100644 --- a/rbi/stripe/resources/billing/alert_triggered.rbi +++ b/rbi/stripe/resources/billing/alert_triggered.rbi @@ -5,28 +5,23 @@ module Stripe module Billing class AlertTriggered < APIResource - # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. sig { returns(Stripe::Billing::Alert) } + # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. attr_reader :alert - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # ID of customer for which the alert triggered sig { returns(String) } + # ID of customer for which the alert triggered attr_reader :customer - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The value triggering the alert sig { returns(Integer) } + # The value triggering the alert attr_reader :value end end diff --git a/rbi/stripe/resources/billing/credit_balance_summary.rbi b/rbi/stripe/resources/billing/credit_balance_summary.rbi index aa725e4b7..8d4cddaeb 100644 --- a/rbi/stripe/resources/billing/credit_balance_summary.rbi +++ b/rbi/stripe/resources/billing/credit_balance_summary.rbi @@ -9,57 +9,44 @@ module Stripe class Balance < Stripe::StripeObject class AvailableBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end - # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class LedgerBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end - # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end - # Attribute for field available_balance sig { returns(AvailableBalance) } attr_reader :available_balance - # Attribute for field ledger_balance sig { returns(LedgerBalance) } attr_reader :ledger_balance end - # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. sig { returns(T::Array[Balance]) } + # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. attr_reader :balances - - # The customer the balance is for. sig { returns(T.any(String, Stripe::Customer)) } + # The customer the balance is for. attr_reader :customer - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end diff --git a/rbi/stripe/resources/billing/credit_balance_transaction.rbi b/rbi/stripe/resources/billing/credit_balance_transaction.rbi index 9ba46310a..efe2fe15b 100644 --- a/rbi/stripe/resources/billing/credit_balance_transaction.rbi +++ b/rbi/stripe/resources/billing/credit_balance_transaction.rbi @@ -9,100 +9,76 @@ module Stripe class Credit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end - # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end - # Attribute for field amount sig { returns(Amount) } attr_reader :amount - # The type of credit transaction. sig { returns(String) } attr_reader :type end class Debit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end - # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class CreditsApplied < Stripe::StripeObject - # The invoice to which the billing credits were applied. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice - # The invoice line item to which the billing credits were applied. sig { returns(String) } attr_reader :invoice_line_item end - # Attribute for field amount sig { returns(Amount) } attr_reader :amount - # Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. sig { returns(T.nilable(CreditsApplied)) } attr_reader :credits_applied - # The type of debit transaction. sig { returns(String) } attr_reader :type end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Credit details for this credit balance transaction. Only present if type is `credit`. sig { returns(T.nilable(Credit)) } + # Credit details for this credit balance transaction. Only present if type is `credit`. attr_reader :credit - - # The credit grant associated with this credit balance transaction. sig { returns(T.any(String, Stripe::Billing::CreditGrant)) } + # The credit grant associated with this credit balance transaction. attr_reader :credit_grant - - # Debit details for this credit balance transaction. Only present if type is `debit`. sig { returns(T.nilable(Debit)) } + # Debit details for this credit balance transaction. Only present if type is `debit`. attr_reader :debit - - # The effective time of this credit balance transaction. sig { returns(Integer) } + # The effective time of this credit balance transaction. attr_reader :effective_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # ID of the test clock this credit balance transaction belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this credit balance transaction belongs to. attr_reader :test_clock - - # The type of credit balance transaction (credit or debit). sig { returns(T.nilable(String)) } + # The type of credit balance transaction (credit or debit). attr_reader :type end end diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi index 75b207599..09f578b14 100644 --- a/rbi/stripe/resources/billing/credit_grant.rbi +++ b/rbi/stripe/resources/billing/credit_grant.rbi @@ -10,88 +10,68 @@ module Stripe class CreditGrant < APIResource class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end - # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary - # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class ApplicabilityConfig < Stripe::StripeObject class Scope < Stripe::StripeObject - # The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. sig { returns(String) } attr_reader :price_type end - # Attribute for field scope sig { returns(Scope) } attr_reader :scope end - # Attribute for field amount sig { returns(Amount) } + # Attribute for field amount attr_reader :amount - - # Attribute for field applicability_config sig { returns(ApplicabilityConfig) } + # Attribute for field applicability_config attr_reader :applicability_config - - # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. sig { returns(String) } + # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. attr_reader :category - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # ID of the customer receiving the billing credits. sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer receiving the billing credits. attr_reader :customer - - # The time when the billing credits become effective—when they're eligible for use. sig { returns(T.nilable(Integer)) } + # The time when the billing credits become effective-when they're eligible for use. attr_reader :effective_at - - # The time when the billing credits expire. If not present, the billing credits don't expire. sig { returns(T.nilable(Integer)) } + # The time when the billing credits expire. If not present, the billing credits don't expire. attr_reader :expires_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # A descriptive name shown in dashboard. sig { returns(T.nilable(String)) } + # A descriptive name shown in dashboard. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # ID of the test clock this credit grant belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this credit grant belongs to. attr_reader :test_clock - - # Time at which the object was last updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated - - # The time when this credit grant was voided. If not present, the credit grant hasn't been voided. sig { returns(T.nilable(Integer)) } + # The time when this credit grant was voided. If not present, the credit grant hasn't been voided. attr_reader :voided_at end end diff --git a/rbi/stripe/resources/billing/meter.rbi b/rbi/stripe/resources/billing/meter.rbi index 1541e2fef..34bfec5fb 100644 --- a/rbi/stripe/resources/billing/meter.rbi +++ b/rbi/stripe/resources/billing/meter.rbi @@ -4,83 +4,66 @@ # typed: true module Stripe module Billing - # A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. + # Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill. # # Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) class Meter < APIResource class CustomerMapping < Stripe::StripeObject - # The key in the meter event payload to use for mapping the event to a customer. sig { returns(String) } attr_reader :event_payload_key - # The method for mapping a meter event to a customer. sig { returns(String) } attr_reader :type end class DefaultAggregation < Stripe::StripeObject - # Specifies how events are aggregated. sig { returns(String) } attr_reader :formula end class StatusTransitions < Stripe::StripeObject - # The time the meter was deactivated, if any. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :deactivated_at end class ValueSettings < Stripe::StripeObject - # The key in the meter event payload to use as the value for this meter. sig { returns(String) } attr_reader :event_payload_key end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Attribute for field customer_mapping sig { returns(CustomerMapping) } + # Attribute for field customer_mapping attr_reader :customer_mapping - - # Attribute for field default_aggregation sig { returns(DefaultAggregation) } + # Attribute for field default_aggregation attr_reader :default_aggregation - - # The meter's name. sig { returns(String) } + # The meter's name. attr_reader :display_name - - # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. sig { returns(String) } + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. attr_reader :event_name - - # The time window to pre-aggregate meter events for, if any. sig { returns(T.nilable(String)) } + # The time window to pre-aggregate meter events for, if any. attr_reader :event_time_window - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The meter's status. sig { returns(String) } + # The meter's status. attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # Time at which the object was last updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated - - # Attribute for field value_settings sig { returns(ValueSettings) } + # Attribute for field value_settings attr_reader :value_settings end end diff --git a/rbi/stripe/resources/billing/meter_error_report.rbi b/rbi/stripe/resources/billing/meter_error_report.rbi index e20386130..65981e0b1 100644 --- a/rbi/stripe/resources/billing/meter_error_report.rbi +++ b/rbi/stripe/resources/billing/meter_error_report.rbi @@ -9,68 +9,52 @@ module Stripe class ErrorType < Stripe::StripeObject class SampleError < Stripe::StripeObject class ApiRequest < Stripe::StripeObject - # Unique identifier for the object. sig { returns(String) } attr_reader :id - # idempotency_key of the request sig { returns(String) } attr_reader :idempotency_key end - # Attribute for field api_request sig { returns(T.nilable(ApiRequest)) } attr_reader :api_request - # message of the error sig { returns(String) } attr_reader :error_message end - # Attribute for field sample_errors sig { returns(T::Array[SampleError]) } attr_reader :sample_errors end - # The number of errors generated sig { returns(Integer) } attr_reader :error_count - # More information about errors sig { returns(T::Array[ErrorType]) } attr_reader :error_types end class RelatedObject < Stripe::StripeObject - # Unique identifier for the object. sig { returns(String) } attr_reader :id - # The type of meter error related object. Should be 'meter' sig { returns(String) } attr_reader :object - # The url of the meter object sig { returns(String) } attr_reader :url end - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field reason sig { returns(Reason) } + # Attribute for field reason attr_reader :reason - - # The related objects about the error sig { returns(T.nilable(RelatedObject)) } + # The related objects about the error attr_reader :related_object - - # Summary of invalid events sig { returns(String) } + # Summary of invalid events attr_reader :summary - - # Time when validation ended. Measured in seconds since the Unix epoch sig { returns(Integer) } + # Time when validation ended. Measured in seconds since the Unix epoch attr_reader :validation_end - - # Time when validation started. Measured in seconds since the Unix epoch sig { returns(Integer) } + # Time when validation started. Measured in seconds since the Unix epoch attr_reader :validation_start end end diff --git a/rbi/stripe/resources/billing/meter_event.rbi b/rbi/stripe/resources/billing/meter_event.rbi index cf08b8ee4..db10fa2b9 100644 --- a/rbi/stripe/resources/billing/meter_event.rbi +++ b/rbi/stripe/resources/billing/meter_event.rbi @@ -4,35 +4,28 @@ # typed: true module Stripe module Billing - # A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage. - # Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing. + # Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events. class MeterEvent < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The name of the meter event. Corresponds with the `event_name` field on a meter. sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name - - # A unique identifier for the event. sig { returns(String) } + # A unique identifier for the event. attr_reader :identifier - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). sig { returns(T::Hash[String, String]) } + # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). attr_reader :payload - - # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. attr_reader :timestamp end end diff --git a/rbi/stripe/resources/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/billing/meter_event_adjustment.rbi index 0d161a986..3b4ecfefd 100644 --- a/rbi/stripe/resources/billing/meter_event_adjustment.rbi +++ b/rbi/stripe/resources/billing/meter_event_adjustment.rbi @@ -7,32 +7,26 @@ module Stripe # A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. class MeterEventAdjustment < APIResource class Cancel < Stripe::StripeObject - # Unique identifier for the event. sig { returns(T.nilable(String)) } attr_reader :identifier end - # Specifies which event to cancel. sig { returns(T.nilable(Cancel)) } + # Specifies which event to cancel. attr_reader :cancel - - # The name of the meter event. Corresponds with the `event_name` field on a meter. sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The meter event adjustment's status. sig { returns(String) } + # The meter event adjustment's status. attr_reader :status - - # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. sig { returns(String) } + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. attr_reader :type end end diff --git a/rbi/stripe/resources/billing/meter_event_summary.rbi b/rbi/stripe/resources/billing/meter_event_summary.rbi index da5261089..c03a0dcf5 100644 --- a/rbi/stripe/resources/billing/meter_event_summary.rbi +++ b/rbi/stripe/resources/billing/meter_event_summary.rbi @@ -7,32 +7,26 @@ module Stripe # A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much # usage was accrued by a customer for that period. class MeterEventSummary < APIResource - # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. sig { returns(Float) } + # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. attr_reader :aggregated_value - - # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. sig { returns(Integer) } + # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. attr_reader :end_time - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The meter associated with this event summary. sig { returns(String) } + # The meter associated with this event summary. attr_reader :meter - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. sig { returns(Integer) } + # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. attr_reader :start_time end end diff --git a/rbi/stripe/resources/billing_portal/configuration.rbi b/rbi/stripe/resources/billing_portal/configuration.rbi index fe59b6d41..889468ff4 100644 --- a/rbi/stripe/resources/billing_portal/configuration.rbi +++ b/rbi/stripe/resources/billing_portal/configuration.rbi @@ -7,168 +7,125 @@ module Stripe # A portal configuration describes the functionality and behavior of a portal session. class Configuration < APIResource class BusinessProfile < Stripe::StripeObject - # The messaging shown to customers in the portal. sig { returns(T.nilable(String)) } attr_reader :headline - # A link to the business’s publicly available privacy policy. sig { returns(T.nilable(String)) } attr_reader :privacy_policy_url - # A link to the business’s publicly available terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service_url end class Features < Stripe::StripeObject class CustomerUpdate < Stripe::StripeObject - # The types of customer updates that are supported. When empty, customers are not updateable. sig { returns(T::Array[String]) } attr_reader :allowed_updates - # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class InvoiceHistory < Stripe::StripeObject - # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class PaymentMethodUpdate < Stripe::StripeObject - # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class SubscriptionCancel < Stripe::StripeObject class CancellationReason < Stripe::StripeObject - # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Which cancellation reasons will be given as options to the customer. sig { returns(T::Array[String]) } attr_reader :options end - # Attribute for field cancellation_reason sig { returns(CancellationReason) } attr_reader :cancellation_reason - # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # Whether to cancel subscriptions immediately or at the end of the billing period. sig { returns(String) } attr_reader :mode - # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. sig { returns(String) } attr_reader :proration_behavior end class SubscriptionUpdate < Stripe::StripeObject class Product < Stripe::StripeObject - # The list of price IDs which, when subscribed to, a subscription can be updated. sig { returns(T::Array[String]) } attr_reader :prices - # The product ID. sig { returns(String) } attr_reader :product end class ScheduleAtPeriodEnd < Stripe::StripeObject class Condition < Stripe::StripeObject - # The type of condition. sig { returns(String) } attr_reader :type end - # List of conditions. When any condition is true, an update will be scheduled at the end of the current period. sig { returns(T::Array[Condition]) } attr_reader :conditions end - # The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. sig { returns(T::Array[String]) } attr_reader :default_allowed_updates - # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # The list of up to 10 products that support subscription updates. sig { returns(T.nilable(T::Array[Product])) } attr_reader :products - # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. sig { returns(String) } attr_reader :proration_behavior - # Attribute for field schedule_at_period_end sig { returns(ScheduleAtPeriodEnd) } attr_reader :schedule_at_period_end end - # Attribute for field customer_update sig { returns(CustomerUpdate) } attr_reader :customer_update - # Attribute for field invoice_history sig { returns(InvoiceHistory) } attr_reader :invoice_history - # Attribute for field payment_method_update sig { returns(PaymentMethodUpdate) } attr_reader :payment_method_update - # Attribute for field subscription_cancel sig { returns(SubscriptionCancel) } attr_reader :subscription_cancel - # Attribute for field subscription_update sig { returns(SubscriptionUpdate) } attr_reader :subscription_update end class LoginPage < Stripe::StripeObject - # If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. - # - # If `false`, the previously generated `url`, if any, will be deactivated. sig { returns(T::Boolean) } attr_reader :enabled - # A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. sig { returns(T.nilable(String)) } attr_reader :url end - # Whether the configuration is active and can be used to create portal sessions. sig { returns(T::Boolean) } + # Whether the configuration is active and can be used to create portal sessions. attr_reader :active - - # ID of the Connect Application that created the configuration. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the configuration. attr_reader :application - - # Attribute for field business_profile sig { returns(BusinessProfile) } + # Attribute for field business_profile attr_reader :business_profile - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. sig { returns(T.nilable(String)) } + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. attr_reader :default_return_url - - # Attribute for field features sig { returns(Features) } + # Attribute for field features attr_reader :features - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. sig { returns(T::Boolean) } + # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. attr_reader :is_default - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Attribute for field login_page sig { returns(LoginPage) } + # Attribute for field login_page attr_reader :login_page - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Time at which the object was last updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated end end diff --git a/rbi/stripe/resources/billing_portal/session.rbi b/rbi/stripe/resources/billing_portal/session.rbi index 814823afa..7cda5592d 100644 --- a/rbi/stripe/resources/billing_portal/session.rbi +++ b/rbi/stripe/resources/billing_portal/session.rbi @@ -22,139 +22,105 @@ module Stripe class Flow < Stripe::StripeObject class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject - # A custom message to display to the customer after the flow is completed. sig { returns(T.nilable(String)) } attr_reader :custom_message end class Redirect < Stripe::StripeObject - # The URL the customer will be redirected to after the flow is completed. sig { returns(String) } attr_reader :return_url end - # Configuration when `after_completion.type=hosted_confirmation`. sig { returns(T.nilable(HostedConfirmation)) } attr_reader :hosted_confirmation - # Configuration when `after_completion.type=redirect`. sig { returns(T.nilable(Redirect)) } attr_reader :redirect - # The specified type of behavior after the flow is completed. sig { returns(String) } attr_reader :type end class SubscriptionCancel < Stripe::StripeObject class Retention < Stripe::StripeObject class CouponOffer < Stripe::StripeObject - # The ID of the coupon to be offered. sig { returns(String) } attr_reader :coupon end - # Configuration when `retention.type=coupon_offer`. sig { returns(T.nilable(CouponOffer)) } attr_reader :coupon_offer - # Type of retention strategy that will be used. sig { returns(String) } attr_reader :type end - # Specify a retention strategy to be used in the cancellation flow. sig { returns(T.nilable(Retention)) } attr_reader :retention - # The ID of the subscription to be canceled. sig { returns(String) } attr_reader :subscription end class SubscriptionUpdate < Stripe::StripeObject - # The ID of the subscription to be updated. sig { returns(String) } attr_reader :subscription end class SubscriptionUpdateConfirm < Stripe::StripeObject class Discount < Stripe::StripeObject - # The ID of the coupon to apply to this subscription update. sig { returns(T.nilable(String)) } attr_reader :coupon - # The ID of a promotion code to apply to this subscription update. sig { returns(T.nilable(String)) } attr_reader :promotion_code end class Item < Stripe::StripeObject - # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. sig { returns(T.nilable(String)) } attr_reader :id - # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). sig { returns(T.nilable(String)) } attr_reader :price - # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. sig { returns(Integer) } attr_reader :quantity end - # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. sig { returns(T.nilable(T::Array[Discount])) } attr_reader :discounts - # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. sig { returns(T::Array[Item]) } attr_reader :items - # The ID of the subscription to be updated. sig { returns(String) } attr_reader :subscription end - # Attribute for field after_completion sig { returns(AfterCompletion) } attr_reader :after_completion - # Configuration when `flow.type=subscription_cancel`. sig { returns(T.nilable(SubscriptionCancel)) } attr_reader :subscription_cancel - # Configuration when `flow.type=subscription_update`. sig { returns(T.nilable(SubscriptionUpdate)) } attr_reader :subscription_update - # Configuration when `flow.type=subscription_update_confirm`. sig { returns(T.nilable(SubscriptionUpdateConfirm)) } attr_reader :subscription_update_confirm - # Type of flow that the customer will go through. sig { returns(String) } attr_reader :type end - # The configuration used by this session, describing the features available. sig { returns(T.any(String, Stripe::BillingPortal::Configuration)) } + # The configuration used by this session, describing the features available. attr_reader :configuration - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The ID of the customer for this session. sig { returns(String) } + # The ID of the customer for this session. attr_reader :customer - - # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. sig { returns(T.nilable(Flow)) } + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. attr_reader :flow - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. sig { returns(T.nilable(String)) } + # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. attr_reader :locale - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. sig { returns(T.nilable(String)) } + # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. attr_reader :on_behalf_of - - # The URL to redirect customers to when they click on the portal's link to return to your website. sig { returns(T.nilable(String)) } + # The URL to redirect customers to when they click on the portal's link to return to your website. attr_reader :return_url - - # The short-lived URL of the session that gives customers access to the customer portal. sig { returns(String) } + # The short-lived URL of the session that gives customers access to the customer portal. attr_reader :url end end diff --git a/rbi/stripe/resources/capability.rbi b/rbi/stripe/resources/capability.rbi index 8c0dd5e0c..3ad23eb66 100644 --- a/rbi/stripe/resources/capability.rbi +++ b/rbi/stripe/resources/capability.rbi @@ -9,124 +9,91 @@ module Stripe class Capability < APIResource class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. sig { returns(String) } attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives - # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline - # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. sig { returns(T::Array[String]) } attr_reader :currently_due - # This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. sig { returns(T.nilable(String)) } attr_reader :disabled_reason - # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. sig { returns(T::Array[String]) } attr_reader :eventually_due - # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T::Array[String]) } attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. sig { returns(String) } attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives - # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline - # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. sig { returns(T::Array[String]) } attr_reader :currently_due - # Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). sig { returns(T.nilable(String)) } attr_reader :disabled_reason - # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due - # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. sig { returns(T::Array[String]) } attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end - # The account for which the capability enables functionality. sig { returns(T.any(String, Stripe::Account)) } + # The account for which the capability enables functionality. attr_reader :account - - # Attribute for field future_requirements sig { returns(FutureRequirements) } + # Attribute for field future_requirements attr_reader :future_requirements - - # The identifier for the capability. sig { returns(String) } + # The identifier for the capability. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Whether the capability has been requested. sig { returns(T::Boolean) } + # Whether the capability has been requested. attr_reader :requested - - # Time at which the capability was requested. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the capability was requested. Measured in seconds since the Unix epoch. attr_reader :requested_at - - # Attribute for field requirements sig { returns(Requirements) } + # Attribute for field requirements attr_reader :requirements - - # The status of the capability. sig { returns(String) } + # The status of the capability. attr_reader :status end end \ No newline at end of file diff --git a/rbi/stripe/resources/capital/financing_offer.rbi b/rbi/stripe/resources/capital/financing_offer.rbi index 632e79db3..b38835e6a 100644 --- a/rbi/stripe/resources/capital/financing_offer.rbi +++ b/rbi/stripe/resources/capital/financing_offer.rbi @@ -8,113 +8,83 @@ module Stripe # Stripe Capital to a Connect subaccount. class FinancingOffer < APIResource class AcceptedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount - # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency - # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount - # Populated when the `product_type` of the `financingoffer` is `refill`. - # Represents the discount amount on remaining premium for the existing loan at payout time. sig { returns(T.nilable(Integer)) } attr_reader :previous_financing_fee_discount_amount - # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end class OfferedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount - # Describes the type of user the offer is being extended to. sig { returns(String) } attr_reader :campaign_type - # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency - # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount - # Populated when the `product_type` of the `financingoffer` is `refill`. - # Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer` - # is paid out, the `previous_financing_fee_discount_amount` will be computed as the multiple of this rate - # and the remaining fee. sig { returns(T.nilable(Float)) } attr_reader :previous_financing_fee_discount_rate - # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end + sig { returns(AcceptedTerms) } # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # the terms accepted by the Connected account, which may differ from those # offered. - sig { returns(AcceptedTerms) } attr_reader :accepted_terms - - # The ID of the merchant associated with this financing object. sig { returns(String) } + # The ID of the merchant associated with this financing object. attr_reader :account - - # The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. sig { returns(Integer) } + # The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. attr_reader :charged_off_at - - # Time at which the offer was created. Given in seconds since unix epoch. sig { returns(Integer) } + # Time at which the offer was created. Given in seconds since unix epoch. attr_reader :created - - # Time at which the offer expires. Given in seconds since unix epoch. sig { returns(Float) } + # Time at which the offer expires. Given in seconds since unix epoch. attr_reader :expires_after - - # The type of financing being offered. sig { returns(String) } + # The type of financing being offered. attr_reader :financing_type - - # A unique identifier for the financing object. sig { returns(String) } + # A unique identifier for the financing object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The object type: financing_offer. sig { returns(String) } + # The object type: financing_offer. attr_reader :object - + sig { returns(OfferedTerms) } # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # both the terms offered to the Connected account. - sig { returns(OfferedTerms) } attr_reader :offered_terms - - # Financing product identifier. sig { returns(String) } + # Financing product identifier. attr_reader :product_type - - # The ID of the financing offer that replaced this offer. sig { returns(String) } + # The ID of the financing offer that replaced this offer. attr_reader :replacement - - # The ID of the financing offer that this offer is a replacement for. sig { returns(String) } + # The ID of the financing offer that this offer is a replacement for. attr_reader :replacement_for - - # The current status of the offer. sig { returns(String) } + # The current status of the offer. attr_reader :status - - # See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). sig { returns(String) } + # See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). attr_reader :type end end diff --git a/rbi/stripe/resources/capital/financing_summary.rbi b/rbi/stripe/resources/capital/financing_summary.rbi index e4bf1301c..82b34f0c4 100644 --- a/rbi/stripe/resources/capital/financing_summary.rbi +++ b/rbi/stripe/resources/capital/financing_summary.rbi @@ -9,61 +9,45 @@ module Stripe class FinancingSummary < SingletonAPIResource class Details < Stripe::StripeObject class CurrentRepaymentInterval < Stripe::StripeObject - # The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited. - # Given in seconds since unix epoch. sig { returns(Integer) } attr_reader :due_at - # The amount that has already been paid in the current repayment interval. sig { returns(T.nilable(Integer)) } attr_reader :paid_amount - # The amount that is yet to be paid in the current repayment interval. sig { returns(Integer) } attr_reader :remaining_amount end - # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount - # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :advance_paid_out_at - # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency - # The chronologically current repayment interval for the financing offer. sig { returns(T.nilable(CurrentRepaymentInterval)) } attr_reader :current_repayment_interval - # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount - # The amount the Connected account has paid toward the financing debt so far. sig { returns(Integer) } attr_reader :paid_amount - # The balance remaining to be paid on the financing, in minor units. sig { returns(Integer) } attr_reader :remaining_amount - # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :repayments_begin_at - # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end + sig { returns(T.nilable(Details)) } # Additional information about the financing summary. Describes currency, advance amount, # fee amount, withhold rate, remaining amount, paid amount, current repayment interval, # repayment start date, and advance payout date. - sig { returns(T.nilable(Details)) } attr_reader :details - - # The Financing Offer ID this Financing Summary corresponds to sig { returns(T.nilable(String)) } + # The Financing Offer ID this Financing Summary corresponds to attr_reader :financing_offer - - # The object type: financing_summary sig { returns(String) } + # The object type: financing_summary attr_reader :object - - # Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. sig { returns(T.nilable(String)) } + # Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. attr_reader :status end end diff --git a/rbi/stripe/resources/capital/financing_transaction.rbi b/rbi/stripe/resources/capital/financing_transaction.rbi index befe2657d..23328bc6a 100644 --- a/rbi/stripe/resources/capital/financing_transaction.rbi +++ b/rbi/stripe/resources/capital/financing_transaction.rbi @@ -8,79 +8,59 @@ module Stripe class FinancingTransaction < APIResource class Details < Stripe::StripeObject class Transaction < Stripe::StripeObject - # The linked payment ID. sig { returns(String) } attr_reader :charge - # The linked Treasury Financing Transaction ID. sig { returns(String) } attr_reader :treasury_transaction end - # The advance amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :advance_amount - # The currency of the financing transaction. sig { returns(String) } attr_reader :currency - # The fee amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :fee_amount - # The linked payment for the transaction. This field only applies to financing transactions of type `paydown` and reason `automatic_withholding`. sig { returns(String) } attr_reader :linked_payment - # The reason for the financing transaction (if applicable). sig { returns(String) } attr_reader :reason - # The reversed transaction. This field only applies to financing - # transactions of type `reversal`. sig { returns(String) } attr_reader :reversed_transaction - # The advance and fee amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :total_amount - # This is an object representing a linked transaction on a Capital Financing Transaction. sig { returns(Transaction) } attr_reader :transaction end - # The ID of the merchant associated with this financing transaction. sig { returns(String) } + # The ID of the merchant associated with this financing transaction. attr_reader :account - - # Time at which the financing transaction was created. Given in seconds since unix epoch. sig { returns(Integer) } + # Time at which the financing transaction was created. Given in seconds since unix epoch. attr_reader :created_at - - # This is an object representing a transaction on a Capital financing offer. sig { returns(Details) } + # This is an object representing a transaction on a Capital financing offer. attr_reader :details - - # The Capital financing offer for this financing transaction. sig { returns(T.nilable(String)) } + # The Capital financing offer for this financing transaction. attr_reader :financing_offer - - # A unique identifier for the financing transaction object. sig { returns(String) } + # A unique identifier for the financing transaction object. attr_reader :id - + sig { returns(String) } # The Capital transaction object that predates the Financing Transactions API and # corresponds with the balance transaction that was created as a result of this # financing transaction. - sig { returns(String) } attr_reader :legacy_balance_transaction_source - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The object type: financing_transaction sig { returns(String) } + # The object type: financing_transaction attr_reader :object - - # The type of the financing transaction. sig { returns(String) } + # The type of the financing transaction. attr_reader :type - - # A human-friendly description of the financing transaction. sig { returns(T.nilable(String)) } + # A human-friendly description of the financing transaction. attr_reader :user_facing_description end end diff --git a/rbi/stripe/resources/card.rbi b/rbi/stripe/resources/card.rbi index 184537225..6ff38acad 100644 --- a/rbi/stripe/resources/card.rbi +++ b/rbi/stripe/resources/card.rbi @@ -10,142 +10,109 @@ module Stripe # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) class Card < APIResource class Networks < Stripe::StripeObject - # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end - # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :account - - # City/District/Suburb/Town/Village. sig { returns(T.nilable(String)) } + # City/District/Suburb/Town/Village. attr_reader :address_city - - # Billing address country, if provided when creating card. sig { returns(T.nilable(String)) } + # Billing address country, if provided when creating card. attr_reader :address_country - - # Address line 1 (Street address/PO Box/Company name). sig { returns(T.nilable(String)) } + # Address line 1 (Street address/PO Box/Company name). attr_reader :address_line1 - - # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } + # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. attr_reader :address_line1_check - - # Address line 2 (Apartment/Suite/Unit/Building). sig { returns(T.nilable(String)) } + # Address line 2 (Apartment/Suite/Unit/Building). attr_reader :address_line2 - - # State/County/Province/Region. sig { returns(T.nilable(String)) } + # State/County/Province/Region. attr_reader :address_state - - # ZIP or postal code. sig { returns(T.nilable(String)) } + # ZIP or postal code. attr_reader :address_zip - - # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } + # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. attr_reader :address_zip_check - - # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. sig { returns(T.nilable(T::Array[String])) } + # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. attr_reader :available_payout_methods - - # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. sig { returns(String) } + # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. attr_reader :brand - - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. attr_reader :country - - # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. sig { returns(T.nilable(String)) } + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :currency - - # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. attr_reader :customer - - # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). sig { returns(T.nilable(String)) } + # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). attr_reader :cvc_check - - # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. sig { returns(T.nilable(T::Boolean)) } + # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. attr_reader :default_for_currency - - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(String) } + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) attr_reader :description - - # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } + # (For tokenized numbers only.) The last four digits of the device account number. attr_reader :dynamic_last4 - - # Two-digit number representing the card's expiration month. sig { returns(Integer) } + # Two-digit number representing the card's expiration month. attr_reader :exp_month - - # Four-digit number representing the card's expiration year. sig { returns(Integer) } + # Four-digit number representing the card's expiration year. attr_reader :exp_year - + sig { returns(T.nilable(String)) } # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. # # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* - sig { returns(T.nilable(String)) } attr_reader :fingerprint - - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(String) } + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. attr_reader :funding - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(String) } + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) attr_reader :iin - - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(String) } + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) attr_reader :issuer - - # The last four digits of the card. sig { returns(String) } + # The last four digits of the card. attr_reader :last4 - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Cardholder name. sig { returns(T.nilable(String)) } + # Cardholder name. attr_reader :name - - # Attribute for field networks sig { returns(Networks) } + # Attribute for field networks attr_reader :networks - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. sig { returns(T.nilable(String)) } + # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. attr_reader :status - - # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. sig { returns(T.nilable(String)) } + # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. attr_reader :tokenization_method - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/cash_balance.rbi b/rbi/stripe/resources/cash_balance.rbi index a1d7e8170..e3991a216 100644 --- a/rbi/stripe/resources/cash_balance.rbi +++ b/rbi/stripe/resources/cash_balance.rbi @@ -6,31 +6,25 @@ module Stripe # A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. class CashBalance < APIResource class Settings < Stripe::StripeObject - # The configuration for how funds that land in the customer cash balance are reconciled. sig { returns(String) } attr_reader :reconciliation_mode - # A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance sig { returns(T::Boolean) } attr_reader :using_merchant_default end - # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(T::Hash[String, Integer])) } + # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :available - - # The ID of the customer whose cash balance this object represents. sig { returns(String) } + # The ID of the customer whose cash balance this object represents. attr_reader :customer - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field settings sig { returns(Settings) } + # Attribute for field settings attr_reader :settings end end \ No newline at end of file diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi index 02e0e3af1..88afe84f4 100644 --- a/rbi/stripe/resources/charge.rbi +++ b/rbi/stripe/resources/charge.rbi @@ -10,202 +10,144 @@ module Stripe class Charge < APIResource class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address - # Email address. sig { returns(T.nilable(String)) } attr_reader :email - # Full name. sig { returns(T.nilable(String)) } attr_reader :name - # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class FraudDetails < Stripe::StripeObject - # Assessments from Stripe. If set, the value is `fraudulent`. sig { returns(String) } attr_reader :stripe_report - # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. sig { returns(String) } attr_reader :user_report end class Level3 < Stripe::StripeObject class LineItem < Stripe::StripeObject - # Attribute for field discount_amount sig { returns(T.nilable(Integer)) } attr_reader :discount_amount - # Attribute for field product_code sig { returns(String) } attr_reader :product_code - # Attribute for field product_description sig { returns(String) } attr_reader :product_description - # Attribute for field quantity sig { returns(T.nilable(Integer)) } attr_reader :quantity - # Attribute for field tax_amount sig { returns(T.nilable(Integer)) } attr_reader :tax_amount - # Attribute for field unit_cost sig { returns(T.nilable(Integer)) } attr_reader :unit_cost end - # Attribute for field customer_reference sig { returns(String) } attr_reader :customer_reference - # Attribute for field line_items sig { returns(T::Array[LineItem]) } attr_reader :line_items - # Attribute for field merchant_reference sig { returns(String) } attr_reader :merchant_reference - # Attribute for field shipping_address_zip sig { returns(String) } attr_reader :shipping_address_zip - # Attribute for field shipping_amount sig { returns(Integer) } attr_reader :shipping_amount - # Attribute for field shipping_from_zip sig { returns(String) } attr_reader :shipping_from_zip end class Outcome < Stripe::StripeObject class Rule < Stripe::StripeObject - # The action taken on the payment. sig { returns(String) } attr_reader :action - # Unique identifier for the object. sig { returns(String) } attr_reader :id - # The predicate to evaluate the payment against. sig { returns(String) } attr_reader :predicate end - # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. sig { returns(T.nilable(String)) } attr_reader :network_advice_code - # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(T.nilable(String)) } attr_reader :network_decline_code - # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. sig { returns(T.nilable(String)) } attr_reader :network_status - # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. sig { returns(T.nilable(String)) } attr_reader :reason - # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. sig { returns(String) } attr_reader :risk_level - # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. sig { returns(Integer) } attr_reader :risk_score - # The ID of the Radar rule that matched the payment, if applicable. sig { returns(T.any(String, Rule)) } attr_reader :rule - # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. sig { returns(T.nilable(String)) } attr_reader :seller_message - # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. sig { returns(String) } attr_reader :type end class PaymentMethodDetails < Stripe::StripeObject class AchCreditTransfer < Stripe::StripeObject - # Account number to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :account_number - # Name of the bank associated with the routing number. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Routing transit number for the bank account to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :routing_number - # SWIFT code of the bank associated with the routing number. sig { returns(T.nilable(String)) } attr_reader :swift_code end class AchDebit < Stripe::StripeObject - # Type of entity that holds the account. This can be either `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # Routing transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end class AcssDebit < Stripe::StripeObject - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Institution number of the bank account sig { returns(T.nilable(String)) } attr_reader :institution_number - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate - # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end class Affirm < Stripe::StripeObject - # The Affirm transaction ID associated with this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class AfterpayClearpay < Stripe::StripeObject - # The Afterpay order ID associated with this payment intent. sig { returns(T.nilable(String)) } attr_reader :order_id - # Order identifier shown to the merchant in Afterpay’s online portal. sig { returns(T.nilable(String)) } attr_reader :reference end class Alipay < Stripe::StripeObject - # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. sig { returns(String) } attr_reader :buyer_id - # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Transaction ID of this particular Alipay transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id end @@ -213,197 +155,139 @@ module Stripe class AmazonPay < Stripe::StripeObject class Funding < Stripe::StripeObject class Card < Stripe::StripeObject - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # Two-digit number representing the card's expiration month. sig { returns(T.nilable(Integer)) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(T.nilable(Integer)) } attr_reader :exp_year - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 end - # Attribute for field card sig { returns(Card) } attr_reader :card - # funding type of the underlying payment method. sig { returns(T.nilable(String)) } attr_reader :type end - # Attribute for field funding sig { returns(Funding) } attr_reader :funding end class AuBecsDebit < Stripe::StripeObject - # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate end class BacsDebit < Stripe::StripeObject - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment. sig { returns(T.nilable(String)) } attr_reader :mandate - # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject - # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Preferred language of the Bancontact authorization page that the customer is redirected to. - # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language - # Owner's verified full name. Values are verified or provided by Bancontact directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Blik < Stripe::StripeObject - # A unique and immutable identifier assigned by BLIK to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Boleto < Stripe::StripeObject - # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check - # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check - # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end class DecrementalAuthorization < Stripe::StripeObject - # Indicates whether or not the decremental authorization feature is supported. sig { returns(String) } attr_reader :status end class ExtendedAuthorization < Stripe::StripeObject - # Indicates whether or not the capture window is extended beyond the standard authorization. sig { returns(String) } attr_reader :status end class IncrementalAuthorization < Stripe::StripeObject - # Indicates whether or not the incremental authorization feature is supported. sig { returns(String) } attr_reader :status end class Installments < Stripe::StripeObject class Plan < Stripe::StripeObject - # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count - # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval - # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end - # Installment plan selected for the payment. sig { returns(T.nilable(Plan)) } attr_reader :plan end class Multicapture < Stripe::StripeObject - # Indicates whether or not multiple captures are supported. sig { returns(String) } attr_reader :status end class NetworkToken < Stripe::StripeObject - # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. sig { returns(T::Boolean) } attr_reader :used end class Overcapture < Stripe::StripeObject - # The maximum amount that can be captured. sig { returns(Integer) } attr_reader :maximum_amount_capturable - # Indicates whether or not the authorized amount can be over-captured. sig { returns(String) } attr_reader :status end class PartialAuthorization < Stripe::StripeObject - # Indicates whether the transaction requested for partial authorization feature and the authorization outcome. sig { returns(String) } attr_reader :status end class ThreeDSecure < Stripe::StripeObject - # For authenticated transactions: how the customer was authenticated by - # the issuing bank. sig { returns(T.nilable(String)) } attr_reader :authentication_flow - # The Electronic Commerce Indicator (ECI). A protocol-level field - # indicating what degree of authentication was performed. sig { returns(T.nilable(String)) } attr_reader :electronic_commerce_indicator - # The exemption requested via 3DS and accepted by the issuer at authentication time. sig { returns(T.nilable(String)) } attr_reader :exemption_indicator - # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on - # the outcome of Stripe's internal risk assessment. sig { returns(T::Boolean) } attr_reader :exemption_indicator_applied - # Indicates the outcome of 3D Secure authentication. sig { returns(T.nilable(String)) } attr_reader :result - # Additional information about why 3D Secure succeeded or failed based - # on the `result`. sig { returns(T.nilable(String)) } attr_reader :result_reason - # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID - # (dsTransId) for this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id - # The version of 3D Secure that was used. sig { returns(T.nilable(String)) } attr_reader :version end @@ -414,753 +298,515 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end - # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout - # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay - # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 - # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass - # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay - # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type - # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end - # The authorized amount. sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized - # The latest amount intended to be authorized by this charge. sig { returns(T.nilable(Integer)) } attr_reader :amount_requested - # Authorization code on the charge. sig { returns(T.nilable(String)) } attr_reader :authorization_code - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before - # Check results by Card networks on Card address and CVC at time of payment. sig { returns(T.nilable(Checks)) } attr_reader :checks - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # Attribute for field decremental_authorization sig { returns(DecrementalAuthorization) } attr_reader :decremental_authorization - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Attribute for field extended_authorization sig { returns(ExtendedAuthorization) } attr_reader :extended_authorization - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # Attribute for field incremental_authorization sig { returns(IncrementalAuthorization) } attr_reader :incremental_authorization - # Installment details for this payment (Mexico only). - # - # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). sig { returns(T.nilable(Installments)) } attr_reader :installments - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment or created by it. sig { returns(T.nilable(String)) } attr_reader :mandate - # True if this payment was marked as MOTO and out of scope for SCA. sig { returns(T.nilable(T::Boolean)) } attr_reader :moto - # Attribute for field multicapture sig { returns(Multicapture) } attr_reader :multicapture - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network - # If this card has network token credentials, this contains the details of the network token credentials. sig { returns(T.nilable(NetworkToken)) } attr_reader :network_token - # Attribute for field overcapture sig { returns(Overcapture) } attr_reader :overcapture - # Attribute for field partial_authorization sig { returns(PartialAuthorization) } attr_reader :partial_authorization - # Populated if this transaction used 3D Secure authentication. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure - # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject - # The type of account being debited or credited sig { returns(String) } attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name - # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code - # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code - # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end - # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product - # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network - # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id - # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline - # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method - # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt - # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject - # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id - # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject - # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank - # Owner's verified full name. Values are verified or provided by EPS directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - # EPS rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Fpx < Stripe::StripeObject - # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank - # Unique transaction id generated by FPX for every request from the merchant sig { returns(T.nilable(String)) } attr_reader :transaction_id end class Giropay < Stripe::StripeObject - # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic - # Owner's verified full name. Values are verified or provided by Giropay directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - # Giropay rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject - # Unique transaction id generated by GrabPay sig { returns(T.nilable(String)) } attr_reader :transaction_id end class IdBankTransfer < Stripe::StripeObject - # Account number of the bank account to transfer funds to. sig { returns(String) } attr_reader :account_number - # Bank where the account is located. sig { returns(String) } attr_reader :bank - # Local bank code of the bank. sig { returns(String) } attr_reader :bank_code - # Name of the bank associated with the bank account. sig { returns(String) } attr_reader :bank_name - # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. sig { returns(String) } attr_reader :display_name end class Ideal < Stripe::StripeObject - # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank - # The Bank Identifier Code of the customer's bank. sig { returns(T.nilable(String)) } attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Owner's verified full name. Values are verified or provided by iDEAL directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class InteracPresent < Stripe::StripeObject class Receipt < Stripe::StripeObject - # The type of account being debited or credited sig { returns(String) } attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name - # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code - # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code - # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end - # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network - # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method - # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt end class KakaoPay < Stripe::StripeObject - # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Klarna < Stripe::StripeObject class PayerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # The payer address country sig { returns(T.nilable(String)) } attr_reader :country end - # The payer's address sig { returns(T.nilable(Address)) } attr_reader :address end - # The payer details for this transaction. sig { returns(T.nilable(PayerDetails)) } attr_reader :payer_details - # The Klarna payment method used for this transaction. - # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` sig { returns(T.nilable(String)) } attr_reader :payment_method_category - # Preferred language of the Klarna authorization page that the customer is redirected to. - # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` sig { returns(T.nilable(String)) } attr_reader :preferred_locale end class Konbini < Stripe::StripeObject class Store < Stripe::StripeObject - # The name of the convenience store chain where the payment was completed. sig { returns(T.nilable(String)) } attr_reader :chain end - # If the payment succeeded, this contains the details of the convenience store where the payment was completed. sig { returns(T.nilable(Store)) } attr_reader :store end class KrCard < Stripe::StripeObject - # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand - # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id - # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject - # Two-letter ISO code representing the funding source country beneath the Link payment. - # You could use this attribute to get a sense of international fees. sig { returns(T.nilable(String)) } attr_reader :country end class MbWay < Stripe::StripeObject; end class Mobilepay < Stripe::StripeObject class Card < Stripe::StripeObject - # Brand of the card used in the transaction sig { returns(T.nilable(String)) } attr_reader :brand - # Two-letter ISO code representing the country of the card sig { returns(T.nilable(String)) } attr_reader :country - # Two digit number representing the card's expiration month sig { returns(T.nilable(Integer)) } attr_reader :exp_month - # Two digit number representing the card's expiration year sig { returns(T.nilable(Integer)) } attr_reader :exp_year - # The last 4 digits of the card sig { returns(T.nilable(String)) } attr_reader :last4 end - # Internal card details sig { returns(T.nilable(Card)) } attr_reader :card end class Multibanco < Stripe::StripeObject - # Entity number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :entity - # Reference number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :reference end class NaverPay < Stripe::StripeObject - # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Oxxo < Stripe::StripeObject - # OXXO reference number sig { returns(T.nilable(String)) } attr_reader :number end class P24 < Stripe::StripeObject - # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. sig { returns(T.nilable(String)) } attr_reader :bank - # Unique reference for this Przelewy24 payment. sig { returns(T.nilable(String)) } attr_reader :reference - # Owner's verified full name. Values are verified or provided by Przelewy24 directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. - # Przelewy24 rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Payco < Stripe::StripeObject - # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Paynow < Stripe::StripeObject - # Reference number associated with this PayNow payment sig { returns(T.nilable(String)) } attr_reader :reference end class Paypal < Stripe::StripeObject class SellerProtection < Stripe::StripeObject - # An array of conditions that are covered for the transaction, if applicable. sig { returns(T.nilable(T::Array[String])) } attr_reader :dispute_categories - # Indicates whether the transaction is eligible for PayPal's seller protection. sig { returns(String) } attr_reader :status end class Shipping < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class VerifiedAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Owner's email. Values are provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email - # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id - # Owner's full name. Values provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_name - # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. sig { returns(T.nilable(SellerProtection)) } attr_reader :seller_protection - # The shipping address for the customer, as supplied by the merchant at the point of payment - # execution. This shipping address will not be updated if the merchant updates the shipping - # address on the PaymentIntent after the PaymentIntent was successfully confirmed. sig { returns(T.nilable(Shipping)) } attr_reader :shipping - # A unique ID generated by PayPal for this transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id - # The shipping address for the customer, as supplied by the merchant at the point of payment - # execution. This shipping address will not be updated if the merchant updates the shipping - # address on the PaymentIntent after the PaymentIntent was successfully confirmed. sig { returns(T.nilable(VerifiedAddress)) } attr_reader :verified_address - # Owner's verified email. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email - # Owner's verified full name. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Payto < Stripe::StripeObject - # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate - # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end class Pix < Stripe::StripeObject - # Unique transaction id generated by BCB sig { returns(T.nilable(String)) } attr_reader :bank_transaction_id end class Promptpay < Stripe::StripeObject - # Bill reference generated by PromptPay sig { returns(T.nilable(String)) } attr_reader :reference end @@ -1169,574 +815,410 @@ module Stripe class RevolutPay < Stripe::StripeObject class Funding < Stripe::StripeObject class Card < Stripe::StripeObject - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # Two-digit number representing the card's expiration month. sig { returns(T.nilable(Integer)) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(T.nilable(Integer)) } attr_reader :exp_year - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 end - # Attribute for field card sig { returns(Card) } attr_reader :card - # funding type of the underlying payment method. sig { returns(T.nilable(String)) } attr_reader :type end - # Attribute for field funding sig { returns(Funding) } attr_reader :funding end class SamsungPay < Stripe::StripeObject - # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class SepaCreditTransfer < Stripe::StripeObject - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic - # IBAN of the bank account to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :iban end class SepaDebit < Stripe::StripeObject - # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code - # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 - # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). sig { returns(T.nilable(String)) } attr_reader :mandate end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic - # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Preferred language of the SOFORT authorization page that the customer is redirected to. - # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` sig { returns(T.nilable(String)) } attr_reader :preferred_language - # Owner's verified full name. Values are verified or provided by SOFORT directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class StripeAccount < Stripe::StripeObject; end class Swish < Stripe::StripeObject - # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Payer bank reference number for the payment sig { returns(T.nilable(String)) } attr_reader :payment_reference - # The last four digits of the Swish account phone number sig { returns(T.nilable(String)) } attr_reader :verified_phone_last4 end class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject - # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate - # Reference number to locate ACH payments with customer's bank. sig { returns(T.nilable(String)) } attr_reader :payment_reference - # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end class Wechat < Stripe::StripeObject; end class WechatPay < Stripe::StripeObject - # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Transaction ID of this particular WeChat Pay transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class Zip < Stripe::StripeObject; end - # Attribute for field ach_credit_transfer sig { returns(AchCreditTransfer) } attr_reader :ach_credit_transfer - # Attribute for field ach_debit sig { returns(AchDebit) } attr_reader :ach_debit - # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit - # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm - # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay - # Attribute for field alma sig { returns(Alma) } attr_reader :alma - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit - # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact - # Attribute for field blik sig { returns(Blik) } attr_reader :blik - # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present - # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp - # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance - # Attribute for field eps sig { returns(Eps) } attr_reader :eps - # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx - # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay - # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay - # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay - # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal - # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present - # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay - # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna - # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini - # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way - # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay - # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco - # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay - # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo - # Attribute for field p24 sig { returns(P24) } attr_reader :p24 - # Attribute for field payco sig { returns(Payco) } attr_reader :payco - # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field payto sig { returns(Payto) } attr_reader :payto - # Attribute for field pix sig { returns(Pix) } attr_reader :pix - # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay - # Attribute for field qris sig { returns(Qris) } attr_reader :qris - # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung - # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay - # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay - # Attribute for field sepa_credit_transfer sig { returns(SepaCreditTransfer) } attr_reader :sepa_credit_transfer - # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit - # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay - # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort - # Attribute for field stripe_account sig { returns(StripeAccount) } attr_reader :stripe_account - # Attribute for field swish sig { returns(Swish) } attr_reader :swish - # Attribute for field twint sig { returns(Twint) } attr_reader :twint - # The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. - # An additional hash is included on `payment_method_details` with a name matching this value. - # It contains information specific to the payment method. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account - # Attribute for field wechat sig { returns(Wechat) } attr_reader :wechat - # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay - # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class RadarOptions < Stripe::StripeObject - # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. sig { returns(String) } attr_reader :session end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TransferData < Stripe::StripeObject - # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. sig { returns(T.nilable(Integer)) } attr_reader :amount - # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } + # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). attr_reader :amount - - # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). sig { returns(Integer) } + # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). attr_reader :amount_captured - - # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). sig { returns(Integer) } + # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). attr_reader :amount_refunded - - # ID of the Connect application that created the charge. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the charge. attr_reader :application - - # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } + # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. attr_reader :application_fee - - # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. attr_reader :application_fee_amount - - # Authorization code on the charge. sig { returns(String) } + # Authorization code on the charge. attr_reader :authorization_code - - # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). attr_reader :balance_transaction - - # Attribute for field billing_details sig { returns(BillingDetails) } + # Attribute for field billing_details attr_reader :billing_details - - # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. sig { returns(T.nilable(String)) } + # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. attr_reader :calculated_statement_descriptor - - # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. sig { returns(T::Boolean) } + # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. attr_reader :captured - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # ID of the customer this charge is for if one exists. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the customer this charge is for if one exists. attr_reader :customer - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Whether the charge has been disputed. sig { returns(T::Boolean) } + # Whether the charge has been disputed. attr_reader :disputed - - # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. attr_reader :failure_balance_transaction - - # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). sig { returns(T.nilable(String)) } + # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). attr_reader :failure_code - - # Message to user further explaining reason for charge failure if available. sig { returns(T.nilable(String)) } + # Message to user further explaining reason for charge failure if available. attr_reader :failure_message - - # Information on fraud assessments for the charge. sig { returns(T.nilable(FraudDetails)) } + # Information on fraud assessments for the charge. attr_reader :fraud_details - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # ID of the invoice this charge is for if one exists. sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice this charge is for if one exists. attr_reader :invoice - - # Attribute for field level3 sig { returns(Level3) } + # Attribute for field level3 attr_reader :level3 - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. attr_reader :on_behalf_of - - # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. sig { returns(T.nilable(Outcome)) } + # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. attr_reader :outcome - - # `true` if the charge succeeded, or was successfully authorized for later capture. sig { returns(T::Boolean) } + # `true` if the charge succeeded, or was successfully authorized for later capture. attr_reader :paid - - # ID of the PaymentIntent associated with this charge, if one exists. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent associated with this charge, if one exists. attr_reader :payment_intent - - # ID of the payment method used in this charge. sig { returns(T.nilable(String)) } + # ID of the payment method used in this charge. attr_reader :payment_method - - # Details about the payment method at the time of the transaction. sig { returns(T.nilable(PaymentMethodDetails)) } + # Details about the payment method at the time of the transaction. attr_reader :payment_method_details - - # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. sig { returns(RadarOptions) } + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. attr_reader :radar_options - - # This is the email address that the receipt for this charge was sent to. sig { returns(T.nilable(String)) } + # This is the email address that the receipt for this charge was sent to. attr_reader :receipt_email - - # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. attr_reader :receipt_number - - # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. sig { returns(T.nilable(String)) } + # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. attr_reader :receipt_url - - # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. sig { returns(T::Boolean) } + # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. attr_reader :refunded - - # A list of refunds that have been applied to the charge. sig { returns(T.nilable(Stripe::ListObject)) } + # A list of refunds that have been applied to the charge. attr_reader :refunds - - # ID of the review associated with this charge if one exists. sig { returns(T.nilable(T.any(String, Stripe::Review))) } + # ID of the review associated with this charge if one exists. attr_reader :review - - # Shipping information for the charge. sig { returns(T.nilable(Shipping)) } + # Shipping information for the charge. attr_reader :shipping - - # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. sig { returns(T.nilable(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))) } + # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. attr_reader :source - - # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. sig { returns(T.nilable(T.any(String, Stripe::Transfer))) } + # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. attr_reader :source_transfer - + sig { returns(T.nilable(String)) } # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. - sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - - # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. sig { returns(T.nilable(String)) } + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. attr_reader :statement_descriptor_suffix - - # The status of the payment is either `succeeded`, `pending`, or `failed`. sig { returns(String) } + # The status of the payment is either `succeeded`, `pending`, or `failed`. attr_reader :status - - # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). sig { returns(T.any(String, Stripe::Transfer)) } + # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). attr_reader :transfer - - # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. sig { returns(T.nilable(TransferData)) } + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. attr_reader :transfer_data - - # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. sig { returns(T.nilable(String)) } + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. attr_reader :transfer_group end end \ No newline at end of file diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index e90f75931..4f708a4e2 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -20,1485 +20,932 @@ module Stripe # Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) class Session < APIResource class AdaptivePricing < Stripe::StripeObject - # Whether Adaptive Pricing is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class AfterExpiration < Stripe::StripeObject class Recovery < Stripe::StripeObject - # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` sig { returns(T::Boolean) } attr_reader :allow_promotion_codes - # If `true`, a recovery url will be generated to recover this Checkout Session if it - # expires before a transaction is completed. It will be attached to the - # Checkout Session object upon expiration. sig { returns(T::Boolean) } attr_reader :enabled - # The timestamp at which the recovery URL will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_at - # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session sig { returns(T.nilable(String)) } attr_reader :url end - # When set, configuration used to recover the Checkout Session on expiry. sig { returns(T.nilable(Recovery)) } attr_reader :recovery end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Indicates whether automatic tax is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability - # The status of the most recent automated tax calculation for this session. sig { returns(T.nilable(String)) } attr_reader :status end class CollectedInformation < Stripe::StripeObject class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type - # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end - # Customer’s business name for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :business_name - # Customer’s email for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :email - # Customer’s phone number for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :phone - # Shipping information for this Checkout Session. sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - # Customer’s tax ids for this Checkout Session. sig { returns(T.nilable(T::Array[TaxId])) } attr_reader :tax_ids end class Consent < Stripe::StripeObject - # If `opt_in`, the customer consents to receiving promotional communications - # from the merchant about this Checkout Session. sig { returns(T.nilable(String)) } attr_reader :promotions - # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject - # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. - # - # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. sig { returns(String) } attr_reader :position end - # If set to `hidden`, it will hide legal text related to the reuse of a payment method. sig { returns(T.nilable(PaymentMethodReuseAgreement)) } attr_reader :payment_method_reuse_agreement - # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - # Session will determine whether to display an option to opt into promotional communication - # from the merchant depending on the customer's locale. Only available to US merchants. sig { returns(T.nilable(String)) } attr_reader :promotions - # If set to `required`, it requires customers to accept the terms of service before being able to pay. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class CurrencyConversion < Stripe::StripeObject - # Total of all items in source currency before discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal - # Total of all items in source currency after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total - # Exchange rate used to convert source currency amounts to customer currency amounts sig { returns(String) } attr_reader :fx_rate - # Creation currency of the CheckoutSession before localization sig { returns(String) } attr_reader :source_currency end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject - # The label for the option, displayed to the customer. Up to 100 characters. sig { returns(String) } attr_reader :label - # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. sig { returns(String) } attr_reader :value end - # The value that will pre-fill on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value - # The options available for the customer to select. Up to 200 options allowed. sig { returns(T::Array[Option]) } attr_reader :options - # The option selected by the customer. This will be the `value` for the option. sig { returns(T.nilable(String)) } attr_reader :value end class Label < Stripe::StripeObject - # Custom text for the label, displayed to the customer. Up to 50 characters. sig { returns(T.nilable(String)) } attr_reader :custom - # The type of the label. sig { returns(String) } attr_reader :type end class Numeric < Stripe::StripeObject - # The value that will pre-fill the field on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value - # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length - # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length - # The value entered by the customer, containing only digits. sig { returns(T.nilable(String)) } attr_reader :value end class Text < Stripe::StripeObject - # The value that will pre-fill the field on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value - # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length - # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length - # The value entered by the customer. sig { returns(T.nilable(String)) } attr_reader :value end - # Attribute for field dropdown sig { returns(Dropdown) } attr_reader :dropdown - # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. sig { returns(String) } attr_reader :key - # Attribute for field label sig { returns(Label) } attr_reader :label - # Attribute for field numeric sig { returns(Numeric) } attr_reader :numeric - # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. sig { returns(T::Boolean) } attr_reader :optional - # Attribute for field text sig { returns(Text) } attr_reader :text - # The type of the field. sig { returns(String) } attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject - # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class ShippingAddress < Stripe::StripeObject - # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class Submit < Stripe::StripeObject - # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject - # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end - # Custom text that should be displayed after the payment confirmation button. sig { returns(T.nilable(AfterSubmit)) } attr_reader :after_submit - # Custom text that should be displayed alongside shipping address collection. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address - # Custom text that should be displayed alongside the payment confirmation button. sig { returns(T.nilable(Submit)) } attr_reader :submit - # Custom text that should be displayed in place of the default terms of service agreement text. sig { returns(T.nilable(TermsOfServiceAcceptance)) } attr_reader :terms_of_service_acceptance end class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type - # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end - # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. sig { returns(T.nilable(Address)) } attr_reader :address - # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. - # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. sig { returns(T.nilable(String)) } attr_reader :email - # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. sig { returns(T.nilable(String)) } attr_reader :name - # The customer's phone number after a completed Checkout Session. sig { returns(T.nilable(String)) } attr_reader :phone - # The customer’s tax exempt status after a completed Checkout Session. sig { returns(T.nilable(String)) } attr_reader :tax_exempt - # The customer’s tax IDs after a completed Checkout Session. sig { returns(T.nilable(T::Array[TaxId])) } attr_reader :tax_ids end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject - # The name of the custom field. sig { returns(String) } attr_reader :name - # The value of the custom field. sig { returns(String) } attr_reader :value end class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end class RenderingOptions < Stripe::StripeObject - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display end - # The account tax IDs associated with the invoice. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - # Custom fields displayed on the invoice. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description - # Footer displayed on the invoice. sig { returns(T.nilable(String)) } attr_reader :footer - # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # Options for invoice PDF rendering. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end - # Indicates whether invoice creation is enabled for the Checkout Session. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field invoice_data sig { returns(InvoiceData) } attr_reader :invoice_data end class PaymentMethodConfigurationDetails < Stripe::StripeObject - # ID of the payment method configuration used. sig { returns(String) } attr_reader :id - # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url - # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. sig { returns(T::Array[String]) } attr_reader :default_for - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description - # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule - # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end - # Currency supported by the bank account. Returned when the Session is in `setup` mode. sig { returns(String) } attr_reader :currency - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Affirm < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AmazonPay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject - # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. sig { returns(Integer) } attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject - # Indicates if installments are enabled sig { returns(T::Boolean) } attr_reader :enabled end - # Attribute for field installments sig { returns(Installments) } attr_reader :installments - # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_decremental_authorization - # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_extended_authorization - # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_incremental_authorization - # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. sig { returns(String) } attr_reader :request_multicapture - # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. sig { returns(String) } attr_reader :request_overcapture - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(String) } attr_reader :request_three_d_secure - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kana - # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kanji end class Cashapp < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end - # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer - # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - # - # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types - # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end - # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Eps < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KakaoPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject - # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Oxxo < Stripe::StripeObject - # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Payco < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Paynow < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount - # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type - # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date - # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule - # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period - # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose - # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Pix < Stripe::StripeObject - # The number of seconds after which Pix payment will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_seconds end class RevolutPay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Swish < Stripe::StripeObject - # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. sig { returns(T.nilable(String)) } attr_reader :reference end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject - # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end - # Attribute for field filters sig { returns(Filters) } attr_reader :filters - # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry - # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions - # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch - # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end - # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end - # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit - # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm - # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit - # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact - # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp - # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance - # Attribute for field eps sig { returns(Eps) } attr_reader :eps - # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx - # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay - # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay - # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal - # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay - # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna - # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini - # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay - # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco - # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay - # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo - # Attribute for field p24 sig { returns(P24) } attr_reader :p24 - # Attribute for field payco sig { returns(Payco) } attr_reader :payco - # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field payto sig { returns(Payto) } attr_reader :payto - # Attribute for field pix sig { returns(Pix) } attr_reader :pix - # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay - # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay - # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit - # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort - # Attribute for field swish sig { returns(Swish) } attr_reader :swish - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class Permissions < Stripe::StripeObject class Update < Stripe::StripeObject - # Determines which entity is allowed to update the line items. - # - # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. - # - # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. sig { returns(T.nilable(String)) } attr_reader :line_items - # Determines which entity is allowed to update the shipping details. - # - # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - # - # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. sig { returns(T.nilable(String)) } attr_reader :shipping_details end - # Permissions for updating the Checkout Session. sig { returns(T.nilable(Update)) } attr_reader :update end class PhoneNumberCollection < Stripe::StripeObject - # Indicates whether phone number collection is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled end class SavedPaymentMethodOptions < Stripe::StripeObject - # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. sig { returns(T.nilable(T::Array[String])) } attr_reader :allow_redisplay_filters - # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. sig { returns(T.nilable(String)) } attr_reader :payment_method_remove - # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. sig { returns(T.nilable(String)) } attr_reader :payment_method_save end class ShippingAddressCollection < Stripe::StripeObject - # An array of two-letter ISO country codes representing which countries Checkout should provide as options for - # shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. sig { returns(T::Array[String]) } attr_reader :allowed_countries end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # Total shipping cost before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax - # Total shipping cost after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total - # The ID of the ShippingRate for this order. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate - # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class ShippingOption < Stripe::StripeObject - # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :shipping_amount - # The shipping rate. sig { returns(T.any(String, Stripe::ShippingRate)) } attr_reader :shipping_rate end class TaxIdCollection < Stripe::StripeObject - # Indicates whether tax ID collection is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled - # Indicates whether a tax ID is required on the payment page sig { returns(String) } attr_reader :required end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts - # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end - # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount - # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping - # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax - # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end - # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). sig { returns(T.nilable(AdaptivePricing)) } + # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). attr_reader :adaptive_pricing - - # When set, provides configuration for actions to take if this Checkout Session expires. sig { returns(T.nilable(AfterExpiration)) } + # When set, provides configuration for actions to take if this Checkout Session expires. attr_reader :after_expiration - - # Enables user redeemable promotion codes. sig { returns(T.nilable(T::Boolean)) } + # Enables user redeemable promotion codes. attr_reader :allow_promotion_codes - - # Total of all items before discounts or taxes are applied. sig { returns(T.nilable(Integer)) } + # Total of all items before discounts or taxes are applied. attr_reader :amount_subtotal - - # Total of all items after discounts and taxes are applied. sig { returns(T.nilable(Integer)) } + # Total of all items after discounts and taxes are applied. attr_reader :amount_total - - # Attribute for field automatic_tax sig { returns(AutomaticTax) } + # Attribute for field automatic_tax attr_reader :automatic_tax - - # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. sig { returns(T.nilable(String)) } + # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. attr_reader :billing_address_collection - - # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. sig { returns(T.nilable(String)) } + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. attr_reader :cancel_url - + sig { returns(T.nilable(String)) } # A unique string to reference the Checkout Session. This can be a # customer ID, a cart ID, or similar, and can be used to reconcile the # Session with your internal systems. - sig { returns(T.nilable(String)) } attr_reader :client_reference_id - - # The client secret of the Session. Use this with [initCustomCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. sig { returns(T.nilable(String)) } + # The client secret of the Session. Use this with [initCustomCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. attr_reader :client_secret - - # Information about the customer collected within the Checkout Session. sig { returns(T.nilable(CollectedInformation)) } + # Information about the customer collected within the Checkout Session. attr_reader :collected_information - - # Results of `consent_collection` for this session. sig { returns(T.nilable(Consent)) } + # Results of `consent_collection` for this session. attr_reader :consent - - # When set, provides configuration for the Checkout Session to gather active consent from customers. sig { returns(T.nilable(ConsentCollection)) } + # When set, provides configuration for the Checkout Session to gather active consent from customers. attr_reader :consent_collection - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions sig { returns(T.nilable(CurrencyConversion)) } + # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions attr_reader :currency_conversion - - # Collect additional information from your customer using custom fields. Up to 3 fields are supported. sig { returns(T::Array[CustomField]) } + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. attr_reader :custom_fields - - # Attribute for field custom_text sig { returns(CustomText) } + # Attribute for field custom_text attr_reader :custom_text - + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The ID of the customer for this Session. # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout # will create a new customer object based on information provided # during the payment flow unless an existing customer was provided when # the Session was created. - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - - # Configure whether a Checkout Session creates a Customer when the Checkout Session completes. sig { returns(T.nilable(String)) } + # Configure whether a Checkout Session creates a Customer when the Checkout Session completes. attr_reader :customer_creation - - # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. sig { returns(T.nilable(CustomerDetails)) } + # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. attr_reader :customer_details - + sig { returns(T.nilable(String)) } # If provided, this value will be used when the Customer object is created. # If not provided, customers will be asked to enter their email address. # Use this parameter to prefill customer data if you already have an email # on file. To access information about the customer once the payment flow is # complete, use the `customer` attribute. - sig { returns(T.nilable(String)) } attr_reader :customer_email - - # The timestamp at which the Checkout Session will expire. sig { returns(Integer) } + # The timestamp at which the Checkout Session will expire. attr_reader :expires_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # ID of the invoice created by the Checkout Session, if it exists. sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice created by the Checkout Session, if it exists. attr_reader :invoice - - # Details on the state of invoice creation for the Checkout Session. sig { returns(T.nilable(InvoiceCreation)) } + # Details on the state of invoice creation for the Checkout Session. attr_reader :invoice_creation - - # The line items purchased by the customer. sig { returns(Stripe::ListObject) } + # The line items purchased by the customer. attr_reader :line_items - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. sig { returns(T.nilable(String)) } + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. attr_reader :locale - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The mode of the Checkout Session. sig { returns(String) } + # The mode of the Checkout Session. attr_reader :mode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. attr_reader :payment_intent - - # The ID of the Payment Link that created this Session. sig { returns(T.nilable(T.any(String, Stripe::PaymentLink))) } + # The ID of the Payment Link that created this Session. attr_reader :payment_link - - # Configure whether a Checkout Session should collect a payment method. Defaults to `always`. sig { returns(T.nilable(String)) } + # Configure whether a Checkout Session should collect a payment method. Defaults to `always`. attr_reader :payment_method_collection - - # Information about the payment method configuration used for this Checkout session if using dynamic payment methods. sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the payment method configuration used for this Checkout session if using dynamic payment methods. attr_reader :payment_method_configuration_details - - # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. attr_reader :payment_method_options - + sig { returns(T::Array[String]) } # A list of the types of payment methods (e.g. card) this Checkout # Session is allowed to accept. - sig { returns(T::Array[String]) } attr_reader :payment_method_types - + sig { returns(String) } # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. # You can use this value to decide when to fulfill your customer's order. - sig { returns(String) } attr_reader :payment_status - + sig { returns(T.nilable(Permissions)) } # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. # # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. - sig { returns(T.nilable(Permissions)) } attr_reader :permissions - - # Attribute for field phone_number_collection sig { returns(PhoneNumberCollection) } + # Attribute for field phone_number_collection attr_reader :phone_number_collection - - # The ID of the original expired Checkout Session that triggered the recovery flow. sig { returns(T.nilable(String)) } + # The ID of the original expired Checkout Session that triggered the recovery flow. attr_reader :recovered_from - - # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. sig { returns(String) } + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. attr_reader :redirect_on_completion - - # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. sig { returns(String) } + # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. attr_reader :return_url - - # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. sig { returns(T.nilable(SavedPaymentMethodOptions)) } + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. attr_reader :saved_payment_method_options - - # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } + # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. attr_reader :setup_intent - - # When set, provides configuration for Checkout to collect a shipping address from a customer. sig { returns(T.nilable(ShippingAddressCollection)) } + # When set, provides configuration for Checkout to collect a shipping address from a customer. attr_reader :shipping_address_collection - - # The details of the customer cost of shipping, including the customer chosen ShippingRate. sig { returns(T.nilable(ShippingCost)) } + # The details of the customer cost of shipping, including the customer chosen ShippingRate. attr_reader :shipping_cost - - # Shipping information for this Checkout Session. sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this Checkout Session. attr_reader :shipping_details - - # The shipping rate options applied to this Session. sig { returns(T::Array[ShippingOption]) } + # The shipping rate options applied to this Session. attr_reader :shipping_options - - # The status of the Checkout Session, one of `open`, `complete`, or `expired`. sig { returns(T.nilable(String)) } + # The status of the Checkout Session, one of `open`, `complete`, or `expired`. attr_reader :status - + sig { returns(T.nilable(String)) } # Describes the type of transaction being performed by Checkout in order to customize # relevant text on the page, such as the submit button. `submit_type` can only be # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. - sig { returns(T.nilable(String)) } attr_reader :submit_type - - # The ID of the subscription for Checkout Sessions in `subscription` mode. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The ID of the subscription for Checkout Sessions in `subscription` mode. attr_reader :subscription - + sig { returns(T.nilable(String)) } # The URL the customer will be directed to after the payment or # subscription creation is successful. - sig { returns(T.nilable(String)) } attr_reader :success_url - - # Attribute for field tax_id_collection sig { returns(TaxIdCollection) } + # Attribute for field tax_id_collection attr_reader :tax_id_collection - - # Tax and discount details for the computed total amount. sig { returns(T.nilable(TotalDetails)) } + # Tax and discount details for the computed total amount. attr_reader :total_details - - # The UI mode of the Session. Defaults to `hosted`. sig { returns(T.nilable(String)) } + # The UI mode of the Session. Defaults to `hosted`. attr_reader :ui_mode - + sig { returns(T.nilable(String)) } # The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` # This value is only present when the session is active. - sig { returns(T.nilable(String)) } attr_reader :url end end diff --git a/rbi/stripe/resources/climate/order.rbi b/rbi/stripe/resources/climate/order.rbi index fbe6c3b25..e70f319d7 100644 --- a/rbi/stripe/resources/climate/order.rbi +++ b/rbi/stripe/resources/climate/order.rbi @@ -8,130 +8,98 @@ module Stripe # payment is deducted from your merchant balance. class Order < APIResource class Beneficiary < Stripe::StripeObject - # Publicly displayable name for the end beneficiary of carbon removal. sig { returns(String) } attr_reader :public_name end class DeliveryDetail < Stripe::StripeObject class Location < Stripe::StripeObject - # The city where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter ISO code representing the country where the supplier is located. sig { returns(String) } attr_reader :country - # The geographic latitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :latitude - # The geographic longitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :longitude - # The state/county/province/region where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :region end - # Time at which the delivery occurred. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :delivered_at - # Specific location of this delivery. sig { returns(T.nilable(Location)) } attr_reader :location - # Quantity of carbon removal supplied by this delivery. sig { returns(String) } attr_reader :metric_tons - # Once retired, a URL to the registry entry for the tons from this delivery. sig { returns(T.nilable(String)) } attr_reader :registry_url - # A supplier of carbon removal. sig { returns(Stripe::Climate::Supplier) } attr_reader :supplier end - # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. sig { returns(Integer) } + # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. attr_reader :amount_fees - - # Total amount of the carbon removal in the currency's smallest unit. sig { returns(Integer) } + # Total amount of the carbon removal in the currency's smallest unit. attr_reader :amount_subtotal - - # Total amount of the order including fees in the currency's smallest unit. sig { returns(Integer) } + # Total amount of the order including fees in the currency's smallest unit. attr_reader :amount_total - - # Attribute for field beneficiary sig { returns(Beneficiary) } + # Attribute for field beneficiary attr_reader :beneficiary - - # Time at which the order was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the order was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at - - # Reason for the cancellation of this order. sig { returns(T.nilable(String)) } + # Reason for the cancellation of this order. attr_reader :cancellation_reason - - # For delivered orders, a URL to a delivery certificate for the order. sig { returns(T.nilable(String)) } + # For delivered orders, a URL to a delivery certificate for the order. attr_reader :certificate - - # Time at which the order was confirmed. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the order was confirmed. Measured in seconds since the Unix epoch. attr_reader :confirmed_at - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. attr_reader :currency - - # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. attr_reader :delayed_at - - # Time at which the order was delivered. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the order was delivered. Measured in seconds since the Unix epoch. attr_reader :delivered_at - - # Details about the delivery of carbon removal for this order. sig { returns(T::Array[DeliveryDetail]) } + # Details about the delivery of carbon removal for this order. attr_reader :delivery_details - - # The year this order is expected to be delivered. sig { returns(Integer) } + # The year this order is expected to be delivered. attr_reader :expected_delivery_year - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Quantity of carbon removal that is included in this order. sig { returns(String) } + # Quantity of carbon removal that is included in this order. attr_reader :metric_tons - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Unique ID for the Climate `Product` this order is purchasing. sig { returns(T.any(String, Stripe::Climate::Product)) } + # Unique ID for the Climate `Product` this order is purchasing. attr_reader :product - - # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. attr_reader :product_substituted_at - - # The current status of this order. sig { returns(String) } + # The current status of this order. attr_reader :status end end diff --git a/rbi/stripe/resources/climate/product.rbi b/rbi/stripe/resources/climate/product.rbi index e56a4895f..f2c914179 100644 --- a/rbi/stripe/resources/climate/product.rbi +++ b/rbi/stripe/resources/climate/product.rbi @@ -8,52 +8,41 @@ module Stripe # You can retrieve it to see the current price and availability. class Product < APIResource class CurrentPricesPerMetricTon < Stripe::StripeObject - # Fees for one metric ton of carbon removal in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_fees - # Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_subtotal - # Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_total end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Current prices for a metric ton of carbon removal in a currency's smallest unit. sig { returns(T::Hash[String, CurrentPricesPerMetricTon]) } + # Current prices for a metric ton of carbon removal in a currency's smallest unit. attr_reader :current_prices_per_metric_ton - - # The year in which the carbon removal is expected to be delivered. sig { returns(T.nilable(Integer)) } + # The year in which the carbon removal is expected to be delivered. attr_reader :delivery_year - + sig { returns(String) } # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) # for a list of available carbon removal products. - sig { returns(String) } attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The quantity of metric tons available for reservation. sig { returns(String) } + # The quantity of metric tons available for reservation. attr_reader :metric_tons_available - - # The Climate product's name. sig { returns(String) } + # The Climate product's name. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The carbon removal suppliers that fulfill orders for this Climate product. sig { returns(T::Array[Stripe::Climate::Supplier]) } + # The carbon removal suppliers that fulfill orders for this Climate product. attr_reader :suppliers end end diff --git a/rbi/stripe/resources/climate/supplier.rbi b/rbi/stripe/resources/climate/supplier.rbi index 7c5e6c71a..04d8561d9 100644 --- a/rbi/stripe/resources/climate/supplier.rbi +++ b/rbi/stripe/resources/climate/supplier.rbi @@ -7,48 +7,37 @@ module Stripe # A supplier of carbon removal. class Supplier < APIResource class Location < Stripe::StripeObject - # The city where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter ISO code representing the country where the supplier is located. sig { returns(String) } attr_reader :country - # The geographic latitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :latitude - # The geographic longitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :longitude - # The state/county/province/region where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :region end - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Link to a webpage to learn more about the supplier. sig { returns(String) } + # Link to a webpage to learn more about the supplier. attr_reader :info_url - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The locations in which this supplier operates. sig { returns(T::Array[Location]) } + # The locations in which this supplier operates. attr_reader :locations - - # Name of this carbon removal supplier. sig { returns(String) } + # Name of this carbon removal supplier. attr_reader :name - - # String representing the object’s type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object’s type. Objects of the same type share the same value. attr_reader :object - - # The scientific pathway used for carbon removal. sig { returns(String) } + # The scientific pathway used for carbon removal. attr_reader :removal_pathway end end diff --git a/rbi/stripe/resources/confirmation_token.rbi b/rbi/stripe/resources/confirmation_token.rbi index 06667ebc4..19356d838 100644 --- a/rbi/stripe/resources/confirmation_token.rbi +++ b/rbi/stripe/resources/confirmation_token.rbi @@ -14,49 +14,37 @@ module Stripe class MandateData < Stripe::StripeObject class CustomerAcceptance < Stripe::StripeObject class Online < Stripe::StripeObject - # The IP address from which the Mandate was accepted by the customer. sig { returns(T.nilable(String)) } attr_reader :ip_address - # The user agent of the browser from which the Mandate was accepted by the customer. sig { returns(T.nilable(String)) } attr_reader :user_agent end - # If this is a Mandate accepted online, this hash contains details about the online acceptance. sig { returns(T.nilable(Online)) } attr_reader :online - # The type of customer acceptance information included with the Mandate. sig { returns(String) } attr_reader :type end - # This hash contains details about the customer acceptance of the Mandate. sig { returns(CustomerAcceptance) } attr_reader :customer_acceptance end class PaymentMethodOptions < Stripe::StripeObject class Card < Stripe::StripeObject - # The `cvc_update` Token collected from the Payment Element. sig { returns(T.nilable(String)) } attr_reader :cvc_token end - # This hash contains the card payment method options. sig { returns(T.nilable(Card)) } attr_reader :card end class PaymentMethodPreview < Stripe::StripeObject class AcssDebit < Stripe::StripeObject - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Institution number of the bank account. sig { returns(T.nilable(String)) } attr_reader :institution_number - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end @@ -66,77 +54,57 @@ module Stripe class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - # Six-digit number identifying bank and branch associated with this bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 end class BacsDebit < Stripe::StripeObject - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address - # Email address. sig { returns(T.nilable(String)) } attr_reader :email - # Full name. sig { returns(T.nilable(String)) } attr_reader :name - # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject - # Uniquely identifies the customer tax id (CNPJ or CPF) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check - # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check - # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end @@ -144,152 +112,105 @@ module Stripe class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject - # The type of account being debited or credited sig { returns(String) } attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name - # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code - # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code - # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end - # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product - # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network - # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id - # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline - # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method - # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt - # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end - # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present - # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. sig { returns(String) } attr_reader :type end - # The charge that created this object. sig { returns(T.nilable(String)) } attr_reader :charge - # Transaction-specific details of the payment method used in the payment. sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details - # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end class Networks < Stripe::StripeObject - # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available - # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject - # Whether 3D Secure is supported on this card. sig { returns(T::Boolean) } attr_reader :supported end @@ -300,287 +221,199 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end - # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout - # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay - # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 - # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass - # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay - # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type - # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand - # Checks on Card address and CVC if provided. sig { returns(T.nilable(Checks)) } attr_reader :checks - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. sig { returns(T.nilable(String)) } attr_reader :display_brand - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(String) } attr_reader :funding - # Details of the original PaymentMethod that created this object. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(String) } attr_reader :last4 - # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks - # Contains details on how this Card may be used for 3D Secure authentication. sig { returns(T.nilable(ThreeDSecureUsage)) } attr_reader :three_d_secure_usage - # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available - # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks - # Details about payment methods collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method - # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject - # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id - # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject - # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank end class Fpx < Stripe::StripeObject - # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank end @@ -588,112 +421,80 @@ module Stripe class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank - # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field display_name sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject - # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank - # The Bank Identifier Code of the customer's bank, if the bank was provided. sig { returns(T.nilable(String)) } attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available - # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end - # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end - # The customer's date of birth, if provided. sig { returns(T.nilable(Dob)) } attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject - # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand - # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject - # Account owner's email address. sig { returns(T.nilable(String)) } attr_reader :email - # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(String) } attr_reader :persistent_token end @@ -701,42 +502,31 @@ module Stripe class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject - # Whether to fund this transaction with Naver Pay points or a card. sig { returns(String) } attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject - # The customer's bank, if provided. sig { returns(T.nilable(String)) } attr_reader :bank end class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Owner's email. Values are provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email - # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id - # Owner's verified email. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject - # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end @@ -745,17 +535,13 @@ module Stripe class Qris < Stripe::StripeObject; end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. sig { returns(Integer) } attr_reader :day - # The month of birth, between 1 and 12. sig { returns(Integer) } attr_reader :month - # The four-digit year of birth. sig { returns(Integer) } attr_reader :year end - # Attribute for field dob sig { returns(Dob) } attr_reader :dob end @@ -763,35 +549,26 @@ module Stripe class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject - # The ID of the Charge that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge - # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end - # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code - # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Information about the object that generated this PaymentMethod. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country end @@ -799,315 +576,222 @@ module Stripe class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject - # The preferred network. sig { returns(T.nilable(String)) } attr_reader :preferred - # All supported networks. sig { returns(T::Array[String]) } attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject - # The ACH network code that resulted in this block. sig { returns(T.nilable(String)) } attr_reader :network_code - # The reason why this PaymentMethod's fingerprint has been blocked sig { returns(T.nilable(String)) } attr_reader :reason end - # Attribute for field blocked sig { returns(Blocked) } attr_reader :blocked end - # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # Account number of the bank account. sig { returns(T.nilable(String)) } attr_reader :account_number - # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type - # The name of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_name - # The ID of the Financial Connections Account used to create the payment method. sig { returns(T.nilable(String)) } attr_reader :financial_connections_account - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # Contains information about US bank account networks that can be used. sig { returns(T.nilable(Networks)) } attr_reader :networks - # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number - # Contains information about the future reusability of this PaymentMethod. sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit - # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm - # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay - # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. sig { returns(String) } attr_reader :allow_redisplay - # Attribute for field alma sig { returns(Alma) } attr_reader :alma - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit - # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact - # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details - # Attribute for field blik sig { returns(Blik) } attr_reader :blik - # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present - # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp - # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance - # Attribute for field eps sig { returns(Eps) } attr_reader :eps - # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx - # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay - # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay - # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay - # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal - # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present - # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay - # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna - # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini - # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way - # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay - # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco - # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay - # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo - # Attribute for field p24 sig { returns(P24) } attr_reader :p24 - # Attribute for field payco sig { returns(Payco) } attr_reader :payco - # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field payto sig { returns(Payto) } attr_reader :payto - # Attribute for field pix sig { returns(Pix) } attr_reader :pix - # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay - # Attribute for field qris sig { returns(Qris) } attr_reader :qris - # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung - # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay - # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay - # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit - # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay - # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort - # Attribute for field swish sig { returns(Swish) } attr_reader :swish - # Attribute for field twint sig { returns(Twint) } attr_reader :twint - # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account - # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay - # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. sig { returns(T.nilable(Integer)) } + # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. attr_reader :expires_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Data used for generating a Mandate. sig { returns(T.nilable(MandateData)) } + # Data used for generating a Mandate. attr_reader :mandate_data - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. sig { returns(T.nilable(String)) } + # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. attr_reader :payment_intent - - # Payment-method-specific configuration for this ConfirmationToken. sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for this ConfirmationToken. attr_reader :payment_method_options - - # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. sig { returns(T.nilable(PaymentMethodPreview)) } + # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. attr_reader :payment_method_preview - - # Return URL used to confirm the Intent. sig { returns(T.nilable(String)) } + # Return URL used to confirm the Intent. attr_reader :return_url - + sig { returns(T.nilable(String)) } # Indicates that you intend to make future payments with this ConfirmationToken's payment method. # # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. - sig { returns(T.nilable(String)) } attr_reader :setup_future_usage - - # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. sig { returns(T.nilable(String)) } + # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. attr_reader :setup_intent - - # Shipping information collected on this ConfirmationToken. sig { returns(T.nilable(Shipping)) } + # Shipping information collected on this ConfirmationToken. attr_reader :shipping - - # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. sig { returns(T::Boolean) } + # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. attr_reader :use_stripe_sdk end end \ No newline at end of file diff --git a/rbi/stripe/resources/connect_collection_transfer.rbi b/rbi/stripe/resources/connect_collection_transfer.rbi index 3aecb1eb1..716c92fd2 100644 --- a/rbi/stripe/resources/connect_collection_transfer.rbi +++ b/rbi/stripe/resources/connect_collection_transfer.rbi @@ -4,28 +4,23 @@ # typed: true module Stripe class ConnectCollectionTransfer < APIResource - # Amount transferred, in cents (or local equivalent). sig { returns(Integer) } + # Amount transferred, in cents (or local equivalent). attr_reader :amount - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # ID of the account that funds are being collected for. sig { returns(T.any(String, Stripe::Account)) } + # ID of the account that funds are being collected for. attr_reader :destination - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/country_spec.rbi b/rbi/stripe/resources/country_spec.rbi index 62bad5b38..3b006e099 100644 --- a/rbi/stripe/resources/country_spec.rbi +++ b/rbi/stripe/resources/country_spec.rbi @@ -12,58 +12,45 @@ module Stripe class CountrySpec < APIResource class VerificationFields < Stripe::StripeObject class Company < Stripe::StripeObject - # Additional fields which are only required for some users. sig { returns(T::Array[String]) } attr_reader :additional - # Fields which every account must eventually provide. sig { returns(T::Array[String]) } attr_reader :minimum end class Individual < Stripe::StripeObject - # Additional fields which are only required for some users. sig { returns(T::Array[String]) } attr_reader :additional - # Fields which every account must eventually provide. sig { returns(T::Array[String]) } attr_reader :minimum end - # Attribute for field company sig { returns(Company) } attr_reader :company - # Attribute for field individual sig { returns(Individual) } attr_reader :individual end - # The default currency for this country. This applies to both payment methods and bank accounts. sig { returns(String) } + # The default currency for this country. This applies to both payment methods and bank accounts. attr_reader :default_currency - - # Unique identifier for the object. Represented as the ISO country code for this country. sig { returns(String) } + # Unique identifier for the object. Represented as the ISO country code for this country. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Currencies that can be accepted in the specific country (for transfers). sig { returns(T::Hash[String, T::Array[String]]) } + # Currencies that can be accepted in the specific country (for transfers). attr_reader :supported_bank_account_currencies - - # Currencies that can be accepted in the specified country (for payments). sig { returns(T::Array[String]) } + # Currencies that can be accepted in the specified country (for payments). attr_reader :supported_payment_currencies - - # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). sig { returns(T::Array[String]) } + # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). attr_reader :supported_payment_methods - - # Countries that can accept transfers from the specified country. sig { returns(T::Array[String]) } + # Countries that can accept transfers from the specified country. attr_reader :supported_transfer_countries - - # Attribute for field verification_fields sig { returns(VerificationFields) } + # Attribute for field verification_fields attr_reader :verification_fields end end \ No newline at end of file diff --git a/rbi/stripe/resources/coupon.rbi b/rbi/stripe/resources/coupon.rbi index a78aa22ec..711b2c7c6 100644 --- a/rbi/stripe/resources/coupon.rbi +++ b/rbi/stripe/resources/coupon.rbi @@ -8,85 +8,66 @@ module Stripe # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). class Coupon < APIResource class AppliesTo < Stripe::StripeObject - # A list of product IDs this coupon applies to sig { returns(T::Array[String]) } attr_reader :products end class CurrencyOptions < Stripe::StripeObject - # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. sig { returns(Integer) } attr_reader :amount_off end - # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. sig { returns(T.nilable(Integer)) } + # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. attr_reader :amount_off - - # Attribute for field applies_to sig { returns(AppliesTo) } + # Attribute for field applies_to attr_reader :applies_to - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. sig { returns(T.nilable(String)) } + # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. attr_reader :currency - - # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). sig { returns(T::Hash[String, CurrencyOptions]) } + # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency_options - - # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. sig { returns(String) } + # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. attr_reader :duration - - # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. sig { returns(T.nilable(Integer)) } + # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. attr_reader :duration_in_months - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. sig { returns(T.nilable(Integer)) } + # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. attr_reader :max_redemptions - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Name of the coupon displayed to customers on for instance invoices or receipts. sig { returns(T.nilable(String)) } + # Name of the coupon displayed to customers on for instance invoices or receipts. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. sig { returns(T.nilable(Float)) } + # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. attr_reader :percent_off - - # Date after which the coupon can no longer be redeemed. sig { returns(T.nilable(Integer)) } + # Date after which the coupon can no longer be redeemed. attr_reader :redeem_by - - # Number of times this coupon has been applied to a customer. sig { returns(Integer) } + # Number of times this coupon has been applied to a customer. attr_reader :times_redeemed - - # Taking account of the above properties, whether this coupon can still be applied to a customer. sig { returns(T::Boolean) } + # Taking account of the above properties, whether this coupon can still be applied to a customer. attr_reader :valid - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/credit_note.rbi b/rbi/stripe/resources/credit_note.rbi index d21ff6895..d179e2935 100644 --- a/rbi/stripe/resources/credit_note.rbi +++ b/rbi/stripe/resources/credit_note.rbi @@ -8,219 +8,162 @@ module Stripe # Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) class CreditNote < APIResource class DiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount - # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) } attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount - # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class Refund < Stripe::StripeObject - # Amount of the refund that applies to this credit note, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_refunded - # ID of the refund. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax - # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total - # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate - # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class TaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount - # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive - # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. attr_reader :amount - - # This is the sum of all the shipping amounts. sig { returns(Integer) } + # This is the sum of all the shipping amounts. attr_reader :amount_shipping - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # ID of the customer. sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer. attr_reader :customer - - # Customer balance transaction related to this credit note. sig { returns(T.nilable(T.any(String, Stripe::CustomerBalanceTransaction))) } + # Customer balance transaction related to this credit note. attr_reader :customer_balance_transaction - - # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. attr_reader :discount_amount - - # The aggregate amounts calculated per discount for all line items. sig { returns(T::Array[DiscountAmount]) } + # The aggregate amounts calculated per discount for all line items. attr_reader :discount_amounts - - # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. sig { returns(T.nilable(Integer)) } + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. attr_reader :effective_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # ID of the invoice. sig { returns(T.any(String, Stripe::Invoice)) } + # ID of the invoice. attr_reader :invoice - - # Line items that make up the credit note sig { returns(Stripe::ListObject) } + # Line items that make up the credit note attr_reader :lines - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Customer-facing text that appears on the credit note PDF. sig { returns(T.nilable(String)) } + # Customer-facing text that appears on the credit note PDF. attr_reader :memo - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. sig { returns(String) } + # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. attr_reader :number - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Amount that was credited outside of Stripe. sig { returns(T.nilable(Integer)) } + # Amount that was credited outside of Stripe. attr_reader :out_of_band_amount - - # The link to download the PDF of the credit note. sig { returns(String) } + # The link to download the PDF of the credit note. attr_reader :pdf - - # Attribute for field post_payment_amount sig { returns(Integer) } + # Attribute for field post_payment_amount attr_reader :post_payment_amount - - # Attribute for field pre_payment_amount sig { returns(Integer) } + # Attribute for field pre_payment_amount attr_reader :pre_payment_amount - - # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. sig { returns(T::Array[PretaxCreditAmount]) } + # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. attr_reader :pretax_credit_amounts - - # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` sig { returns(T.nilable(String)) } + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` attr_reader :reason - - # Refund related to this credit note. sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # Refund related to this credit note. attr_reader :refund - - # Refunds related to this credit note. sig { returns(T::Array[Refund]) } + # Refunds related to this credit note. attr_reader :refunds - - # The details of the cost of shipping, including the ShippingRate applied to the invoice. sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied to the invoice. attr_reader :shipping_cost - - # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). sig { returns(String) } + # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). attr_reader :status - - # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. attr_reader :subtotal - - # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. attr_reader :subtotal_excluding_tax - - # The aggregate amounts calculated per tax rate for all line items. sig { returns(T::Array[TaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. attr_reader :tax_amounts - - # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. attr_reader :total - - # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. attr_reader :total_excluding_tax - - # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. sig { returns(String) } + # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. attr_reader :type - - # The time that the credit note was voided. sig { returns(T.nilable(Integer)) } + # The time that the credit note was voided. attr_reader :voided_at end end \ No newline at end of file diff --git a/rbi/stripe/resources/credit_note_line_item.rbi b/rbi/stripe/resources/credit_note_line_item.rbi index a33492b4b..e3ea6442d 100644 --- a/rbi/stripe/resources/credit_note_line_item.rbi +++ b/rbi/stripe/resources/credit_note_line_item.rbi @@ -6,110 +6,83 @@ module Stripe # The credit note line item object class CreditNoteLineItem < StripeObject class DiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount - # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) } attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount - # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount - # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive - # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. attr_reader :amount - - # The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. attr_reader :amount_excluding_tax - - # Description of the item being credited. sig { returns(T.nilable(String)) } + # Description of the item being credited. attr_reader :description - - # The integer amount in cents (or local equivalent) representing the discount being credited for this line item. sig { returns(Integer) } + # The integer amount in cents (or local equivalent) representing the discount being credited for this line item. attr_reader :discount_amount - - # The amount of discount calculated per discount for this line item sig { returns(T::Array[DiscountAmount]) } + # The amount of discount calculated per discount for this line item attr_reader :discount_amounts - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # ID of the invoice line item being credited sig { returns(String) } + # ID of the invoice line item being credited attr_reader :invoice_line_item - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The pretax credit amounts (ex: discount, credit grants, etc) for this line item. sig { returns(T::Array[PretaxCreditAmount]) } + # The pretax credit amounts (ex: discount, credit grants, etc) for this line item. attr_reader :pretax_credit_amounts - - # The number of units of product being credited. sig { returns(T.nilable(Integer)) } + # The number of units of product being credited. attr_reader :quantity - - # The amount of tax calculated per tax rate for this line item sig { returns(T::Array[TaxAmount]) } + # The amount of tax calculated per tax rate for this line item attr_reader :tax_amounts - - # The tax rates which apply to the line item. sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates which apply to the line item. attr_reader :tax_rates - - # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. sig { returns(String) } + # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. attr_reader :type - - # The cost of each unit of product being credited. sig { returns(T.nilable(Integer)) } + # The cost of each unit of product being credited. attr_reader :unit_amount - - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. attr_reader :unit_amount_decimal - - # The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. sig { returns(T.nilable(String)) } + # The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. attr_reader :unit_amount_excluding_tax end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer.rbi b/rbi/stripe/resources/customer.rbi index 62ac8710a..588078036 100644 --- a/rbi/stripe/resources/customer.rbi +++ b/rbi/stripe/resources/customer.rbi @@ -7,236 +7,177 @@ module Stripe # and track payments that belong to the same customer. class Customer < APIResource class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class InvoiceSettings < Stripe::StripeObject class CustomField < Stripe::StripeObject - # The name of the custom field. sig { returns(String) } attr_reader :name - # The value of the custom field. sig { returns(String) } attr_reader :value end class RenderingOptions < Stripe::StripeObject - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display - # ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. sig { returns(T.nilable(String)) } attr_reader :template end - # Default custom fields to be displayed on invoices for this customer. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields - # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method - # Default footer to be displayed on invoices for this customer. sig { returns(T.nilable(String)) } attr_reader :footer - # Default options for invoice PDF rendering for this customer. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class Tax < Stripe::StripeObject class Location < Stripe::StripeObject - # The customer's country as identified by Stripe Tax. sig { returns(String) } attr_reader :country - # The data source used to infer the customer's location. sig { returns(String) } attr_reader :source - # The customer's state, county, province, or region as identified by Stripe Tax. sig { returns(T.nilable(String)) } attr_reader :state end - # Surfaces if automatic tax computation is possible given the current customer location information. sig { returns(String) } attr_reader :automatic_tax - # A recent IP address of the customer used for tax reporting and tax location inference. sig { returns(T.nilable(String)) } attr_reader :ip_address - # The customer's location as identified by Stripe Tax. sig { returns(T.nilable(Location)) } attr_reader :location end - # The customer's address. sig { returns(T.nilable(Address)) } + # The customer's address. attr_reader :address - - # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. sig { returns(Integer) } + # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. attr_reader :balance - - # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. sig { returns(T.nilable(Stripe::CashBalance)) } + # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. attr_reader :cash_balance - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. sig { returns(T.nilable(String)) } + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. attr_reader :currency - - # ID of the default payment source for the customer. - # - # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } + # ID of the default payment source for the customer. + # + # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. attr_reader :default_source - + sig { returns(T.nilable(T::Boolean)) } # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. # # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. # # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. - sig { returns(T.nilable(T::Boolean)) } attr_reader :delinquent - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Describes the current discount active on the customer, if there is one. sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount active on the customer, if there is one. attr_reader :discount - - # The customer's email address. sig { returns(T.nilable(String)) } + # The customer's email address. attr_reader :email - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. sig { returns(T::Hash[String, Integer]) } + # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. attr_reader :invoice_credit_balance - - # The prefix for the customer used to generate unique invoice numbers. sig { returns(T.nilable(String)) } + # The prefix for the customer used to generate unique invoice numbers. attr_reader :invoice_prefix - - # Attribute for field invoice_settings sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings attr_reader :invoice_settings - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The customer's full name or business name. sig { returns(T.nilable(String)) } + # The customer's full name or business name. attr_reader :name - - # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. sig { returns(Integer) } + # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. attr_reader :next_invoice_sequence - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The customer's phone number. sig { returns(T.nilable(String)) } + # The customer's phone number. attr_reader :phone - - # The customer's preferred locales (languages), ordered by preference. sig { returns(T.nilable(T::Array[String])) } + # The customer's preferred locales (languages), ordered by preference. attr_reader :preferred_locales - - # Mailing and shipping address for the customer. Appears on invoices emailed to this customer. sig { returns(T.nilable(Shipping)) } + # Mailing and shipping address for the customer. Appears on invoices emailed to this customer. attr_reader :shipping - - # The customer's payment sources, if any. sig { returns(Stripe::ListObject) } + # The customer's payment sources, if any. attr_reader :sources - - # The customer's current subscriptions, if any. sig { returns(Stripe::ListObject) } + # The customer's current subscriptions, if any. attr_reader :subscriptions - - # Attribute for field tax sig { returns(Tax) } + # Attribute for field tax attr_reader :tax - - # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. sig { returns(T.nilable(String)) } + # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. attr_reader :tax_exempt - - # The customer's tax IDs. sig { returns(Stripe::ListObject) } + # The customer's tax IDs. attr_reader :tax_ids - - # ID of the test clock that this customer belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock that this customer belongs to. attr_reader :test_clock - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_balance_transaction.rbi b/rbi/stripe/resources/customer_balance_transaction.rbi index 270d5942a..0dd62d98b 100644 --- a/rbi/stripe/resources/customer_balance_transaction.rbi +++ b/rbi/stripe/resources/customer_balance_transaction.rbi @@ -10,56 +10,44 @@ module Stripe # # Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) class CustomerBalanceTransaction < APIResource - # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. sig { returns(Integer) } + # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. attr_reader :amount - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The ID of the credit note (if any) related to the transaction. sig { returns(T.nilable(T.any(String, Stripe::CreditNote))) } + # The ID of the credit note (if any) related to the transaction. attr_reader :credit_note - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The ID of the customer the transaction belongs to. sig { returns(T.any(String, Stripe::Customer)) } + # The ID of the customer the transaction belongs to. attr_reader :customer - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. sig { returns(Integer) } + # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. attr_reader :ending_balance - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The ID of the invoice (if any) related to the transaction. sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the invoice (if any) related to the transaction. attr_reader :invoice - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. sig { returns(String) } + # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_cash_balance_transaction.rbi b/rbi/stripe/resources/customer_cash_balance_transaction.rbi index 23eb765b4..4864d51b8 100644 --- a/rbi/stripe/resources/customer_cash_balance_transaction.rbi +++ b/rbi/stripe/resources/customer_cash_balance_transaction.rbi @@ -9,157 +9,119 @@ module Stripe # to payments, and refunds to the customer. class CustomerCashBalanceTransaction < APIResource class AdjustedForOverdraft < Stripe::StripeObject - # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. sig { returns(T.any(String, Stripe::BalanceTransaction)) } attr_reader :balance_transaction - # The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. sig { returns(T.any(String, Stripe::CustomerCashBalanceTransaction)) } attr_reader :linked_transaction end class AppliedToPayment < Stripe::StripeObject - # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent end class Funded < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The BIC of the bank of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :bic - # The last 4 digits of the IBAN of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end class GbBankTransfer < Stripe::StripeObject - # The last 4 digits of the account number of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :account_number_last4 - # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name - # The sort code of the bank of the sender of the funding sig { returns(T.nilable(String)) } attr_reader :sort_code end class JpBankTransfer < Stripe::StripeObject - # The name of the bank of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :sender_bank - # The name of the bank branch of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :sender_branch - # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end class UsBankTransfer < Stripe::StripeObject - # The banking network used for this funding. sig { returns(String) } attr_reader :network - # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end - # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer - # Attribute for field gb_bank_transfer sig { returns(GbBankTransfer) } attr_reader :gb_bank_transfer - # Attribute for field jp_bank_transfer sig { returns(JpBankTransfer) } attr_reader :jp_bank_transfer - # The user-supplied reference field on the bank transfer. sig { returns(T.nilable(String)) } attr_reader :reference - # The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_transfer sig { returns(UsBankTransfer) } attr_reader :us_bank_transfer end - # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer end class RefundedFromPayment < Stripe::StripeObject - # The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund end class TransferredToBalance < Stripe::StripeObject - # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. sig { returns(T.any(String, Stripe::BalanceTransaction)) } attr_reader :balance_transaction end class UnappliedFromPayment < Stripe::StripeObject - # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent end - # Attribute for field adjusted_for_overdraft sig { returns(AdjustedForOverdraft) } + # Attribute for field adjusted_for_overdraft attr_reader :adjusted_for_overdraft - - # Attribute for field applied_to_payment sig { returns(AppliedToPayment) } + # Attribute for field applied_to_payment attr_reader :applied_to_payment - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The customer whose available cash balance changed as a result of this transaction. sig { returns(T.any(String, Stripe::Customer)) } + # The customer whose available cash balance changed as a result of this transaction. attr_reader :customer - - # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } + # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :ending_balance - - # Attribute for field funded sig { returns(Funded) } + # Attribute for field funded attr_reader :funded - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. sig { returns(Integer) } + # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. attr_reader :net_amount - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field refunded_from_payment sig { returns(RefundedFromPayment) } + # Attribute for field refunded_from_payment attr_reader :refunded_from_payment - - # Attribute for field transferred_to_balance sig { returns(TransferredToBalance) } + # Attribute for field transferred_to_balance attr_reader :transferred_to_balance - - # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. sig { returns(String) } + # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. attr_reader :type - - # Attribute for field unapplied_from_payment sig { returns(UnappliedFromPayment) } + # Attribute for field unapplied_from_payment attr_reader :unapplied_from_payment end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_session.rbi b/rbi/stripe/resources/customer_session.rbi index a1a5f6900..55e768f7b 100644 --- a/rbi/stripe/resources/customer_session.rbi +++ b/rbi/stripe/resources/customer_session.rbi @@ -12,89 +12,62 @@ module Stripe class CustomerSession < APIResource class Components < Stripe::StripeObject class BuyButton < Stripe::StripeObject - # Whether the buy button is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class PaymentElement < Stripe::StripeObject class Features < Stripe::StripeObject - # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. - # - # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. sig { returns(T::Array[String]) } attr_reader :payment_method_allow_redisplay_filters - # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. sig { returns(String) } attr_reader :payment_method_redisplay - # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. sig { returns(T.nilable(Integer)) } attr_reader :payment_method_redisplay_limit - # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. - # - # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). sig { returns(String) } attr_reader :payment_method_remove - # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. - # - # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. sig { returns(String) } attr_reader :payment_method_save - # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. - # - # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. sig { returns(T.nilable(String)) } attr_reader :payment_method_save_usage end - # Whether the Payment Element is enabled. sig { returns(T::Boolean) } attr_reader :enabled - # This hash defines whether the Payment Element supports certain features. sig { returns(T.nilable(Features)) } attr_reader :features end class PricingTable < Stripe::StripeObject - # Whether the pricing table is enabled. sig { returns(T::Boolean) } attr_reader :enabled end - # This hash contains whether the buy button is enabled. sig { returns(BuyButton) } attr_reader :buy_button - # This hash contains whether the Payment Element is enabled and the features it supports. sig { returns(PaymentElement) } attr_reader :payment_element - # This hash contains whether the pricing table is enabled. sig { returns(PricingTable) } attr_reader :pricing_table end + sig { returns(String) } # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. # # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. - sig { returns(String) } attr_reader :client_secret - - # Configuration for the components supported by this Customer Session. sig { returns(Components) } + # Configuration for the components supported by this Customer Session. attr_reader :components - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The Customer the Customer Session was created for. sig { returns(T.any(String, Stripe::Customer)) } + # The Customer the Customer Session was created for. attr_reader :customer - - # The timestamp at which this Customer Session will expire. sig { returns(Integer) } + # The timestamp at which this Customer Session will expire. attr_reader :expires_at - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/discount.rbi b/rbi/stripe/resources/discount.rbi index 6d06f1a41..cc007e93d 100644 --- a/rbi/stripe/resources/discount.rbi +++ b/rbi/stripe/resources/discount.rbi @@ -8,58 +8,46 @@ module Stripe # # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) class Discount < StripeObject - # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. sig { returns(T.nilable(String)) } + # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. attr_reader :checkout_session - + sig { returns(Stripe::Coupon) } # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). - sig { returns(Stripe::Coupon) } attr_reader :coupon - - # The ID of the customer associated with this discount. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer associated with this discount. attr_reader :customer - - # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. sig { returns(T.nilable(Integer)) } + # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. attr_reader :end - - # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. sig { returns(String) } + # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. attr_reader :id - - # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. sig { returns(T.nilable(String)) } + # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. attr_reader :invoice - - # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. sig { returns(T.nilable(String)) } + # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. attr_reader :invoice_item - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The promotion code applied to create this discount. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } + # The promotion code applied to create this discount. attr_reader :promotion_code - - # Date that the coupon was applied. sig { returns(Integer) } + # Date that the coupon was applied. attr_reader :start - - # The subscription that this coupon is applied to, if it is applied to a particular subscription. sig { returns(T.nilable(String)) } + # The subscription that this coupon is applied to, if it is applied to a particular subscription. attr_reader :subscription - - # The subscription item that this coupon is applied to, if it is applied to a particular subscription item. sig { returns(T.nilable(String)) } + # The subscription item that this coupon is applied to, if it is applied to a particular subscription item. attr_reader :subscription_item - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/dispute.rbi b/rbi/stripe/resources/dispute.rbi index 46c672c1c..ea7e2266b 100644 --- a/rbi/stripe/resources/dispute.rbi +++ b/rbi/stripe/resources/dispute.rbi @@ -14,338 +14,242 @@ module Stripe class VisaCompellingEvidence3 < Stripe::StripeObject class DisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # User Account ID used to log into business platform. Must be recognizable by the user. sig { returns(T.nilable(String)) } attr_reader :customer_account_id - # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_fingerprint - # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_id - # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address - # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip - # Categorization of disputed payment. sig { returns(T.nilable(String)) } attr_reader :merchandise_or_services - # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description - # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class PriorUndisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. sig { returns(String) } attr_reader :charge - # User Account ID used to log into business platform. Must be recognizable by the user. sig { returns(T.nilable(String)) } attr_reader :customer_account_id - # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_fingerprint - # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_id - # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address - # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip - # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description - # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end - # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(DisputedTransaction)) } attr_reader :disputed_transaction - # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T::Array[PriorUndisputedTransaction]) } attr_reader :prior_undisputed_transactions end - # Attribute for field visa_compelling_evidence_3 sig { returns(VisaCompellingEvidence3) } attr_reader :visa_compelling_evidence_3 end - # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. sig { returns(T.nilable(String)) } attr_reader :access_activity_log - # The billing address provided by the customer. sig { returns(T.nilable(String)) } attr_reader :billing_address - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :cancellation_policy - # An explanation of how and when the customer was shown your refund policy prior to purchase. sig { returns(T.nilable(String)) } attr_reader :cancellation_policy_disclosure - # A justification for why the customer's subscription was not canceled. sig { returns(T.nilable(String)) } attr_reader :cancellation_rebuttal - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :customer_communication - # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address - # The name of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_name - # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :customer_signature - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :duplicate_charge_documentation - # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. sig { returns(T.nilable(String)) } attr_reader :duplicate_charge_explanation - # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. sig { returns(T.nilable(String)) } attr_reader :duplicate_charge_id - # Attribute for field enhanced_evidence sig { returns(EnhancedEvidence) } attr_reader :enhanced_evidence - # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :receipt - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :refund_policy - # Documentation demonstrating that the customer was shown your refund policy prior to purchase. sig { returns(T.nilable(String)) } attr_reader :refund_policy_disclosure - # A justification for why the customer is not entitled to a refund. sig { returns(T.nilable(String)) } attr_reader :refund_refusal_explanation - # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. sig { returns(T.nilable(String)) } attr_reader :service_date - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :service_documentation - # The address to which a physical product was shipped. You should try to include as complete address information as possible. sig { returns(T.nilable(String)) } attr_reader :shipping_address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :shipping_carrier - # The date on which a physical product began its route to the shipping address, in a clear human-readable format. sig { returns(T.nilable(String)) } attr_reader :shipping_date - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :shipping_documentation - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :shipping_tracking_number - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :uncategorized_file - # Any additional evidence or statements. sig { returns(T.nilable(String)) } attr_reader :uncategorized_text end class EvidenceDetails < Stripe::StripeObject class EnhancedEligibility < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject - # List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T::Array[String]) } attr_reader :required_actions - # Visa Compelling Evidence 3.0 eligibility status. sig { returns(String) } attr_reader :status end - # Attribute for field visa_compelling_evidence_3 sig { returns(VisaCompellingEvidence3) } attr_reader :visa_compelling_evidence_3 end - # Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. sig { returns(T.nilable(Integer)) } attr_reader :due_by - # Attribute for field enhanced_eligibility sig { returns(EnhancedEligibility) } attr_reader :enhanced_eligibility - # Whether evidence has been staged for this dispute. sig { returns(T::Boolean) } attr_reader :has_evidence - # Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. sig { returns(T::Boolean) } attr_reader :past_due - # The number of times evidence has been submitted. Typically, you may only submit evidence once. sig { returns(Integer) } attr_reader :submission_count end class PaymentMethodDetails < Stripe::StripeObject class AmazonPay < Stripe::StripeObject - # The AmazonPay dispute type, chargeback or claim sig { returns(T.nilable(String)) } attr_reader :dispute_type end class Card < Stripe::StripeObject - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand - # The type of dispute opened. Different case types may have varying fees and financial impact. sig { returns(String) } attr_reader :case_type - # The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. sig { returns(T.nilable(String)) } attr_reader :network_reason_code end class Klarna < Stripe::StripeObject - # The reason for the dispute as defined by Klarna sig { returns(T.nilable(String)) } attr_reader :reason_code end class Paypal < Stripe::StripeObject - # The ID of the dispute in PayPal. sig { returns(T.nilable(String)) } attr_reader :case_id - # The reason for the dispute as defined by PayPal sig { returns(T.nilable(String)) } attr_reader :reason_code end - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Payment method type. sig { returns(String) } attr_reader :type end - # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). sig { returns(Integer) } + # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). attr_reader :amount - - # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. sig { returns(T::Array[Stripe::BalanceTransaction]) } + # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. attr_reader :balance_transactions - - # ID of the charge that's disputed. sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge that's disputed. attr_reader :charge - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # List of eligibility types that are included in `enhanced_evidence`. sig { returns(T::Array[String]) } + # List of eligibility types that are included in `enhanced_evidence`. attr_reader :enhanced_eligibility_types - - # Attribute for field evidence sig { returns(Evidence) } + # Attribute for field evidence attr_reader :evidence - - # Attribute for field evidence_details sig { returns(EvidenceDetails) } + # Attribute for field evidence_details attr_reader :evidence_details - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. sig { returns(T::Boolean) } + # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. attr_reader :is_charge_refundable - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Network-dependent reason code for the dispute. sig { returns(T.nilable(String)) } + # Network-dependent reason code for the dispute. attr_reader :network_reason_code - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # ID of the PaymentIntent that's disputed. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent that's disputed. attr_reader :payment_intent - - # Attribute for field payment_method_details sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details attr_reader :payment_method_details - - # Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). sig { returns(String) } + # Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). attr_reader :reason - - # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. sig { returns(String) } + # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. attr_reader :status end end \ No newline at end of file diff --git a/rbi/stripe/resources/entitlements/active_entitlement.rbi b/rbi/stripe/resources/entitlements/active_entitlement.rbi index a63821be4..a62340126 100644 --- a/rbi/stripe/resources/entitlements/active_entitlement.rbi +++ b/rbi/stripe/resources/entitlements/active_entitlement.rbi @@ -6,24 +6,20 @@ module Stripe module Entitlements # An active entitlement describes access to a feature for a customer. class ActiveEntitlement < APIResource - # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. sig { returns(T.any(String, Stripe::Entitlements::Feature)) } + # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. attr_reader :feature - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # A unique key you provide as your own system identifier. This may be up to 80 characters. sig { returns(String) } + # A unique key you provide as your own system identifier. This may be up to 80 characters. attr_reader :lookup_key - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end diff --git a/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi index 7db89193f..44b1d8031 100644 --- a/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +++ b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi @@ -6,20 +6,17 @@ module Stripe module Entitlements # A summary of a customer's active entitlements. class ActiveEntitlementSummary < APIResource - # The customer that is entitled to this feature. sig { returns(String) } + # The customer that is entitled to this feature. attr_reader :customer - - # The list of entitlements this customer has. sig { returns(Stripe::ListObject) } + # The list of entitlements this customer has. attr_reader :entitlements - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end diff --git a/rbi/stripe/resources/entitlements/feature.rbi b/rbi/stripe/resources/entitlements/feature.rbi index 38a2c8da6..aecd2d91b 100644 --- a/rbi/stripe/resources/entitlements/feature.rbi +++ b/rbi/stripe/resources/entitlements/feature.rbi @@ -7,32 +7,26 @@ module Stripe # A feature represents a monetizable ability or functionality in your system. # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. class Feature < APIResource - # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. sig { returns(T::Boolean) } + # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. attr_reader :active - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # A unique key you provide as your own system identifier. This may be up to 80 characters. sig { returns(String) } + # A unique key you provide as your own system identifier. This may be up to 80 characters. attr_reader :lookup_key - - # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The feature's name, for your own purpose, not meant to be displayable to the customer. sig { returns(String) } + # The feature's name, for your own purpose, not meant to be displayable to the customer. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end diff --git a/rbi/stripe/resources/ephemeral_key.rbi b/rbi/stripe/resources/ephemeral_key.rbi index 49a40d4d4..76524e224 100644 --- a/rbi/stripe/resources/ephemeral_key.rbi +++ b/rbi/stripe/resources/ephemeral_key.rbi @@ -4,28 +4,23 @@ # typed: true module Stripe class EphemeralKey < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Time at which the key will expire. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the key will expire. Measured in seconds since the Unix epoch. attr_reader :expires - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The key's secret. You can use this value to make authorized requests to the Stripe API. sig { returns(String) } + # The key's secret. You can use this value to make authorized requests to the Stripe API. attr_reader :secret end end \ No newline at end of file diff --git a/rbi/stripe/resources/event.rbi b/rbi/stripe/resources/event.rbi index 7cd1e0ee3..390290e2a 100644 --- a/rbi/stripe/resources/event.rbi +++ b/rbi/stripe/resources/event.rbi @@ -35,99 +35,75 @@ module Stripe # for 30 days. class Event < APIResource class Data < Stripe::StripeObject - # Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. sig { returns(T::Hash[String, T.untyped]) } attr_reader :object - # Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. sig { returns(T::Hash[String, T.untyped]) } attr_reader :previous_attributes end class Reason < Stripe::StripeObject class AutomationAction < Stripe::StripeObject class StripeSendWebhookCustomEvent < Stripe::StripeObject - # Set of key-value pairs attached to the action when creating an Automation. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :custom_data end - # Attribute for field stripe_send_webhook_custom_event sig { returns(StripeSendWebhookCustomEvent) } attr_reader :stripe_send_webhook_custom_event - # The trigger name of the automation that triggered this action. - # Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names. sig { returns(String) } attr_reader :trigger - # The type of the `automation_action`. sig { returns(String) } attr_reader :type end class Request < Stripe::StripeObject - # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. sig { returns(T.nilable(String)) } attr_reader :id - # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. sig { returns(T.nilable(String)) } attr_reader :idempotency_key end - # Attribute for field automation_action sig { returns(AutomationAction) } attr_reader :automation_action - # Attribute for field request sig { returns(Request) } attr_reader :request - # The type of the reason for the event. sig { returns(String) } attr_reader :type end class Request < Stripe::StripeObject - # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. sig { returns(T.nilable(String)) } attr_reader :id - # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. sig { returns(T.nilable(String)) } attr_reader :idempotency_key end - # The connected account that originates the event. sig { returns(String) } + # The connected account that originates the event. attr_reader :account - - # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. sig { returns(T.nilable(String)) } + # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. attr_reader :api_version - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Attribute for field data sig { returns(Data) } + # Attribute for field data attr_reader :data - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. sig { returns(Integer) } + # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. attr_reader :pending_webhooks - - # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. sig { returns(T.nilable(Reason)) } + # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. attr_reader :reason - - # Information on the API request that triggers the event. sig { returns(T.nilable(Request)) } + # Information on the API request that triggers the event. attr_reader :request - - # Description of the event (for example, `invoice.created` or `charge.refunded`). sig { returns(String) } + # Description of the event (for example, `invoice.created` or `charge.refunded`). attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/exchange_rate.rbi b/rbi/stripe/resources/exchange_rate.rbi index 10eccf63f..f4510f618 100644 --- a/rbi/stripe/resources/exchange_rate.rbi +++ b/rbi/stripe/resources/exchange_rate.rbi @@ -30,16 +30,14 @@ module Stripe # # *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* class ExchangeRate < APIResource - # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. sig { returns(String) } + # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. sig { returns(T::Hash[String, Float]) } + # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. attr_reader :rates end end \ No newline at end of file diff --git a/rbi/stripe/resources/file.rbi b/rbi/stripe/resources/file.rbi index d386a998a..0523f5149 100644 --- a/rbi/stripe/resources/file.rbi +++ b/rbi/stripe/resources/file.rbi @@ -11,48 +11,38 @@ module Stripe # # Related guide: [File upload guide](https://stripe.com/docs/file-upload) class File < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The file expires and isn't available at this time in epoch seconds. sig { returns(T.nilable(Integer)) } + # The file expires and isn't available at this time in epoch seconds. attr_reader :expires_at - - # The suitable name for saving the file to a filesystem. sig { returns(T.nilable(String)) } + # The suitable name for saving the file to a filesystem. attr_reader :filename - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. sig { returns(T.nilable(Stripe::ListObject)) } + # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. attr_reader :links - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. sig { returns(String) } + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. attr_reader :purpose - - # The size of the file object in bytes. sig { returns(Integer) } + # The size of the file object in bytes. attr_reader :size - - # A suitable title for the document. sig { returns(T.nilable(String)) } + # A suitable title for the document. attr_reader :title - - # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). sig { returns(T.nilable(String)) } + # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). attr_reader :type - - # Use your live secret API key to download the file from this URL. sig { returns(T.nilable(String)) } + # Use your live secret API key to download the file from this URL. attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/file_link.rbi b/rbi/stripe/resources/file_link.rbi index 1b77787d0..d371d092b 100644 --- a/rbi/stripe/resources/file_link.rbi +++ b/rbi/stripe/resources/file_link.rbi @@ -7,40 +7,32 @@ module Stripe # create a `FileLink`. `FileLink`s contain a URL that you can use to # retrieve the contents of the file without authentication. class FileLink < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Returns if the link is already expired. sig { returns(T::Boolean) } + # Returns if the link is already expired. attr_reader :expired - - # Time that the link expires. sig { returns(T.nilable(Integer)) } + # Time that the link expires. attr_reader :expires_at - - # The file object this link points to. sig { returns(T.any(String, Stripe::File)) } + # The file object this link points to. attr_reader :file - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The publicly accessible URL to download the file. sig { returns(T.nilable(String)) } + # The publicly accessible URL to download the file. attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/account.rbi b/rbi/stripe/resources/financial_connections/account.rbi index 1f32fe8ad..8162395c5 100644 --- a/rbi/stripe/resources/financial_connections/account.rbi +++ b/rbi/stripe/resources/financial_connections/account.rbi @@ -7,166 +7,116 @@ module Stripe # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. class Account < APIResource class AccountHolder < Stripe::StripeObject - # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - # Type of account holder that this account belongs to. sig { returns(String) } attr_reader :type end class Balance < Stripe::StripeObject class Cash < Stripe::StripeObject - # The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. - # - # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. - # - # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T.nilable(T::Hash[String, Integer])) } attr_reader :available end class Credit < Stripe::StripeObject - # The credit that has been used by the account holder. - # - # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. - # - # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T.nilable(T::Hash[String, Integer])) } attr_reader :used end - # The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :as_of - # Attribute for field cash sig { returns(Cash) } attr_reader :cash - # Attribute for field credit sig { returns(Credit) } attr_reader :credit - # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. - # - # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. - # - # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T::Hash[String, Integer]) } attr_reader :current - # The `type` of the balance. An additional hash is included on the balance with a name matching this value. sig { returns(String) } attr_reader :type end class BalanceRefresh < Stripe::StripeObject - # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at - # Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at - # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class InferredBalancesRefresh < Stripe::StripeObject - # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at - # Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at - # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class OwnershipRefresh < Stripe::StripeObject - # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at - # Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at - # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class TransactionRefresh < Stripe::StripeObject - # Unique identifier for the object. sig { returns(String) } attr_reader :id - # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at - # Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at - # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end - # The account holder that this account belongs to. sig { returns(T.nilable(AccountHolder)) } + # The account holder that this account belongs to. attr_reader :account_holder - - # The most recent information about the account's balance. sig { returns(T.nilable(Balance)) } + # The most recent information about the account's balance. attr_reader :balance - - # The state of the most recent attempt to refresh the account balance. sig { returns(T.nilable(BalanceRefresh)) } + # The state of the most recent attempt to refresh the account balance. attr_reader :balance_refresh - - # The type of the account. Account category is further divided in `subcategory`. sig { returns(String) } + # The type of the account. Account category is further divided in `subcategory`. attr_reader :category - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # A human-readable name that has been assigned to this account, either by the account holder or by the institution. sig { returns(T.nilable(String)) } + # A human-readable name that has been assigned to this account, either by the account holder or by the institution. attr_reader :display_name - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The state of the most recent attempt to refresh the account's inferred balance history. sig { returns(T.nilable(InferredBalancesRefresh)) } + # The state of the most recent attempt to refresh the account's inferred balance history. attr_reader :inferred_balances_refresh - - # The name of the institution that holds this account. sig { returns(String) } + # The name of the institution that holds this account. attr_reader :institution_name - - # The last 4 digits of the account number. If present, this will be 4 numeric characters. sig { returns(T.nilable(String)) } + # The last 4 digits of the account number. If present, this will be 4 numeric characters. attr_reader :last4 - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The most recent information about the account's owners. sig { returns(T.nilable(T.any(String, Stripe::FinancialConnections::AccountOwnership))) } + # The most recent information about the account's owners. attr_reader :ownership - - # The state of the most recent attempt to refresh the account owners. sig { returns(T.nilable(OwnershipRefresh)) } + # The state of the most recent attempt to refresh the account owners. attr_reader :ownership_refresh - - # The list of permissions granted by this account. sig { returns(T.nilable(T::Array[String])) } + # The list of permissions granted by this account. attr_reader :permissions - - # The status of the link to the account. sig { returns(String) } + # The status of the link to the account. attr_reader :status - + sig { returns(String) } # If `category` is `cash`, one of: # # - `checking` @@ -181,19 +131,15 @@ module Stripe # - `other` # # If `category` is `investment` or `other`, this will be `other`. - sig { returns(String) } attr_reader :subcategory - - # The list of data refresh subscriptions requested on this account. sig { returns(T.nilable(T::Array[String])) } + # The list of data refresh subscriptions requested on this account. attr_reader :subscriptions - - # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. sig { returns(T::Array[String]) } + # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. attr_reader :supported_payment_method_types - - # The state of the most recent attempt to refresh the account transactions. sig { returns(T.nilable(TransactionRefresh)) } + # The state of the most recent attempt to refresh the account transactions. attr_reader :transaction_refresh end end diff --git a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi index 4a2a09762..4c61210cc 100644 --- a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +++ b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi @@ -6,24 +6,21 @@ module Stripe module FinancialConnections # A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. class AccountInferredBalance < APIResource - # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. sig { returns(Integer) } + # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. attr_reader :as_of - + sig { returns(T::Hash[String, Integer]) } # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. # # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. # # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. - sig { returns(T::Hash[String, Integer]) } attr_reader :current - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end diff --git a/rbi/stripe/resources/financial_connections/account_owner.rbi b/rbi/stripe/resources/financial_connections/account_owner.rbi index c80ba872f..cc68f2f8d 100644 --- a/rbi/stripe/resources/financial_connections/account_owner.rbi +++ b/rbi/stripe/resources/financial_connections/account_owner.rbi @@ -6,36 +6,29 @@ module Stripe module FinancialConnections # Describes an owner of an account. class AccountOwner < StripeObject - # The email address of the owner. sig { returns(T.nilable(String)) } + # The email address of the owner. attr_reader :email - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The full name of the owner. sig { returns(String) } + # The full name of the owner. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The ownership object that this owner belongs to. sig { returns(String) } + # The ownership object that this owner belongs to. attr_reader :ownership - - # The raw phone number of the owner. sig { returns(T.nilable(String)) } + # The raw phone number of the owner. attr_reader :phone - - # The raw physical address of the owner. sig { returns(T.nilable(String)) } + # The raw physical address of the owner. attr_reader :raw_address - - # The timestamp of the refresh that updated this owner. sig { returns(T.nilable(Integer)) } + # The timestamp of the refresh that updated this owner. attr_reader :refreshed_at end end diff --git a/rbi/stripe/resources/financial_connections/account_ownership.rbi b/rbi/stripe/resources/financial_connections/account_ownership.rbi index 6784a4477..25918d1fa 100644 --- a/rbi/stripe/resources/financial_connections/account_ownership.rbi +++ b/rbi/stripe/resources/financial_connections/account_ownership.rbi @@ -6,20 +6,17 @@ module Stripe module FinancialConnections # Describes a snapshot of the owners of an account at a particular point in time. class AccountOwnership < StripeObject - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # A paginated list of owners for this account. sig { returns(Stripe::ListObject) } + # A paginated list of owners for this account. attr_reader :owners end end diff --git a/rbi/stripe/resources/financial_connections/institution.rbi b/rbi/stripe/resources/financial_connections/institution.rbi index ad1534ab3..3474fadef 100644 --- a/rbi/stripe/resources/financial_connections/institution.rbi +++ b/rbi/stripe/resources/financial_connections/institution.rbi @@ -8,68 +8,53 @@ module Stripe class Institution < APIResource class Features < Stripe::StripeObject class Balances < Stripe::StripeObject - # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class Ownership < Stripe::StripeObject - # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class PaymentMethod < Stripe::StripeObject - # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class Transactions < Stripe::StripeObject - # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end - # Attribute for field balances sig { returns(Balances) } attr_reader :balances - # Attribute for field ownership sig { returns(Ownership) } attr_reader :ownership - # Attribute for field payment_method sig { returns(PaymentMethod) } attr_reader :payment_method - # Attribute for field transactions sig { returns(Transactions) } attr_reader :transactions end - # Attribute for field features sig { returns(Features) } + # Attribute for field features attr_reader :features - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The name of this institution. sig { returns(String) } + # The name of this institution. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. sig { returns(T::Array[String]) } + # A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. attr_reader :routing_numbers - - # The status of this institution in the Financial Connections authentication flow. sig { returns(String) } + # The status of this institution in the Financial Connections authentication flow. attr_reader :status - - # A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. sig { returns(T.nilable(String)) } + # A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. attr_reader :url end end diff --git a/rbi/stripe/resources/financial_connections/session.rbi b/rbi/stripe/resources/financial_connections/session.rbi index 80457723f..11a654d5f 100644 --- a/rbi/stripe/resources/financial_connections/session.rbi +++ b/rbi/stripe/resources/financial_connections/session.rbi @@ -7,97 +7,75 @@ module Stripe # A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. class Session < APIResource class AccountHolder < Stripe::StripeObject - # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - # Type of account holder that this account belongs to. sig { returns(String) } attr_reader :type end class Filters < Stripe::StripeObject - # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. sig { returns(T.nilable(T::Array[String])) } attr_reader :account_subcategories - # List of countries from which to filter accounts. sig { returns(T.nilable(T::Array[String])) } attr_reader :countries - # Stripe ID of the institution with which the customer should be directed to log in. sig { returns(String) } attr_reader :institution end class Limits < Stripe::StripeObject - # The number of accounts that can be linked in this Session. sig { returns(Integer) } attr_reader :accounts end class ManualEntry < Stripe::StripeObject; end class StatusDetails < Stripe::StripeObject class Cancelled < Stripe::StripeObject - # The reason for the Session being cancelled. sig { returns(String) } attr_reader :reason end - # Attribute for field cancelled sig { returns(Cancelled) } attr_reader :cancelled end - # The account holder for whom accounts are collected in this session. sig { returns(T.nilable(AccountHolder)) } + # The account holder for whom accounts are collected in this session. attr_reader :account_holder - - # The accounts that were collected as part of this Session. sig { returns(Stripe::ListObject) } + # The accounts that were collected as part of this Session. attr_reader :accounts - - # A value that will be passed to the client to launch the authentication flow. sig { returns(String) } + # A value that will be passed to the client to launch the authentication flow. attr_reader :client_secret - - # Attribute for field filters sig { returns(Filters) } + # Attribute for field filters attr_reader :filters - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Attribute for field limits sig { returns(Limits) } + # Attribute for field limits attr_reader :limits - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Attribute for field manual_entry sig { returns(ManualEntry) } + # Attribute for field manual_entry attr_reader :manual_entry - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Permissions requested for accounts collected during this session. sig { returns(T::Array[String]) } + # Permissions requested for accounts collected during this session. attr_reader :permissions - - # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } + # Data features requested to be retrieved upon account creation. attr_reader :prefetch - - # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. attr_reader :return_url - - # The current state of the session. sig { returns(String) } + # The current state of the session. attr_reader :status - - # Attribute for field status_details sig { returns(StatusDetails) } + # Attribute for field status_details attr_reader :status_details end end diff --git a/rbi/stripe/resources/financial_connections/transaction.rbi b/rbi/stripe/resources/financial_connections/transaction.rbi index dba6d14b6..c5e6585d8 100644 --- a/rbi/stripe/resources/financial_connections/transaction.rbi +++ b/rbi/stripe/resources/financial_connections/transaction.rbi @@ -7,59 +7,46 @@ module Stripe # A Transaction represents a real transaction that affects a Financial Connections Account balance. class Transaction < APIResource class StatusTransitions < Stripe::StripeObject - # Time at which this transaction posted. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :posted_at - # Time at which this transaction was voided. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :void_at end - # The ID of the Financial Connections Account this transaction belongs to. sig { returns(String) } + # The ID of the Financial Connections Account this transaction belongs to. attr_reader :account - - # The amount of this transaction, in cents (or local equivalent). sig { returns(Integer) } + # The amount of this transaction, in cents (or local equivalent). attr_reader :amount - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The description of this transaction. sig { returns(String) } + # The description of this transaction. attr_reader :description - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The status of the transaction. sig { returns(String) } + # The status of the transaction. attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # Time at which the transaction was transacted. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the transaction was transacted. Measured in seconds since the Unix epoch. attr_reader :transacted_at - - # The token of the transaction refresh that last updated or created this transaction. sig { returns(String) } + # The token of the transaction refresh that last updated or created this transaction. attr_reader :transaction_refresh - - # Time at which the object was last updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated end end diff --git a/rbi/stripe/resources/forwarding/request.rbi b/rbi/stripe/resources/forwarding/request.rbi index eb7db33fc..7f3373b2c 100644 --- a/rbi/stripe/resources/forwarding/request.rbi +++ b/rbi/stripe/resources/forwarding/request.rbi @@ -22,93 +22,71 @@ module Stripe # Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). class Request < APIResource class RequestContext < Stripe::StripeObject - # The time it took in milliseconds for the destination endpoint to respond. sig { returns(Integer) } attr_reader :destination_duration - # The IP address of the destination. sig { returns(String) } attr_reader :destination_ip_address end class RequestDetails < Stripe::StripeObject class Header < Stripe::StripeObject - # The header name. sig { returns(String) } attr_reader :name - # The header value. sig { returns(String) } attr_reader :value end - # The body payload to send to the destination endpoint. sig { returns(String) } attr_reader :body - # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. sig { returns(T::Array[Header]) } attr_reader :headers - # The HTTP method used to call the destination endpoint. sig { returns(String) } attr_reader :http_method end class ResponseDetails < Stripe::StripeObject class Header < Stripe::StripeObject - # The header name. sig { returns(String) } attr_reader :name - # The header value. sig { returns(String) } attr_reader :value end - # The response body from the destination endpoint to Stripe. sig { returns(String) } attr_reader :body - # HTTP headers that the destination endpoint returned. sig { returns(T::Array[Header]) } attr_reader :headers - # The HTTP status code that the destination endpoint returned. sig { returns(Integer) } attr_reader :status end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. sig { returns(String) } + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. attr_reader :payment_method - - # The field kinds to be replaced in the forwarded request. sig { returns(T::Array[String]) } + # The field kinds to be replaced in the forwarded request. attr_reader :replacements - - # Context about the request from Stripe's servers to the destination endpoint. sig { returns(T.nilable(RequestContext)) } + # Context about the request from Stripe's servers to the destination endpoint. attr_reader :request_context - - # The request that was sent to the destination endpoint. We redact any sensitive fields. sig { returns(T.nilable(RequestDetails)) } + # The request that was sent to the destination endpoint. We redact any sensitive fields. attr_reader :request_details - - # The response that the destination endpoint returned to us. We redact any sensitive fields. sig { returns(T.nilable(ResponseDetails)) } + # The response that the destination endpoint returned to us. We redact any sensitive fields. attr_reader :response_details - - # The destination URL for the forwarded request. Must be supported by the config. sig { returns(T.nilable(String)) } + # The destination URL for the forwarded request. Must be supported by the config. attr_reader :url end end diff --git a/rbi/stripe/resources/funding_instructions.rbi b/rbi/stripe/resources/funding_instructions.rbi index 8fbb87eda..a2c73620f 100644 --- a/rbi/stripe/resources/funding_instructions.rbi +++ b/rbi/stripe/resources/funding_instructions.rbi @@ -13,429 +13,302 @@ module Stripe class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The account holder name sig { returns(String) } attr_reader :account_holder_name - # The ABA account number sig { returns(String) } attr_reader :account_number - # The account type sig { returns(String) } attr_reader :account_type - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The bank name sig { returns(String) } attr_reader :bank_name - # The ABA routing number sig { returns(String) } attr_reader :routing_number end class Iban < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The BIC/SWIFT code of the account. sig { returns(String) } attr_reader :bic - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # The IBAN of the account. sig { returns(String) } attr_reader :iban end class SortCode < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name - # The account number sig { returns(String) } attr_reader :account_number - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The six-digit sort code sig { returns(String) } attr_reader :sort_code end class Spei < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The account holder name sig { returns(String) } attr_reader :account_holder_name - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The three-digit bank code sig { returns(String) } attr_reader :bank_code - # The short banking institution name sig { returns(String) } attr_reader :bank_name - # The CLABE number sig { returns(String) } attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The account holder name sig { returns(String) } attr_reader :account_holder_name - # The account number sig { returns(String) } attr_reader :account_number - # The account type sig { returns(String) } attr_reader :account_type - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The bank name sig { returns(String) } attr_reader :bank_name - # The SWIFT code sig { returns(String) } attr_reader :swift_code end class Zengin < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The account holder name sig { returns(T.nilable(String)) } attr_reader :account_holder_name - # The account number sig { returns(T.nilable(String)) } attr_reader :account_number - # The bank account type. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } attr_reader :account_type - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The bank code of the account sig { returns(T.nilable(String)) } attr_reader :bank_code - # The bank name of the account sig { returns(T.nilable(String)) } attr_reader :bank_name - # The branch code of the account sig { returns(T.nilable(String)) } attr_reader :branch_code - # The branch name of the account sig { returns(T.nilable(String)) } attr_reader :branch_name end - # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba - # Iban Records contain E.U. bank account details per the SEPA format. sig { returns(Iban) } attr_reader :iban - # Sort Code Records contain U.K. bank account details per the sort code format. sig { returns(SortCode) } attr_reader :sort_code - # SPEI Records contain Mexico bank account details per the SPEI format. sig { returns(Spei) } attr_reader :spei - # The payment networks supported by this FinancialAddress sig { returns(T::Array[String]) } attr_reader :supported_networks - # SWIFT Records contain U.S. bank account details per the SWIFT format. sig { returns(Swift) } attr_reader :swift - # The type of financial address sig { returns(String) } attr_reader :type - # Zengin Records contain Japan bank account details per the Zengin format. sig { returns(Zengin) } attr_reader :zengin end - # The country of the bank account to fund sig { returns(String) } attr_reader :country - # A list of financial addresses that can be used to fund a particular balance sig { returns(T::Array[FinancialAddress]) } attr_reader :financial_addresses - # The bank_transfer type sig { returns(String) } attr_reader :type end - # Attribute for field bank_transfer sig { returns(BankTransfer) } + # Attribute for field bank_transfer attr_reader :bank_transfer - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The `funding_type` of the returned instructions sig { returns(String) } + # The `funding_type` of the returned instructions attr_reader :funding_type - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/gift_cards/card.rbi b/rbi/stripe/resources/gift_cards/card.rbi index e5dd29202..066816800 100644 --- a/rbi/stripe/resources/gift_cards/card.rbi +++ b/rbi/stripe/resources/gift_cards/card.rbi @@ -9,81 +9,62 @@ module Stripe class Card < APIResource class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject - # The Stripe CheckoutSession that created this object. sig { returns(String) } attr_reader :checkout_session - # The Stripe CheckoutSession LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item end class Order < Stripe::StripeObject - # The Stripe Order LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item - # The Stripe Order that created this object. sig { returns(String) } attr_reader :order end class Payment < Stripe::StripeObject - # The PaymentIntent that created this object. sig { returns(String) } attr_reader :payment_intent end - # Attribute for field checkout sig { returns(Checkout) } attr_reader :checkout - # Attribute for field order sig { returns(Order) } attr_reader :order - # Attribute for field payment sig { returns(Payment) } attr_reader :payment - # The type of event that created this object. sig { returns(String) } attr_reader :type end - # Whether this gift card can be used or not. sig { returns(T::Boolean) } + # Whether this gift card can be used or not. attr_reader :active - - # The amount of funds available for new transactions. sig { returns(Integer) } + # The amount of funds available for new transactions. attr_reader :amount_available - - # The amount of funds marked as held. sig { returns(Integer) } + # The amount of funds marked as held. attr_reader :amount_held - - # Code used to redeem this gift card. sig { returns(T.nilable(String)) } + # Code used to redeem this gift card. attr_reader :code - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The related Stripe objects that created this gift card. sig { returns(T.nilable(CreatedBy)) } + # The related Stripe objects that created this gift card. attr_reader :created_by - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Transactions on this gift card. sig { returns(Stripe::ListObject) } + # Transactions on this gift card. attr_reader :transactions end end diff --git a/rbi/stripe/resources/gift_cards/transaction.rbi b/rbi/stripe/resources/gift_cards/transaction.rbi index e85e2294b..8d486f84d 100644 --- a/rbi/stripe/resources/gift_cards/transaction.rbi +++ b/rbi/stripe/resources/gift_cards/transaction.rbi @@ -13,85 +13,65 @@ module Stripe class Transaction < APIResource class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject - # The Stripe CheckoutSession that created this object. sig { returns(String) } attr_reader :checkout_session - # The Stripe CheckoutSession LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item end class Order < Stripe::StripeObject - # The Stripe Order LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item - # The Stripe Order that created this object. sig { returns(String) } attr_reader :order end class Payment < Stripe::StripeObject - # The PaymentIntent that created this object. sig { returns(String) } attr_reader :payment_intent end - # Attribute for field checkout sig { returns(Checkout) } attr_reader :checkout - # Attribute for field order sig { returns(Order) } attr_reader :order - # Attribute for field payment sig { returns(Payment) } attr_reader :payment - # The type of event that created this object. sig { returns(String) } attr_reader :type end - # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. sig { returns(T.nilable(Integer)) } + # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. attr_reader :amount - - # Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. attr_reader :confirmed_at - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The related Stripe objects that created this gift card transaction. sig { returns(T.nilable(CreatedBy)) } + # The related Stripe objects that created this gift card transaction. attr_reader :created_by - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # The gift card that this transaction occurred on sig { returns(T.nilable(String)) } + # The gift card that this transaction occurred on attr_reader :gift_card - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Status of this transaction, one of `held`, `confirmed`, or `canceled`. sig { returns(T.nilable(String)) } + # Status of this transaction, one of `held`, `confirmed`, or `canceled`. attr_reader :status - - # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. sig { returns(T.nilable(String)) } + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. attr_reader :transfer_group end end diff --git a/rbi/stripe/resources/identity/verification_report.rbi b/rbi/stripe/resources/identity/verification_report.rbi index 0fe1c84c5..aa18b876f 100644 --- a/rbi/stripe/resources/identity/verification_report.rbi +++ b/rbi/stripe/resources/identity/verification_report.rbi @@ -18,282 +18,206 @@ module Stripe class VerificationReport < APIResource class Document < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Dob < Stripe::StripeObject - # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end class ExpirationDate < Stripe::StripeObject - # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class IssuedDate < Stripe::StripeObject - # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end - # Address as it appears in the document. sig { returns(T.nilable(Address)) } attr_reader :address - # Date of birth as it appears in the document. sig { returns(T.nilable(Dob)) } attr_reader :dob - # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error - # Expiration date of the document. sig { returns(T.nilable(ExpirationDate)) } attr_reader :expiration_date - # Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. sig { returns(T.nilable(T::Array[String])) } attr_reader :files - # First name as it appears in the document. sig { returns(T.nilable(String)) } attr_reader :first_name - # Issued date of the document. sig { returns(T.nilable(IssuedDate)) } attr_reader :issued_date - # Issuing country of the document. sig { returns(T.nilable(String)) } attr_reader :issuing_country - # Last name as it appears in the document. sig { returns(T.nilable(String)) } attr_reader :last_name - # Document ID number. sig { returns(T.nilable(String)) } attr_reader :number - # Status of this `document` check. sig { returns(String) } attr_reader :status - # Type of the document. sig { returns(T.nilable(String)) } attr_reader :type end class Email < Stripe::StripeObject class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end - # Email to be verified. sig { returns(T.nilable(String)) } attr_reader :email - # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error - # Status of this `email` check. sig { returns(String) } attr_reader :status end class IdNumber < Stripe::StripeObject class Dob < Stripe::StripeObject - # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end - # Date of birth. sig { returns(T.nilable(Dob)) } attr_reader :dob - # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error - # First name. sig { returns(T.nilable(String)) } attr_reader :first_name - # ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. sig { returns(T.nilable(String)) } attr_reader :id_number - # Type of ID number. sig { returns(T.nilable(String)) } attr_reader :id_number_type - # Last name. sig { returns(T.nilable(String)) } attr_reader :last_name - # Status of this `id_number` check. sig { returns(String) } attr_reader :status end class Options < Stripe::StripeObject class Document < Stripe::StripeObject - # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. sig { returns(T::Array[String]) } attr_reader :allowed_types - # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. sig { returns(T::Boolean) } attr_reader :require_id_number - # Disable image uploads, identity document images have to be captured using the device’s camera. sig { returns(T::Boolean) } attr_reader :require_live_capture - # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). sig { returns(T::Boolean) } attr_reader :require_matching_selfie end class IdNumber < Stripe::StripeObject; end - # Attribute for field document sig { returns(Document) } attr_reader :document - # Attribute for field id_number sig { returns(IdNumber) } attr_reader :id_number end class Phone < Stripe::StripeObject class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end - # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error - # Phone to be verified. sig { returns(T.nilable(String)) } attr_reader :phone - # Status of this `phone` check. sig { returns(String) } attr_reader :status end class Selfie < Stripe::StripeObject class Error < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code - # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end - # ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. sig { returns(T.nilable(String)) } attr_reader :document - # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error - # ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. sig { returns(T.nilable(String)) } attr_reader :selfie - # Status of this `selfie` check. sig { returns(String) } attr_reader :status end - # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. sig { returns(T.nilable(String)) } + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_reader :client_reference_id - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Result from a document check sig { returns(Document) } + # Result from a document check attr_reader :document - - # Result from a email check sig { returns(Email) } + # Result from a email check attr_reader :email - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Result from an id_number check sig { returns(IdNumber) } + # Result from an id_number check attr_reader :id_number - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field options sig { returns(Options) } + # Attribute for field options attr_reader :options - - # Result from a phone check sig { returns(Phone) } + # Result from a phone check attr_reader :phone - - # Result from a selfie check sig { returns(Selfie) } + # Result from a selfie check attr_reader :selfie - - # Type of report. sig { returns(String) } + # Type of report. attr_reader :type - - # The configuration token of a verification flow from the dashboard. sig { returns(String) } + # The configuration token of a verification flow from the dashboard. attr_reader :verification_flow - - # ID of the VerificationSession that created this report. sig { returns(T.nilable(String)) } + # ID of the VerificationSession that created this report. attr_reader :verification_session end end diff --git a/rbi/stripe/resources/identity/verification_session.rbi b/rbi/stripe/resources/identity/verification_session.rbi index 2f62e5562..a6bb69001 100644 --- a/rbi/stripe/resources/identity/verification_session.rbi +++ b/rbi/stripe/resources/identity/verification_session.rbi @@ -17,192 +17,143 @@ module Stripe # Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) class VerificationSession < APIResource class LastError < Stripe::StripeObject - # A short machine-readable string giving the reason for the verification or user-session failure. sig { returns(T.nilable(String)) } attr_reader :code - # A message that explains the reason for verification or user-session failure. sig { returns(T.nilable(String)) } attr_reader :reason end class Options < Stripe::StripeObject class Document < Stripe::StripeObject - # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. sig { returns(T::Array[String]) } attr_reader :allowed_types - # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. sig { returns(T::Boolean) } attr_reader :require_id_number - # Disable image uploads, identity document images have to be captured using the device’s camera. sig { returns(T::Boolean) } attr_reader :require_live_capture - # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). sig { returns(T::Boolean) } attr_reader :require_matching_selfie end class Email < Stripe::StripeObject - # Request one time password verification of `provided_details.email`. sig { returns(T::Boolean) } attr_reader :require_verification end class IdNumber < Stripe::StripeObject; end class Phone < Stripe::StripeObject - # Request one time password verification of `provided_details.phone`. sig { returns(T::Boolean) } attr_reader :require_verification end - # Attribute for field document sig { returns(Document) } attr_reader :document - # Attribute for field email sig { returns(Email) } attr_reader :email - # Attribute for field id_number sig { returns(IdNumber) } attr_reader :id_number - # Attribute for field phone sig { returns(Phone) } attr_reader :phone end class ProvidedDetails < Stripe::StripeObject - # Email of user being verified sig { returns(String) } attr_reader :email - # Phone number of user being verified sig { returns(String) } attr_reader :phone end class Redaction < Stripe::StripeObject - # Indicates whether this object and its related objects have been redacted or not. sig { returns(String) } attr_reader :status end class VerifiedOutputs < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Dob < Stripe::StripeObject - # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end - # The user's verified address. sig { returns(T.nilable(Address)) } attr_reader :address - # The user’s verified date of birth. sig { returns(T.nilable(Dob)) } attr_reader :dob - # The user's verified email address sig { returns(T.nilable(String)) } attr_reader :email - # The user's verified first name. sig { returns(T.nilable(String)) } attr_reader :first_name - # The user's verified id number. sig { returns(T.nilable(String)) } attr_reader :id_number - # The user's verified id number type. sig { returns(T.nilable(String)) } attr_reader :id_number_type - # The user's verified last name. sig { returns(T.nilable(String)) } attr_reader :last_name - # The user's verified phone number sig { returns(T.nilable(String)) } attr_reader :phone end - # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. sig { returns(T.nilable(String)) } + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_reader :client_reference_id - - # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. sig { returns(T.nilable(String)) } + # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. attr_reader :client_secret - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # If present, this property tells you the last error encountered when processing the verification. sig { returns(T.nilable(LastError)) } + # If present, this property tells you the last error encountered when processing the verification. attr_reader :last_error - - # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) sig { returns(T.nilable(T.any(String, Stripe::Identity::VerificationReport))) } + # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) attr_reader :last_verification_report - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # A set of options for the session’s verification checks. sig { returns(T.nilable(Options)) } + # A set of options for the session’s verification checks. attr_reader :options - - # Details provided about the user being verified. These details may be shown to the user. sig { returns(T.nilable(ProvidedDetails)) } + # Details provided about the user being verified. These details may be shown to the user. attr_reader :provided_details - - # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. sig { returns(T.nilable(Redaction)) } + # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. attr_reader :redaction - - # Token referencing a Customer resource. sig { returns(T.nilable(String)) } + # Token referencing a Customer resource. attr_reader :related_customer - - # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). sig { returns(String) } + # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). attr_reader :status - - # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. sig { returns(String) } + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. attr_reader :type - - # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. sig { returns(T.nilable(String)) } + # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. attr_reader :url - - # The configuration token of a verification flow from the dashboard. sig { returns(String) } + # The configuration token of a verification flow from the dashboard. attr_reader :verification_flow - - # The user’s verified data. sig { returns(T.nilable(VerifiedOutputs)) } + # The user’s verified data. attr_reader :verified_outputs end end diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index 4d3a73ece..381e3c889 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -37,217 +37,132 @@ module Stripe # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) class Invoice < APIResource class AmountsDue < Stripe::StripeObject - # Incremental amount due for this payment in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount - # The amount in cents (or local equivalent) that was paid for this payment. sig { returns(Integer) } attr_reader :amount_paid - # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_remaining - # Number of days from when invoice is finalized until the payment is due. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description - # Date on which a payment plan’s payment is due. sig { returns(T.nilable(Integer)) } attr_reader :due_date - # Timestamp when the payment was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at - # The status of the payment, one of `open`, `paid`, or `past_due` sig { returns(String) } attr_reader :status end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability - # The status of the most recent automated tax calculation for this invoice. sig { returns(T.nilable(String)) } attr_reader :status end class CustomField < Stripe::StripeObject - # The name of the custom field. sig { returns(String) } attr_reader :name - # The value of the custom field. sig { returns(String) } attr_reader :value end class CustomerAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type - # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end class FromInvoice < Stripe::StripeObject - # The relation between this invoice and the cloned invoice sig { returns(String) } attr_reader :action - # The invoice that was cloned. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice end class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end class LastFinalizationError < Stripe::StripeObject - # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent - # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end @@ -255,53 +170,41 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject - # Whether Installments are enabled for this Invoice. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end - # Attribute for field installments sig { returns(Installments) } attr_reader :installments - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end - # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer - # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end - # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -311,323 +214,234 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end - # Attribute for field filters sig { returns(Filters) } attr_reader :filters - # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions - # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end - # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end - # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit - # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact - # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Card)) } attr_reader :card - # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance - # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer - # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Konbini)) } attr_reader :konbini - # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit - # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end - # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. sig { returns(T.nilable(String)) } attr_reader :default_mandate - # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject - # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. sig { returns(T.nilable(String)) } attr_reader :page_size end - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display - # Invoice pdf rendering options sig { returns(T.nilable(Pdf)) } attr_reader :pdf - # ID of the rendering template that the invoice is formatted by. sig { returns(T.nilable(String)) } attr_reader :template - # Version of the rendering template that the invoice is using. sig { returns(T.nilable(Integer)) } attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax - # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total - # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate - # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject - # The time that the invoice draft was finalized. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at - # The time that the invoice was marked uncollectible. sig { returns(T.nilable(Integer)) } attr_reader :marked_uncollectible_at - # The time that the invoice was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at - # The time that the invoice was voided. sig { returns(T.nilable(Integer)) } attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior - # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. - # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject - # The IDs of the line items that triggered the threshold invoice. sig { returns(T::Array[String]) } attr_reader :line_item_ids - # The quantity threshold boundary that applied to the given line item. sig { returns(Integer) } attr_reader :usage_gte end - # The total invoice amount threshold boundary if it triggered the threshold invoice. sig { returns(T.nilable(Integer)) } attr_reader :amount_gte - # Indicates which line items triggered a threshold invoice. sig { returns(T::Array[ItemReason]) } attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount - # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount - # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount - # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin - # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TotalTaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount - # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive - # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end class TransferData < Stripe::StripeObject - # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount - # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # The country of the business associated with this invoice, most often the business creating the invoice. sig { returns(T.nilable(String)) } + # The country of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_country - - # The public name of the business associated with this invoice, most often the business creating the invoice. sig { returns(T.nilable(String)) } + # The public name of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_name - - # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. attr_reader :account_tax_ids - - # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. sig { returns(Integer) } + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. attr_reader :amount_due - - # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. sig { returns(Integer) } + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. attr_reader :amount_overpaid - - # The amount, in cents (or local equivalent), that was paid. sig { returns(Integer) } + # The amount, in cents (or local equivalent), that was paid. attr_reader :amount_paid - - # The difference between amount_due and amount_paid, in cents (or local equivalent). sig { returns(Integer) } + # The difference between amount_due and amount_paid, in cents (or local equivalent). attr_reader :amount_remaining - - # This is the sum of all the shipping amounts. sig { returns(Integer) } + # This is the sum of all the shipping amounts. attr_reader :amount_shipping - - # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. sig { returns(T.nilable(T::Array[AmountsDue])) } + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. attr_reader :amounts_due - - # ID of the Connect Application that created the invoice. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the invoice. attr_reader :application - - # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. sig { returns(T.nilable(Integer)) } + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. attr_reader :application_fee_amount - - # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. sig { returns(Integer) } + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. attr_reader :attempt_count - - # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. sig { returns(T::Boolean) } + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. attr_reader :attempted - - # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. sig { returns(T::Boolean) } + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. attr_reader :auto_advance - - # Attribute for field automatic_tax sig { returns(AutomaticTax) } + # Attribute for field automatic_tax attr_reader :automatic_tax - - # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. sig { returns(T.nilable(Integer)) } + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. attr_reader :automatically_finalizes_at - + sig { returns(T.nilable(String)) } # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -637,301 +451,227 @@ module Stripe # * `subscription_threshold`: A subscription reached a billing threshold. # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. - sig { returns(T.nilable(String)) } attr_reader :billing_reason - - # ID of the latest charge generated for this invoice, if any. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the latest charge generated for this invoice, if any. attr_reader :charge - - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. attr_reader :collection_method - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Custom fields displayed on the invoice. sig { returns(T.nilable(T::Array[CustomField])) } + # Custom fields displayed on the invoice. attr_reader :custom_fields - - # The ID of the customer who will be billed. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the customer who will be billed. attr_reader :customer - - # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(CustomerAddress)) } + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_address - - # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(String)) } + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_email - - # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(String)) } + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_name - - # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(String)) } + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_phone - - # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(CustomerShipping)) } + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_shipping - - # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(String)) } + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_exempt - - # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(T::Array[CustomerTaxId])) } + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_ids - - # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. attr_reader :default_margins - - # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. attr_reader :default_payment_method - - # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source - - # The tax rates applied to this invoice, if any. sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates applied to this invoice, if any. attr_reader :default_tax_rates - - # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. attr_reader :description - - # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. attr_reader :discount - - # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - - # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. sig { returns(T.nilable(Integer)) } + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. attr_reader :due_date - - # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. sig { returns(T.nilable(Integer)) } + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. attr_reader :effective_at - - # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. sig { returns(T.nilable(Integer)) } + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :ending_balance - - # Footer displayed on the invoice. sig { returns(T.nilable(String)) } + # Footer displayed on the invoice. attr_reader :footer - - # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. sig { returns(T.nilable(FromInvoice)) } + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. attr_reader :from_invoice - - # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. sig { returns(T.nilable(String)) } + # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. attr_reader :hosted_invoice_url - - # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. sig { returns(String) } + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. attr_reader :id - - # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. sig { returns(T.nilable(String)) } + # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :invoice_pdf - - # Attribute for field issuer sig { returns(Issuer) } + # Attribute for field issuer attr_reader :issuer - - # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. sig { returns(T.nilable(LastFinalizationError)) } + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. attr_reader :last_finalization_error - - # The ID of the most recent non-draft revision of this invoice sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the most recent non-draft revision of this invoice attr_reader :latest_revision - - # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. sig { returns(Stripe::ListObject) } + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. attr_reader :lines - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. sig { returns(T.nilable(Integer)) } + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. attr_reader :next_payment_attempt - - # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. sig { returns(T.nilable(String)) } + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. attr_reader :number - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. attr_reader :on_behalf_of - - # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. sig { returns(T::Boolean) } + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. attr_reader :paid - - # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. sig { returns(T::Boolean) } + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. attr_reader :paid_out_of_band - - # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. attr_reader :payment_intent - - # Attribute for field payment_settings sig { returns(PaymentSettings) } + # Attribute for field payment_settings attr_reader :payment_settings - - # Payments for this invoice sig { returns(Stripe::ListObject) } + # Payments for this invoice attr_reader :payments - - # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. sig { returns(Integer) } + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_end - - # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. sig { returns(Integer) } + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_start - - # Total amount of all post-payment credit notes issued for this invoice. sig { returns(Integer) } + # Total amount of all post-payment credit notes issued for this invoice. attr_reader :post_payment_credit_notes_amount - - # Total amount of all pre-payment credit notes issued for this invoice. sig { returns(Integer) } + # Total amount of all pre-payment credit notes issued for this invoice. attr_reader :pre_payment_credit_notes_amount - - # The quote this invoice was generated from. sig { returns(T.nilable(T.any(String, Stripe::Quote))) } + # The quote this invoice was generated from. attr_reader :quote - - # This is the transaction number that appears on email receipts sent for this invoice. sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this invoice. attr_reader :receipt_number - - # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. sig { returns(T.nilable(Rendering)) } + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. attr_reader :rendering - - # The details of the cost of shipping, including the ShippingRate applied on the invoice. sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied on the invoice. attr_reader :shipping_cost - - # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. sig { returns(T.nilable(ShippingDetails)) } + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. attr_reader :shipping_details - - # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. sig { returns(Integer) } + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. attr_reader :starting_balance - - # Extra information about an invoice for the customer's credit card statement. sig { returns(T.nilable(String)) } + # Extra information about an invoice for the customer's credit card statement. attr_reader :statement_descriptor - - # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) sig { returns(T.nilable(String)) } + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # The subscription that this invoice was prepared for, if any. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that this invoice was prepared for, if any. attr_reader :subscription - - # Details about the subscription that created this invoice. sig { returns(T.nilable(SubscriptionDetails)) } + # Details about the subscription that created this invoice. attr_reader :subscription_details - - # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. sig { returns(Integer) } + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. attr_reader :subscription_proration_date - - # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated sig { returns(Integer) } + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated attr_reader :subtotal - - # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated attr_reader :subtotal_excluding_tax - - # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. sig { returns(T.nilable(Integer)) } + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. attr_reader :tax - - # ID of the test clock this invoice belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice belongs to. attr_reader :test_clock - - # Attribute for field threshold_reason sig { returns(ThresholdReason) } + # Attribute for field threshold_reason attr_reader :threshold_reason - - # Total after discounts and taxes. sig { returns(Integer) } + # Total after discounts and taxes. attr_reader :total - - # The aggregate amounts calculated per discount across all line items. sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } + # The aggregate amounts calculated per discount across all line items. attr_reader :total_discount_amounts - - # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. attr_reader :total_excluding_tax - - # The aggregate amounts calculated per margin across all line items. sig { returns(T.nilable(T::Array[TotalMarginAmount])) } + # The aggregate amounts calculated per margin across all line items. attr_reader :total_margin_amounts - - # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. attr_reader :total_pretax_credit_amounts - - # The aggregate amounts calculated per tax rate for all line items. sig { returns(T::Array[TotalTaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. attr_reader :total_tax_amounts - - # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. sig { returns(T.nilable(TransferData)) } + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. attr_reader :transfer_data - - # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. sig { returns(T.nilable(Integer)) } + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. attr_reader :webhooks_delivered_at - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_item.rbi b/rbi/stripe/resources/invoice_item.rbi index 47538c6b2..d0c0fc11a 100644 --- a/rbi/stripe/resources/invoice_item.rbi +++ b/rbi/stripe/resources/invoice_item.rbi @@ -16,111 +16,85 @@ module Stripe # Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). class InvoiceItem < APIResource class Period < Stripe::StripeObject - # The end of the period, which must be greater than or equal to the start. This value is inclusive. sig { returns(Integer) } attr_reader :end - # The start of the period. This value is inclusive. sig { returns(Integer) } attr_reader :start end - # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. sig { returns(Integer) } + # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. attr_reader :amount - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The ID of the customer who will be billed when this invoice item is billed. sig { returns(T.any(String, Stripe::Customer)) } + # The ID of the customer who will be billed when this invoice item is billed. attr_reader :customer - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :date - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # If true, discounts will apply to this invoice item. Always false for prorations. sig { returns(T::Boolean) } + # If true, discounts will apply to this invoice item. Always false for prorations. attr_reader :discountable - - # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } + # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The ID of the invoice this invoice item belongs to. sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the invoice this invoice item belongs to. attr_reader :invoice - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. attr_reader :margins - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field period sig { returns(Period) } + # Attribute for field period attr_reader :period - - # If the invoice item is a proration, the plan of the subscription that the proration was computed for. sig { returns(T.nilable(Stripe::Plan)) } + # If the invoice item is a proration, the plan of the subscription that the proration was computed for. attr_reader :plan - - # The price of the invoice item. sig { returns(T.nilable(Stripe::Price)) } + # The price of the invoice item. attr_reader :price - - # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. sig { returns(T::Boolean) } + # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. attr_reader :proration - - # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. sig { returns(Integer) } + # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. attr_reader :quantity - - # The subscription that this invoice item has been created for, if any. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that this invoice item has been created for, if any. attr_reader :subscription - - # The subscription item that this invoice item has been created for, if any. sig { returns(String) } + # The subscription item that this invoice item has been created for, if any. attr_reader :subscription_item - - # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. attr_reader :tax_rates - - # ID of the test clock this invoice item belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice item belongs to. attr_reader :test_clock - - # Unit amount (in the `currency` specified) of the invoice item. sig { returns(T.nilable(Integer)) } + # Unit amount (in the `currency` specified) of the invoice item. attr_reader :unit_amount - - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. attr_reader :unit_amount_decimal - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_line_item.rbi b/rbi/stripe/resources/invoice_line_item.rbi index c580f5e39..8c587d7b9 100644 --- a/rbi/stripe/resources/invoice_line_item.rbi +++ b/rbi/stripe/resources/invoice_line_item.rbi @@ -8,186 +8,140 @@ module Stripe # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). class InvoiceLineItem < StripeObject class DiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount - # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class MarginAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount - # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class Period < Stripe::StripeObject - # The end of the period, which must be greater than or equal to the start. This value is inclusive. sig { returns(Integer) } attr_reader :end - # The start of the period. This value is inclusive. sig { returns(Integer) } attr_reader :start end class PretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount - # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin - # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class ProrationDetails < Stripe::StripeObject class CreditedItems < Stripe::StripeObject - # Invoice containing the credited invoice line items sig { returns(String) } attr_reader :invoice - # Credited invoice line items sig { returns(T::Array[String]) } attr_reader :invoice_line_items end - # For a credit proration `line_item`, the original debit line_items to which the credit proration applies. sig { returns(T.nilable(CreditedItems)) } attr_reader :credited_items end class TaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount - # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive - # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # The amount, in cents (or local equivalent). sig { returns(Integer) } + # The amount, in cents (or local equivalent). attr_reader :amount - - # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. attr_reader :amount_excluding_tax - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # The amount of discount calculated per discount for this line item. sig { returns(T.nilable(T::Array[DiscountAmount])) } + # The amount of discount calculated per discount for this line item. attr_reader :discount_amounts - - # If true, discounts will apply to this line item. Always false for prorations. sig { returns(T::Boolean) } + # If true, discounts will apply to this line item. Always false for prorations. attr_reader :discountable - - # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The ID of the invoice that contains this line item. sig { returns(T.nilable(String)) } + # The ID of the invoice that contains this line item. attr_reader :invoice - - # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. sig { returns(T.any(String, Stripe::InvoiceItem)) } + # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. attr_reader :invoice_item - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The amount of margin calculated per margin for this line item. sig { returns(T.nilable(T::Array[MarginAmount])) } + # The amount of margin calculated per margin for this line item. attr_reader :margin_amounts - - # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. attr_reader :margins - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field period sig { returns(Period) } + # Attribute for field period attr_reader :period - - # The plan of the subscription, if the line item is a subscription or a proration. sig { returns(T.nilable(Stripe::Plan)) } + # The plan of the subscription, if the line item is a subscription or a proration. attr_reader :plan - - # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. sig { returns(T.nilable(T::Array[PretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. attr_reader :pretax_credit_amounts - - # The price of the line item. sig { returns(T.nilable(Stripe::Price)) } + # The price of the line item. attr_reader :price - - # Whether this is a proration. sig { returns(T::Boolean) } + # Whether this is a proration. attr_reader :proration - - # Additional details for proration line items sig { returns(T.nilable(ProrationDetails)) } + # Additional details for proration line items attr_reader :proration_details - - # The quantity of the subscription, if the line item is a subscription or a proration. sig { returns(T.nilable(Integer)) } + # The quantity of the subscription, if the line item is a subscription or a proration. attr_reader :quantity - - # The subscription that the invoice item pertains to, if any. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that the invoice item pertains to, if any. attr_reader :subscription - - # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. sig { returns(T.any(String, Stripe::SubscriptionItem)) } + # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. attr_reader :subscription_item - - # The amount of tax calculated per tax rate for this line item sig { returns(T::Array[TaxAmount]) } + # The amount of tax calculated per tax rate for this line item attr_reader :tax_amounts - - # The tax rates which apply to the line item. sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates which apply to the line item. attr_reader :tax_rates - - # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. sig { returns(String) } + # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. attr_reader :type - - # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. sig { returns(T.nilable(String)) } + # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. attr_reader :unit_amount_excluding_tax end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_payment.rbi b/rbi/stripe/resources/invoice_payment.rbi index 974f0ae23..4dccf0f92 100644 --- a/rbi/stripe/resources/invoice_payment.rbi +++ b/rbi/stripe/resources/invoice_payment.rbi @@ -6,77 +6,59 @@ module Stripe # The invoice payment object class InvoicePayment < APIResource class Payment < Stripe::StripeObject - # ID of the successful charge for this payment when `type` is `charge`. sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge - # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent - # ID of the PaymentRecord associated with this payment when `type` is `payment_record`. sig { returns(T.any(String, Stripe::PaymentRecord)) } attr_reader :payment_record - # Type of payment object associated with this invoice payment. sig { returns(String) } attr_reader :type end class StatusTransitions < Stripe::StripeObject - # The time that the payment was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - # The time that the payment succeeded. sig { returns(T.nilable(Integer)) } attr_reader :paid_at end - # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. sig { returns(T.nilable(Integer)) } + # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. attr_reader :amount_overpaid - - # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. sig { returns(T.nilable(Integer)) } + # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. attr_reader :amount_paid - - # Amount intended to be paid toward this invoice, in cents (or local equivalent) sig { returns(Integer) } + # Amount intended to be paid toward this invoice, in cents (or local equivalent) attr_reader :amount_requested - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The invoice that was paid. sig { returns(T.any(String, Stripe::Invoice)) } + # The invoice that was paid. attr_reader :invoice - - # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. sig { returns(T.nilable(T::Boolean)) } + # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. attr_reader :is_default - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field payment sig { returns(Payment) } + # Attribute for field payment attr_reader :payment - - # The status of the payment, one of `open`, `paid`, or `canceled`. sig { returns(String) } + # The status of the payment, one of `open`, `paid`, or `canceled`. attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_rendering_template.rbi b/rbi/stripe/resources/invoice_rendering_template.rbi index a48e8dec9..5f2c3e939 100644 --- a/rbi/stripe/resources/invoice_rendering_template.rbi +++ b/rbi/stripe/resources/invoice_rendering_template.rbi @@ -6,36 +6,29 @@ module Stripe # Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates # can be created from within the Dashboard, and they can be used over the API when creating invoices. class InvoiceRenderingTemplate < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # A brief description of the template, hidden from customers sig { returns(T.nilable(String)) } + # A brief description of the template, hidden from customers attr_reader :nickname - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The status of the template, one of `active` or `archived`. sig { returns(String) } + # The status of the template, one of `active` or `archived`. attr_reader :status - - # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering sig { returns(Integer) } + # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering attr_reader :version end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/authorization.rbi b/rbi/stripe/resources/issuing/authorization.rbi index 394dd8bbe..5748c28e2 100644 --- a/rbi/stripe/resources/issuing/authorization.rbi +++ b/rbi/stripe/resources/issuing/authorization.rbi @@ -11,385 +11,281 @@ module Stripe # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) class Authorization < APIResource class AmountDetails < Stripe::StripeObject - # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee - # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject - # [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. sig { returns(T.nilable(String)) } attr_reader :alphanumeric_id - # Driver ID. sig { returns(T.nilable(String)) } attr_reader :driver_id - # Odometer reading. sig { returns(T.nilable(Integer)) } attr_reader :odometer - # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. sig { returns(T.nilable(String)) } attr_reader :unspecified_id - # User ID. sig { returns(T.nilable(String)) } attr_reader :user_id - # Vehicle number. sig { returns(T.nilable(String)) } attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject - # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject - # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject - # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :local_amount_decimal - # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :national_amount_decimal end - # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } attr_reader :fuel - # Breakdown of non-fuel portion of the purchase. sig { returns(T.nilable(NonFuel)) } attr_reader :non_fuel - # Information about tax included in this transaction. sig { returns(T.nilable(Tax)) } attr_reader :tax end - # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { returns(T.nilable(CardholderPromptData)) } attr_reader :cardholder_prompt_data - # The type of purchase. sig { returns(T.nilable(String)) } attr_reader :purchase_type - # More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. sig { returns(T.nilable(ReportedBreakdown)) } attr_reader :reported_breakdown - # The type of fuel service. sig { returns(T.nilable(String)) } attr_reader :service_type end class FraudChallenge < Stripe::StripeObject - # The method by which the fraud challenge was delivered to the cardholder. sig { returns(String) } attr_reader :channel - # The status of the fraud challenge. sig { returns(String) } attr_reader :status - # If the challenge is not deliverable, the reason why. sig { returns(T.nilable(String)) } attr_reader :undeliverable_reason end class Fuel < Stripe::StripeObject - # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. sig { returns(T.nilable(String)) } attr_reader :industry_product_code - # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :quantity_decimal - # The type of fuel that was purchased. sig { returns(T.nilable(String)) } attr_reader :type - # The units for `quantity_decimal`. sig { returns(T.nilable(String)) } attr_reader :unit - # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_cost_decimal end class MerchantData < Stripe::StripeObject - # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. sig { returns(String) } attr_reader :category - # The merchant category code for the seller’s business sig { returns(String) } attr_reader :category_code - # City where the seller is located sig { returns(T.nilable(String)) } attr_reader :city - # Country where the seller is located sig { returns(T.nilable(String)) } attr_reader :country - # Name of the seller sig { returns(T.nilable(String)) } attr_reader :name - # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. sig { returns(String) } attr_reader :network_id - # Postal code where the seller is located sig { returns(T.nilable(String)) } attr_reader :postal_code - # State where the seller is located sig { returns(T.nilable(String)) } attr_reader :state - # An ID assigned by the seller to the location of the sale. sig { returns(T.nilable(String)) } attr_reader :terminal_id - # URL provided by the merchant on a 3DS request sig { returns(T.nilable(String)) } attr_reader :url end class NetworkData < Stripe::StripeObject - # Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. sig { returns(T.nilable(String)) } attr_reader :acquiring_institution_id - # The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. sig { returns(T.nilable(String)) } attr_reader :system_trace_audit_number - # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class PendingRequest < Stripe::StripeObject class AmountDetails < Stripe::StripeObject - # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee - # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end - # The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. sig { returns(T::Boolean) } attr_reader :is_amount_controllable - # The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :merchant_amount - # The local currency the merchant is requesting to authorize. sig { returns(String) } attr_reader :merchant_currency - # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. sig { returns(T.nilable(Integer)) } attr_reader :network_risk_score end class RequestHistory < Stripe::StripeObject class AmountDetails < Stripe::StripeObject - # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee - # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end - # The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. sig { returns(Integer) } attr_reader :amount - # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details - # Whether this request was approved. sig { returns(T::Boolean) } attr_reader :approved - # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. sig { returns(T.nilable(String)) } attr_reader :authorization_code - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :created - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :merchant_amount - # The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :merchant_currency - # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. sig { returns(T.nilable(Integer)) } attr_reader :network_risk_score - # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. sig { returns(String) } attr_reader :reason - # If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. sig { returns(T.nilable(String)) } attr_reader :reason_message - # Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. sig { returns(T.nilable(Integer)) } attr_reader :requested_at end class Treasury < Stripe::StripeObject - # The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization sig { returns(T::Array[String]) } attr_reader :received_credits - # The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization sig { returns(T::Array[String]) } attr_reader :received_debits - # The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization sig { returns(T.nilable(String)) } attr_reader :transaction end class VerificationData < Stripe::StripeObject class AuthenticationExemption < Stripe::StripeObject - # The entity that requested the exemption, either the acquiring merchant or the Issuing user. sig { returns(String) } attr_reader :claimed_by - # The specific exemption claimed for this authorization. sig { returns(String) } attr_reader :type end class ThreeDSecure < Stripe::StripeObject - # The outcome of the 3D Secure authentication request. sig { returns(String) } attr_reader :result end - # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. sig { returns(String) } attr_reader :address_line1_check - # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. sig { returns(String) } attr_reader :address_postal_code_check - # The exemption applied to this authorization. sig { returns(T.nilable(AuthenticationExemption)) } attr_reader :authentication_exemption - # Whether the cardholder provided a CVC and if it matched Stripe’s record. sig { returns(String) } attr_reader :cvc_check - # Whether the cardholder provided an expiry date and if it matched Stripe’s record. sig { returns(String) } attr_reader :expiry_check - # The postal code submitted as part of the authorization used for postal code verification. sig { returns(T.nilable(String)) } attr_reader :postal_code - # 3D Secure details. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure end - # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. sig { returns(Integer) } + # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. attr_reader :amount - - # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(AmountDetails)) } + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_details - - # Whether the authorization has been approved. sig { returns(T::Boolean) } + # Whether the authorization has been approved. attr_reader :approved - - # How the card details were provided. sig { returns(String) } + # How the card details were provided. attr_reader :authorization_method - - # List of balance transactions associated with this authorization. sig { returns(T::Array[Stripe::BalanceTransaction]) } + # List of balance transactions associated with this authorization. attr_reader :balance_transactions - - # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. sig { returns(Stripe::Issuing::Card) } + # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. attr_reader :card - - # The cardholder to whom this authorization belongs. sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } + # The cardholder to whom this authorization belongs. attr_reader :cardholder - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Fleet-specific information for authorizations using Fleet cards. sig { returns(T.nilable(Fleet)) } + # Fleet-specific information for authorizations using Fleet cards. attr_reader :fleet - - # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. sig { returns(T.nilable(T::Array[FraudChallenge])) } + # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. attr_reader :fraud_challenges - - # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. sig { returns(T.nilable(Fuel)) } + # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. attr_reader :fuel - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. sig { returns(Integer) } + # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. attr_reader :merchant_amount - - # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :merchant_currency - - # Attribute for field merchant_data sig { returns(MerchantData) } + # Attribute for field merchant_data attr_reader :merchant_data - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Details about the authorization, such as identifiers, set by the card network. sig { returns(T.nilable(NetworkData)) } + # Details about the authorization, such as identifiers, set by the card network. attr_reader :network_data - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. sig { returns(T.nilable(PendingRequest)) } + # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. attr_reader :pending_request - - # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. sig { returns(T::Array[RequestHistory]) } + # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. attr_reader :request_history - - # The current status of the authorization in its lifecycle. sig { returns(String) } + # The current status of the authorization in its lifecycle. attr_reader :status - - # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. attr_reader :token - - # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. sig { returns(T::Array[Stripe::Issuing::Transaction]) } + # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. attr_reader :transactions - - # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). attr_reader :treasury - - # Attribute for field verification_data sig { returns(VerificationData) } + # Attribute for field verification_data attr_reader :verification_data - - # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. sig { returns(T.nilable(T::Boolean)) } + # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. attr_reader :verified_by_fraud_challenge - - # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. sig { returns(T.nilable(String)) } + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. attr_reader :wallet end end diff --git a/rbi/stripe/resources/issuing/card.rbi b/rbi/stripe/resources/issuing/card.rbi index d223aa99b..c232e804e 100644 --- a/rbi/stripe/resources/issuing/card.rbi +++ b/rbi/stripe/resources/issuing/card.rbi @@ -8,255 +8,187 @@ module Stripe class Card < APIResource class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressValidation < Stripe::StripeObject class NormalizedAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # The address validation capabilities to use. sig { returns(String) } attr_reader :mode - # The normalized shipping address. sig { returns(T.nilable(NormalizedAddress)) } attr_reader :normalized_address - # The validation result for the shipping address. sig { returns(T.nilable(String)) } attr_reader :result end class Customs < Stripe::StripeObject - # A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. sig { returns(T.nilable(String)) } attr_reader :eori_number end - # Attribute for field address sig { returns(Address) } attr_reader :address - # Address validation details for the shipment. sig { returns(T.nilable(AddressValidation)) } attr_reader :address_validation - # The delivery company that shipped a card. sig { returns(T.nilable(String)) } attr_reader :carrier - # Additional information that may be required for clearing customs. sig { returns(T.nilable(Customs)) } attr_reader :customs - # A unix timestamp representing a best estimate of when the card will be delivered. sig { returns(T.nilable(Integer)) } attr_reader :eta - # Recipient name. sig { returns(String) } attr_reader :name - # The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. sig { returns(T.nilable(String)) } attr_reader :phone_number - # Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. sig { returns(T.nilable(T::Boolean)) } attr_reader :require_signature - # Shipment service, such as `standard` or `express`. sig { returns(String) } attr_reader :service - # The delivery status of the card. sig { returns(T.nilable(String)) } attr_reader :status - # A tracking number for a card shipment. sig { returns(T.nilable(String)) } attr_reader :tracking_number - # A link to the shipping carrier's site where you can view detailed information about a card shipment. sig { returns(T.nilable(String)) } attr_reader :tracking_url - # Packaging options. sig { returns(String) } attr_reader :type end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject - # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. sig { returns(T.nilable(T::Array[String])) } attr_reader :categories - # Interval (or event) to which the amount applies. sig { returns(String) } attr_reader :interval end - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_categories - # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_merchant_countries - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_categories - # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_merchant_countries - # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). sig { returns(T.nilable(T::Array[SpendingLimit])) } attr_reader :spending_limits - # Currency of the amounts within `spending_limits`. Always the same as the currency of the card. sig { returns(T.nilable(String)) } attr_reader :spending_limits_currency end class Wallets < Stripe::StripeObject class ApplePay < Stripe::StripeObject - # Apple Pay Eligibility sig { returns(T::Boolean) } attr_reader :eligible - # Reason the card is ineligible for Apple Pay sig { returns(T.nilable(String)) } attr_reader :ineligible_reason end class GooglePay < Stripe::StripeObject - # Google Pay Eligibility sig { returns(T::Boolean) } attr_reader :eligible - # Reason the card is ineligible for Google Pay sig { returns(T.nilable(String)) } attr_reader :ineligible_reason end - # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay - # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay - # Unique identifier for a card used with digital wallets sig { returns(T.nilable(String)) } attr_reader :primary_account_identifier end - # The brand of the card. sig { returns(String) } + # The brand of the card. attr_reader :brand - - # The reason why the card was canceled. sig { returns(T.nilable(String)) } + # The reason why the card was canceled. attr_reader :cancellation_reason - + sig { returns(Stripe::Issuing::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/virtual/issue-cards#create-cardholder) - sig { returns(Stripe::Issuing::Cardholder) } attr_reader :cardholder - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. attr_reader :currency - - # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. sig { returns(String) } + # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. attr_reader :cvc - - # The expiration month of the card. sig { returns(Integer) } + # The expiration month of the card. attr_reader :exp_month - - # The expiration year of the card. sig { returns(Integer) } + # The expiration year of the card. attr_reader :exp_year - - # The financial account this card is attached to. sig { returns(T.nilable(String)) } + # The financial account this card is attached to. attr_reader :financial_account - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The last 4 digits of the card number. sig { returns(String) } + # The last 4 digits of the card number. attr_reader :last4 - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. sig { returns(String) } + # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. attr_reader :number - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The personalization design object belonging to this card. sig { returns(T.nilable(T.any(String, Stripe::Issuing::PersonalizationDesign))) } + # The personalization design object belonging to this card. attr_reader :personalization_design - - # The latest card that replaces this card, if any. sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } + # The latest card that replaces this card, if any. attr_reader :replaced_by - - # The card this card replaces, if any. sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } + # The card this card replaces, if any. attr_reader :replacement_for - - # The reason why the previous card needed to be replaced. sig { returns(T.nilable(String)) } + # The reason why the previous card needed to be replaced. attr_reader :replacement_reason - - # Where and how the card will be shipped. sig { returns(T.nilable(Shipping)) } + # Where and how the card will be shipped. attr_reader :shipping - - # Attribute for field spending_controls sig { returns(SpendingControls) } + # Attribute for field spending_controls attr_reader :spending_controls - - # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. sig { returns(String) } + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. attr_reader :status - - # The type of the card. sig { returns(String) } + # The type of the card. attr_reader :type - - # Information relating to digital wallets (like Apple Pay and Google Pay). sig { returns(T.nilable(Wallets)) } + # Information relating to digital wallets (like Apple Pay and Google Pay). attr_reader :wallets end end diff --git a/rbi/stripe/resources/issuing/cardholder.rbi b/rbi/stripe/resources/issuing/cardholder.rbi index 0b44b85d3..ee2b27fe1 100644 --- a/rbi/stripe/resources/issuing/cardholder.rbi +++ b/rbi/stripe/resources/issuing/cardholder.rbi @@ -10,193 +10,144 @@ module Stripe class Cardholder < APIResource class Billing < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address end class Company < Stripe::StripeObject - # Whether the company's business ID number was provided. sig { returns(T::Boolean) } attr_reader :tax_id_provided end class Individual < Stripe::StripeObject class CardIssuing < Stripe::StripeObject class UserTermsAcceptance < Stripe::StripeObject - # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(Integer)) } attr_reader :date - # The IP address from which the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(String)) } attr_reader :ip - # The user agent of the browser from which the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(String)) } attr_reader :user_agent end - # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. sig { returns(T.nilable(UserTermsAcceptance)) } attr_reader :user_terms_acceptance end class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject - # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back - # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end - # An identifying document, either a passport or local ID card. sig { returns(T.nilable(Document)) } attr_reader :document end - # Information related to the card_issuing program for this cardholder. sig { returns(T.nilable(CardIssuing)) } attr_reader :card_issuing - # The date of birth of this cardholder. sig { returns(T.nilable(Dob)) } attr_reader :dob - # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. sig { returns(T.nilable(String)) } attr_reader :first_name - # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. sig { returns(T.nilable(String)) } attr_reader :last_name - # Government-issued ID document for this cardholder. sig { returns(T.nilable(Verification)) } attr_reader :verification end class Requirements < Stripe::StripeObject - # If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. sig { returns(T.nilable(String)) } attr_reader :disabled_reason - # Array of fields that need to be collected in order to verify and re-enable the cardholder. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject - # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. sig { returns(T.nilable(T::Array[String])) } attr_reader :categories - # Interval (or event) to which the amount applies. sig { returns(String) } attr_reader :interval end - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_categories - # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_merchant_countries - # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_categories - # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_merchant_countries - # Limit spending with amount-based rules that apply across this cardholder's cards. sig { returns(T.nilable(T::Array[SpendingLimit])) } attr_reader :spending_limits - # Currency of the amounts within `spending_limits`. sig { returns(T.nilable(String)) } attr_reader :spending_limits_currency end - # Attribute for field billing sig { returns(Billing) } + # Attribute for field billing attr_reader :billing - - # Additional information about a `company` cardholder. sig { returns(T.nilable(Company)) } + # Additional information about a `company` cardholder. attr_reader :company - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The cardholder's email address. sig { returns(T.nilable(String)) } + # The cardholder's email address. attr_reader :email - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Additional information about an `individual` cardholder. sig { returns(T.nilable(Individual)) } + # Additional information about an `individual` cardholder. attr_reader :individual - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The cardholder's name. This will be printed on cards issued to them. sig { returns(String) } + # The cardholder's name. This will be printed on cards issued to them. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. sig { returns(T.nilable(String)) } + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. attr_reader :phone_number - + sig { returns(T.nilable(T::Array[String])) } # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. - sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - - # Attribute for field requirements sig { returns(Requirements) } + # Attribute for field requirements attr_reader :requirements - - # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. sig { returns(T.nilable(SpendingControls)) } + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. attr_reader :spending_controls - - # Specifies whether to permit authorizations on this cardholder's cards. sig { returns(String) } + # Specifies whether to permit authorizations on this cardholder's cards. attr_reader :status - - # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. sig { returns(String) } + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. attr_reader :type end end diff --git a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi index 82d55a1fd..7bad74caf 100644 --- a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +++ b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi @@ -9,137 +9,103 @@ module Stripe # [Follow the guide](https://stripe.com/docs/issuing/credit/report-credit-decisions-and-manage-aans) to learn about your requirements as a platform. class CreditUnderwritingRecord < APIResource class Application < Stripe::StripeObject - # The channel through which the applicant has submitted their application. sig { returns(String) } attr_reader :application_method - # Scope of demand made by the applicant. sig { returns(String) } attr_reader :purpose - # Date when the applicant submitted their application. sig { returns(Integer) } attr_reader :submitted_at end class CreditUser < Stripe::StripeObject - # Email of the applicant or accountholder. sig { returns(String) } attr_reader :email - # Full name of the company or person. sig { returns(String) } attr_reader :name end class Decision < Stripe::StripeObject class ApplicationRejected < Stripe::StripeObject - # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation - # List of reasons why the application was rejected up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end class CreditLimitApproved < Stripe::StripeObject - # Credit amount approved. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end class CreditLimitDecreased < Stripe::StripeObject - # Credit amount approved after decrease. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation - # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end class CreditLineClosed < Stripe::StripeObject - # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation - # List of reasons why the existing account was closed, up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end - # Details about a decision application_rejected. sig { returns(T.nilable(ApplicationRejected)) } attr_reader :application_rejected - # Details about a decision credit_limit_approved. sig { returns(T.nilable(CreditLimitApproved)) } attr_reader :credit_limit_approved - # Details about a decision credit_limit_decreased. sig { returns(T.nilable(CreditLimitDecreased)) } attr_reader :credit_limit_decreased - # Details about a decision credit_line_closed. sig { returns(T.nilable(CreditLineClosed)) } attr_reader :credit_line_closed - # Outcome of the decision. sig { returns(String) } attr_reader :type end class UnderwritingException < Stripe::StripeObject - # Written explanation for the exception. sig { returns(String) } attr_reader :explanation - # The decision before the exception was applied. sig { returns(String) } attr_reader :original_decision_type end - # For decisions triggered by an application, details about the submission. sig { returns(T.nilable(Application)) } + # For decisions triggered by an application, details about the submission. attr_reader :application - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The event that triggered the underwriting. sig { returns(String) } + # The event that triggered the underwriting. attr_reader :created_from - - # Attribute for field credit_user sig { returns(CreditUser) } + # Attribute for field credit_user attr_reader :credit_user - - # Date when a decision was made. sig { returns(T.nilable(Integer)) } + # Date when a decision was made. attr_reader :decided_at - - # Details about the decision. sig { returns(T.nilable(Decision)) } + # Details about the decision. attr_reader :decision - - # For underwriting initiated by an application, a decision must be taken 30 days after the submission. sig { returns(T.nilable(Integer)) } + # For underwriting initiated by an application, a decision must be taken 30 days after the submission. attr_reader :decision_deadline - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). sig { returns(T.nilable(String)) } + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). attr_reader :regulatory_reporting_file - - # If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. sig { returns(T.nilable(UnderwritingException)) } + # If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. attr_reader :underwriting_exception end end diff --git a/rbi/stripe/resources/issuing/dispute.rbi b/rbi/stripe/resources/issuing/dispute.rbi index 0dacacd4a..cf2ab7e68 100644 --- a/rbi/stripe/resources/issuing/dispute.rbi +++ b/rbi/stripe/resources/issuing/dispute.rbi @@ -10,227 +10,164 @@ module Stripe class Dispute < APIResource class Evidence < Stripe::StripeObject class Canceled < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation - # Date when order was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - # Whether the cardholder was provided with a cancellation policy. sig { returns(T.nilable(T::Boolean)) } attr_reader :cancellation_policy_provided - # Reason for canceling the order. sig { returns(T.nilable(String)) } attr_reader :cancellation_reason - # Date when the cardholder expected to receive the product. sig { returns(T.nilable(Integer)) } attr_reader :expected_at - # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation - # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description - # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type - # Result of cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_status - # Date when the product was returned or attempted to be returned. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class Duplicate < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :card_statement - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :cash_receipt - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :check_image - # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation - # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. sig { returns(T.nilable(String)) } attr_reader :original_transaction end class Fraudulent < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation - # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation end class MerchandiseNotAsDescribed < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation - # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation - # Date when the product was received. sig { returns(T.nilable(Integer)) } attr_reader :received_at - # Description of the cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_description - # Result of cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_status - # Date when the product was returned or attempted to be returned. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class NoValidAuthorization < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation - # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation end class NotReceived < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation - # Date when the cardholder expected to receive the product. sig { returns(T.nilable(Integer)) } attr_reader :expected_at - # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation - # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description - # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type end class Other < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation - # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation - # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description - # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type end class ServiceNotAsDescribed < Stripe::StripeObject - # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation - # Date when order was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - # Reason for canceling the order. sig { returns(T.nilable(String)) } attr_reader :cancellation_reason - # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation - # Date when the product was received. sig { returns(T.nilable(Integer)) } attr_reader :received_at end - # Attribute for field canceled sig { returns(Canceled) } attr_reader :canceled - # Attribute for field duplicate sig { returns(Duplicate) } attr_reader :duplicate - # Attribute for field fraudulent sig { returns(Fraudulent) } attr_reader :fraudulent - # Attribute for field merchandise_not_as_described sig { returns(MerchandiseNotAsDescribed) } attr_reader :merchandise_not_as_described - # Attribute for field no_valid_authorization sig { returns(NoValidAuthorization) } attr_reader :no_valid_authorization - # Attribute for field not_received sig { returns(NotReceived) } attr_reader :not_received - # Attribute for field other sig { returns(Other) } attr_reader :other - # The reason for filing the dispute. Its value will match the field containing the evidence. sig { returns(String) } attr_reader :reason - # Attribute for field service_not_as_described sig { returns(ServiceNotAsDescribed) } attr_reader :service_not_as_described end class Treasury < Stripe::StripeObject - # The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute sig { returns(T.nilable(String)) } attr_reader :debit_reversal - # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. sig { returns(String) } attr_reader :received_debit end - # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). sig { returns(Integer) } + # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). attr_reader :amount - - # List of balance transactions associated with the dispute. sig { returns(T.nilable(T::Array[Stripe::BalanceTransaction])) } + # List of balance transactions associated with the dispute. attr_reader :balance_transactions - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The currency the `transaction` was made in. sig { returns(String) } + # The currency the `transaction` was made in. attr_reader :currency - - # Attribute for field evidence sig { returns(Evidence) } + # Attribute for field evidence attr_reader :evidence - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. sig { returns(String) } + # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. attr_reader :loss_reason - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Current status of the dispute. sig { returns(String) } + # Current status of the dispute. attr_reader :status - - # The transaction being disputed. sig { returns(T.any(String, Stripe::Issuing::Transaction)) } + # The transaction being disputed. attr_reader :transaction - - # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts attr_reader :treasury end end diff --git a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi index 46f484da3..309ad946d 100644 --- a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +++ b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi @@ -6,48 +6,38 @@ module Stripe module Issuing # Represents a record from the card network of a money movement or change in state for an Issuing dispute. These records are included in the settlement reports that we receive from networks and expose to users as Settlement objects. class DisputeSettlementDetail < APIResource - # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). sig { returns(Integer) } + # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). attr_reader :amount - - # The card used to make the original transaction. sig { returns(String) } + # The card used to make the original transaction. attr_reader :card - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The ID of the linked dispute. sig { returns(String) } + # The ID of the linked dispute. attr_reader :dispute - - # The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. sig { returns(String) } + # The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. attr_reader :event_type - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] sig { returns(String) } + # The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] attr_reader :network - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The ID of the linked card network settlement. sig { returns(T.nilable(String)) } + # The ID of the linked card network settlement. attr_reader :settlement end end diff --git a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi index 5d0ee1af2..2435ce53c 100644 --- a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +++ b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi @@ -6,36 +6,29 @@ module Stripe module Issuing # A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions. class FraudLiabilityDebit < APIResource - # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. sig { returns(Integer) } + # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. attr_reader :amount - - # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. attr_reader :balance_transaction - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The ID of the linked dispute. sig { returns(String) } + # The ID of the linked dispute. attr_reader :dispute - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end diff --git a/rbi/stripe/resources/issuing/personalization_design.rbi b/rbi/stripe/resources/issuing/personalization_design.rbi index 136f9e82f..5501e8cb1 100644 --- a/rbi/stripe/resources/issuing/personalization_design.rbi +++ b/rbi/stripe/resources/issuing/personalization_design.rbi @@ -7,85 +7,65 @@ module Stripe # A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. class PersonalizationDesign < APIResource class CarrierText < Stripe::StripeObject - # The footer body text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :footer_body - # The footer title text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :footer_title - # The header body text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :header_body - # The header title text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :header_title end class Preferences < Stripe::StripeObject - # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. sig { returns(T::Boolean) } attr_reader :is_default - # Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. sig { returns(T.nilable(T::Boolean)) } attr_reader :is_platform_default end class RejectionReasons < Stripe::StripeObject - # The reason(s) the card logo was rejected. sig { returns(T.nilable(T::Array[String])) } attr_reader :card_logo - # The reason(s) the carrier text was rejected. sig { returns(T.nilable(T::Array[String])) } attr_reader :carrier_text end - # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. sig { returns(T.nilable(T.any(String, Stripe::File))) } + # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. attr_reader :card_logo - - # Hash containing carrier text, for use with physical bundles that support carrier text. sig { returns(T.nilable(CarrierText)) } + # Hash containing carrier text, for use with physical bundles that support carrier text. attr_reader :carrier_text - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. sig { returns(T.nilable(String)) } + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. attr_reader :lookup_key - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Friendly display name. sig { returns(T.nilable(String)) } + # Friendly display name. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The physical bundle object belonging to this personalization design. sig { returns(T.any(String, Stripe::Issuing::PhysicalBundle)) } + # The physical bundle object belonging to this personalization design. attr_reader :physical_bundle - - # Attribute for field preferences sig { returns(Preferences) } + # Attribute for field preferences attr_reader :preferences - - # Attribute for field rejection_reasons sig { returns(RejectionReasons) } + # Attribute for field rejection_reasons attr_reader :rejection_reasons - - # Whether this personalization design can be used to create cards. sig { returns(String) } + # Whether this personalization design can be used to create cards. attr_reader :status end end diff --git a/rbi/stripe/resources/issuing/physical_bundle.rbi b/rbi/stripe/resources/issuing/physical_bundle.rbi index 81142c152..31db54f76 100644 --- a/rbi/stripe/resources/issuing/physical_bundle.rbi +++ b/rbi/stripe/resources/issuing/physical_bundle.rbi @@ -7,42 +7,33 @@ module Stripe # A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. class PhysicalBundle < APIResource class Features < Stripe::StripeObject - # The policy for how to use card logo images in a card design with this physical bundle. sig { returns(String) } attr_reader :card_logo - # The policy for how to use carrier letter text in a card design with this physical bundle. sig { returns(String) } attr_reader :carrier_text - # The policy for how to use a second line on a card with this physical bundle. sig { returns(String) } attr_reader :second_line end - # Attribute for field features sig { returns(Features) } + # Attribute for field features attr_reader :features - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Friendly display name. sig { returns(String) } + # Friendly display name. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Whether this physical bundle can be used to create cards. sig { returns(String) } + # Whether this physical bundle can be used to create cards. attr_reader :status - - # Whether this physical bundle is a standard Stripe offering or custom-made for you. sig { returns(String) } + # Whether this physical bundle is a standard Stripe offering or custom-made for you. attr_reader :type end end diff --git a/rbi/stripe/resources/issuing/settlement.rbi b/rbi/stripe/resources/issuing/settlement.rbi index eb2fd32ef..c754c8033 100644 --- a/rbi/stripe/resources/issuing/settlement.rbi +++ b/rbi/stripe/resources/issuing/settlement.rbi @@ -6,72 +6,56 @@ module Stripe module Issuing # When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. class Settlement < APIResource - # The Bank Identification Number reflecting this settlement record. sig { returns(String) } + # The Bank Identification Number reflecting this settlement record. attr_reader :bin - - # The date that the transactions are cleared and posted to user's accounts. sig { returns(Integer) } + # The date that the transactions are cleared and posted to user's accounts. attr_reader :clearing_date - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The total interchange received as reimbursement for the transactions. sig { returns(Integer) } + # The total interchange received as reimbursement for the transactions. attr_reader :interchange_fees - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The total net amount required to settle with the network. sig { returns(Integer) } + # The total net amount required to settle with the network. attr_reader :net_total - - # The card network for this settlement report. One of ["visa", "maestro"] sig { returns(String) } + # The card network for this settlement report. One of ["visa", "maestro"] attr_reader :network - - # The total amount of fees owed to the network. sig { returns(Integer) } + # The total amount of fees owed to the network. attr_reader :network_fees - - # The Settlement Identification Number assigned by the network. sig { returns(String) } + # The Settlement Identification Number assigned by the network. attr_reader :network_settlement_identifier - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # One of `international` or `uk_national_net`. sig { returns(String) } + # One of `international` or `uk_national_net`. attr_reader :settlement_service - - # The current processing status of this settlement. sig { returns(String) } + # The current processing status of this settlement. attr_reader :status - - # The total number of transactions reflected in this settlement. sig { returns(Integer) } + # The total number of transactions reflected in this settlement. attr_reader :transaction_count - - # The total transaction amount reflected in this settlement. sig { returns(Integer) } + # The total transaction amount reflected in this settlement. attr_reader :transaction_volume end end diff --git a/rbi/stripe/resources/issuing/token.rbi b/rbi/stripe/resources/issuing/token.rbi index e82e9809c..6e427223f 100644 --- a/rbi/stripe/resources/issuing/token.rbi +++ b/rbi/stripe/resources/issuing/token.rbi @@ -8,155 +8,113 @@ module Stripe class Token < APIResource class NetworkData < Stripe::StripeObject class Device < Stripe::StripeObject - # An obfuscated ID derived from the device ID. sig { returns(String) } attr_reader :device_fingerprint - # The IP address of the device at provisioning time. sig { returns(String) } attr_reader :ip_address - # The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. sig { returns(String) } attr_reader :location - # The name of the device used for tokenization. sig { returns(String) } attr_reader :name - # The phone number of the device used for tokenization. sig { returns(String) } attr_reader :phone_number - # The type of device used for tokenization. sig { returns(String) } attr_reader :type end class Mastercard < Stripe::StripeObject - # A unique reference ID from MasterCard to represent the card account number. sig { returns(String) } attr_reader :card_reference_id - # The network-unique identifier for the token. sig { returns(String) } attr_reader :token_reference_id - # The ID of the entity requesting tokenization, specific to MasterCard. sig { returns(String) } attr_reader :token_requestor_id - # The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. sig { returns(String) } attr_reader :token_requestor_name end class Visa < Stripe::StripeObject - # A unique reference ID from Visa to represent the card account number. sig { returns(String) } attr_reader :card_reference_id - # The network-unique identifier for the token. sig { returns(String) } attr_reader :token_reference_id - # The ID of the entity requesting tokenization, specific to Visa. sig { returns(String) } attr_reader :token_requestor_id - # Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. sig { returns(String) } attr_reader :token_risk_score end class WalletProvider < Stripe::StripeObject class CardholderAddress < Stripe::StripeObject - # The street address of the cardholder tokenizing the card. sig { returns(String) } attr_reader :line1 - # The postal code of the cardholder tokenizing the card. sig { returns(String) } attr_reader :postal_code end - # The wallet provider-given account ID of the digital wallet the token belongs to. sig { returns(String) } attr_reader :account_id - # An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. sig { returns(Integer) } attr_reader :account_trust_score - # The method used for tokenizing a card. sig { returns(String) } attr_reader :card_number_source - # Attribute for field cardholder_address sig { returns(CardholderAddress) } attr_reader :cardholder_address - # The name of the cardholder tokenizing the card. sig { returns(String) } attr_reader :cardholder_name - # An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. sig { returns(Integer) } attr_reader :device_trust_score - # The hashed email address of the cardholder's account with the wallet provider. sig { returns(String) } attr_reader :hashed_account_email_address - # The reasons for suggested tokenization given by the card network. sig { returns(T::Array[String]) } attr_reader :reason_codes - # The recommendation on responding to the tokenization request. sig { returns(String) } attr_reader :suggested_decision - # The version of the standard for mapping reason codes followed by the wallet provider. sig { returns(String) } attr_reader :suggested_decision_version end - # Attribute for field device sig { returns(Device) } attr_reader :device - # Attribute for field mastercard sig { returns(Mastercard) } attr_reader :mastercard - # The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. sig { returns(String) } attr_reader :type - # Attribute for field visa sig { returns(Visa) } attr_reader :visa - # Attribute for field wallet_provider sig { returns(WalletProvider) } attr_reader :wallet_provider end - # Card associated with this token. sig { returns(T.any(String, Stripe::Issuing::Card)) } + # Card associated with this token. attr_reader :card - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The hashed ID derived from the device ID from the card network associated with the token. sig { returns(T.nilable(String)) } + # The hashed ID derived from the device ID from the card network associated with the token. attr_reader :device_fingerprint - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The last four digits of the token. sig { returns(String) } + # The last four digits of the token. attr_reader :last4 - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The token service provider / card network associated with the token. sig { returns(String) } + # The token service provider / card network associated with the token. attr_reader :network - - # Attribute for field network_data sig { returns(NetworkData) } + # Attribute for field network_data attr_reader :network_data - - # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. attr_reader :network_updated_at - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The usage state of the token. sig { returns(String) } + # The usage state of the token. attr_reader :status - - # The digital wallet for this token, if one was used. sig { returns(String) } + # The digital wallet for this token, if one was used. attr_reader :wallet_provider end end diff --git a/rbi/stripe/resources/issuing/transaction.rbi b/rbi/stripe/resources/issuing/transaction.rbi index bd3daf349..d11aa8e17 100644 --- a/rbi/stripe/resources/issuing/transaction.rbi +++ b/rbi/stripe/resources/issuing/transaction.rbi @@ -11,310 +11,227 @@ module Stripe # Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions) class Transaction < APIResource class AmountDetails < Stripe::StripeObject - # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee - # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end class MerchantData < Stripe::StripeObject - # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. sig { returns(String) } attr_reader :category - # The merchant category code for the seller’s business sig { returns(String) } attr_reader :category_code - # City where the seller is located sig { returns(T.nilable(String)) } attr_reader :city - # Country where the seller is located sig { returns(T.nilable(String)) } attr_reader :country - # Name of the seller sig { returns(T.nilable(String)) } attr_reader :name - # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. sig { returns(String) } attr_reader :network_id - # Postal code where the seller is located sig { returns(T.nilable(String)) } attr_reader :postal_code - # State where the seller is located sig { returns(T.nilable(String)) } attr_reader :state - # An ID assigned by the seller to the location of the sale. sig { returns(T.nilable(String)) } attr_reader :terminal_id - # URL provided by the merchant on a 3DS request sig { returns(T.nilable(String)) } attr_reader :url end class NetworkData < Stripe::StripeObject - # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. sig { returns(T.nilable(String)) } attr_reader :authorization_code - # The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. sig { returns(T.nilable(String)) } attr_reader :processing_date - # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class PurchaseDetails < Stripe::StripeObject class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject - # Driver ID. sig { returns(T.nilable(String)) } attr_reader :driver_id - # Odometer reading. sig { returns(T.nilable(Integer)) } attr_reader :odometer - # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. sig { returns(T.nilable(String)) } attr_reader :unspecified_id - # User ID. sig { returns(T.nilable(String)) } attr_reader :user_id - # Vehicle number. sig { returns(T.nilable(String)) } attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject - # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject - # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject - # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :local_amount_decimal - # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :national_amount_decimal end - # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } attr_reader :fuel - # Breakdown of non-fuel portion of the purchase. sig { returns(T.nilable(NonFuel)) } attr_reader :non_fuel - # Information about tax included in this transaction. sig { returns(T.nilable(Tax)) } attr_reader :tax end - # Answers to prompts presented to cardholder at point of sale. sig { returns(T.nilable(CardholderPromptData)) } attr_reader :cardholder_prompt_data - # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. sig { returns(T.nilable(String)) } attr_reader :purchase_type - # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. sig { returns(T.nilable(ReportedBreakdown)) } attr_reader :reported_breakdown - # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. sig { returns(T.nilable(String)) } attr_reader :service_type end class Flight < Stripe::StripeObject class Segment < Stripe::StripeObject - # The three-letter IATA airport code of the flight's destination. sig { returns(T.nilable(String)) } attr_reader :arrival_airport_code - # The airline carrier code. sig { returns(T.nilable(String)) } attr_reader :carrier - # The three-letter IATA airport code that the flight departed from. sig { returns(T.nilable(String)) } attr_reader :departure_airport_code - # The flight number. sig { returns(T.nilable(String)) } attr_reader :flight_number - # The flight's service class. sig { returns(T.nilable(String)) } attr_reader :service_class - # Whether a stopover is allowed on this flight. sig { returns(T.nilable(T::Boolean)) } attr_reader :stopover_allowed end - # The time that the flight departed. sig { returns(T.nilable(Integer)) } attr_reader :departure_at - # The name of the passenger. sig { returns(T.nilable(String)) } attr_reader :passenger_name - # Whether the ticket is refundable. sig { returns(T.nilable(T::Boolean)) } attr_reader :refundable - # The legs of the trip. sig { returns(T.nilable(T::Array[Segment])) } attr_reader :segments - # The travel agency that issued the ticket. sig { returns(T.nilable(String)) } attr_reader :travel_agency end class Fuel < Stripe::StripeObject - # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. sig { returns(T.nilable(String)) } attr_reader :industry_product_code - # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :quantity_decimal - # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(String) } attr_reader :type - # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. sig { returns(String) } attr_reader :unit - # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. sig { returns(String) } attr_reader :unit_cost_decimal end class Lodging < Stripe::StripeObject - # The time of checking into the lodging. sig { returns(T.nilable(Integer)) } attr_reader :check_in_at - # The number of nights stayed at the lodging. sig { returns(T.nilable(Integer)) } attr_reader :nights end class Receipt < Stripe::StripeObject - # The description of the item. The maximum length of this field is 26 characters. sig { returns(T.nilable(String)) } attr_reader :description - # The quantity of the item. sig { returns(T.nilable(Float)) } attr_reader :quantity - # The total for this line item in cents. sig { returns(T.nilable(Integer)) } attr_reader :total - # The unit cost of the item in cents. sig { returns(T.nilable(Integer)) } attr_reader :unit_cost end - # Fleet-specific information for transactions using Fleet cards. sig { returns(T.nilable(Fleet)) } attr_reader :fleet - # Information about the flight that was purchased with this transaction. sig { returns(T.nilable(Flight)) } attr_reader :flight - # Information about fuel that was purchased with this transaction. sig { returns(T.nilable(Fuel)) } attr_reader :fuel - # Information about lodging that was purchased with this transaction. sig { returns(T.nilable(Lodging)) } attr_reader :lodging - # The line items in the purchase. sig { returns(T.nilable(T::Array[Receipt])) } attr_reader :receipt - # A merchant-specific order number. sig { returns(T.nilable(String)) } attr_reader :reference end class Treasury < Stripe::StripeObject - # The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund sig { returns(T.nilable(String)) } attr_reader :received_credit - # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture sig { returns(T.nilable(String)) } attr_reader :received_debit end - # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } + # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount - - # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(AmountDetails)) } + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_details - - # The `Authorization` object that led to this transaction. sig { returns(T.nilable(T.any(String, Stripe::Issuing::Authorization))) } + # The `Authorization` object that led to this transaction. attr_reader :authorization - - # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. attr_reader :balance_transaction - - # The card used to make this transaction. sig { returns(T.any(String, Stripe::Issuing::Card)) } + # The card used to make this transaction. attr_reader :card - - # The cardholder to whom this transaction belongs. sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } + # The cardholder to whom this transaction belongs. attr_reader :cardholder - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # If you've disputed the transaction, the ID of the dispute. sig { returns(T.nilable(T.any(String, Stripe::Issuing::Dispute))) } + # If you've disputed the transaction, the ID of the dispute. attr_reader :dispute - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. sig { returns(Integer) } + # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. attr_reader :merchant_amount - - # The currency with which the merchant is taking payment. sig { returns(String) } + # The currency with which the merchant is taking payment. attr_reader :merchant_currency - - # Attribute for field merchant_data sig { returns(MerchantData) } + # Attribute for field merchant_data attr_reader :merchant_data - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Details about the transaction, such as processing dates, set by the card network. sig { returns(T.nilable(NetworkData)) } + # Details about the transaction, such as processing dates, set by the card network. attr_reader :network_data - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Additional purchase information that is optionally provided by the merchant. sig { returns(T.nilable(PurchaseDetails)) } + # Additional purchase information that is optionally provided by the merchant. attr_reader :purchase_details - - # Attribute for field settlement sig { returns(T.nilable(T.any(String, Stripe::Issuing::Settlement))) } + # Attribute for field settlement attr_reader :settlement - - # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } + # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. attr_reader :token - - # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts sig { returns(T.nilable(Treasury)) } + # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts attr_reader :treasury - - # The nature of the transaction. sig { returns(String) } + # The nature of the transaction. attr_reader :type - - # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. sig { returns(T.nilable(String)) } + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. attr_reader :wallet end end diff --git a/rbi/stripe/resources/line_item.rbi b/rbi/stripe/resources/line_item.rbi index c2361be63..3d2311c32 100644 --- a/rbi/stripe/resources/line_item.rbi +++ b/rbi/stripe/resources/line_item.rbi @@ -6,118 +6,86 @@ module Stripe # A line item. class LineItem < APIResource class AdjustableQuantity < Stripe::StripeObject - # Attribute for field enabled sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field maximum sig { returns(T.nilable(Integer)) } attr_reader :maximum - # Attribute for field minimum sig { returns(T.nilable(Integer)) } attr_reader :minimum end class Discount < Stripe::StripeObject - # The amount discounted. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::Discount) } attr_reader :discount end class Display < Stripe::StripeObject - # Attribute for field description sig { returns(T.nilable(String)) } attr_reader :description - # Attribute for field images sig { returns(T::Array[String]) } attr_reader :images - # Attribute for field name sig { returns(String) } attr_reader :name end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # Attribute for field adjustable_quantity sig { returns(T.nilable(AdjustableQuantity)) } + # Attribute for field adjustable_quantity attr_reader :adjustable_quantity - - # Total discount amount applied. If no discounts were applied, defaults to 0. sig { returns(Integer) } + # Total discount amount applied. If no discounts were applied, defaults to 0. attr_reader :amount_discount - - # Total before any discounts or taxes are applied. sig { returns(Integer) } + # Total before any discounts or taxes are applied. attr_reader :amount_subtotal - - # Total tax amount applied. If no tax was applied, defaults to 0. sig { returns(Integer) } + # Total tax amount applied. If no tax was applied, defaults to 0. attr_reader :amount_tax - - # Total after discounts and taxes. sig { returns(Integer) } + # Total after discounts and taxes. attr_reader :amount_total - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. attr_reader :description - - # The discounts applied to the line item. sig { returns(T::Array[Discount]) } + # The discounts applied to the line item. attr_reader :discounts - - # Attribute for field display sig { returns(Display) } + # Attribute for field display attr_reader :display - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The price used to generate the line item. sig { returns(T.nilable(Stripe::Price)) } + # The price used to generate the line item. attr_reader :price - + sig { returns(T.any(String, Stripe::Product)) } # The ID of the product for this line item. # # This will always be the same as `price.product`. - sig { returns(T.any(String, Stripe::Product)) } attr_reader :product - - # The quantity of products being purchased. sig { returns(T.nilable(Integer)) } + # The quantity of products being purchased. attr_reader :quantity - - # The taxes applied to the line item. sig { returns(T::Array[Tax]) } + # The taxes applied to the line item. attr_reader :taxes end end \ No newline at end of file diff --git a/rbi/stripe/resources/login_link.rbi b/rbi/stripe/resources/login_link.rbi index 1774125f4..eca4eb558 100644 --- a/rbi/stripe/resources/login_link.rbi +++ b/rbi/stripe/resources/login_link.rbi @@ -5,16 +5,14 @@ module Stripe # Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard. class LoginLink < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The URL for the login link. sig { returns(String) } + # The URL for the login link. attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/mandate.rbi b/rbi/stripe/resources/mandate.rbi index e4244d4d6..914b85a50 100644 --- a/rbi/stripe/resources/mandate.rbi +++ b/rbi/stripe/resources/mandate.rbi @@ -8,59 +8,44 @@ module Stripe class CustomerAcceptance < Stripe::StripeObject class Offline < Stripe::StripeObject; end class Online < Stripe::StripeObject - # The customer accepts the mandate from this IP address. sig { returns(T.nilable(String)) } attr_reader :ip_address - # The customer accepts the mandate using the user agent of the browser. sig { returns(T.nilable(String)) } attr_reader :user_agent end - # The time that the customer accepts the mandate. sig { returns(T.nilable(Integer)) } attr_reader :accepted_at - # Attribute for field offline sig { returns(Offline) } attr_reader :offline - # Attribute for field online sig { returns(Online) } attr_reader :online - # The mandate includes the type of customer acceptance information, such as: `online` or `offline`. sig { returns(String) } attr_reader :type end class MultiUse < Stripe::StripeObject; end class PaymentMethodDetails < Stripe::StripeObject class AcssDebit < Stripe::StripeObject - # List of Stripe products where this mandate can be selected automatically. sig { returns(T::Array[String]) } attr_reader :default_for - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description - # Payment schedule for the mandate. sig { returns(String) } attr_reader :payment_schedule - # Transaction type of the mandate. sig { returns(String) } attr_reader :transaction_type end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. sig { returns(String) } attr_reader :url end class BacsDebit < Stripe::StripeObject - # The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. sig { returns(String) } attr_reader :network_status - # The unique reference identifying the mandate on the Bacs network. sig { returns(String) } attr_reader :reference - # When the mandate is revoked on the Bacs network this field displays the reason for the revocation. sig { returns(T.nilable(String)) } attr_reader :revocation_reason - # The URL that will contain the mandate that the customer has signed. sig { returns(String) } attr_reader :url end @@ -70,153 +55,111 @@ module Stripe class KrCard < Stripe::StripeObject; end class Link < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. sig { returns(T.nilable(String)) } attr_reader :billing_agreement_id - # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id - # Owner's verified email. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject - # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount - # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(String) } attr_reader :amount_type - # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date - # The periodicity at which payments will be collected. sig { returns(String) } attr_reader :payment_schedule - # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period - # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose - # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject - # The unique reference of the mandate. sig { returns(String) } attr_reader :reference - # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. sig { returns(String) } attr_reader :url end class UsBankAccount < Stripe::StripeObject - # Mandate collection method sig { returns(String) } attr_reader :collection_method end - # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp - # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay - # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field payto sig { returns(Payto) } attr_reader :payto - # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay - # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit - # This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class SingleUse < Stripe::StripeObject - # The amount of the payment on a single use mandate. sig { returns(Integer) } attr_reader :amount - # The currency of the payment on a single use mandate. sig { returns(String) } attr_reader :currency end - # Attribute for field customer_acceptance sig { returns(CustomerAcceptance) } + # Attribute for field customer_acceptance attr_reader :customer_acceptance - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Attribute for field multi_use sig { returns(MultiUse) } + # Attribute for field multi_use attr_reader :multi_use - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account (if any) that the mandate is intended for. sig { returns(String) } + # The account (if any) that the mandate is intended for. attr_reader :on_behalf_of - - # ID of the payment method associated with this mandate. sig { returns(T.any(String, Stripe::PaymentMethod)) } + # ID of the payment method associated with this mandate. attr_reader :payment_method - - # Attribute for field payment_method_details sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details attr_reader :payment_method_details - - # Attribute for field single_use sig { returns(SingleUse) } + # Attribute for field single_use attr_reader :single_use - - # The mandate status indicates whether or not you can use it to initiate a payment. sig { returns(String) } + # The mandate status indicates whether or not you can use it to initiate a payment. attr_reader :status - - # The type of the mandate. sig { returns(String) } + # The type of the mandate. attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/margin.rbi b/rbi/stripe/resources/margin.rbi index 033757acb..09335115e 100644 --- a/rbi/stripe/resources/margin.rbi +++ b/rbi/stripe/resources/margin.rbi @@ -6,40 +6,32 @@ module Stripe # A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who # resell products and services and earn a discount (margin) for doing so. class Margin < APIResource - # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. sig { returns(T::Boolean) } + # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. attr_reader :active - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Name of the margin that's displayed on, for example, invoices. sig { returns(T.nilable(String)) } + # Name of the margin that's displayed on, for example, invoices. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. sig { returns(Float) } + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. attr_reader :percent_off - - # Time at which the object was last updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated end end \ No newline at end of file diff --git a/rbi/stripe/resources/order.rbi b/rbi/stripe/resources/order.rbi index 5cb8ac441..b97c8a79d 100644 --- a/rbi/stripe/resources/order.rbi +++ b/rbi/stripe/resources/order.rbi @@ -10,698 +10,438 @@ module Stripe # Related guide: [Orders overview](https://stripe.com/docs/orders) class Order < APIResource class AutomaticTax < Stripe::StripeObject - # Whether Stripe automatically computes tax on this Order. sig { returns(T::Boolean) } attr_reader :enabled - # The status of the most recent automated tax calculation for this Order. sig { returns(T.nilable(String)) } attr_reader :status end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Billing address for the order. sig { returns(T.nilable(Address)) } attr_reader :address - # Email address for the order. sig { returns(T.nilable(String)) } attr_reader :email - # Full name for the order. sig { returns(T.nilable(String)) } attr_reader :name - # Billing phone number for the order (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Credit < Stripe::StripeObject class GiftCard < Stripe::StripeObject - # The token of the gift card applied to the order sig { returns(String) } attr_reader :card end - # The amount of this credit to apply to the order. sig { returns(Integer) } attr_reader :amount - # Details for a gift card. sig { returns(T.nilable(GiftCard)) } attr_reader :gift_card - # Line items on this order that are ineligible for this credit sig { returns(T.nilable(T::Array[String])) } attr_reader :ineligible_line_items - # The type of credit to apply to the order, only `gift_card` currently supported. sig { returns(String) } attr_reader :type end class Payment < Stripe::StripeObject class Settings < Stripe::StripeObject class AutomaticPaymentMethods < Stripe::StripeObject - # Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). sig { returns(T::Boolean) } attr_reader :enabled end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description - # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule - # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class AfterpayClearpay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. sig { returns(T.nilable(String)) } attr_reader :reference - # Indicates that you intend to make future payments with the payment method. - # - # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - # - # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - # - # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with the payment method. - # - # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - # - # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - # - # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end - # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer - # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - # - # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types - # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end - # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Preferred locale of the Klarna checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Oxxo < Stripe::StripeObject - # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject - # The tax for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :amount - # The tax behavior for the line item. sig { returns(String) } attr_reader :behavior end - # Type of the line item. sig { returns(String) } attr_reader :category - # Description of the line item. sig { returns(String) } attr_reader :description - # Descriptive name of the line item. sig { returns(String) } attr_reader :name - # Quantity of the line item. Cannot be a negative number. sig { returns(Integer) } attr_reader :quantity - # Client facing stock keeping unit, article number or similar. sig { returns(String) } attr_reader :sku - # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). sig { returns(String) } attr_reader :sold_by - # Attribute for field tax sig { returns(Tax) } attr_reader :tax - # Price for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :unit_amount end - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # The line items purchased by the customer. sig { returns(T::Array[LineItem]) } attr_reader :line_items - # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference_id - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject - # Preferred language of the SOFORT authorization page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_language - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class WechatPay < Stripe::StripeObject - # The app ID registered with WeChat Pay. Only required when client is ios or android. sig { returns(T.nilable(String)) } attr_reader :app_id - # The client type that the end customer will pay from sig { returns(T.nilable(String)) } attr_reader :client - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end - # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit - # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay - # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance - # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal - # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo - # Attribute for field p24 sig { returns(P24) } attr_reader :p24 - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit - # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort - # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay end class TransferData < Stripe::StripeObject - # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. sig { returns(T.nilable(Integer)) } attr_reader :amount - # ID of the Connected account receiving the transfer. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - # Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. sig { returns(T.nilable(AutomaticPaymentMethods)) } attr_reader :automatic_payment_methods - # PaymentMethod-specific configuration to provide to the order's PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types - # The URL to redirect the customer to after they authenticate their payment. sig { returns(T.nilable(String)) } attr_reader :return_url - # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix - # Provides configuration for completing a transfer for the order after it is paid. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end - # ID of the payment intent associated with this order. Null when the order is `open`. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - # Settings describing how the order should configure generated PaymentIntents. sig { returns(T.nilable(Settings)) } attr_reader :settings - # The status of the underlying payment associated with this order, if any. Null when the order is `open`. sig { returns(T.nilable(String)) } attr_reader :status end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # Total shipping cost before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax - # Total shipping cost after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total - # The ID of the ShippingRate for this order. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate - # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Recipient shipping address. Required if the order includes products that are shippable. sig { returns(T.nilable(Address)) } attr_reader :address - # Recipient name. sig { returns(T.nilable(String)) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class TaxDetails < Stripe::StripeObject class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type - # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end - # Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. sig { returns(String) } attr_reader :tax_exempt - # The purchaser's tax IDs to be used in calculation of tax for this Order. sig { returns(T::Array[TaxId]) } attr_reader :tax_ids end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts - # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end - # Attribute for field amount_credit sig { returns(Integer) } attr_reader :amount_credit - # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount - # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping - # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax - # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end - # Attribute for field amount_remaining sig { returns(Integer) } + # Attribute for field amount_remaining attr_reader :amount_remaining - - # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). sig { returns(Integer) } + # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). attr_reader :amount_subtotal - - # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). sig { returns(Integer) } + # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). attr_reader :amount_total - - # ID of the Connect application that created the Order, if any. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the Order, if any. attr_reader :application - - # Attribute for field automatic_tax sig { returns(AutomaticTax) } + # Attribute for field automatic_tax attr_reader :automatic_tax - - # Customer billing details associated with the order. sig { returns(T.nilable(BillingDetails)) } + # Customer billing details associated with the order. attr_reader :billing_details - + sig { returns(T.nilable(String)) } # The client secret of this Order. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. - sig { returns(T.nilable(String)) } attr_reader :client_secret - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The credits applied to the Order. At most 10 credits can be applied to an Order. sig { returns(T::Array[Credit]) } + # The credits applied to the Order. At most 10 credits can be applied to an Order. attr_reader :credits - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The customer which this orders belongs to. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer which this orders belongs to. attr_reader :customer - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # The discounts applied to the order. Use `expand[]=discounts` to expand each discount. sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } + # The discounts applied to the order. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # A recent IP address of the purchaser used for tax reporting and tax location inference. sig { returns(T.nilable(String)) } + # A recent IP address of the purchaser used for tax reporting and tax location inference. attr_reader :ip_address - - # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. sig { returns(Stripe::ListObject) } + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. attr_reader :line_items - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field payment sig { returns(Payment) } + # Attribute for field payment attr_reader :payment - - # The details of the customer cost of shipping, including the customer chosen ShippingRate. sig { returns(T.nilable(ShippingCost)) } + # The details of the customer cost of shipping, including the customer chosen ShippingRate. attr_reader :shipping_cost - - # Customer shipping information associated with the order. sig { returns(T.nilable(ShippingDetails)) } + # Customer shipping information associated with the order. attr_reader :shipping_details - - # The overall status of the order. sig { returns(String) } + # The overall status of the order. attr_reader :status - - # Attribute for field tax_details sig { returns(TaxDetails) } + # Attribute for field tax_details attr_reader :tax_details - - # Attribute for field total_details sig { returns(TotalDetails) } + # Attribute for field total_details attr_reader :total_details end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_attempt_record.rbi b/rbi/stripe/resources/payment_attempt_record.rbi index e6a43ce9e..071114bca 100644 --- a/rbi/stripe/resources/payment_attempt_record.rbi +++ b/rbi/stripe/resources/payment_attempt_record.rbi @@ -9,200 +9,148 @@ module Stripe # can have guaranteed funds. class PaymentAttemptRecord < APIResource class AmountCanceled < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountFailed < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountGuaranteed < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountRequested < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class CustomerDetails < Stripe::StripeObject - # ID of the Stripe Customer associated with this payment. sig { returns(T.nilable(String)) } attr_reader :customer - # The customer's email address. sig { returns(T.nilable(String)) } attr_reader :email - # The customer's name. sig { returns(T.nilable(String)) } attr_reader :name - # The customer's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # A representation of a physical address. sig { returns(Address) } attr_reader :address - # The billing email associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :email - # The billing name associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :name - # The billing phone number associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :phone end class Custom < Stripe::StripeObject - # Display name for the custom (user-defined) payment method type used to make this payment. sig { returns(String) } attr_reader :display_name - # The custom payment method type associated with this payment. sig { returns(T.nilable(String)) } attr_reader :type end - # The billing details associated with the method of payment. sig { returns(T.nilable(BillingDetails)) } attr_reader :billing_details - # Information about the custom (user-defined) payment method used to make this payment. sig { returns(T.nilable(Custom)) } attr_reader :custom - # ID of the Stripe PaymentMethod used to make this payment. sig { returns(T.nilable(String)) } attr_reader :payment_method - # The type of Payment Method used for this payment attempt. sig { returns(String) } attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # A representation of a physical address. sig { returns(Address) } attr_reader :address - # The shipping recipient's name. sig { returns(T.nilable(String)) } attr_reader :name - # The shipping recipient's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end - # A representation of an amount of money, consisting of an amount and a currency. sig { returns(AmountCanceled) } - attr_reader :amount_canceled - # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_canceled sig { returns(AmountFailed) } - attr_reader :amount_failed - # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_failed sig { returns(AmountGuaranteed) } - attr_reader :amount_guaranteed - # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_guaranteed sig { returns(AmountRequested) } + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_requested - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Customer information for this payment. sig { returns(T.nilable(CustomerDetails)) } + # Customer information for this payment. attr_reader :customer_details - - # Indicates whether the customer was present in your checkout flow during this payment. sig { returns(T.nilable(String)) } + # Indicates whether the customer was present in your checkout flow during this payment. attr_reader :customer_presence - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Information about the Payment Method debited for this payment. sig { returns(T.nilable(PaymentMethodDetails)) } + # Information about the Payment Method debited for this payment. attr_reader :payment_method_details - - # ID of the Payment Record this Payment Attempt Record belongs to. sig { returns(String) } + # ID of the Payment Record this Payment Attempt Record belongs to. attr_reader :payment_record - - # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. sig { returns(T.nilable(String)) } + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. attr_reader :payment_reference - - # Shipping information for this payment. sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this payment. attr_reader :shipping_details end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index a8bb60a2d..5fd568713 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -17,176 +17,102 @@ module Stripe class PaymentIntent < APIResource class AmountDetails < Stripe::StripeObject class Tip < Stripe::StripeObject - # Portion of the amount that corresponds to a tip. sig { returns(Integer) } attr_reader :amount end - # Attribute for field tip sig { returns(Tip) } attr_reader :tip end class AsyncWorkflows < Stripe::StripeObject class Inputs < Stripe::StripeObject class Tax < Stripe::StripeObject - # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id sig { returns(String) } attr_reader :calculation end - # Attribute for field tax sig { returns(Tax) } attr_reader :tax end - # Attribute for field inputs sig { returns(Inputs) } attr_reader :inputs end class AutomaticPaymentMethods < Stripe::StripeObject - # Controls whether this PaymentIntent will accept redirect-based payment methods. - # - # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. sig { returns(String) } attr_reader :allow_redirects - # Automatically calculates compatible payment methods sig { returns(T::Boolean) } attr_reader :enabled end class LastPaymentError < Stripe::StripeObject - # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent - # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end class NextAction < Stripe::StripeObject class AlipayHandleRedirect < Stripe::StripeObject - # The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. sig { returns(T.nilable(String)) } attr_reader :native_data - # The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. sig { returns(T.nilable(String)) } attr_reader :native_url - # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url - # The URL you must redirect your customer to in order to authenticate the payment. sig { returns(T.nilable(String)) } attr_reader :url end class BoletoDisplayDetails < Stripe::StripeObject - # The timestamp after which the boleto expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at - # The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url - # The boleto number. sig { returns(T.nilable(String)) } attr_reader :number - # The URL to the downloadable boleto voucher PDF. sig { returns(T.nilable(String)) } attr_reader :pdf end class CardAwaitNotification < Stripe::StripeObject - # The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. sig { returns(T.nilable(Integer)) } attr_reader :charge_attempt_at - # For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. sig { returns(T.nilable(T::Boolean)) } attr_reader :customer_approval_required end class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - # The date (unix timestamp) when the QR code expires. sig { returns(Integer) } attr_reader :expires_at - # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png - # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end - # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. sig { returns(String) } attr_reader :hosted_instructions_url - # The url for mobile redirect based auth sig { returns(String) } attr_reader :mobile_auth_url - # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end @@ -194,2255 +120,1421 @@ module Stripe class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The account holder name sig { returns(String) } attr_reader :account_holder_name - # The ABA account number sig { returns(String) } attr_reader :account_number - # The account type sig { returns(String) } attr_reader :account_type - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The bank name sig { returns(String) } attr_reader :bank_name - # The ABA routing number sig { returns(String) } attr_reader :routing_number end class Iban < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The BIC/SWIFT code of the account. sig { returns(String) } attr_reader :bic - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # The IBAN of the account. sig { returns(String) } attr_reader :iban end class SortCode < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name - # The account number sig { returns(String) } attr_reader :account_number - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The six-digit sort code sig { returns(String) } attr_reader :sort_code end class Spei < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The account holder name sig { returns(String) } attr_reader :account_holder_name - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The three-digit bank code sig { returns(String) } attr_reader :bank_code - # The short banking institution name sig { returns(String) } attr_reader :bank_name - # The CLABE number sig { returns(String) } attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The account holder name sig { returns(String) } attr_reader :account_holder_name - # The account number sig { returns(String) } attr_reader :account_number - # The account type sig { returns(String) } attr_reader :account_type - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The bank name sig { returns(String) } attr_reader :bank_name - # The SWIFT code sig { returns(String) } attr_reader :swift_code end class Zengin < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address - # The account holder name sig { returns(T.nilable(String)) } attr_reader :account_holder_name - # The account number sig { returns(T.nilable(String)) } attr_reader :account_number - # The bank account type. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } attr_reader :account_type - # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address - # The bank code of the account sig { returns(T.nilable(String)) } attr_reader :bank_code - # The bank name of the account sig { returns(T.nilable(String)) } attr_reader :bank_name - # The branch code of the account sig { returns(T.nilable(String)) } attr_reader :branch_code - # The branch name of the account sig { returns(T.nilable(String)) } attr_reader :branch_name end - # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba - # Iban Records contain E.U. bank account details per the SEPA format. sig { returns(Iban) } attr_reader :iban - # Sort Code Records contain U.K. bank account details per the sort code format. sig { returns(SortCode) } attr_reader :sort_code - # SPEI Records contain Mexico bank account details per the SPEI format. sig { returns(Spei) } attr_reader :spei - # The payment networks supported by this FinancialAddress sig { returns(T::Array[String]) } attr_reader :supported_networks - # SWIFT Records contain U.S. bank account details per the SWIFT format. sig { returns(Swift) } attr_reader :swift - # The type of financial address sig { returns(String) } attr_reader :type - # Zengin Records contain Japan bank account details per the Zengin format. sig { returns(Zengin) } attr_reader :zengin end - # The remaining amount that needs to be transferred to complete the payment. sig { returns(T.nilable(Integer)) } attr_reader :amount_remaining - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency - # A list of financial addresses that can be used to fund the customer balance sig { returns(T::Array[FinancialAddress]) } attr_reader :financial_addresses - # A link to a hosted page that guides your customer through completing the transfer. sig { returns(T.nilable(String)) } attr_reader :hosted_instructions_url - # A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. sig { returns(T.nilable(String)) } attr_reader :reference - # Type of bank transfer sig { returns(String) } attr_reader :type end class KonbiniDisplayDetails < Stripe::StripeObject class Stores < Stripe::StripeObject class Familymart < Stripe::StripeObject - # The confirmation number. sig { returns(String) } attr_reader :confirmation_number - # The payment code. sig { returns(String) } attr_reader :payment_code end class Lawson < Stripe::StripeObject - # The confirmation number. sig { returns(String) } attr_reader :confirmation_number - # The payment code. sig { returns(String) } attr_reader :payment_code end class Ministop < Stripe::StripeObject - # The confirmation number. sig { returns(String) } attr_reader :confirmation_number - # The payment code. sig { returns(String) } attr_reader :payment_code end class Seicomart < Stripe::StripeObject - # The confirmation number. sig { returns(String) } attr_reader :confirmation_number - # The payment code. sig { returns(String) } attr_reader :payment_code end - # FamilyMart instruction details. sig { returns(T.nilable(Familymart)) } attr_reader :familymart - # Lawson instruction details. sig { returns(T.nilable(Lawson)) } attr_reader :lawson - # Ministop instruction details. sig { returns(T.nilable(Ministop)) } attr_reader :ministop - # Seicomart instruction details. sig { returns(T.nilable(Seicomart)) } attr_reader :seicomart end - # The timestamp at which the pending Konbini payment expires. sig { returns(Integer) } attr_reader :expires_at - # The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url - # Attribute for field stores sig { returns(Stores) } attr_reader :stores end class MultibancoDisplayDetails < Stripe::StripeObject - # Entity number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :entity - # The timestamp at which the Multibanco voucher expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at - # The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url - # Reference number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :reference end class OxxoDisplayDetails < Stripe::StripeObject - # The timestamp after which the OXXO voucher expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_after - # The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url - # OXXO reference number. sig { returns(T.nilable(String)) } attr_reader :number end class PaynowDisplayQrCode < Stripe::StripeObject - # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data - # The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. sig { returns(T.nilable(String)) } attr_reader :hosted_instructions_url - # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png - # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end class PixDisplayQrCode < Stripe::StripeObject - # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data - # The date (unix timestamp) when the PIX expires. sig { returns(Integer) } attr_reader :expires_at - # The URL to the hosted pix instructions page, which allows customers to view the pix QR code. sig { returns(String) } attr_reader :hosted_instructions_url - # The image_url_png string used to render png QR code sig { returns(String) } attr_reader :image_url_png - # The image_url_svg string used to render svg QR code sig { returns(String) } attr_reader :image_url_svg end class PromptpayDisplayQrCode < Stripe::StripeObject - # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data - # The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. sig { returns(String) } attr_reader :hosted_instructions_url - # The PNG path used to render the QR code, can be used as the source in an HTML img tag sig { returns(String) } attr_reader :image_url_png - # The SVG path used to render the QR code, can be used as the source in an HTML img tag sig { returns(String) } attr_reader :image_url_svg end class RedirectToUrl < Stripe::StripeObject - # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url - # The URL you must redirect your customer to in order to authenticate the payment. sig { returns(T.nilable(String)) } attr_reader :url end class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data - # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png - # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end - # The URL to the hosted Swish instructions page, which allows customers to view the QR code. sig { returns(String) } attr_reader :hosted_instructions_url - # The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). sig { returns(String) } attr_reader :mobile_auth_url - # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end class VerifyWithMicrodeposits < Stripe::StripeObject - # The timestamp when the microdeposits are expected to land. sig { returns(Integer) } attr_reader :arrival_date - # The URL for the hosted verification page, which allows customers to verify their bank account. sig { returns(String) } attr_reader :hosted_verification_url - # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. sig { returns(T.nilable(String)) } attr_reader :microdeposit_type end class WechatPayDisplayQrCode < Stripe::StripeObject - # The data being used to generate QR code sig { returns(String) } attr_reader :data - # The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. sig { returns(String) } attr_reader :hosted_instructions_url - # The base64 image data for a pre-generated QR code sig { returns(String) } attr_reader :image_data_url - # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png - # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end class WechatPayRedirectToAndroidApp < Stripe::StripeObject - # app_id is the APP ID registered on WeChat open platform sig { returns(String) } attr_reader :app_id - # nonce_str is a random string sig { returns(String) } attr_reader :nonce_str - # package is static value sig { returns(String) } attr_reader :package - # an unique merchant ID assigned by WeChat Pay sig { returns(String) } attr_reader :partner_id - # an unique trading ID assigned by WeChat Pay sig { returns(String) } attr_reader :prepay_id - # A signature sig { returns(String) } attr_reader :sign - # Specifies the current time in epoch format sig { returns(String) } attr_reader :timestamp end class WechatPayRedirectToIosApp < Stripe::StripeObject - # An universal link that redirect to WeChat Pay app sig { returns(String) } attr_reader :native_url end - # Attribute for field alipay_handle_redirect sig { returns(AlipayHandleRedirect) } attr_reader :alipay_handle_redirect - # Attribute for field boleto_display_details sig { returns(BoletoDisplayDetails) } attr_reader :boleto_display_details - # Attribute for field card_await_notification sig { returns(CardAwaitNotification) } attr_reader :card_await_notification - # Attribute for field cashapp_handle_redirect_or_display_qr_code sig { returns(CashappHandleRedirectOrDisplayQrCode) } attr_reader :cashapp_handle_redirect_or_display_qr_code - # Attribute for field display_bank_transfer_instructions sig { returns(DisplayBankTransferInstructions) } attr_reader :display_bank_transfer_instructions - # Attribute for field konbini_display_details sig { returns(KonbiniDisplayDetails) } attr_reader :konbini_display_details - # Attribute for field multibanco_display_details sig { returns(MultibancoDisplayDetails) } attr_reader :multibanco_display_details - # Attribute for field oxxo_display_details sig { returns(OxxoDisplayDetails) } attr_reader :oxxo_display_details - # Attribute for field paynow_display_qr_code sig { returns(PaynowDisplayQrCode) } attr_reader :paynow_display_qr_code - # Attribute for field pix_display_qr_code sig { returns(PixDisplayQrCode) } attr_reader :pix_display_qr_code - # Attribute for field promptpay_display_qr_code sig { returns(PromptpayDisplayQrCode) } attr_reader :promptpay_display_qr_code - # Attribute for field redirect_to_url sig { returns(RedirectToUrl) } attr_reader :redirect_to_url - # Attribute for field swish_handle_redirect_or_display_qr_code sig { returns(SwishHandleRedirectOrDisplayQrCode) } attr_reader :swish_handle_redirect_or_display_qr_code - # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. sig { returns(String) } attr_reader :type - # When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. sig { returns(T::Hash[String, T.untyped]) } attr_reader :use_stripe_sdk - # Attribute for field verify_with_microdeposits sig { returns(VerifyWithMicrodeposits) } attr_reader :verify_with_microdeposits - # Attribute for field wechat_pay_display_qr_code sig { returns(WechatPayDisplayQrCode) } attr_reader :wechat_pay_display_qr_code - # Attribute for field wechat_pay_redirect_to_android_app sig { returns(WechatPayRedirectToAndroidApp) } attr_reader :wechat_pay_redirect_to_android_app - # Attribute for field wechat_pay_redirect_to_ios_app sig { returns(WechatPayRedirectToIosApp) } attr_reader :wechat_pay_redirect_to_ios_app end class PaymentDetails < Stripe::StripeObject class CarRental < Stripe::StripeObject class Affiliate < Stripe::StripeObject - # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject - # The email of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :email - # The name of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :name - # The phone number of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :phone end - # The delivery method for the payment sig { returns(String) } attr_reader :mode - # Attribute for field recipient sig { returns(Recipient) } attr_reader :recipient end class Driver < Stripe::StripeObject - # Full name of the driver on the reservation. sig { returns(String) } attr_reader :name end class PickupAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ReturnAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate - # The booking number associated with the car rental. sig { returns(String) } attr_reader :booking_number - # Class code of the car. sig { returns(String) } attr_reader :car_class_code - # Make of the car. sig { returns(String) } attr_reader :car_make - # Model of the car. sig { returns(String) } attr_reader :car_model - # The name of the rental car company. sig { returns(String) } attr_reader :company - # The customer service phone number of the car rental company. sig { returns(String) } attr_reader :customer_service_phone_number - # Number of days the car is being rented. sig { returns(Integer) } attr_reader :days_rented - # Attribute for field delivery sig { returns(Delivery) } attr_reader :delivery - # The details of the drivers associated with the trip. sig { returns(T::Array[Driver]) } attr_reader :drivers - # List of additional charges being billed. sig { returns(T::Array[String]) } attr_reader :extra_charges - # Indicates if the customer did not keep nor cancel their booking. sig { returns(T::Boolean) } attr_reader :no_show - # Attribute for field pickup_address sig { returns(PickupAddress) } attr_reader :pickup_address - # Car pick-up time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :pickup_at - # Rental rate. sig { returns(Integer) } attr_reader :rate_amount - # The frequency at which the rate amount is applied. One of `day`, `week` or `month` sig { returns(String) } attr_reader :rate_interval - # The full name of the person or entity renting the car. sig { returns(String) } attr_reader :renter_name - # Attribute for field return_address sig { returns(ReturnAddress) } attr_reader :return_address - # Car return time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :return_at - # Indicates whether the goods or services are tax-exempt or tax is not collected. sig { returns(T::Boolean) } attr_reader :tax_exempt end class EventDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Affiliate < Stripe::StripeObject - # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject - # The email of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :email - # The name of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :name - # The phone number of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :phone end - # The delivery method for the payment sig { returns(String) } attr_reader :mode - # Attribute for field recipient sig { returns(Recipient) } attr_reader :recipient end - # Indicates if the tickets are digitally checked when entering the venue. sig { returns(T::Boolean) } attr_reader :access_controlled_venue - # Attribute for field address sig { returns(Address) } attr_reader :address - # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate - # The name of the company sig { returns(String) } attr_reader :company - # Attribute for field delivery sig { returns(Delivery) } attr_reader :delivery - # Event end time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :ends_at - # Type of the event entertainment (concert, sports event etc) sig { returns(String) } attr_reader :genre - # The name of the event. sig { returns(String) } attr_reader :name - # Event start time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :starts_at end class Subscription < Stripe::StripeObject class Affiliate < Stripe::StripeObject - # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class BillingInterval < Stripe::StripeObject - # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :count - # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval end - # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate - # Info whether the subscription will be auto renewed upon expiry. sig { returns(T::Boolean) } attr_reader :auto_renewal - # Attribute for field billing_interval sig { returns(BillingInterval) } attr_reader :billing_interval - # Subscription end time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :ends_at - # Name of the product on subscription. e.g. Apple Music Subscription. sig { returns(String) } attr_reader :name - # Subscription start time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :starts_at end - # Attribute for field car_rental sig { returns(CarRental) } attr_reader :car_rental - # Attribute for field event_details sig { returns(EventDetails) } attr_reader :event_details - # Attribute for field subscription sig { returns(Subscription) } attr_reader :subscription end class PaymentMethodConfigurationDetails < Stripe::StripeObject - # ID of the payment method configuration used. sig { returns(String) } attr_reader :id - # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description - # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule - # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Affirm < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Preferred language of the Affirm authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_locale - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - # This field differs from the statement descriptor and item name. sig { returns(T.nilable(String)) } attr_reader :reference - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alma < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class AmazonPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Blik < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject - # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. sig { returns(Integer) } attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject class AvailablePlan < Stripe::StripeObject - # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count - # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval - # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end class Plan < Stripe::StripeObject - # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count - # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval - # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end - # Installment plans that may be selected for this PaymentIntent. sig { returns(T.nilable(T::Array[AvailablePlan])) } attr_reader :available_plans - # Whether Installments are enabled for this PaymentIntent. sig { returns(T::Boolean) } attr_reader :enabled - # Installment plan selected for this PaymentIntent. sig { returns(T.nilable(Plan)) } attr_reader :plan end class MandateOptions < Stripe::StripeObject - # Amount to be charged for future payments. sig { returns(Integer) } attr_reader :amount - # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(String) } attr_reader :amount_type - # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description - # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. sig { returns(T.nilable(Integer)) } attr_reader :end_date - # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. sig { returns(String) } attr_reader :interval - # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. sig { returns(T.nilable(Integer)) } attr_reader :interval_count - # Unique identifier for the mandate or subscription. sig { returns(String) } attr_reader :reference - # Start date of the mandate or subscription. Start date should not be lesser than yesterday. sig { returns(Integer) } attr_reader :start_date - # Specifies the type of mandates supported. Possible values are `india`. sig { returns(T.nilable(T::Array[String])) } attr_reader :supported_types end class StatementDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(String) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(String) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(String) } attr_reader :line2 - # ZIP or postal code. sig { returns(String) } attr_reader :postal_code - # State, county, province, or region. sig { returns(String) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # Phone number sig { returns(String) } attr_reader :phone end - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Installment details for this payment (Mexico only). - # - # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). sig { returns(T.nilable(Installments)) } attr_reader :installments - # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } attr_reader :mandate_options - # Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network - # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_decremental_authorization - # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_extended_authorization - # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_incremental_authorization - # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. sig { returns(String) } attr_reader :request_multicapture - # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. sig { returns(String) } attr_reader :request_overcapture - # Request partial authorization on this PaymentIntent. sig { returns(String) } attr_reader :request_partial_authorization - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure - # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). sig { returns(T::Boolean) } attr_reader :require_cvc_recollection - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kana - # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kanji - # Attribute for field statement_details sig { returns(StatementDetails) } attr_reader :statement_details end class CardPresent < Stripe::StripeObject class Routing < Stripe::StripeObject - # Requested routing priority sig { returns(T.nilable(String)) } attr_reader :requested_priority end - # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) sig { returns(T.nilable(T::Boolean)) } attr_reader :request_extended_authorization - # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. sig { returns(T.nilable(T::Boolean)) } attr_reader :request_incremental_authorization_support - # Attribute for field routing sig { returns(Routing) } attr_reader :routing end class Cashapp < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end - # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer - # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - # - # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types - # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end - # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Eps < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Gopay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class IdBankTransfer < Stripe::StripeObject - # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now till 2678400 seconds (31 days) from now. sig { returns(T.nilable(Integer)) } attr_reader :expires_after - # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. sig { returns(T.nilable(Integer)) } attr_reader :expires_at - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class InteracPresent < Stripe::StripeObject; end class KakaoPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Preferred locale of the Klarna checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject - # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. sig { returns(T.nilable(String)) } attr_reader :confirmation_number - # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_days - # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. sig { returns(T.nilable(Integer)) } attr_reader :expires_at - # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. sig { returns(T.nilable(String)) } attr_reader :product_description - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class MbWay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Oxxo < Stripe::StripeObject - # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Payco < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Paynow < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject - # The tax for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :amount - # The tax behavior for the line item. sig { returns(String) } attr_reader :behavior end - # Type of the line item. sig { returns(String) } attr_reader :category - # Description of the line item. sig { returns(String) } attr_reader :description - # Descriptive name of the line item. sig { returns(String) } attr_reader :name - # Quantity of the line item. Cannot be a negative number. sig { returns(Integer) } attr_reader :quantity - # Client facing stock keeping unit, article number or similar. sig { returns(String) } attr_reader :sku - # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). sig { returns(String) } attr_reader :sold_by - # Attribute for field tax sig { returns(Tax) } attr_reader :tax - # Price for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :unit_amount end - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # The line items purchased by the customer. sig { returns(T::Array[LineItem]) } attr_reader :line_items - # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference - # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference_id - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount - # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type - # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date - # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule - # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period - # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Pix < Stripe::StripeObject - # The number of seconds (between 10 and 1209600) after which Pix payment will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_seconds - # The timestamp at which the Pix expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Promptpay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Qris < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject - # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Shopeepay < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject - # Preferred language of the SOFORT authorization page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_language - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Swish < Stripe::StripeObject - # A reference for this payment to be displayed in the Swish app. sig { returns(T.nilable(String)) } attr_reader :reference - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Twint < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject - # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end - # Attribute for field filters sig { returns(Filters) } attr_reader :filters - # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry - # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions - # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch - # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end class MandateOptions < Stripe::StripeObject - # Mandate collection method sig { returns(String) } attr_reader :collection_method end - # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Preferred transaction settlement speed sig { returns(String) } attr_reader :preferred_settlement_speed - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class WechatPay < Stripe::StripeObject - # The app ID registered with WeChat Pay. Only required when client is ios or android. sig { returns(T.nilable(String)) } attr_reader :app_id - # The client type that the end customer will pay from sig { returns(T.nilable(String)) } attr_reader :client - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Zip < Stripe::StripeObject - # Indicates that you intend to make future payments with this PaymentIntent's payment method. - # - # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - # - # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - # - # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end - # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit - # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm - # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay - # Attribute for field alma sig { returns(Alma) } attr_reader :alma - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit - # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact - # Attribute for field blik sig { returns(Blik) } attr_reader :blik - # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present - # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp - # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance - # Attribute for field eps sig { returns(Eps) } attr_reader :eps - # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx - # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay - # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay - # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay - # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal - # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present - # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay - # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna - # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini - # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way - # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay - # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco - # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay - # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo - # Attribute for field p24 sig { returns(P24) } attr_reader :p24 - # Attribute for field payco sig { returns(Payco) } attr_reader :payco - # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field payto sig { returns(Payto) } attr_reader :payto - # Attribute for field pix sig { returns(Pix) } attr_reader :pix - # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay - # Attribute for field qris sig { returns(Qris) } attr_reader :qris - # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung - # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay - # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay - # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit - # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay - # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort - # Attribute for field swish sig { returns(Swish) } attr_reader :swish - # Attribute for field twint sig { returns(Twint) } attr_reader :twint - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account - # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay - # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class Processing < Stripe::StripeObject class Card < Stripe::StripeObject class CustomerNotification < Stripe::StripeObject - # Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. sig { returns(T.nilable(T::Boolean)) } attr_reader :approval_requested - # If customer approval is required, they need to provide approval before this time. sig { returns(T.nilable(Integer)) } attr_reader :completes_at end - # Attribute for field customer_notification sig { returns(CustomerNotification) } attr_reader :customer_notification end - # Attribute for field card sig { returns(Card) } attr_reader :card - # Type of the payment method for which payment is in `processing` state, one of `card`. sig { returns(String) } attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TransferData < Stripe::StripeObject - # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount - # The account (if any) that the payment is attributed to for tax - # reporting, and where funds from the payment are transferred to after - # payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). attr_reader :amount - - # Amount that can be captured from this PaymentIntent. sig { returns(Integer) } + # Amount that can be captured from this PaymentIntent. attr_reader :amount_capturable - - # Attribute for field amount_details sig { returns(AmountDetails) } + # Attribute for field amount_details attr_reader :amount_details - - # Amount that this PaymentIntent collects. sig { returns(Integer) } + # Amount that this PaymentIntent collects. attr_reader :amount_received - - # ID of the Connect application that created the PaymentIntent. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the PaymentIntent. attr_reader :application - - # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). attr_reader :application_fee_amount - - # Attribute for field async_workflows sig { returns(AsyncWorkflows) } + # Attribute for field async_workflows attr_reader :async_workflows - - # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) sig { returns(T.nilable(AutomaticPaymentMethods)) } + # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) attr_reader :automatic_payment_methods - - # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at - - # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). sig { returns(T.nilable(String)) } + # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). attr_reader :cancellation_reason - - # Controls when the funds will be captured from the customer's account. sig { returns(String) } + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method - + sig { returns(T.nilable(String)) } # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. - sig { returns(T.nilable(String)) } attr_reader :client_secret - - # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. sig { returns(String) } + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. attr_reader :confirmation_method - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # ID of the Customer this PaymentIntent belongs to, if one exists. # # Payment methods attached to other Customers cannot be used with this PaymentIntent. # # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # ID of the invoice that created this PaymentIntent, if it exists. sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # ID of the invoice that created this PaymentIntent, if it exists. attr_reader :invoice - - # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. sig { returns(T.nilable(LastPaymentError)) } + # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. attr_reader :last_payment_error - - # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. attr_reader :latest_charge - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). attr_reader :metadata - - # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. sig { returns(T.nilable(NextAction)) } + # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. attr_reader :next_action - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. attr_reader :on_behalf_of - - # Attribute for field payment_details sig { returns(PaymentDetails) } + # Attribute for field payment_details attr_reader :payment_details - - # ID of the payment method used in this PaymentIntent. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the payment method used in this PaymentIntent. attr_reader :payment_method - - # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. attr_reader :payment_method_configuration_details - - # Payment-method-specific configuration for this PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment-method-specific configuration for this PaymentIntent. attr_reader :payment_method_options - - # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. sig { returns(T::Array[String]) } + # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. attr_reader :payment_method_types - - # If present, this property tells you about the processing state of the payment. sig { returns(T.nilable(Processing)) } + # If present, this property tells you about the processing state of the payment. attr_reader :processing - - # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). sig { returns(T.nilable(String)) } + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). attr_reader :receipt_email - - # ID of the review associated with this PaymentIntent, if any. sig { returns(T.nilable(T.any(String, Stripe::Review))) } + # ID of the review associated with this PaymentIntent, if any. attr_reader :review - - # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. sig { returns(String) } + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. attr_reader :secret_key_confirmation - + sig { returns(T.nilable(String)) } # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -2450,39 +1542,31 @@ module Stripe # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. # # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). - sig { returns(T.nilable(String)) } attr_reader :setup_future_usage - - # Shipping information for this PaymentIntent. sig { returns(T.nilable(Shipping)) } + # Shipping information for this PaymentIntent. attr_reader :shipping - - # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } + # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. attr_reader :source - + sig { returns(T.nilable(String)) } # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - - # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. sig { returns(T.nilable(String)) } + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. attr_reader :statement_descriptor_suffix - - # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). sig { returns(String) } + # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). attr_reader :status - - # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). sig { returns(T.nilable(TransferData)) } + # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). attr_reader :transfer_data - - # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). sig { returns(T.nilable(String)) } + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). attr_reader :transfer_group end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_link.rbi b/rbi/stripe/resources/payment_link.rbi index 10b1e63b1..2b51a69b1 100644 --- a/rbi/stripe/resources/payment_link.rbi +++ b/rbi/stripe/resources/payment_link.rbi @@ -11,445 +11,332 @@ module Stripe class PaymentLink < APIResource class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject - # The custom message that is displayed to the customer after the purchase is complete. sig { returns(T.nilable(String)) } attr_reader :custom_message end class Redirect < Stripe::StripeObject - # The URL the customer will be redirected to after the purchase is complete. sig { returns(String) } attr_reader :url end - # Attribute for field hosted_confirmation sig { returns(HostedConfirmation) } attr_reader :hosted_confirmation - # Attribute for field redirect sig { returns(Redirect) } attr_reader :redirect - # The specified behavior after the purchase is complete. sig { returns(String) } attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # If `true`, tax will be calculated automatically using the customer's location. sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject - # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. - # - # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. sig { returns(String) } attr_reader :position end - # Settings related to the payment method reuse text shown in the Checkout UI. sig { returns(T.nilable(PaymentMethodReuseAgreement)) } attr_reader :payment_method_reuse_agreement - # If set to `auto`, enables the collection of customer consent for promotional communications. sig { returns(T.nilable(String)) } attr_reader :promotions - # If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject - # The label for the option, displayed to the customer. Up to 100 characters. sig { returns(String) } attr_reader :label - # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. sig { returns(String) } attr_reader :value end - # The options available for the customer to select. Up to 200 options allowed. sig { returns(T::Array[Option]) } attr_reader :options end class Label < Stripe::StripeObject - # Custom text for the label, displayed to the customer. Up to 50 characters. sig { returns(T.nilable(String)) } attr_reader :custom - # The type of the label. sig { returns(String) } attr_reader :type end class Numeric < Stripe::StripeObject - # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length - # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length end class Text < Stripe::StripeObject - # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length - # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length end - # Attribute for field dropdown sig { returns(Dropdown) } attr_reader :dropdown - # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. sig { returns(String) } attr_reader :key - # Attribute for field label sig { returns(Label) } attr_reader :label - # Attribute for field numeric sig { returns(Numeric) } attr_reader :numeric - # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. sig { returns(T::Boolean) } attr_reader :optional - # Attribute for field text sig { returns(Text) } attr_reader :text - # The type of the field. sig { returns(String) } attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject - # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class ShippingAddress < Stripe::StripeObject - # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class Submit < Stripe::StripeObject - # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject - # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end - # Custom text that should be displayed after the payment confirmation button. sig { returns(T.nilable(AfterSubmit)) } attr_reader :after_submit - # Custom text that should be displayed alongside shipping address collection. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address - # Custom text that should be displayed alongside the payment confirmation button. sig { returns(T.nilable(Submit)) } attr_reader :submit - # Custom text that should be displayed in place of the default terms of service agreement text. sig { returns(T.nilable(TermsOfServiceAcceptance)) } attr_reader :terms_of_service_acceptance end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject - # The name of the custom field. sig { returns(String) } attr_reader :name - # The value of the custom field. sig { returns(String) } attr_reader :value end class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end class RenderingOptions < Stripe::StripeObject - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display end - # The account tax IDs associated with the invoice. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - # A list of up to 4 custom fields to be displayed on the invoice. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description - # Footer to be displayed on the invoice. sig { returns(T.nilable(String)) } attr_reader :footer - # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # Options for invoice PDF rendering. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end - # Enable creating an invoice on successful payment. sig { returns(T::Boolean) } attr_reader :enabled - # Configuration for the invoice. Default invoice values will be used if unspecified. sig { returns(T.nilable(InvoiceData)) } attr_reader :invoice_data end class PaymentIntentData < Stripe::StripeObject - # Indicates when the funds will be captured from the customer's account. sig { returns(T.nilable(String)) } attr_reader :capture_method - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. sig { returns(T::Hash[String, String]) } attr_reader :metadata - # Indicates that you intend to make future payments with the payment method collected during checkout. sig { returns(T.nilable(String)) } attr_reader :setup_future_usage - # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - # For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix - # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. sig { returns(T.nilable(String)) } attr_reader :transfer_group end class PhoneNumberCollection < Stripe::StripeObject - # If `true`, a phone number will be collected during checkout. sig { returns(T::Boolean) } attr_reader :enabled end class Restrictions < Stripe::StripeObject class CompletedSessions < Stripe::StripeObject - # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. sig { returns(Integer) } attr_reader :count - # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. sig { returns(Integer) } attr_reader :limit end - # Attribute for field completed_sessions sig { returns(CompletedSessions) } attr_reader :completed_sessions end class ShippingAddressCollection < Stripe::StripeObject - # An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. sig { returns(T::Array[String]) } attr_reader :allowed_countries end class ShippingOption < Stripe::StripeObject - # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :shipping_amount - # The ID of the Shipping Rate to use for this shipping option. sig { returns(T.any(String, Stripe::ShippingRate)) } attr_reader :shipping_rate end class SubscriptionData < Stripe::StripeObject class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. sig { returns(String) } attr_reader :missing_payment_method end - # Defines how a subscription behaves when a free trial ends. sig { returns(EndBehavior) } attr_reader :end_behavior end - # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description - # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. sig { returns(T::Hash[String, String]) } attr_reader :metadata - # Integer representing the number of trial period days before the customer is charged for the first time. sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days - # Settings related to subscription trials. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class TaxIdCollection < Stripe::StripeObject - # Indicates whether tax ID collection is enabled for the session. sig { returns(T::Boolean) } attr_reader :enabled - # Attribute for field required sig { returns(String) } attr_reader :required end class TransferData < Stripe::StripeObject - # The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount - # The connected account receiving the transfer. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. sig { returns(T::Boolean) } + # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. attr_reader :active - - # Attribute for field after_completion sig { returns(AfterCompletion) } + # Attribute for field after_completion attr_reader :after_completion - - # Whether user redeemable promotion codes are enabled. sig { returns(T::Boolean) } + # Whether user redeemable promotion codes are enabled. attr_reader :allow_promotion_codes - - # The ID of the Connect application that created the Payment Link. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # The ID of the Connect application that created the Payment Link. attr_reader :application - - # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. attr_reader :application_fee_amount - - # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. sig { returns(T.nilable(Float)) } + # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. attr_reader :application_fee_percent - - # Attribute for field automatic_tax sig { returns(AutomaticTax) } + # Attribute for field automatic_tax attr_reader :automatic_tax - - # Configuration for collecting the customer's billing address. Defaults to `auto`. sig { returns(String) } + # Configuration for collecting the customer's billing address. Defaults to `auto`. attr_reader :billing_address_collection - - # When set, provides configuration to gather active consent from customers. sig { returns(T.nilable(ConsentCollection)) } + # When set, provides configuration to gather active consent from customers. attr_reader :consent_collection - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Collect additional information from your customer using custom fields. Up to 3 fields are supported. sig { returns(T::Array[CustomField]) } + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. attr_reader :custom_fields - - # Attribute for field custom_text sig { returns(CustomText) } + # Attribute for field custom_text attr_reader :custom_text - - # Configuration for Customer creation during checkout. sig { returns(String) } + # Configuration for Customer creation during checkout. attr_reader :customer_creation - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The custom message to be displayed to a customer when a payment link is no longer active. sig { returns(T.nilable(String)) } + # The custom message to be displayed to a customer when a payment link is no longer active. attr_reader :inactive_message - - # Configuration for creating invoice for payment mode payment links. sig { returns(T.nilable(InvoiceCreation)) } + # Configuration for creating invoice for payment mode payment links. attr_reader :invoice_creation - - # The line items representing what is being sold. sig { returns(Stripe::ListObject) } + # The line items representing what is being sold. attr_reader :line_items - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. attr_reader :on_behalf_of - - # Indicates the parameters to be passed to PaymentIntent creation during checkout. sig { returns(T.nilable(PaymentIntentData)) } + # Indicates the parameters to be passed to PaymentIntent creation during checkout. attr_reader :payment_intent_data - - # Configuration for collecting a payment method during checkout. Defaults to `always`. sig { returns(String) } + # Configuration for collecting a payment method during checkout. Defaults to `always`. attr_reader :payment_method_collection - - # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). sig { returns(T.nilable(T::Array[String])) } + # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). attr_reader :payment_method_types - - # Attribute for field phone_number_collection sig { returns(PhoneNumberCollection) } + # Attribute for field phone_number_collection attr_reader :phone_number_collection - - # Settings that restrict the usage of a payment link. sig { returns(T.nilable(Restrictions)) } + # Settings that restrict the usage of a payment link. attr_reader :restrictions - - # Configuration for collecting the customer's shipping address. sig { returns(T.nilable(ShippingAddressCollection)) } + # Configuration for collecting the customer's shipping address. attr_reader :shipping_address_collection - - # The shipping rate options applied to the session. sig { returns(T::Array[ShippingOption]) } + # The shipping rate options applied to the session. attr_reader :shipping_options - - # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. sig { returns(String) } + # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. attr_reader :submit_type - - # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. sig { returns(T.nilable(SubscriptionData)) } + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. attr_reader :subscription_data - - # Attribute for field tax_id_collection sig { returns(TaxIdCollection) } + # Attribute for field tax_id_collection attr_reader :tax_id_collection - - # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. sig { returns(T.nilable(TransferData)) } + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. attr_reader :transfer_data - - # The public URL that can be shared with customers. sig { returns(String) } + # The public URL that can be shared with customers. attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method.rbi b/rbi/stripe/resources/payment_method.rbi index 04669d7e0..b98e52cb2 100644 --- a/rbi/stripe/resources/payment_method.rbi +++ b/rbi/stripe/resources/payment_method.rbi @@ -10,19 +10,14 @@ module Stripe # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). class PaymentMethod < APIResource class AcssDebit < Stripe::StripeObject - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Institution number of the bank account. sig { returns(T.nilable(String)) } attr_reader :institution_number - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end @@ -32,77 +27,57 @@ module Stripe class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - # Six-digit number identifying bank and branch associated with this bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 end class BacsDebit < Stripe::StripeObject - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address - # Email address. sig { returns(T.nilable(String)) } attr_reader :email - # Full name. sig { returns(T.nilable(String)) } attr_reader :name - # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject - # Uniquely identifies the customer tax id (CNPJ or CPF) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check - # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check - # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end @@ -110,152 +85,105 @@ module Stripe class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject - # The type of account being debited or credited sig { returns(String) } attr_reader :account_type - # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram - # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name - # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code - # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code - # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method - # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name - # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results - # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end - # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product - # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network - # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id - # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline - # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method - # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt - # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end - # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present - # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. sig { returns(String) } attr_reader :type end - # The charge that created this object. sig { returns(T.nilable(String)) } attr_reader :charge - # Transaction-specific details of the payment method used in the payment. sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details - # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end class Networks < Stripe::StripeObject - # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available - # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject - # Whether 3D Secure is supported on this card. sig { returns(T::Boolean) } attr_reader :supported end @@ -266,287 +194,199 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address - # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email - # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name - # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end - # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout - # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay - # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 - # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass - # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay - # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type - # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand - # Checks on Card address and CVC if provided. sig { returns(T.nilable(Checks)) } attr_reader :checks - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. sig { returns(T.nilable(String)) } attr_reader :display_brand - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(String) } attr_reader :funding - # Details of the original PaymentMethod that created this object. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(String) } attr_reader :last4 - # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks - # Contains details on how this Card may be used for 3D Secure authentication. sig { returns(T.nilable(ThreeDSecureUsage)) } attr_reader :three_d_secure_usage - # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available - # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Wallet < Stripe::StripeObject - # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks - # Details about payment methods collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method - # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject - # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id - # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject - # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank end class Fpx < Stripe::StripeObject - # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank end @@ -554,112 +394,80 @@ module Stripe class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank - # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field display_name sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject - # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank - # The Bank Identifier Code of the customer's bank, if the bank was provided. sig { returns(T.nilable(String)) } attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available - # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end - # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand - # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks - # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end - # The customer's date of birth, if provided. sig { returns(T.nilable(Dob)) } attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject - # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand - # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject - # Account owner's email address. sig { returns(T.nilable(String)) } attr_reader :email - # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(String) } attr_reader :persistent_token end @@ -667,42 +475,31 @@ module Stripe class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject - # Whether to fund this transaction with Naver Pay points or a card. sig { returns(String) } attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject - # The customer's bank, if provided. sig { returns(T.nilable(String)) } attr_reader :bank end class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Owner's email. Values are provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email - # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id - # Owner's verified email. Values are verified or provided by PayPal directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject - # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end @@ -710,23 +507,18 @@ module Stripe class Promptpay < Stripe::StripeObject; end class Qris < Stripe::StripeObject; end class RadarOptions < Stripe::StripeObject - # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. sig { returns(String) } attr_reader :session end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. sig { returns(Integer) } attr_reader :day - # The month of birth, between 1 and 12. sig { returns(Integer) } attr_reader :month - # The four-digit year of birth. sig { returns(Integer) } attr_reader :year end - # Attribute for field dob sig { returns(Dob) } attr_reader :dob end @@ -734,35 +526,26 @@ module Stripe class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject - # The ID of the Charge that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge - # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end - # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code - # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Information about the object that generated this PaymentMethod. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country end @@ -770,305 +553,229 @@ module Stripe class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject - # The preferred network. sig { returns(T.nilable(String)) } attr_reader :preferred - # All supported networks. sig { returns(T::Array[String]) } attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject - # The ACH network code that resulted in this block. sig { returns(T.nilable(String)) } attr_reader :network_code - # The reason why this PaymentMethod's fingerprint has been blocked sig { returns(T.nilable(String)) } attr_reader :reason end - # Attribute for field blocked sig { returns(Blocked) } attr_reader :blocked end - # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # Account number of the bank account. sig { returns(T.nilable(String)) } attr_reader :account_number - # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type - # The name of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_name - # The ID of the Financial Connections Account used to create the payment method. sig { returns(T.nilable(String)) } attr_reader :financial_connections_account - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # Contains information about US bank account networks that can be used. sig { returns(T.nilable(Networks)) } attr_reader :networks - # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number - # Contains information about the future reusability of this PaymentMethod. sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - # Attribute for field acss_debit sig { returns(AcssDebit) } + # Attribute for field acss_debit attr_reader :acss_debit - - # Attribute for field affirm sig { returns(Affirm) } + # Attribute for field affirm attr_reader :affirm - - # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } + # Attribute for field afterpay_clearpay attr_reader :afterpay_clearpay - - # Attribute for field alipay sig { returns(Alipay) } + # Attribute for field alipay attr_reader :alipay - - # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. sig { returns(String) } + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. attr_reader :allow_redisplay - - # Attribute for field alma sig { returns(Alma) } + # Attribute for field alma attr_reader :alma - - # Attribute for field amazon_pay sig { returns(AmazonPay) } + # Attribute for field amazon_pay attr_reader :amazon_pay - - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit attr_reader :au_becs_debit - - # Attribute for field bacs_debit sig { returns(BacsDebit) } + # Attribute for field bacs_debit attr_reader :bacs_debit - - # Attribute for field bancontact sig { returns(Bancontact) } + # Attribute for field bancontact attr_reader :bancontact - - # Attribute for field billing_details sig { returns(BillingDetails) } + # Attribute for field billing_details attr_reader :billing_details - - # Attribute for field blik sig { returns(Blik) } + # Attribute for field blik attr_reader :blik - - # Attribute for field boleto sig { returns(Boleto) } + # Attribute for field boleto attr_reader :boleto - - # Attribute for field card sig { returns(Card) } + # Attribute for field card attr_reader :card - - # Attribute for field card_present sig { returns(CardPresent) } + # Attribute for field card_present attr_reader :card_present - - # Attribute for field cashapp sig { returns(Cashapp) } + # Attribute for field cashapp attr_reader :cashapp - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. attr_reader :customer - - # Attribute for field customer_balance sig { returns(CustomerBalance) } + # Attribute for field customer_balance attr_reader :customer_balance - - # Attribute for field eps sig { returns(Eps) } + # Attribute for field eps attr_reader :eps - - # Attribute for field fpx sig { returns(Fpx) } + # Attribute for field fpx attr_reader :fpx - - # Attribute for field giropay sig { returns(Giropay) } + # Attribute for field giropay attr_reader :giropay - - # Attribute for field gopay sig { returns(Gopay) } + # Attribute for field gopay attr_reader :gopay - - # Attribute for field grabpay sig { returns(Grabpay) } + # Attribute for field grabpay attr_reader :grabpay - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } + # Attribute for field id_bank_transfer attr_reader :id_bank_transfer - - # Attribute for field ideal sig { returns(Ideal) } + # Attribute for field ideal attr_reader :ideal - - # Attribute for field interac_present sig { returns(InteracPresent) } + # Attribute for field interac_present attr_reader :interac_present - - # Attribute for field kakao_pay sig { returns(KakaoPay) } + # Attribute for field kakao_pay attr_reader :kakao_pay - - # Attribute for field klarna sig { returns(Klarna) } + # Attribute for field klarna attr_reader :klarna - - # Attribute for field konbini sig { returns(Konbini) } + # Attribute for field konbini attr_reader :konbini - - # Attribute for field kr_card sig { returns(KrCard) } + # Attribute for field kr_card attr_reader :kr_card - - # Attribute for field link sig { returns(Link) } + # Attribute for field link attr_reader :link - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Attribute for field mb_way sig { returns(MbWay) } + # Attribute for field mb_way attr_reader :mb_way - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Attribute for field mobilepay sig { returns(Mobilepay) } + # Attribute for field mobilepay attr_reader :mobilepay - - # Attribute for field multibanco sig { returns(Multibanco) } + # Attribute for field multibanco attr_reader :multibanco - - # Attribute for field naver_pay sig { returns(NaverPay) } + # Attribute for field naver_pay attr_reader :naver_pay - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field oxxo sig { returns(Oxxo) } + # Attribute for field oxxo attr_reader :oxxo - - # Attribute for field p24 sig { returns(P24) } + # Attribute for field p24 attr_reader :p24 - - # Attribute for field payco sig { returns(Payco) } + # Attribute for field payco attr_reader :payco - - # Attribute for field paynow sig { returns(Paynow) } + # Attribute for field paynow attr_reader :paynow - - # Attribute for field paypal sig { returns(Paypal) } + # Attribute for field paypal attr_reader :paypal - - # Attribute for field payto sig { returns(Payto) } + # Attribute for field payto attr_reader :payto - - # Attribute for field pix sig { returns(Pix) } + # Attribute for field pix attr_reader :pix - - # Attribute for field promptpay sig { returns(Promptpay) } + # Attribute for field promptpay attr_reader :promptpay - - # Attribute for field qris sig { returns(Qris) } + # Attribute for field qris attr_reader :qris - - # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. sig { returns(RadarOptions) } + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. attr_reader :radar_options - - # Attribute for field rechnung sig { returns(Rechnung) } + # Attribute for field rechnung attr_reader :rechnung - - # Attribute for field revolut_pay sig { returns(RevolutPay) } + # Attribute for field revolut_pay attr_reader :revolut_pay - - # Attribute for field samsung_pay sig { returns(SamsungPay) } + # Attribute for field samsung_pay attr_reader :samsung_pay - - # Attribute for field sepa_debit sig { returns(SepaDebit) } + # Attribute for field sepa_debit attr_reader :sepa_debit - - # Attribute for field shopeepay sig { returns(Shopeepay) } + # Attribute for field shopeepay attr_reader :shopeepay - - # Attribute for field sofort sig { returns(Sofort) } + # Attribute for field sofort attr_reader :sofort - - # Attribute for field swish sig { returns(Swish) } + # Attribute for field swish attr_reader :swish - - # Attribute for field twint sig { returns(Twint) } + # Attribute for field twint attr_reader :twint - - # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. sig { returns(String) } + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. attr_reader :type - - # Attribute for field us_bank_account sig { returns(UsBankAccount) } + # Attribute for field us_bank_account attr_reader :us_bank_account - - # Attribute for field wechat_pay sig { returns(WechatPay) } + # Attribute for field wechat_pay attr_reader :wechat_pay - - # Attribute for field zip sig { returns(Zip) } + # Attribute for field zip attr_reader :zip end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method_configuration.rbi b/rbi/stripe/resources/payment_method_configuration.rbi index 4f06c0830..ad627de89 100644 --- a/rbi/stripe/resources/payment_method_configuration.rbi +++ b/rbi/stripe/resources/payment_method_configuration.rbi @@ -20,1092 +20,809 @@ module Stripe class PaymentMethodConfiguration < APIResource class AcssDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Affirm < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AfterpayClearpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Alipay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Alma < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AmazonPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class ApplePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AuBecsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class BacsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Bancontact < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Blik < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Boleto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Card < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class CartesBancaires < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Cashapp < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class CustomerBalance < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Eps < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Fpx < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Giropay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class GooglePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Gopay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Grabpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class IdBankTransfer < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Ideal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Jcb < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Klarna < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Konbini < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Link < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Mobilepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Multibanco < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Oxxo < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class P24 < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Paynow < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Paypal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Payto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Promptpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Qris < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class RevolutPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class SepaDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Shopeepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Sofort < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Swish < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Twint < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class UsBankAccount < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class WechatPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Zip < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable - # The account's display preference. sig { returns(String) } attr_reader :preference - # The effective display preference value. sig { returns(String) } attr_reader :value end - # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available - # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end - # Attribute for field acss_debit sig { returns(AcssDebit) } + # Attribute for field acss_debit attr_reader :acss_debit - - # Whether the configuration can be used for new payments. sig { returns(T::Boolean) } + # Whether the configuration can be used for new payments. attr_reader :active - - # Attribute for field affirm sig { returns(Affirm) } + # Attribute for field affirm attr_reader :affirm - - # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } + # Attribute for field afterpay_clearpay attr_reader :afterpay_clearpay - - # Attribute for field alipay sig { returns(Alipay) } + # Attribute for field alipay attr_reader :alipay - - # Attribute for field alma sig { returns(Alma) } + # Attribute for field alma attr_reader :alma - - # Attribute for field amazon_pay sig { returns(AmazonPay) } + # Attribute for field amazon_pay attr_reader :amazon_pay - - # Attribute for field apple_pay sig { returns(ApplePay) } + # Attribute for field apple_pay attr_reader :apple_pay - - # For child configs, the Connect application associated with the configuration. sig { returns(T.nilable(String)) } + # For child configs, the Connect application associated with the configuration. attr_reader :application - - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit attr_reader :au_becs_debit - - # Attribute for field bacs_debit sig { returns(BacsDebit) } + # Attribute for field bacs_debit attr_reader :bacs_debit - - # Attribute for field bancontact sig { returns(Bancontact) } + # Attribute for field bancontact attr_reader :bancontact - - # Attribute for field blik sig { returns(Blik) } + # Attribute for field blik attr_reader :blik - - # Attribute for field boleto sig { returns(Boleto) } + # Attribute for field boleto attr_reader :boleto - - # Attribute for field card sig { returns(Card) } + # Attribute for field card attr_reader :card - - # Attribute for field cartes_bancaires sig { returns(CartesBancaires) } + # Attribute for field cartes_bancaires attr_reader :cartes_bancaires - - # Attribute for field cashapp sig { returns(Cashapp) } + # Attribute for field cashapp attr_reader :cashapp - - # Attribute for field customer_balance sig { returns(CustomerBalance) } + # Attribute for field customer_balance attr_reader :customer_balance - - # Attribute for field eps sig { returns(Eps) } + # Attribute for field eps attr_reader :eps - - # Attribute for field fpx sig { returns(Fpx) } + # Attribute for field fpx attr_reader :fpx - - # Attribute for field giropay sig { returns(Giropay) } + # Attribute for field giropay attr_reader :giropay - - # Attribute for field google_pay sig { returns(GooglePay) } + # Attribute for field google_pay attr_reader :google_pay - - # Attribute for field gopay sig { returns(Gopay) } + # Attribute for field gopay attr_reader :gopay - - # Attribute for field grabpay sig { returns(Grabpay) } + # Attribute for field grabpay attr_reader :grabpay - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } + # Attribute for field id_bank_transfer attr_reader :id_bank_transfer - - # Attribute for field ideal sig { returns(Ideal) } + # Attribute for field ideal attr_reader :ideal - - # The default configuration is used whenever a payment method configuration is not specified. sig { returns(T::Boolean) } + # The default configuration is used whenever a payment method configuration is not specified. attr_reader :is_default - - # Attribute for field jcb sig { returns(Jcb) } + # Attribute for field jcb attr_reader :jcb - - # Attribute for field klarna sig { returns(Klarna) } + # Attribute for field klarna attr_reader :klarna - - # Attribute for field konbini sig { returns(Konbini) } + # Attribute for field konbini attr_reader :konbini - - # Attribute for field link sig { returns(Link) } + # Attribute for field link attr_reader :link - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Attribute for field mobilepay sig { returns(Mobilepay) } + # Attribute for field mobilepay attr_reader :mobilepay - - # Attribute for field multibanco sig { returns(Multibanco) } + # Attribute for field multibanco attr_reader :multibanco - - # The configuration's name. sig { returns(String) } + # The configuration's name. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field oxxo sig { returns(Oxxo) } + # Attribute for field oxxo attr_reader :oxxo - - # Attribute for field p24 sig { returns(P24) } + # Attribute for field p24 attr_reader :p24 - - # For child configs, the configuration's parent configuration. sig { returns(T.nilable(String)) } + # For child configs, the configuration's parent configuration. attr_reader :parent - - # Attribute for field paynow sig { returns(Paynow) } + # Attribute for field paynow attr_reader :paynow - - # Attribute for field paypal sig { returns(Paypal) } + # Attribute for field paypal attr_reader :paypal - - # Attribute for field payto sig { returns(Payto) } + # Attribute for field payto attr_reader :payto - - # Attribute for field promptpay sig { returns(Promptpay) } + # Attribute for field promptpay attr_reader :promptpay - - # Attribute for field qris sig { returns(Qris) } + # Attribute for field qris attr_reader :qris - - # Attribute for field revolut_pay sig { returns(RevolutPay) } + # Attribute for field revolut_pay attr_reader :revolut_pay - - # Attribute for field sepa_debit sig { returns(SepaDebit) } + # Attribute for field sepa_debit attr_reader :sepa_debit - - # Attribute for field shopeepay sig { returns(Shopeepay) } + # Attribute for field shopeepay attr_reader :shopeepay - - # Attribute for field sofort sig { returns(Sofort) } + # Attribute for field sofort attr_reader :sofort - - # Attribute for field swish sig { returns(Swish) } + # Attribute for field swish attr_reader :swish - - # Attribute for field twint sig { returns(Twint) } + # Attribute for field twint attr_reader :twint - - # Attribute for field us_bank_account sig { returns(UsBankAccount) } + # Attribute for field us_bank_account attr_reader :us_bank_account - - # Attribute for field wechat_pay sig { returns(WechatPay) } + # Attribute for field wechat_pay attr_reader :wechat_pay - - # Attribute for field zip sig { returns(Zip) } + # Attribute for field zip attr_reader :zip end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method_domain.rbi b/rbi/stripe/resources/payment_method_domain.rbi index 520de023d..fe03b8a7a 100644 --- a/rbi/stripe/resources/payment_method_domain.rbi +++ b/rbi/stripe/resources/payment_method_domain.rbi @@ -10,111 +10,86 @@ module Stripe class PaymentMethodDomain < APIResource class AmazonPay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end - # The status of the payment method on the domain. sig { returns(String) } attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class ApplePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end - # The status of the payment method on the domain. sig { returns(String) } attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class GooglePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end - # The status of the payment method on the domain. sig { returns(String) } attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class Link < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end - # The status of the payment method on the domain. sig { returns(String) } attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class Paypal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject - # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end - # The status of the payment method on the domain. sig { returns(String) } attr_reader :status - # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end - # Indicates the status of a specific payment method on a payment method domain. sig { returns(AmazonPay) } - attr_reader :amazon_pay - # Indicates the status of a specific payment method on a payment method domain. + attr_reader :amazon_pay sig { returns(ApplePay) } + # Indicates the status of a specific payment method on a payment method domain. attr_reader :apple_pay - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The domain name that this payment method domain object represents. sig { returns(String) } + # The domain name that this payment method domain object represents. attr_reader :domain_name - - # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. sig { returns(T::Boolean) } + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. attr_reader :enabled - - # Indicates the status of a specific payment method on a payment method domain. sig { returns(GooglePay) } + # Indicates the status of a specific payment method on a payment method domain. attr_reader :google_pay - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Indicates the status of a specific payment method on a payment method domain. sig { returns(Link) } + # Indicates the status of a specific payment method on a payment method domain. attr_reader :link - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Indicates the status of a specific payment method on a payment method domain. sig { returns(Paypal) } + # Indicates the status of a specific payment method on a payment method domain. attr_reader :paypal end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_record.rbi b/rbi/stripe/resources/payment_record.rbi index 13c5db4c8..6c34020ac 100644 --- a/rbi/stripe/resources/payment_record.rbi +++ b/rbi/stripe/resources/payment_record.rbi @@ -9,212 +9,157 @@ module Stripe # more Payment Attempt Records, which represent individual attempts made on a payment network. class PaymentRecord < APIResource class AmountCanceled < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountFailed < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountGuaranteed < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountRefunded < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountRequested < Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class CustomerDetails < Stripe::StripeObject - # ID of the Stripe Customer associated with this payment. sig { returns(T.nilable(String)) } attr_reader :customer - # The customer's email address. sig { returns(T.nilable(String)) } attr_reader :email - # The customer's name. sig { returns(T.nilable(String)) } attr_reader :name - # The customer's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # A representation of a physical address. sig { returns(Address) } attr_reader :address - # The billing email associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :email - # The billing name associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :name - # The billing phone number associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :phone end class Custom < Stripe::StripeObject - # Display name for the custom (user-defined) payment method type used to make this payment. sig { returns(String) } attr_reader :display_name - # The custom payment method type associated with this payment. sig { returns(T.nilable(String)) } attr_reader :type end - # The billing details associated with the method of payment. sig { returns(T.nilable(BillingDetails)) } attr_reader :billing_details - # Information about the custom (user-defined) payment method used to make this payment. sig { returns(T.nilable(Custom)) } attr_reader :custom - # ID of the Stripe PaymentMethod used to make this payment. sig { returns(T.nilable(String)) } attr_reader :payment_method - # The type of Payment Method used for this payment attempt. sig { returns(String) } attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # A representation of a physical address. sig { returns(Address) } attr_reader :address - # The shipping recipient's name. sig { returns(T.nilable(String)) } attr_reader :name - # The shipping recipient's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end - # A representation of an amount of money, consisting of an amount and a currency. sig { returns(AmountCanceled) } - attr_reader :amount_canceled - # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_canceled sig { returns(AmountFailed) } - attr_reader :amount_failed - # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_failed sig { returns(AmountGuaranteed) } - attr_reader :amount_guaranteed - # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_guaranteed sig { returns(AmountRefunded) } - attr_reader :amount_refunded - # A representation of an amount of money, consisting of an amount and a currency. + attr_reader :amount_refunded sig { returns(AmountRequested) } + # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_requested - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Customer information for this payment. sig { returns(T.nilable(CustomerDetails)) } + # Customer information for this payment. attr_reader :customer_details - - # Indicates whether the customer was present in your checkout flow during this payment. sig { returns(T.nilable(String)) } + # Indicates whether the customer was present in your checkout flow during this payment. attr_reader :customer_presence - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # ID of the latest Payment Attempt Record attached to this Payment Record. sig { returns(String) } + # ID of the latest Payment Attempt Record attached to this Payment Record. attr_reader :latest_payment_attempt_record - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Information about the Payment Method debited for this payment. sig { returns(T.nilable(PaymentMethodDetails)) } + # Information about the Payment Method debited for this payment. attr_reader :payment_method_details - - # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. sig { returns(T.nilable(String)) } + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. attr_reader :payment_reference - - # Shipping information for this payment. sig { returns(T.nilable(ShippingDetails)) } + # Shipping information for this payment. attr_reader :shipping_details end end \ No newline at end of file diff --git a/rbi/stripe/resources/payout.rbi b/rbi/stripe/resources/payout.rbi index 81a0341af..dfd1615fa 100644 --- a/rbi/stripe/resources/payout.rbi +++ b/rbi/stripe/resources/payout.rbi @@ -13,115 +13,88 @@ module Stripe # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) class Payout < APIResource class TraceId < Stripe::StripeObject - # Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. sig { returns(String) } attr_reader :status - # The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. sig { returns(T.nilable(String)) } attr_reader :value end - # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. sig { returns(Integer) } + # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. attr_reader :amount - - # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } + # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. attr_reader :application_fee - - # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. attr_reader :application_fee_amount - - # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. sig { returns(Integer) } + # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. attr_reader :arrival_date - - # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). sig { returns(T::Boolean) } + # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). attr_reader :automatic - - # ID of the balance transaction that describes the impact of this payout on your account balance. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this payout on your account balance. attr_reader :balance_transaction - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # ID of the bank account or card the payout is sent to. sig { returns(T.nilable(T.any(String, T.any(Stripe::BankAccount, Stripe::Card)))) } + # ID of the bank account or card the payout is sent to. attr_reader :destination - - # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. attr_reader :failure_balance_transaction - - # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). sig { returns(T.nilable(String)) } + # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). attr_reader :failure_code - - # Message that provides the reason for a payout failure, if available. sig { returns(T.nilable(String)) } + # Message that provides the reason for a payout failure, if available. attr_reader :failure_message - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). sig { returns(String) } + # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). attr_reader :method - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # If the payout reverses another, this is the ID of the original payout. sig { returns(T.nilable(T.any(String, Stripe::Payout))) } + # If the payout reverses another, this is the ID of the original payout. attr_reader :original_payout - - # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. sig { returns(String) } + # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. attr_reader :reconciliation_status - - # If the payout reverses, this is the ID of the payout that reverses this payout. sig { returns(T.nilable(T.any(String, Stripe::Payout))) } + # If the payout reverses, this is the ID of the payout that reverses this payout. attr_reader :reversed_by - - # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. sig { returns(String) } + # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. attr_reader :source_type - - # Extra information about a payout that displays on the user's bank statement. sig { returns(T.nilable(String)) } + # Extra information about a payout that displays on the user's bank statement. attr_reader :statement_descriptor - - # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. sig { returns(String) } + # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. attr_reader :status - - # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. sig { returns(T.nilable(TraceId)) } + # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. attr_reader :trace_id - - # Can be `bank_account` or `card`. sig { returns(String) } + # Can be `bank_account` or `card`. attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/person.rbi b/rbi/stripe/resources/person.rbi index 927f934c9..0c747f1d8 100644 --- a/rbi/stripe/resources/person.rbi +++ b/rbi/stripe/resources/person.rbi @@ -11,392 +11,285 @@ module Stripe class Person < APIResource class AdditionalTosAcceptances < Stripe::StripeObject class Account < Stripe::StripeObject - # The Unix timestamp marking when the legal guardian accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date - # The IP address from which the legal guardian accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip - # The user agent of the browser from which the legal guardian accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :user_agent end - # Details on the legal guardian's acceptance of the main Stripe service agreement. sig { returns(T.nilable(Account)) } attr_reader :account end class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressKana < Stripe::StripeObject - # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 - # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state - # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class AddressKanji < Stripe::StripeObject - # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 - # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state - # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class Dob < Stripe::StripeObject - # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day - # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month - # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. sig { returns(String) } attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives - # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. sig { returns(T::Array[String]) } attr_reader :currently_due - # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due - # Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T::Array[String]) } attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class RegisteredAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Relationship < Stripe::StripeObject - # Whether the person is the authorizer of the account's representative. sig { returns(T.nilable(T::Boolean)) } attr_reader :authorizer - # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. sig { returns(T.nilable(T::Boolean)) } attr_reader :director - # Whether the person has significant responsibility to control, manage, or direct the organization. sig { returns(T.nilable(T::Boolean)) } attr_reader :executive - # Whether the person is the legal guardian of the account's representative. sig { returns(T.nilable(T::Boolean)) } attr_reader :legal_guardian - # Whether the person is an owner of the account’s legal entity. sig { returns(T.nilable(T::Boolean)) } attr_reader :owner - # The percent owned by the person of the account's legal entity. sig { returns(T.nilable(Float)) } attr_reader :percent_ownership - # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. sig { returns(T.nilable(T::Boolean)) } attr_reader :representative - # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } attr_reader :title end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due - # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject - # The code for the type of error. sig { returns(String) } attr_reader :code - # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason - # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end - # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives - # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T::Array[String]) } attr_reader :currently_due - # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors - # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due - # Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. sig { returns(T::Array[String]) } attr_reader :past_due - # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class Verification < Stripe::StripeObject class AdditionalDocument < Stripe::StripeObject - # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back - # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". sig { returns(T.nilable(String)) } attr_reader :details - # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code - # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end class Document < Stripe::StripeObject - # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back - # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". sig { returns(T.nilable(String)) } attr_reader :details - # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code - # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end - # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. sig { returns(T.nilable(AdditionalDocument)) } attr_reader :additional_document - # A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". sig { returns(T.nilable(String)) } attr_reader :details - # One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. sig { returns(T.nilable(String)) } attr_reader :details_code - # Attribute for field document sig { returns(Document) } attr_reader :document - # The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. sig { returns(String) } attr_reader :status end - # The account the person is associated with. sig { returns(String) } + # The account the person is associated with. attr_reader :account - - # Attribute for field additional_tos_acceptances sig { returns(AdditionalTosAcceptances) } + # Attribute for field additional_tos_acceptances attr_reader :additional_tos_acceptances - - # Attribute for field address sig { returns(Address) } + # Attribute for field address attr_reader :address - - # The Kana variation of the person's address (Japan only). sig { returns(T.nilable(AddressKana)) } + # The Kana variation of the person's address (Japan only). attr_reader :address_kana - - # The Kanji variation of the person's address (Japan only). sig { returns(T.nilable(AddressKanji)) } + # The Kanji variation of the person's address (Japan only). attr_reader :address_kanji - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Attribute for field dob sig { returns(Dob) } + # Attribute for field dob attr_reader :dob - - # The person's email address. sig { returns(T.nilable(String)) } + # The person's email address. attr_reader :email - - # The person's first name. sig { returns(T.nilable(String)) } + # The person's first name. attr_reader :first_name - - # The Kana variation of the person's first name (Japan only). sig { returns(T.nilable(String)) } + # The Kana variation of the person's first name (Japan only). attr_reader :first_name_kana - - # The Kanji variation of the person's first name (Japan only). sig { returns(T.nilable(String)) } + # The Kanji variation of the person's first name (Japan only). attr_reader :first_name_kanji - - # A list of alternate names or aliases that the person is known by. sig { returns(T::Array[String]) } + # A list of alternate names or aliases that the person is known by. attr_reader :full_name_aliases - - # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. sig { returns(T.nilable(FutureRequirements)) } + # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. attr_reader :future_requirements - - # The person's gender. sig { returns(T.nilable(String)) } + # The person's gender. attr_reader :gender - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). sig { returns(T::Boolean) } + # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). attr_reader :id_number_provided - - # Whether the person's `id_number_secondary` was provided. sig { returns(T::Boolean) } + # Whether the person's `id_number_secondary` was provided. attr_reader :id_number_secondary_provided - - # The person's last name. sig { returns(T.nilable(String)) } + # The person's last name. attr_reader :last_name - - # The Kana variation of the person's last name (Japan only). sig { returns(T.nilable(String)) } + # The Kana variation of the person's last name (Japan only). attr_reader :last_name_kana - - # The Kanji variation of the person's last name (Japan only). sig { returns(T.nilable(String)) } + # The Kanji variation of the person's last name (Japan only). attr_reader :last_name_kanji - - # The person's maiden name. sig { returns(T.nilable(String)) } + # The person's maiden name. attr_reader :maiden_name - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The country where the person is a national. sig { returns(T.nilable(String)) } + # The country where the person is a national. attr_reader :nationality - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The person's phone number. sig { returns(T.nilable(String)) } + # The person's phone number. attr_reader :phone - - # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. sig { returns(String) } + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. attr_reader :political_exposure - - # Attribute for field registered_address sig { returns(RegisteredAddress) } + # Attribute for field registered_address attr_reader :registered_address - - # Attribute for field relationship sig { returns(Relationship) } + # Attribute for field relationship attr_reader :relationship - - # Information about the requirements for this person, including what information needs to be collected, and by when. sig { returns(T.nilable(Requirements)) } + # Information about the requirements for this person, including what information needs to be collected, and by when. attr_reader :requirements - - # Whether the last four digits of the person's Social Security number have been provided (U.S. only). sig { returns(T::Boolean) } + # Whether the last four digits of the person's Social Security number have been provided (U.S. only). attr_reader :ssn_last_4_provided - - # Attribute for field verification sig { returns(Verification) } + # Attribute for field verification attr_reader :verification - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/plan.rbi b/rbi/stripe/resources/plan.rbi index a25bcdb97..247c12a81 100644 --- a/rbi/stripe/resources/plan.rbi +++ b/rbi/stripe/resources/plan.rbi @@ -13,116 +13,88 @@ module Stripe # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). class Plan < APIResource class Tier < Stripe::StripeObject - # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount - # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal - # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal - # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end class TransformUsage < Stripe::StripeObject - # Divide usage by this number. sig { returns(Integer) } attr_reader :divide_by - # After division, either round the result `up` or `down`. sig { returns(String) } attr_reader :round end - # Whether the plan can be used for new purchases. sig { returns(T::Boolean) } + # Whether the plan can be used for new purchases. attr_reader :active - - # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. sig { returns(T.nilable(String)) } + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. attr_reader :aggregate_usage - - # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(Integer)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. attr_reader :amount - - # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(String)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. attr_reader :amount_decimal - - # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. sig { returns(String) } + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. attr_reader :billing_scheme - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. sig { returns(String) } + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. attr_reader :interval - - # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. sig { returns(Integer) } + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. attr_reader :interval_count - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The meter tracking the usage of a metered price sig { returns(T.nilable(String)) } + # The meter tracking the usage of a metered price attr_reader :meter - - # A brief description of the plan, hidden from customers. sig { returns(T.nilable(String)) } + # A brief description of the plan, hidden from customers. attr_reader :nickname - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The product whose pricing this plan determines. sig { returns(T.nilable(T.any(String, Stripe::Product))) } + # The product whose pricing this plan determines. attr_reader :product - - # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. sig { returns(T::Array[Tier]) } + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. attr_reader :tiers - - # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. sig { returns(T.nilable(String)) } + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. attr_reader :tiers_mode - - # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. sig { returns(T.nilable(TransformUsage)) } + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. attr_reader :transform_usage - - # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). sig { returns(T.nilable(Integer)) } + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). attr_reader :trial_period_days - - # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. sig { returns(String) } + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. attr_reader :usage_type - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/price.rbi b/rbi/stripe/resources/price.rbi index 59d7228ac..7e012570b 100644 --- a/rbi/stripe/resources/price.rbi +++ b/rbi/stripe/resources/price.rbi @@ -12,206 +12,152 @@ module Stripe class Price < APIResource class CurrencyOptions < Stripe::StripeObject class CustomUnitAmount < Stripe::StripeObject - # The maximum unit amount the customer can specify for this item. sig { returns(T.nilable(Integer)) } attr_reader :maximum - # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. sig { returns(T.nilable(Integer)) } attr_reader :minimum - # The starting unit amount which can be updated by the customer. sig { returns(T.nilable(Integer)) } attr_reader :preset end class Tier < Stripe::StripeObject - # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount - # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal - # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal - # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end - # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(CustomUnitAmount)) } attr_reader :custom_unit_amount - # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. sig { returns(T.nilable(String)) } attr_reader :tax_behavior - # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. sig { returns(T::Array[Tier]) } attr_reader :tiers - # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal end class CustomUnitAmount < Stripe::StripeObject - # The maximum unit amount the customer can specify for this item. sig { returns(T.nilable(Integer)) } attr_reader :maximum - # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. sig { returns(T.nilable(Integer)) } attr_reader :minimum - # The starting unit amount which can be updated by the customer. sig { returns(T.nilable(Integer)) } attr_reader :preset end class MigrateTo < Stripe::StripeObject - # The behavior controlling at what point in the subscription lifecycle to migrate the price sig { returns(String) } attr_reader :behavior - # The unix timestamp after at which subscriptions will start to migrate to the new price. sig { returns(Integer) } attr_reader :effective_after - # The id of the price being migrated to sig { returns(String) } attr_reader :price end class Recurring < Stripe::StripeObject - # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. sig { returns(T.nilable(String)) } attr_reader :aggregate_usage - # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval - # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. sig { returns(Integer) } attr_reader :interval_count - # The meter tracking the usage of a metered price sig { returns(T.nilable(String)) } attr_reader :meter - # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days - # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. sig { returns(String) } attr_reader :usage_type end class Tier < Stripe::StripeObject - # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount - # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal - # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal - # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end class TransformQuantity < Stripe::StripeObject - # Divide usage by this number. sig { returns(Integer) } attr_reader :divide_by - # After division, either round the result `up` or `down`. sig { returns(String) } attr_reader :round end - # Whether the price can be used for new purchases. sig { returns(T::Boolean) } + # Whether the price can be used for new purchases. attr_reader :active - - # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. sig { returns(String) } + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. attr_reader :billing_scheme - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). sig { returns(T::Hash[String, CurrencyOptions]) } + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency_options - - # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(CustomUnitAmount)) } + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_reader :custom_unit_amount - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. sig { returns(T.nilable(String)) } + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. attr_reader :lookup_key - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Subscriptions using this price will be migrated to use the new referenced price. sig { returns(T.nilable(MigrateTo)) } + # Subscriptions using this price will be migrated to use the new referenced price. attr_reader :migrate_to - - # A brief description of the price, hidden from customers. sig { returns(T.nilable(String)) } + # A brief description of the price, hidden from customers. attr_reader :nickname - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The ID of the product this price is associated with. sig { returns(T.any(String, Stripe::Product)) } + # The ID of the product this price is associated with. attr_reader :product - - # The recurring components of a price such as `interval` and `usage_type`. sig { returns(T.nilable(Recurring)) } + # The recurring components of a price such as `interval` and `usage_type`. attr_reader :recurring - - # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. sig { returns(T.nilable(String)) } + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. attr_reader :tax_behavior - - # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. sig { returns(T::Array[Tier]) } + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. attr_reader :tiers - - # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. sig { returns(T.nilable(String)) } + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. attr_reader :tiers_mode - - # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. sig { returns(T.nilable(TransformQuantity)) } + # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. attr_reader :transform_quantity - - # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. sig { returns(String) } + # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. attr_reader :type - - # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(Integer)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. attr_reader :unit_amount - - # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(String)) } + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. attr_reader :unit_amount_decimal - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/product.rbi b/rbi/stripe/resources/product.rbi index 3bae61c88..ce669dfed 100644 --- a/rbi/stripe/resources/product.rbi +++ b/rbi/stripe/resources/product.rbi @@ -13,130 +13,99 @@ module Stripe # and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) class Product < APIResource class MarketingFeature < Stripe::StripeObject - # The marketing feature name. Up to 80 characters long. sig { returns(String) } attr_reader :name end class PackageDimensions < Stripe::StripeObject - # Height, in inches. sig { returns(Float) } attr_reader :height - # Length, in inches. sig { returns(Float) } attr_reader :length - # Weight, in ounces. sig { returns(Float) } attr_reader :weight - # Width, in inches. sig { returns(Float) } attr_reader :width end class Provisioning < Stripe::StripeObject class GiftCard < Stripe::StripeObject class FixedAmount < Stripe::StripeObject - # The initial amount with which the provisioned gift card will be created. sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end - # Attribute for field fixed_amount sig { returns(T.nilable(FixedAmount)) } attr_reader :fixed_amount - # The specific type of gift_card provisioning, only `fixed_amount` currently supported. sig { returns(String) } attr_reader :type end - # Attribute for field gift_card sig { returns(T.nilable(GiftCard)) } attr_reader :gift_card - # The type of provisioning, only `gift_card` currently supported. sig { returns(String) } attr_reader :type end - # Whether the product is currently available for purchase. sig { returns(T::Boolean) } + # Whether the product is currently available for purchase. attr_reader :active - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. sig { returns(T.nilable(T.any(String, Stripe::Price))) } + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. attr_reader :default_price - - # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. sig { returns(T.nilable(String)) } + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. attr_reader :description - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. sig { returns(T::Array[String]) } + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. attr_reader :images - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). sig { returns(T::Array[MarketingFeature]) } + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). attr_reader :marketing_features - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The product's name, meant to be displayable to the customer. sig { returns(String) } + # The product's name, meant to be displayable to the customer. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The dimensions of this product for shipping purposes. sig { returns(T.nilable(PackageDimensions)) } + # The dimensions of this product for shipping purposes. attr_reader :package_dimensions - - # Provisioning configuration for this product. sig { returns(T.nilable(Provisioning)) } + # Provisioning configuration for this product. attr_reader :provisioning - - # Whether this product is shipped (i.e., physical goods). sig { returns(T.nilable(T::Boolean)) } + # Whether this product is shipped (i.e., physical goods). attr_reader :shippable - - # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. sig { returns(T.nilable(String)) } + # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. attr_reader :statement_descriptor - - # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. attr_reader :tax_code - - # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. sig { returns(String) } + # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. attr_reader :type - - # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. sig { returns(T.nilable(String)) } + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. attr_reader :unit_label - - # Time at which the object was last updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated - - # A URL of a publicly-accessible webpage for this product. sig { returns(T.nilable(String)) } + # A URL of a publicly-accessible webpage for this product. attr_reader :url - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/product_feature.rbi b/rbi/stripe/resources/product_feature.rbi index 09ad339bd..cdb0717a8 100644 --- a/rbi/stripe/resources/product_feature.rbi +++ b/rbi/stripe/resources/product_feature.rbi @@ -6,25 +6,21 @@ module Stripe # A product_feature represents an attachment between a feature and a product. # When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. class ProductFeature < APIResource + sig { returns(Stripe::Entitlements::Feature) } # A feature represents a monetizable ability or functionality in your system. # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. - sig { returns(Stripe::Entitlements::Feature) } attr_reader :entitlement_feature - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/promotion_code.rbi b/rbi/stripe/resources/promotion_code.rbi index 5e02944a0..4c84a56a7 100644 --- a/rbi/stripe/resources/promotion_code.rbi +++ b/rbi/stripe/resources/promotion_code.rbi @@ -8,75 +8,58 @@ module Stripe class PromotionCode < APIResource class Restrictions < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject - # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). sig { returns(Integer) } attr_reader :minimum_amount end - # Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options - # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices sig { returns(T::Boolean) } attr_reader :first_time_transaction - # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). sig { returns(T.nilable(Integer)) } attr_reader :minimum_amount - # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount sig { returns(T.nilable(String)) } attr_reader :minimum_amount_currency end - # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. sig { returns(T::Boolean) } + # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. attr_reader :active - - # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). sig { returns(String) } + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). attr_reader :code - + sig { returns(Stripe::Coupon) } # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). - sig { returns(Stripe::Coupon) } attr_reader :coupon - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The customer that this promotion code can be used by. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer that this promotion code can be used by. attr_reader :customer - - # Date at which the promotion code can no longer be redeemed. sig { returns(T.nilable(Integer)) } + # Date at which the promotion code can no longer be redeemed. attr_reader :expires_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Maximum number of times this promotion code can be redeemed. sig { returns(T.nilable(Integer)) } + # Maximum number of times this promotion code can be redeemed. attr_reader :max_redemptions - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field restrictions sig { returns(Restrictions) } + # Attribute for field restrictions attr_reader :restrictions - - # Number of times this promotion code has been used. sig { returns(Integer) } + # Number of times this promotion code has been used. attr_reader :times_redeemed end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi index e95cced4f..219e73629 100644 --- a/rbi/stripe/resources/quote.rbi +++ b/rbi/stripe/resources/quote.rbi @@ -8,40 +8,30 @@ module Stripe class Quote < APIResource class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Automatically calculate taxes sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability - # The status of the most recent automated tax calculation for this quote. sig { returns(T.nilable(String)) } attr_reader :status end class Computed < Stripe::StripeObject class LastReestimationDetails < Stripe::StripeObject class Failed < Stripe::StripeObject - # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field. sig { returns(T.nilable(String)) } attr_reader :failure_code - # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID". sig { returns(T.nilable(String)) } attr_reader :message - # The reason the reestimation failed. sig { returns(String) } attr_reader :reason end - # When `status` is `failed`, provides details about the quote reestimation failure. sig { returns(T.nilable(Failed)) } attr_reader :failed - # Latest status of the reestimation. sig { returns(String) } attr_reader :status end @@ -49,65 +39,43 @@ module Stripe class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts - # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end - # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount - # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping - # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax - # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end - # Total before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal - # Total after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total - # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval - # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. sig { returns(Integer) } attr_reader :interval_count - # Attribute for field total_details sig { returns(TotalDetails) } attr_reader :total_details end @@ -115,190 +83,134 @@ module Stripe class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts - # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end - # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount - # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping - # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax - # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end - # Total before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal - # Total after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total - # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. sig { returns(Stripe::ListObject) } attr_reader :line_items - # Attribute for field total_details sig { returns(TotalDetails) } attr_reader :total_details end - # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation. sig { returns(T.nilable(LastReestimationDetails)) } attr_reader :last_reestimation_details - # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. sig { returns(T.nilable(Recurring)) } attr_reader :recurring - # The time at which the quote's estimated schedules and upcoming invoices were generated. sig { returns(T.nilable(Integer)) } attr_reader :updated_at - # Attribute for field upfront sig { returns(Upfront) } attr_reader :upfront end class FromQuote < Stripe::StripeObject - # Whether this quote is a revision of a different quote. sig { returns(T::Boolean) } attr_reader :is_revision - # The quote that was cloned. sig { returns(T.any(String, Stripe::Quote)) } attr_reader :quote end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class StatusDetails < Stripe::StripeObject class Canceled < Stripe::StripeObject - # The reason this quote was marked as canceled. sig { returns(T.nilable(String)) } attr_reader :reason - # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :transitioned_at end class Stale < Stripe::StripeObject class LastReason < Stripe::StripeObject class LinesInvalid < Stripe::StripeObject - # The timestamp at which the lines were marked as invalid. sig { returns(Integer) } attr_reader :invalid_at - # The list of lines that became invalid at the given timestamp. sig { returns(T::Array[String]) } attr_reader :lines end class SubscriptionChanged < Stripe::StripeObject - # The subscription's state before the quote was marked as stale. sig { returns(T.nilable(Stripe::Subscription)) } attr_reader :previous_subscription end class SubscriptionScheduleChanged < Stripe::StripeObject - # The subscription schedule's state before the quote was marked as stale. sig { returns(T.nilable(Stripe::SubscriptionSchedule)) } attr_reader :previous_subscription_schedule end - # The ID of the line that is invalid if the stale reason type is `line_invalid`. sig { returns(String) } attr_reader :line_invalid - # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`. sig { returns(T::Array[LinesInvalid]) } attr_reader :lines_invalid - # The user supplied mark stale reason. sig { returns(T.nilable(String)) } attr_reader :marked_stale - # The ID of the subscription that was canceled. sig { returns(String) } attr_reader :subscription_canceled - # Attribute for field subscription_changed sig { returns(SubscriptionChanged) } attr_reader :subscription_changed - # The ID of the subscription that was expired. sig { returns(String) } attr_reader :subscription_expired - # The ID of the subscription schedule that was canceled. sig { returns(String) } attr_reader :subscription_schedule_canceled - # Attribute for field subscription_schedule_changed sig { returns(SubscriptionScheduleChanged) } attr_reader :subscription_schedule_changed - # The ID of the subscription schedule that was released. sig { returns(String) } attr_reader :subscription_schedule_released - # The reason the quote was marked as stale. sig { returns(T.nilable(String)) } attr_reader :type end - # Time at which the quote expires. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :expires_at - # The most recent reason this quote was marked as stale. sig { returns(T.nilable(LastReason)) } attr_reader :last_reason - # Time at which the stale reason was updated. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :last_updated_at - # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :transitioned_at end - # Attribute for field canceled sig { returns(Canceled) } attr_reader :canceled - # Attribute for field stale sig { returns(Stale) } attr_reader :stale end class StatusTransitions < Stripe::StripeObject - # The time that the quote was accepted. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :accepted_at - # The time that the quote was canceled. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - # The time that the quote was finalized. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at end @@ -306,427 +218,311 @@ module Stripe class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject - # Unique identifier for the object. sig { returns(String) } attr_reader :id end - # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed - # The timestamp the given line starts at. sig { returns(T.nilable(LineStartsAt)) } attr_reader :line_starts_at - # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The type of method to specify the `bill_from` time. sig { returns(String) } attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject - # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval - # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject - # Unique identifier for the object. sig { returns(String) } attr_reader :id end - # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed - # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration - # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at - # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The type of method to specify the `bill_until` time. sig { returns(String) } attr_reader :type end - # The start of the period to bill from when the Quote is accepted. sig { returns(T.nilable(BillFrom)) } attr_reader :bill_from - # The end of the period to bill until when the Quote is accepted. sig { returns(T.nilable(BillUntil)) } attr_reader :bill_until end class Prebilling < Stripe::StripeObject - # Attribute for field iterations sig { returns(Integer) } attr_reader :iterations end - # Describes the period to bill for upon accepting the quote. sig { returns(T.nilable(BillOnAcceptance)) } attr_reader :bill_on_acceptance - # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior - # Whether the subscription will always start a new billing period when the quote is accepted. sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor - # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description - # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :effective_date - # Behavior of the subscription schedule and underlying subscription when it ends. sig { returns(T.nilable(String)) } attr_reader :end_behavior - # The id of the subscription that will be updated when the quote is accepted. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :from_subscription - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling - # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. sig { returns(String) } attr_reader :proration_behavior - # Integer representing the number of trial period days before the customer is charged for the first time. sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days end class SubscriptionDataOverride < Stripe::StripeObject class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference - # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject - # Unique identifier for the object. sig { returns(String) } attr_reader :id end - # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed - # The timestamp the given line starts at. sig { returns(T.nilable(LineStartsAt)) } attr_reader :line_starts_at - # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The type of method to specify the `bill_from` time. sig { returns(String) } attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject - # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval - # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject - # Unique identifier for the object. sig { returns(String) } attr_reader :id end - # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed - # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration - # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at - # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The type of method to specify the `bill_until` time. sig { returns(String) } attr_reader :type end - # The start of the period to bill from when the Quote is accepted. sig { returns(T.nilable(BillFrom)) } attr_reader :bill_from - # The end of the period to bill until when the Quote is accepted. sig { returns(T.nilable(BillUntil)) } attr_reader :bill_until end - # Attribute for field applies_to sig { returns(AppliesTo) } attr_reader :applies_to - # Describes the period to bill for upon accepting the quote. sig { returns(T.nilable(BillOnAcceptance)) } attr_reader :bill_on_acceptance - # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior - # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. sig { returns(T.nilable(String)) } attr_reader :customer - # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description - # Behavior of the subscription schedule and underlying subscription when it ends. sig { returns(T.nilable(String)) } attr_reader :end_behavior - # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. sig { returns(T.nilable(String)) } attr_reader :proration_behavior end class SubscriptionSchedule < Stripe::StripeObject class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference - # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end - # Attribute for field applies_to sig { returns(AppliesTo) } attr_reader :applies_to - # The subscription schedule that was created or updated from this quote. sig { returns(String) } attr_reader :subscription_schedule end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - # The amount discounted. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts - # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end - # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount - # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping - # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax - # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end class TransferData < Stripe::StripeObject - # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. sig { returns(T.nilable(T::Boolean)) } + # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. attr_reader :allow_backdated_lines - - # Total before any discounts or taxes are applied. sig { returns(Integer) } + # Total before any discounts or taxes are applied. attr_reader :amount_subtotal - - # Total after discounts and taxes are applied. sig { returns(Integer) } + # Total after discounts and taxes are applied. attr_reader :amount_total - - # ID of the Connect Application that created the quote. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the quote. attr_reader :application - - # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. sig { returns(T.nilable(Integer)) } + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. attr_reader :application_fee_amount - - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. sig { returns(T.nilable(Float)) } + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. attr_reader :application_fee_percent - - # Attribute for field automatic_tax sig { returns(AutomaticTax) } + # Attribute for field automatic_tax attr_reader :automatic_tax - - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. attr_reader :collection_method - - # Attribute for field computed sig { returns(Computed) } + # Attribute for field computed attr_reader :computed - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. attr_reader :customer - - # The tax rates applied to this quote. sig { returns(T::Array[T.any(String, Stripe::TaxRate)]) } + # The tax rates applied to this quote. attr_reader :default_tax_rates - - # A description that will be displayed on the quote PDF. sig { returns(T.nilable(String)) } + # A description that will be displayed on the quote PDF. attr_reader :description - - # The discounts applied to this quote. sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to this quote. attr_reader :discounts - - # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. attr_reader :expires_at - - # A footer that will be displayed on the quote PDF. sig { returns(T.nilable(String)) } + # A footer that will be displayed on the quote PDF. attr_reader :footer - - # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. sig { returns(T.nilable(FromQuote)) } + # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. attr_reader :from_quote - - # A header that will be displayed on the quote PDF. sig { returns(T.nilable(String)) } + # A header that will be displayed on the quote PDF. attr_reader :header - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The invoice that was created from this quote. sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The invoice that was created from this quote. attr_reader :invoice - - # Attribute for field invoice_settings sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings attr_reader :invoice_settings - - # A list of items the customer is being quoted for. sig { returns(Stripe::ListObject) } + # A list of items the customer is being quoted for. attr_reader :line_items - - # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. sig { returns(T.nilable(T::Array[String])) } + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. attr_reader :lines - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). sig { returns(T.nilable(String)) } + # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). attr_reader :number - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. attr_reader :on_behalf_of - - # The status of the quote. sig { returns(String) } + # The status of the quote. attr_reader :status - - # Details on when and why a quote has been marked as stale or canceled. sig { returns(T.nilable(StatusDetails)) } + # Details on when and why a quote has been marked as stale or canceled. attr_reader :status_details - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # The subscription that was created or updated from this quote. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # The subscription that was created or updated from this quote. attr_reader :subscription - - # Attribute for field subscription_data sig { returns(SubscriptionData) } + # Attribute for field subscription_data attr_reader :subscription_data - - # List representing overrides for `subscription_data` configurations for specific subscription schedules. sig { returns(T.nilable(T::Array[SubscriptionDataOverride])) } + # List representing overrides for `subscription_data` configurations for specific subscription schedules. attr_reader :subscription_data_overrides - - # The subscription schedule that was created or updated from this quote. sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } + # The subscription schedule that was created or updated from this quote. attr_reader :subscription_schedule - - # The subscription schedules that were created or updated from this quote. sig { returns(T.nilable(T::Array[SubscriptionSchedule])) } + # The subscription schedules that were created or updated from this quote. attr_reader :subscription_schedules - - # ID of the test clock this quote belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this quote belongs to. attr_reader :test_clock - - # Attribute for field total_details sig { returns(TotalDetails) } + # Attribute for field total_details attr_reader :total_details - - # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. sig { returns(T.nilable(TransferData)) } + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. attr_reader :transfer_data end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_line.rbi b/rbi/stripe/resources/quote_line.rbi index cde0f468c..bdc5ec3e8 100644 --- a/rbi/stripe/resources/quote_line.rbi +++ b/rbi/stripe/resources/quote_line.rbi @@ -8,354 +8,260 @@ module Stripe class Action < Stripe::StripeObject class AddDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. sig { returns(T.nilable(Integer)) } attr_reader :index - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class AddItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to - # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price - # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity - # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates - # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class RemoveDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class RemoveItem < Stripe::StripeObject - # ID of a price to remove. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price end class SetDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class SetItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to - # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price - # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity - # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates - # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end - # Details for the `add_discount` type. sig { returns(T.nilable(AddDiscount)) } attr_reader :add_discount - # Details for the `add_item` type. sig { returns(T.nilable(AddItem)) } attr_reader :add_item - # Details for the `add_metadata` type: specify a hash of key-value pairs. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :add_metadata - # Details for the `remove_discount` type. sig { returns(T.nilable(RemoveDiscount)) } attr_reader :remove_discount - # Details for the `remove_item` type. sig { returns(T.nilable(RemoveItem)) } attr_reader :remove_item - # Details for the `remove_metadata` type: specify an array of metadata keys. sig { returns(T.nilable(T::Array[String])) } attr_reader :remove_metadata - # Details for the `set_discounts` type. sig { returns(T.nilable(T::Array[SetDiscount])) } attr_reader :set_discounts - # Details for the `set_items` type. sig { returns(T.nilable(T::Array[SetItem])) } attr_reader :set_items - # Details for the `set_metadata` type: specify an array of key-value pairs. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :set_metadata - # The type of action the quote line performs. sig { returns(String) } attr_reader :type end class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference - # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class CancelSubscriptionSchedule < Stripe::StripeObject - # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. sig { returns(String) } attr_reader :cancel_at - # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. sig { returns(T.nilable(T::Boolean)) } attr_reader :invoice_now - # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. sig { returns(T.nilable(T::Boolean)) } attr_reader :prorate end class EndsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The ID of a specific discount. sig { returns(String) } attr_reader :discount end class Duration < Stripe::StripeObject - # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval - # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end - # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `ends_at` field. For example, if `ends_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `ends_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `ends_at` is respecified. This field is guaranteed to be populated after quote acceptance. sig { returns(T.nilable(Integer)) } attr_reader :computed - # Use the `end` time of a given discount. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration - # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # Select a way to pass in `ends_at`. sig { returns(String) } attr_reader :type end class SetPauseCollection < Stripe::StripeObject class Set < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(Set)) } attr_reader :set - # Defines the type of the pause_collection behavior for the quote line. sig { returns(String) } attr_reader :type end class StartsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The ID of a specific discount. sig { returns(String) } attr_reader :discount end class LineEndsAt < Stripe::StripeObject - # Unique identifier for the object. sig { returns(String) } attr_reader :id end - # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `starts_at` field. For example, if `starts_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `starts_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `starts_at` is respecified. This field is guaranteed to be populated after quote acceptance. sig { returns(T.nilable(Integer)) } attr_reader :computed - # Use the `end` time of a given discount. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at - # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # Select a way to pass in `starts_at`. sig { returns(String) } attr_reader :type end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end - # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end - # A list of items the customer is being quoted for. sig { returns(T::Array[Action]) } + # A list of items the customer is being quoted for. attr_reader :actions - - # Details to identify the subscription schedule the quote line applies to. sig { returns(T.nilable(AppliesTo)) } + # Details to identify the subscription schedule the quote line applies to. attr_reader :applies_to - - # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. sig { returns(T.nilable(String)) } + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. attr_reader :billing_cycle_anchor - - # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. sig { returns(T.nilable(CancelSubscriptionSchedule)) } + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. attr_reader :cancel_subscription_schedule - - # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. sig { returns(T.nilable(EndsAt)) } + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. attr_reader :ends_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. sig { returns(T.nilable(String)) } + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. attr_reader :proration_behavior - - # Details to modify the pause_collection behavior of the subscription schedule. sig { returns(T.nilable(SetPauseCollection)) } + # Details to modify the pause_collection behavior of the subscription schedule. attr_reader :set_pause_collection - - # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. sig { returns(T.nilable(String)) } + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. attr_reader :set_schedule_end - - # Details to identify the earliest timestamp where the proposed change should take effect. sig { returns(T.nilable(StartsAt)) } + # Details to identify the earliest timestamp where the proposed change should take effect. attr_reader :starts_at - - # Settings related to subscription trials. sig { returns(T.nilable(TrialSettings)) } + # Settings related to subscription trials. attr_reader :trial_settings end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_invoice.rbi b/rbi/stripe/resources/quote_preview_invoice.rbi index ce57043cd..d4c8144c6 100644 --- a/rbi/stripe/resources/quote_preview_invoice.rbi +++ b/rbi/stripe/resources/quote_preview_invoice.rbi @@ -37,228 +37,140 @@ module Stripe # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) class QuotePreviewInvoice < APIResource class AmountsDue < Stripe::StripeObject - # Incremental amount due for this payment in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount - # The amount in cents (or local equivalent) that was paid for this payment. sig { returns(Integer) } attr_reader :amount_paid - # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_remaining - # Number of days from when invoice is finalized until the payment is due. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description - # Date on which a payment plan’s payment is due. sig { returns(T.nilable(Integer)) } attr_reader :due_date - # Timestamp when the payment was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at - # The status of the payment, one of `open`, `paid`, or `past_due` sig { returns(String) } attr_reader :status end class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference - # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability - # The status of the most recent automated tax calculation for this invoice. sig { returns(T.nilable(String)) } attr_reader :status end class CustomField < Stripe::StripeObject - # The name of the custom field. sig { returns(String) } attr_reader :name - # The value of the custom field. sig { returns(String) } attr_reader :value end class CustomerAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type - # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end class FromInvoice < Stripe::StripeObject - # The relation between this invoice and the cloned invoice sig { returns(String) } attr_reader :action - # The invoice that was cloned. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice end class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end class LastFinalizationError < Stripe::StripeObject - # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent - # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end @@ -266,53 +178,41 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject - # Whether Installments are enabled for this Invoice. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end - # Attribute for field installments sig { returns(Installments) } attr_reader :installments - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end - # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer - # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end - # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -322,323 +222,234 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end - # Attribute for field filters sig { returns(Filters) } attr_reader :filters - # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions - # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end - # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end - # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit - # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact - # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Card)) } attr_reader :card - # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance - # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer - # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Konbini)) } attr_reader :konbini - # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit - # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end - # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. sig { returns(T.nilable(String)) } attr_reader :default_mandate - # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject - # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. sig { returns(T.nilable(String)) } attr_reader :page_size end - # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display - # Invoice pdf rendering options sig { returns(T.nilable(Pdf)) } attr_reader :pdf - # ID of the rendering template that the invoice is formatted by. sig { returns(T.nilable(String)) } attr_reader :template - # Version of the rendering template that the invoice is using. sig { returns(T.nilable(Integer)) } attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount - # 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) sig { returns(Stripe::TaxRate) } attr_reader :rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal - # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax - # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total - # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate - # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject - # The time that the invoice draft was finalized. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at - # The time that the invoice was marked uncollectible. sig { returns(T.nilable(Integer)) } attr_reader :marked_uncollectible_at - # The time that the invoice was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at - # The time that the invoice was voided. sig { returns(T.nilable(Integer)) } attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior - # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. - # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject - # The IDs of the line items that triggered the threshold invoice. sig { returns(T::Array[String]) } attr_reader :line_item_ids - # The quantity threshold boundary that applied to the given line item. sig { returns(Integer) } attr_reader :usage_gte end - # The total invoice amount threshold boundary if it triggered the threshold invoice. sig { returns(T.nilable(Integer)) } attr_reader :amount_gte - # Indicates which line items triggered a threshold invoice. sig { returns(T::Array[ItemReason]) } attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount - # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount - # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount - # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction - # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount - # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin - # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TotalTaxAmount < Stripe::StripeObject - # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount - # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive - # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason - # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end class TransferData < Stripe::StripeObject - # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount - # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # The country of the business associated with this invoice, most often the business creating the invoice. sig { returns(T.nilable(String)) } + # The country of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_country - - # The public name of the business associated with this invoice, most often the business creating the invoice. sig { returns(T.nilable(String)) } + # The public name of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_name - - # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. attr_reader :account_tax_ids - - # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. sig { returns(Integer) } + # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. attr_reader :amount_due - - # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. sig { returns(Integer) } + # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. attr_reader :amount_overpaid - - # The amount, in cents (or local equivalent), that was paid. sig { returns(Integer) } + # The amount, in cents (or local equivalent), that was paid. attr_reader :amount_paid - - # The difference between amount_due and amount_paid, in cents (or local equivalent). sig { returns(Integer) } + # The difference between amount_due and amount_paid, in cents (or local equivalent). attr_reader :amount_remaining - - # This is the sum of all the shipping amounts. sig { returns(Integer) } + # This is the sum of all the shipping amounts. attr_reader :amount_shipping - - # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. sig { returns(T.nilable(T::Array[AmountsDue])) } + # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. attr_reader :amounts_due - - # ID of the Connect Application that created the invoice. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the invoice. attr_reader :application - - # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. sig { returns(T.nilable(Integer)) } + # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. attr_reader :application_fee_amount - - # Attribute for field applies_to sig { returns(AppliesTo) } + # Attribute for field applies_to attr_reader :applies_to - - # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. sig { returns(Integer) } + # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. attr_reader :attempt_count - - # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. sig { returns(T::Boolean) } + # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. attr_reader :attempted - - # Attribute for field automatic_tax sig { returns(AutomaticTax) } + # Attribute for field automatic_tax attr_reader :automatic_tax - - # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. sig { returns(T.nilable(Integer)) } + # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. attr_reader :automatically_finalizes_at - + sig { returns(T.nilable(String)) } # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -648,281 +459,212 @@ module Stripe # * `subscription_threshold`: A subscription reached a billing threshold. # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. - sig { returns(T.nilable(String)) } attr_reader :billing_reason - - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. attr_reader :collection_method - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Custom fields displayed on the invoice. sig { returns(T.nilable(T::Array[CustomField])) } + # Custom fields displayed on the invoice. attr_reader :custom_fields - - # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(CustomerAddress)) } + # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_address - - # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(String)) } + # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_email - - # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(String)) } + # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_name - - # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(String)) } + # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_phone - - # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(CustomerShipping)) } + # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_shipping - - # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(String)) } + # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_exempt - - # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. sig { returns(T.nilable(T::Array[CustomerTaxId])) } + # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. attr_reader :customer_tax_ids - - # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } + # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. attr_reader :default_margins - - # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. attr_reader :default_payment_method - - # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source - - # The tax rates applied to this invoice, if any. sig { returns(T::Array[Stripe::TaxRate]) } + # The tax rates applied to this invoice, if any. attr_reader :default_tax_rates - - # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. attr_reader :description - - # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. attr_reader :discount - - # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - - # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. sig { returns(T.nilable(Integer)) } + # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. attr_reader :due_date - - # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. sig { returns(T.nilable(Integer)) } + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. attr_reader :effective_at - - # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. sig { returns(T.nilable(Integer)) } + # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. attr_reader :ending_balance - - # Footer displayed on the invoice. sig { returns(T.nilable(String)) } + # Footer displayed on the invoice. attr_reader :footer - - # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. sig { returns(T.nilable(FromInvoice)) } + # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. attr_reader :from_invoice - - # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. sig { returns(String) } + # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. attr_reader :id - - # Attribute for field issuer sig { returns(Issuer) } + # Attribute for field issuer attr_reader :issuer - - # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. sig { returns(T.nilable(LastFinalizationError)) } + # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. attr_reader :last_finalization_error - - # The ID of the most recent non-draft revision of this invoice sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The ID of the most recent non-draft revision of this invoice attr_reader :latest_revision - - # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. sig { returns(Stripe::ListObject) } + # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. attr_reader :lines - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. sig { returns(T.nilable(Integer)) } + # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. attr_reader :next_payment_attempt - - # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. sig { returns(T.nilable(String)) } + # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. attr_reader :number - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. attr_reader :on_behalf_of - - # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. sig { returns(T::Boolean) } + # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. attr_reader :paid - - # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. sig { returns(T::Boolean) } + # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. attr_reader :paid_out_of_band - - # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. attr_reader :payment_intent - - # Attribute for field payment_settings sig { returns(PaymentSettings) } + # Attribute for field payment_settings attr_reader :payment_settings - - # Payments for this invoice sig { returns(Stripe::ListObject) } + # Payments for this invoice attr_reader :payments - - # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. sig { returns(Integer) } + # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_end - - # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. sig { returns(Integer) } + # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. attr_reader :period_start - - # Total amount of all post-payment credit notes issued for this invoice. sig { returns(Integer) } + # Total amount of all post-payment credit notes issued for this invoice. attr_reader :post_payment_credit_notes_amount - - # Total amount of all pre-payment credit notes issued for this invoice. sig { returns(Integer) } + # Total amount of all pre-payment credit notes issued for this invoice. attr_reader :pre_payment_credit_notes_amount - - # The quote this invoice was generated from. sig { returns(T.nilable(T.any(String, Stripe::Quote))) } + # The quote this invoice was generated from. attr_reader :quote - - # This is the transaction number that appears on email receipts sent for this invoice. sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this invoice. attr_reader :receipt_number - - # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. sig { returns(T.nilable(Rendering)) } + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. attr_reader :rendering - - # The details of the cost of shipping, including the ShippingRate applied on the invoice. sig { returns(T.nilable(ShippingCost)) } + # The details of the cost of shipping, including the ShippingRate applied on the invoice. attr_reader :shipping_cost - - # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. sig { returns(T.nilable(ShippingDetails)) } + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. attr_reader :shipping_details - - # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. sig { returns(Integer) } + # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. attr_reader :starting_balance - - # Extra information about an invoice for the customer's credit card statement. sig { returns(T.nilable(String)) } + # Extra information about an invoice for the customer's credit card statement. attr_reader :statement_descriptor - - # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) sig { returns(T.nilable(String)) } + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # Attribute for field subscription sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # Attribute for field subscription attr_reader :subscription - - # Details about the subscription that created this invoice. sig { returns(T.nilable(SubscriptionDetails)) } + # Details about the subscription that created this invoice. attr_reader :subscription_details - - # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. sig { returns(Integer) } + # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. attr_reader :subscription_proration_date - - # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated sig { returns(Integer) } + # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated attr_reader :subtotal - - # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated attr_reader :subtotal_excluding_tax - - # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. sig { returns(T.nilable(Integer)) } + # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. attr_reader :tax - - # ID of the test clock this invoice belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this invoice belongs to. attr_reader :test_clock - - # Attribute for field threshold_reason sig { returns(ThresholdReason) } + # Attribute for field threshold_reason attr_reader :threshold_reason - - # Total after discounts and taxes. sig { returns(Integer) } + # Total after discounts and taxes. attr_reader :total - - # The aggregate amounts calculated per discount across all line items. sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } + # The aggregate amounts calculated per discount across all line items. attr_reader :total_discount_amounts - - # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. sig { returns(T.nilable(Integer)) } + # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. attr_reader :total_excluding_tax - - # The aggregate amounts calculated per margin across all line items. sig { returns(T.nilable(T::Array[TotalMarginAmount])) } + # The aggregate amounts calculated per margin across all line items. attr_reader :total_margin_amounts - - # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } + # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. attr_reader :total_pretax_credit_amounts - - # The aggregate amounts calculated per tax rate for all line items. sig { returns(T::Array[TotalTaxAmount]) } + # The aggregate amounts calculated per tax rate for all line items. attr_reader :total_tax_amounts - - # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. sig { returns(T.nilable(TransferData)) } + # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. attr_reader :transfer_data - - # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. sig { returns(T.nilable(Integer)) } + # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. attr_reader :webhooks_delivered_at end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi index cc8aceac1..f834292c8 100644 --- a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +++ b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi @@ -5,123 +5,92 @@ module Stripe class QuotePreviewSubscriptionSchedule < APIResource class AppliesTo < Stripe::StripeObject - # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference - # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule - # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class CurrentPhase < Stripe::StripeObject - # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date - # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Whether Stripe automatically computes tax on invoices created during this phase. + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax - # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(String) } attr_reader :billing_cycle_anchor - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method - # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method - # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description - # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings - # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - # The original price to be migrated. sig { returns(String) } attr_reader :source_price - # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end - # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at - # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions - # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end @@ -129,361 +98,265 @@ module Stripe class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end - # The stackable discounts that will be applied to the item. sig { returns(T::Array[Discount]) } attr_reader :discounts - # ID of the price used to generate the invoice item. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price - # The quantity of the invoice item. sig { returns(T.nilable(Integer)) } attr_reader :quantity - # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Whether Stripe automatically computes tax on invoices created during this phase. + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject - # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to - # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end - # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # ID of the plan to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Plan)) } attr_reader :plan - # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price - # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity - # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates - # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end - # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end - # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. sig { returns(T::Array[AddInvoiceItem]) } attr_reader :add_invoice_items - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax - # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method - # ID of the coupon to use during this phase of the subscription schedule. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method - # The default tax rates to apply to the subscription during this phase of the subscription schedule. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :default_tax_rates - # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description - # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts - # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date - # The invoice settings applicable during this phase. sig { returns(T.nilable(InvoiceSettings)) } attr_reader :invoice_settings - # Subscription items to configure the subscription to during this phase of the subscription schedule. sig { returns(T::Array[Item]) } attr_reader :items - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection - # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. sig { returns(String) } attr_reader :proration_behavior - # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date - # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - # Specify behavior of the trial when crossing schedule phase boundaries sig { returns(T.nilable(String)) } attr_reader :trial_continuation - # When the trial ends within the phase. sig { returns(T.nilable(Integer)) } attr_reader :trial_end - # Settings related to any trials on the subscription during this phase. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class Prebilling < Stripe::StripeObject - # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice - # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end - # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start - # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end - # ID of the Connect Application that created the schedule. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the schedule. attr_reader :application - - # Attribute for field applies_to sig { returns(AppliesTo) } + # Attribute for field applies_to attr_reader :applies_to - - # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_reader :billing_behavior - - # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at - - # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. attr_reader :completed_at - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. sig { returns(T.nilable(CurrentPhase)) } + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. attr_reader :current_phase - - # ID of the customer who owns the subscription schedule. sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription schedule. attr_reader :customer - - # Attribute for field default_settings sig { returns(DefaultSettings) } + # Attribute for field default_settings attr_reader :default_settings - - # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. sig { returns(String) } + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. attr_reader :end_behavior - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Details of the most recent price migration that failed for the subscription schedule. sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription schedule. attr_reader :last_price_migration_error - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Configuration for the subscription schedule's phases. sig { returns(T::Array[Phase]) } + # Configuration for the subscription schedule's phases. attr_reader :phases - - # Time period and invoice for a Subscription billed in advance. sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling - - # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. attr_reader :released_at - - # ID of the subscription once managed by the subscription schedule (if it is released). sig { returns(T.nilable(String)) } + # ID of the subscription once managed by the subscription schedule (if it is released). attr_reader :released_subscription - - # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). sig { returns(String) } + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). attr_reader :status - - # ID of the subscription managed by the subscription schedule. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # ID of the subscription managed by the subscription schedule. attr_reader :subscription - - # ID of the test clock this subscription schedule belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription schedule belongs to. attr_reader :test_clock end end \ No newline at end of file diff --git a/rbi/stripe/resources/radar/early_fraud_warning.rbi b/rbi/stripe/resources/radar/early_fraud_warning.rbi index afeffa4e6..5908a679c 100644 --- a/rbi/stripe/resources/radar/early_fraud_warning.rbi +++ b/rbi/stripe/resources/radar/early_fraud_warning.rbi @@ -9,36 +9,29 @@ module Stripe # # Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) class EarlyFraudWarning < APIResource - # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. sig { returns(T::Boolean) } + # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. attr_reader :actionable - - # ID of the charge this early fraud warning is for, optionally expanded. sig { returns(T.any(String, Stripe::Charge)) } + # ID of the charge this early fraud warning is for, optionally expanded. attr_reader :charge - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. sig { returns(String) } + # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. attr_reader :fraud_type - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # ID of the Payment Intent this early fraud warning is for, optionally expanded. sig { returns(T.any(String, Stripe::PaymentIntent)) } + # ID of the Payment Intent this early fraud warning is for, optionally expanded. attr_reader :payment_intent end end diff --git a/rbi/stripe/resources/radar/value_list.rbi b/rbi/stripe/resources/radar/value_list.rbi index e0bc8afd4..8d38f344b 100644 --- a/rbi/stripe/resources/radar/value_list.rbi +++ b/rbi/stripe/resources/radar/value_list.rbi @@ -8,48 +8,38 @@ module Stripe # # Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) class ValueList < APIResource - # The name of the value list for use in rules. sig { returns(String) } + # The name of the value list for use in rules. attr_reader :alias - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The name or email address of the user who created this value list. sig { returns(String) } + # The name or email address of the user who created this value list. attr_reader :created_by - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. sig { returns(String) } + # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. attr_reader :item_type - - # List of items contained within this value list. sig { returns(Stripe::ListObject) } + # List of items contained within this value list. attr_reader :list_items - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The name of the value list. sig { returns(String) } + # The name of the value list. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end diff --git a/rbi/stripe/resources/radar/value_list_item.rbi b/rbi/stripe/resources/radar/value_list_item.rbi index cc54eeaf9..6b9e595c1 100644 --- a/rbi/stripe/resources/radar/value_list_item.rbi +++ b/rbi/stripe/resources/radar/value_list_item.rbi @@ -8,36 +8,29 @@ module Stripe # # Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) class ValueListItem < APIResource - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The name or email address of the user who added this item to the value list. sig { returns(String) } + # The name or email address of the user who added this item to the value list. attr_reader :created_by - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The value of the item. sig { returns(String) } + # The value of the item. attr_reader :value - - # The identifier of the value list this item belongs to. sig { returns(String) } + # The identifier of the value list this item belongs to. attr_reader :value_list - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end diff --git a/rbi/stripe/resources/refund.rbi b/rbi/stripe/resources/refund.rbi index 2b174d4b3..fdd1fc9e1 100644 --- a/rbi/stripe/resources/refund.rbi +++ b/rbi/stripe/resources/refund.rbi @@ -17,35 +17,26 @@ module Stripe class AmazonPay < Stripe::StripeObject; end class AuBankTransfer < Stripe::StripeObject; end class Blik < Stripe::StripeObject - # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. sig { returns(T.nilable(String)) } attr_reader :network_decline_code - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class BrBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Card < Stripe::StripeObject - # Value of the reference number assigned to the refund. sig { returns(String) } attr_reader :reference - # Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(String) } attr_reader :reference_status - # Type of the reference number assigned to the refund. sig { returns(String) } attr_reader :reference_type - # The type of refund. This can be `refund`, `reversal`, or `pending`. sig { returns(String) } attr_reader :type end @@ -53,61 +44,47 @@ module Stripe class CustomerCashBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject; end class EuBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class GbBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class JpBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Klarna < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class MxBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class P24 < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end @@ -117,236 +94,171 @@ module Stripe class Revolut < Stripe::StripeObject; end class Sofort < Stripe::StripeObject; end class Swish < Stripe::StripeObject - # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. sig { returns(T.nilable(String)) } attr_reader :network_decline_code - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class ThBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class UsBankTransfer < Stripe::StripeObject - # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference - # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm - # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay - # Attribute for field alma sig { returns(Alma) } attr_reader :alma - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field au_bank_transfer sig { returns(AuBankTransfer) } attr_reader :au_bank_transfer - # Attribute for field blik sig { returns(Blik) } attr_reader :blik - # Attribute for field br_bank_transfer sig { returns(BrBankTransfer) } attr_reader :br_bank_transfer - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp - # Attribute for field customer_cash_balance sig { returns(CustomerCashBalance) } attr_reader :customer_cash_balance - # Attribute for field eps sig { returns(Eps) } attr_reader :eps - # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer - # Attribute for field gb_bank_transfer sig { returns(GbBankTransfer) } attr_reader :gb_bank_transfer - # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay - # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay - # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - # Attribute for field jp_bank_transfer sig { returns(JpBankTransfer) } attr_reader :jp_bank_transfer - # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna - # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco - # Attribute for field mx_bank_transfer sig { returns(MxBankTransfer) } attr_reader :mx_bank_transfer - # Attribute for field p24 sig { returns(P24) } attr_reader :p24 - # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field pix sig { returns(Pix) } attr_reader :pix - # Attribute for field revolut sig { returns(Revolut) } attr_reader :revolut - # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort - # Attribute for field swish sig { returns(Swish) } attr_reader :swish - # Attribute for field th_bank_transfer sig { returns(ThBankTransfer) } attr_reader :th_bank_transfer - # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_transfer sig { returns(UsBankTransfer) } attr_reader :us_bank_transfer - # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay - # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class NextAction < Stripe::StripeObject class DisplayDetails < Stripe::StripeObject class EmailSent < Stripe::StripeObject - # The timestamp when the email was sent. sig { returns(Integer) } attr_reader :email_sent_at - # The recipient's email address. sig { returns(String) } attr_reader :email_sent_to end - # Attribute for field email_sent sig { returns(EmailSent) } attr_reader :email_sent - # The expiry timestamp. sig { returns(Integer) } attr_reader :expires_at end - # Attribute for field display_details sig { returns(DisplayDetails) } attr_reader :display_details - # Type of the next action to perform. sig { returns(String) } attr_reader :type end - # Amount, in cents (or local equivalent). sig { returns(Integer) } + # Amount, in cents (or local equivalent). attr_reader :amount - - # Balance transaction that describes the impact on your account balance. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction - - # ID of the charge that's refunded. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the charge that's refunded. attr_reader :charge - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). sig { returns(String) } + # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). attr_reader :description - - # Attribute for field destination_details sig { returns(DestinationDetails) } + # Attribute for field destination_details attr_reader :destination_details - - # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. sig { returns(T.any(String, Stripe::BalanceTransaction)) } + # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. attr_reader :failure_balance_transaction - - # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. sig { returns(String) } + # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. attr_reader :failure_reason - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. sig { returns(String) } + # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. attr_reader :instructions_email - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Attribute for field next_action sig { returns(NextAction) } + # Attribute for field next_action attr_reader :next_action - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # ID of the PaymentIntent that's refunded. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } + # ID of the PaymentIntent that's refunded. attr_reader :payment_intent - - # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). sig { returns(T.nilable(String)) } + # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). attr_reader :reason - - # This is the transaction number that appears on email receipts sent for this refund. sig { returns(T.nilable(String)) } + # This is the transaction number that appears on email receipts sent for this refund. attr_reader :receipt_number - - # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } + # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. attr_reader :source_transfer_reversal - - # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). sig { returns(T.nilable(String)) } + # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). attr_reader :status - - # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } + # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. attr_reader :transfer_reversal end end \ No newline at end of file diff --git a/rbi/stripe/resources/reporting/report_run.rbi b/rbi/stripe/resources/reporting/report_run.rbi index 9c395519d..c9a65293e 100644 --- a/rbi/stripe/resources/reporting/report_run.rbi +++ b/rbi/stripe/resources/reporting/report_run.rbi @@ -14,74 +14,57 @@ module Stripe # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). class ReportRun < APIResource class Parameters < Stripe::StripeObject - # The set of output columns requested for inclusion in the report run. sig { returns(T::Array[String]) } attr_reader :columns - # Connected account ID by which to filter the report run. sig { returns(String) } attr_reader :connected_account - # Currency of objects to be included in the report run. sig { returns(String) } attr_reader :currency - # Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. sig { returns(Integer) } attr_reader :interval_end - # Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. sig { returns(Integer) } attr_reader :interval_start - # Payout ID by which to filter the report run. sig { returns(String) } attr_reader :payout - # Category of balance transactions to be included in the report run. sig { returns(String) } attr_reader :reporting_category - # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. sig { returns(String) } attr_reader :timezone end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - + sig { returns(T.nilable(String)) } # If something should go wrong during the run, a message about the failure (populated when # `status=failed`). - sig { returns(T.nilable(String)) } attr_reader :error - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # `true` if the report is run on live mode data and `false` if it is run on test mode data. sig { returns(T::Boolean) } + # `true` if the report is run on live mode data and `false` if it is run on test mode data. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field parameters sig { returns(Parameters) } + # Attribute for field parameters attr_reader :parameters - - # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. sig { returns(String) } + # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. attr_reader :report_type - + sig { returns(T.nilable(Stripe::File)) } # The file object representing the result of the report run (populated when # `status=succeeded`). - sig { returns(T.nilable(Stripe::File)) } attr_reader :result - + sig { returns(String) } # Status of this report run. This will be `pending` when the run is initially created. # When the run finishes, this will be set to `succeeded` and the `result` field will be populated. # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. - sig { returns(String) } attr_reader :status - + sig { returns(T.nilable(Integer)) } # Timestamp at which this run successfully finished (populated when # `status=succeeded`). Measured in seconds since the Unix epoch. - sig { returns(T.nilable(Integer)) } attr_reader :succeeded_at end end diff --git a/rbi/stripe/resources/reporting/report_type.rbi b/rbi/stripe/resources/reporting/report_type.rbi index adaa3dfdb..b8e3c9782 100644 --- a/rbi/stripe/resources/reporting/report_type.rbi +++ b/rbi/stripe/resources/reporting/report_type.rbi @@ -13,40 +13,32 @@ module Stripe # Note that certain report types can only be run based on your live-mode data (not test-mode # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). class ReportType < APIResource - # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. attr_reader :data_available_end - - # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. attr_reader :data_available_start - - # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) sig { returns(T.nilable(T::Array[String])) } + # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) attr_reader :default_columns - - # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. sig { returns(String) } + # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Human-readable name of the Report Type sig { returns(String) } + # Human-readable name of the Report Type attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # When this Report Type was latest updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # When this Report Type was latest updated. Measured in seconds since the Unix epoch. attr_reader :updated - - # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. sig { returns(Integer) } + # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. attr_reader :version end end diff --git a/rbi/stripe/resources/reserve_transaction.rbi b/rbi/stripe/resources/reserve_transaction.rbi index d6676f703..5bec97e5b 100644 --- a/rbi/stripe/resources/reserve_transaction.rbi +++ b/rbi/stripe/resources/reserve_transaction.rbi @@ -4,24 +4,20 @@ # typed: true module Stripe class ReserveTransaction < APIResource - # Attribute for field amount sig { returns(Integer) } + # Attribute for field amount attr_reader :amount - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/reversal.rbi b/rbi/stripe/resources/reversal.rbi index 04a7e5537..bc5c1f4eb 100644 --- a/rbi/stripe/resources/reversal.rbi +++ b/rbi/stripe/resources/reversal.rbi @@ -17,44 +17,35 @@ module Stripe # # Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) class Reversal < APIResource - # Amount, in cents (or local equivalent). sig { returns(Integer) } + # Amount, in cents (or local equivalent). attr_reader :amount - - # Balance transaction that describes the impact on your account balance. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact on your account balance. attr_reader :balance_transaction - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Linked payment refund for the transfer reversal. sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # Linked payment refund for the transfer reversal. attr_reader :destination_payment_refund - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # ID of the refund responsible for the transfer reversal. sig { returns(T.nilable(T.any(String, Stripe::Refund))) } + # ID of the refund responsible for the transfer reversal. attr_reader :source_refund - - # ID of the transfer that was reversed. sig { returns(T.any(String, Stripe::Transfer)) } + # ID of the transfer that was reversed. attr_reader :transfer end end \ No newline at end of file diff --git a/rbi/stripe/resources/review.rbi b/rbi/stripe/resources/review.rbi index da7ab09f2..ea0280f45 100644 --- a/rbi/stripe/resources/review.rbi +++ b/rbi/stripe/resources/review.rbi @@ -9,90 +9,68 @@ module Stripe # [here](https://stripe.com/docs/radar/reviews). class Review < APIResource class IpAddressLocation < Stripe::StripeObject - # The city where the payment originated. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter ISO code representing the country where the payment originated. sig { returns(T.nilable(String)) } attr_reader :country - # The geographic latitude where the payment originated. sig { returns(T.nilable(Float)) } attr_reader :latitude - # The geographic longitude where the payment originated. sig { returns(T.nilable(Float)) } attr_reader :longitude - # The state/county/province/region where the payment originated. sig { returns(T.nilable(String)) } attr_reader :region end class Session < Stripe::StripeObject - # The browser used in this browser session (e.g., `Chrome`). sig { returns(T.nilable(String)) } attr_reader :browser - # Information about the device used for the browser session (e.g., `Samsung SM-G930T`). sig { returns(T.nilable(String)) } attr_reader :device - # The platform for the browser session (e.g., `Macintosh`). sig { returns(T.nilable(String)) } attr_reader :platform - # The version for the browser session (e.g., `61.0.3163.100`). sig { returns(T.nilable(String)) } attr_reader :version end - # The ZIP or postal code of the card used, if applicable. sig { returns(T.nilable(String)) } + # The ZIP or postal code of the card used, if applicable. attr_reader :billing_zip - - # The charge associated with this review. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # The charge associated with this review. attr_reader :charge - - # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. sig { returns(T.nilable(String)) } + # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. attr_reader :closed_reason - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The IP address where the payment originated. sig { returns(T.nilable(String)) } + # The IP address where the payment originated. attr_reader :ip_address - - # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. sig { returns(T.nilable(IpAddressLocation)) } + # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. attr_reader :ip_address_location - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # If `true`, the review needs action. sig { returns(T::Boolean) } + # If `true`, the review needs action. attr_reader :open - - # The reason the review was opened. One of `rule` or `manual`. sig { returns(String) } + # The reason the review was opened. One of `rule` or `manual`. attr_reader :opened_reason - - # The PaymentIntent ID associated with this review, if one exists. sig { returns(T.any(String, Stripe::PaymentIntent)) } + # The PaymentIntent ID associated with this review, if one exists. attr_reader :payment_intent - - # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. sig { returns(String) } + # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. attr_reader :reason - - # Information related to the browsing session of the user who initiated the payment. sig { returns(T.nilable(Session)) } + # Information related to the browsing session of the user who initiated the payment. attr_reader :session end end \ No newline at end of file diff --git a/rbi/stripe/resources/setup_attempt.rbi b/rbi/stripe/resources/setup_attempt.rbi index 7ab5b6ea4..22ce6eaf5 100644 --- a/rbi/stripe/resources/setup_attempt.rbi +++ b/rbi/stripe/resources/setup_attempt.rbi @@ -14,177 +14,120 @@ module Stripe class AuBecsDebit < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject; end class Bancontact < Stripe::StripeObject - # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Preferred language of the Bancontact authorization page that the customer is redirected to. - # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language - # Owner's verified full name. Values are verified or provided by Bancontact directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Boleto < Stripe::StripeObject; end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check - # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check - # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end class ThreeDSecure < Stripe::StripeObject - # For authenticated transactions: how the customer was authenticated by - # the issuing bank. sig { returns(T.nilable(String)) } attr_reader :authentication_flow - # The Electronic Commerce Indicator (ECI). A protocol-level field - # indicating what degree of authentication was performed. sig { returns(T.nilable(String)) } attr_reader :electronic_commerce_indicator - # Indicates the outcome of 3D Secure authentication. sig { returns(T.nilable(String)) } attr_reader :result - # Additional information about why 3D Secure succeeded or failed based - # on the `result`. sig { returns(T.nilable(String)) } attr_reader :result_reason - # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID - # (dsTransId) for this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id - # The version of 3D Secure that was used. sig { returns(T.nilable(String)) } attr_reader :version end class Wallet < Stripe::StripeObject class ApplePay < Stripe::StripeObject; end class GooglePay < Stripe::StripeObject; end - # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay - # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay - # The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type end - # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand - # Check results by Card networks on Card address and CVC at the time of authorization sig { returns(T.nilable(Checks)) } attr_reader :checks - # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country - # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description - # Two-digit number representing the card's expiration month. sig { returns(T.nilable(Integer)) } attr_reader :exp_month - # Four-digit number representing the card's expiration year. sig { returns(T.nilable(Integer)) } attr_reader :exp_year - # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - # - # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding - # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin - # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer - # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 - # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network - # Populated if this authorization used 3D Secure authentication. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure - # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at - # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end - # The ID of the Card PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_card - # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline end class Cashapp < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - # Bank where the account is located. sig { returns(T.nilable(String)) } attr_reader :bank - # Local bank code of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject - # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank - # The Bank Identifier Code of the customer's bank. sig { returns(T.nilable(String)) } attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Owner's verified full name. Values are verified or provided by iDEAL directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end @@ -197,244 +140,149 @@ module Stripe class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic - # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit - # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate - # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Preferred language of the Sofort authorization page that the customer is redirected to. - # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language - # Owner's verified full name. Values are verified or provided by Sofort directly - # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class UsBankAccount < Stripe::StripeObject; end - # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit - # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact - # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present - # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp - # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal - # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay - # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna - # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field payto sig { returns(Payto) } attr_reader :payto - # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay - # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit - # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort - # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class SetupError < Stripe::StripeObject - # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent - # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end - # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. attr_reader :application - + sig { returns(T::Boolean) } # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - sig { returns(T::Boolean) } attr_reader :attach_to_self - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. attr_reader :customer - + sig { returns(T.nilable(T::Array[String])) } # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - sig { returns(T.nilable(T::Array[String])) } attr_reader :flow_directions - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. attr_reader :on_behalf_of - - # ID of the payment method used with this SetupAttempt. sig { returns(T.any(String, Stripe::PaymentMethod)) } + # ID of the payment method used with this SetupAttempt. attr_reader :payment_method - - # Attribute for field payment_method_details sig { returns(PaymentMethodDetails) } + # Attribute for field payment_method_details attr_reader :payment_method_details - - # The error encountered during this attempt to confirm the SetupIntent, if any. sig { returns(T.nilable(SetupError)) } + # The error encountered during this attempt to confirm the SetupIntent, if any. attr_reader :setup_error - - # ID of the SetupIntent that this attempt belongs to. sig { returns(T.any(String, Stripe::SetupIntent)) } + # ID of the SetupIntent that this attempt belongs to. attr_reader :setup_intent - - # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. sig { returns(String) } + # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. attr_reader :status - - # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. sig { returns(String) } + # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. attr_reader :usage end end \ No newline at end of file diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi index 314181d3e..a677d1516 100644 --- a/rbi/stripe/resources/setup_intent.rbi +++ b/rbi/stripe/resources/setup_intent.rbi @@ -26,477 +26,325 @@ module Stripe # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) class SetupIntent < APIResource class AutomaticPaymentMethods < Stripe::StripeObject - # Controls whether this SetupIntent will accept redirect-based payment methods. - # - # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. sig { returns(String) } attr_reader :allow_redirects - # Automatically calculates compatible payment methods sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end class LastSetupError < Stripe::StripeObject - # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge - # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code - # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code - # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url - # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message - # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code - # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code - # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param - # A PaymentIntent guides you through the process of collecting a payment from your customer. - # We recommend that you create exactly one PaymentIntent for each order or - # customer session in your system. You can reference the PaymentIntent later to - # see the history of payment attempts for a particular session. - # - # A PaymentIntent transitions through - # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - # throughout its lifetime as it interfaces with Stripe.js to perform - # authentication flows and ultimately creates at most one successful charge. - # - # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method - # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type - # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url - # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - # - # Create a SetupIntent when you're ready to collect your customer's payment credentials. - # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. - # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides - # you through the setup process. - # - # Successful SetupIntents result in payment credentials that are optimized for future payments. - # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through - # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection - # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), - # it automatically attaches the resulting payment method to that Customer after successful setup. - # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on - # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. - # - # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. - # - # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent - # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source - # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end class NextAction < Stripe::StripeObject class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - # The date (unix timestamp) when the QR code expires. sig { returns(Integer) } attr_reader :expires_at - # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png - # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end - # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. sig { returns(String) } attr_reader :hosted_instructions_url - # The url for mobile redirect based auth sig { returns(String) } attr_reader :mobile_auth_url - # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end class RedirectToUrl < Stripe::StripeObject - # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url - # The URL you must redirect your customer to in order to authenticate. sig { returns(T.nilable(String)) } attr_reader :url end class VerifyWithMicrodeposits < Stripe::StripeObject - # The timestamp when the microdeposits are expected to land. sig { returns(Integer) } attr_reader :arrival_date - # The URL for the hosted verification page, which allows customers to verify their bank account. sig { returns(String) } attr_reader :hosted_verification_url - # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. sig { returns(T.nilable(String)) } attr_reader :microdeposit_type end - # Attribute for field cashapp_handle_redirect_or_display_qr_code sig { returns(CashappHandleRedirectOrDisplayQrCode) } attr_reader :cashapp_handle_redirect_or_display_qr_code - # Attribute for field redirect_to_url sig { returns(RedirectToUrl) } attr_reader :redirect_to_url - # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. sig { returns(String) } attr_reader :type - # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. sig { returns(T::Hash[String, T.untyped]) } attr_reader :use_stripe_sdk - # Attribute for field verify_with_microdeposits sig { returns(VerifyWithMicrodeposits) } attr_reader :verify_with_microdeposits end class PaymentMethodConfigurationDetails < Stripe::StripeObject - # ID of the payment method configuration used. sig { returns(String) } attr_reader :id - # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url - # List of Stripe products where this mandate can be selected automatically. sig { returns(T::Array[String]) } attr_reader :default_for - # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description - # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule - # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end - # Currency supported by the bank account sig { returns(T.nilable(String)) } attr_reader :currency - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class AmazonPay < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount to be charged for future payments. sig { returns(Integer) } attr_reader :amount - # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(String) } attr_reader :amount_type - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description - # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. sig { returns(T.nilable(Integer)) } attr_reader :end_date - # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. sig { returns(String) } attr_reader :interval - # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. sig { returns(T.nilable(Integer)) } attr_reader :interval_count - # Unique identifier for the mandate or subscription. sig { returns(String) } attr_reader :reference - # Start date of the mandate or subscription. Start date should not be lesser than yesterday. sig { returns(Integer) } attr_reader :start_date - # Specifies the type of mandates supported. Possible values are `india`. sig { returns(T.nilable(T::Array[String])) } attr_reader :supported_types end - # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } attr_reader :mandate_options - # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CardPresent < Stripe::StripeObject; end class Link < Stripe::StripeObject - # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token end class Paypal < Stripe::StripeObject - # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. sig { returns(T.nilable(String)) } attr_reader :billing_agreement_id - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency - # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount - # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type - # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date - # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule - # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period - # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose - # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject; end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject - # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end - # Attribute for field filters sig { returns(Filters) } attr_reader :filters - # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry - # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions - # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch - # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end class MandateOptions < Stripe::StripeObject - # Mandate collection method sig { returns(String) } attr_reader :collection_method end - # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end - # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit - # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay - # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit - # Attribute for field card sig { returns(Card) } attr_reader :card - # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present - # Attribute for field link sig { returns(Link) } attr_reader :link - # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal - # Attribute for field payto sig { returns(Payto) } attr_reader :payto - # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end - # ID of the Connect application that created the SetupIntent. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect application that created the SetupIntent. attr_reader :application - + sig { returns(T::Boolean) } # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - sig { returns(T::Boolean) } attr_reader :attach_to_self - - # Settings for dynamic payment methods compatible with this Setup Intent sig { returns(T.nilable(AutomaticPaymentMethods)) } + # Settings for dynamic payment methods compatible with this Setup Intent attr_reader :automatic_payment_methods - - # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. sig { returns(T.nilable(String)) } + # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. attr_reader :cancellation_reason - + sig { returns(T.nilable(String)) } # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. - sig { returns(T.nilable(String)) } attr_reader :client_secret - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # ID of the Customer this SetupIntent belongs to, if one exists. # # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - + sig { returns(T.nilable(T::Array[String])) } # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - sig { returns(T.nilable(T::Array[String])) } attr_reader :flow_directions - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The error encountered in the previous SetupIntent confirmation. sig { returns(T.nilable(LastSetupError)) } + # The error encountered in the previous SetupIntent confirmation. attr_reader :last_setup_error - - # The most recent SetupAttempt for this SetupIntent. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } + # The most recent SetupAttempt for this SetupIntent. attr_reader :latest_attempt - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # ID of the multi use Mandate generated by the SetupIntent. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + # ID of the multi use Mandate generated by the SetupIntent. attr_reader :mandate - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # If present, this property tells you what actions you need to take in order for your customer to continue payment setup. sig { returns(T.nilable(NextAction)) } + # If present, this property tells you what actions you need to take in order for your customer to continue payment setup. attr_reader :next_action - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account (if any) for which the setup is intended. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) for which the setup is intended. attr_reader :on_behalf_of - - # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. attr_reader :payment_method - - # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } + # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. attr_reader :payment_method_configuration_details - - # Payment method-specific configuration for this SetupIntent. sig { returns(T.nilable(PaymentMethodOptions)) } + # Payment method-specific configuration for this SetupIntent. attr_reader :payment_method_options - - # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. sig { returns(T::Array[String]) } + # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. attr_reader :payment_method_types - - # ID of the single_use Mandate generated by the SetupIntent. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } + # ID of the single_use Mandate generated by the SetupIntent. attr_reader :single_use_mandate - - # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. sig { returns(String) } + # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. attr_reader :status - + sig { returns(String) } # Indicates how the payment method is intended to be used in the future. # # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. - sig { returns(String) } attr_reader :usage end end \ No newline at end of file diff --git a/rbi/stripe/resources/shipping_rate.rbi b/rbi/stripe/resources/shipping_rate.rbi index afdcd928c..1b9b2c058 100644 --- a/rbi/stripe/resources/shipping_rate.rbi +++ b/rbi/stripe/resources/shipping_rate.rbi @@ -8,93 +8,71 @@ module Stripe class ShippingRate < APIResource class DeliveryEstimate < Stripe::StripeObject class Maximum < Stripe::StripeObject - # A unit of time. sig { returns(String) } attr_reader :unit - # Must be greater than 0. sig { returns(Integer) } attr_reader :value end class Minimum < Stripe::StripeObject - # A unit of time. sig { returns(String) } attr_reader :unit - # Must be greater than 0. sig { returns(Integer) } attr_reader :value end - # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. sig { returns(T.nilable(Maximum)) } attr_reader :maximum - # The lower bound of the estimated range. If empty, represents no lower bound. sig { returns(T.nilable(Minimum)) } attr_reader :minimum end class FixedAmount < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject - # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :amount - # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. sig { returns(String) } attr_reader :tax_behavior end - # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options end - # Whether the shipping rate can be used for new purchases. Defaults to `true`. sig { returns(T::Boolean) } + # Whether the shipping rate can be used for new purchases. Defaults to `true`. attr_reader :active - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. sig { returns(T.nilable(DeliveryEstimate)) } + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. attr_reader :delivery_estimate - - # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. sig { returns(T.nilable(String)) } + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. attr_reader :display_name - - # Attribute for field fixed_amount sig { returns(FixedAmount) } + # Attribute for field fixed_amount attr_reader :fixed_amount - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. sig { returns(T.nilable(String)) } + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. attr_reader :tax_behavior - - # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. attr_reader :tax_code - - # The type of calculation to use on the shipping rate. sig { returns(String) } + # The type of calculation to use on the shipping rate. attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/sigma/scheduled_query_run.rbi b/rbi/stripe/resources/sigma/scheduled_query_run.rbi index 8e12a1c57..18025847d 100644 --- a/rbi/stripe/resources/sigma/scheduled_query_run.rbi +++ b/rbi/stripe/resources/sigma/scheduled_query_run.rbi @@ -10,52 +10,41 @@ module Stripe # retrieve the query results. class ScheduledQueryRun < APIResource class Error < Stripe::StripeObject - # Information about the run failure. sig { returns(String) } attr_reader :message end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # When the query was run, Sigma contained a snapshot of your Stripe data at this time. sig { returns(Integer) } + # When the query was run, Sigma contained a snapshot of your Stripe data at this time. attr_reader :data_load_time - - # Attribute for field error sig { returns(Error) } + # Attribute for field error attr_reader :error - - # The file object representing the results of the query. sig { returns(T.nilable(Stripe::File)) } + # The file object representing the results of the query. attr_reader :file - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Time at which the result expires and is no longer available for download. sig { returns(Integer) } + # Time at which the result expires and is no longer available for download. attr_reader :result_available_until - - # SQL for the query. sig { returns(String) } + # SQL for the query. attr_reader :sql - - # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. sig { returns(String) } + # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. attr_reader :status - - # Title of the query. sig { returns(String) } + # Title of the query. attr_reader :title end end diff --git a/rbi/stripe/resources/source.rbi b/rbi/stripe/resources/source.rbi index 8ae072ca0..9116e3446 100644 --- a/rbi/stripe/resources/source.rbi +++ b/rbi/stripe/resources/source.rbi @@ -15,930 +15,655 @@ module Stripe # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). class Source < APIResource class AchCreditTransfer < Stripe::StripeObject - # Attribute for field account_number sig { returns(T.nilable(String)) } attr_reader :account_number - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name - # Attribute for field refund_account_holder_type sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_type - # Attribute for field refund_routing_number sig { returns(T.nilable(String)) } attr_reader :refund_routing_number - # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number - # Attribute for field swift_code sig { returns(T.nilable(String)) } attr_reader :swift_code end class AchDebit < Stripe::StripeObject - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country - # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 - # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number - # Attribute for field type sig { returns(T.nilable(String)) } attr_reader :type end class AcssDebit < Stripe::StripeObject - # Attribute for field bank_address_city sig { returns(T.nilable(String)) } attr_reader :bank_address_city - # Attribute for field bank_address_line_1 sig { returns(T.nilable(String)) } attr_reader :bank_address_line_1 - # Attribute for field bank_address_line_2 sig { returns(T.nilable(String)) } attr_reader :bank_address_line_2 - # Attribute for field bank_address_postal_code sig { returns(T.nilable(String)) } attr_reader :bank_address_postal_code - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field category sig { returns(T.nilable(String)) } attr_reader :category - # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country - # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 - # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number end class Alipay < Stripe::StripeObject - # Attribute for field data_string sig { returns(T.nilable(String)) } attr_reader :data_string - # Attribute for field native_url sig { returns(T.nilable(String)) } attr_reader :native_url - # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class AuBecsDebit < Stripe::StripeObject - # Attribute for field bsb_number sig { returns(T.nilable(String)) } attr_reader :bsb_number - # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 end class Bancontact < Stripe::StripeObject - # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic - # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Attribute for field preferred_language sig { returns(T.nilable(String)) } attr_reader :preferred_language - # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Card < Stripe::StripeObject - # Attribute for field address_line1_check sig { returns(T.nilable(String)) } attr_reader :address_line1_check - # Attribute for field address_zip_check sig { returns(T.nilable(String)) } attr_reader :address_zip_check - # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand - # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country - # Attribute for field cvc_check sig { returns(T.nilable(String)) } attr_reader :cvc_check - # Attribute for field description sig { returns(String) } attr_reader :description - # Attribute for field dynamic_last4 sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 - # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month - # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year - # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint - # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding - # Attribute for field iin sig { returns(String) } attr_reader :iin - # Attribute for field issuer sig { returns(String) } attr_reader :issuer - # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 - # Attribute for field name sig { returns(T.nilable(String)) } attr_reader :name - # Attribute for field three_d_secure sig { returns(String) } attr_reader :three_d_secure - # Attribute for field tokenization_method sig { returns(T.nilable(String)) } attr_reader :tokenization_method end class CardPresent < Stripe::StripeObject - # Attribute for field application_cryptogram sig { returns(String) } attr_reader :application_cryptogram - # Attribute for field application_preferred_name sig { returns(String) } attr_reader :application_preferred_name - # Attribute for field authorization_code sig { returns(T.nilable(String)) } attr_reader :authorization_code - # Attribute for field authorization_response_code sig { returns(String) } attr_reader :authorization_response_code - # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand - # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country - # Attribute for field cvm_type sig { returns(String) } attr_reader :cvm_type - # Attribute for field data_type sig { returns(T.nilable(String)) } attr_reader :data_type - # Attribute for field dedicated_file_name sig { returns(String) } attr_reader :dedicated_file_name - # Attribute for field description sig { returns(String) } attr_reader :description - # Attribute for field emv_auth_data sig { returns(String) } attr_reader :emv_auth_data - # Attribute for field evidence_customer_signature sig { returns(T.nilable(String)) } attr_reader :evidence_customer_signature - # Attribute for field evidence_transaction_certificate sig { returns(T.nilable(String)) } attr_reader :evidence_transaction_certificate - # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month - # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year - # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint - # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding - # Attribute for field iin sig { returns(String) } attr_reader :iin - # Attribute for field issuer sig { returns(String) } attr_reader :issuer - # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 - # Attribute for field pos_device_id sig { returns(T.nilable(String)) } attr_reader :pos_device_id - # Attribute for field pos_entry_mode sig { returns(String) } attr_reader :pos_entry_mode - # Attribute for field read_method sig { returns(T.nilable(String)) } attr_reader :read_method - # Attribute for field reader sig { returns(T.nilable(String)) } attr_reader :reader - # Attribute for field terminal_verification_results sig { returns(String) } attr_reader :terminal_verification_results - # Attribute for field transaction_status_information sig { returns(String) } attr_reader :transaction_status_information end class CodeVerification < Stripe::StripeObject - # The number of attempts remaining to authenticate the source object with a verification code. sig { returns(Integer) } attr_reader :attempts_remaining - # The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). sig { returns(String) } attr_reader :status end class Eps < Stripe::StripeObject - # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference - # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Giropay < Stripe::StripeObject - # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic - # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Ideal < Stripe::StripeObject - # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank - # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic - # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Klarna < Stripe::StripeObject - # Attribute for field background_image_url sig { returns(String) } attr_reader :background_image_url - # Attribute for field client_token sig { returns(T.nilable(String)) } attr_reader :client_token - # Attribute for field first_name sig { returns(String) } attr_reader :first_name - # Attribute for field last_name sig { returns(String) } attr_reader :last_name - # Attribute for field locale sig { returns(String) } attr_reader :locale - # Attribute for field logo_url sig { returns(String) } attr_reader :logo_url - # Attribute for field page_title sig { returns(String) } attr_reader :page_title - # Attribute for field pay_later_asset_urls_descriptive sig { returns(String) } attr_reader :pay_later_asset_urls_descriptive - # Attribute for field pay_later_asset_urls_standard sig { returns(String) } attr_reader :pay_later_asset_urls_standard - # Attribute for field pay_later_name sig { returns(String) } attr_reader :pay_later_name - # Attribute for field pay_later_redirect_url sig { returns(String) } attr_reader :pay_later_redirect_url - # Attribute for field pay_now_asset_urls_descriptive sig { returns(String) } attr_reader :pay_now_asset_urls_descriptive - # Attribute for field pay_now_asset_urls_standard sig { returns(String) } attr_reader :pay_now_asset_urls_standard - # Attribute for field pay_now_name sig { returns(String) } attr_reader :pay_now_name - # Attribute for field pay_now_redirect_url sig { returns(String) } attr_reader :pay_now_redirect_url - # Attribute for field pay_over_time_asset_urls_descriptive sig { returns(String) } attr_reader :pay_over_time_asset_urls_descriptive - # Attribute for field pay_over_time_asset_urls_standard sig { returns(String) } attr_reader :pay_over_time_asset_urls_standard - # Attribute for field pay_over_time_name sig { returns(String) } attr_reader :pay_over_time_name - # Attribute for field pay_over_time_redirect_url sig { returns(String) } attr_reader :pay_over_time_redirect_url - # Attribute for field payment_method_categories sig { returns(String) } attr_reader :payment_method_categories - # Attribute for field purchase_country sig { returns(String) } attr_reader :purchase_country - # Attribute for field purchase_type sig { returns(String) } attr_reader :purchase_type - # Attribute for field redirect_url sig { returns(String) } attr_reader :redirect_url - # Attribute for field shipping_delay sig { returns(Integer) } attr_reader :shipping_delay - # Attribute for field shipping_first_name sig { returns(String) } attr_reader :shipping_first_name - # Attribute for field shipping_last_name sig { returns(String) } attr_reader :shipping_last_name end class Multibanco < Stripe::StripeObject - # Attribute for field entity sig { returns(T.nilable(String)) } attr_reader :entity - # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference - # Attribute for field refund_account_holder_address_city sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_city - # Attribute for field refund_account_holder_address_country sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_country - # Attribute for field refund_account_holder_address_line1 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line1 - # Attribute for field refund_account_holder_address_line2 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line2 - # Attribute for field refund_account_holder_address_postal_code sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_postal_code - # Attribute for field refund_account_holder_address_state sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_state - # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name - # Attribute for field refund_iban sig { returns(T.nilable(String)) } attr_reader :refund_iban end class Owner < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class VerifiedAddress < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Owner's address. sig { returns(T.nilable(Address)) } attr_reader :address - # Owner's email address. sig { returns(T.nilable(String)) } attr_reader :email - # Owner's full name. sig { returns(T.nilable(String)) } attr_reader :name - # Owner's phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(VerifiedAddress)) } attr_reader :verified_address - # Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email - # Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name - # Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_phone end class P24 < Stripe::StripeObject - # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference end class Paypal < Stripe::StripeObject - # Attribute for field billing_agreement sig { returns(T.nilable(String)) } attr_reader :billing_agreement - # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Attribute for field payer_id sig { returns(T.nilable(String)) } attr_reader :payer_id - # Attribute for field reference_id sig { returns(String) } attr_reader :reference_id - # Attribute for field reference_transaction_amount sig { returns(String) } attr_reader :reference_transaction_amount - # Attribute for field reference_transaction_charged sig { returns(T::Boolean) } attr_reader :reference_transaction_charged - # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - # Attribute for field transaction_id sig { returns(String) } attr_reader :transaction_id - # Attribute for field verified_email sig { returns(T.nilable(String)) } attr_reader :verified_email end class Receiver < Stripe::StripeObject - # The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. sig { returns(T.nilable(String)) } attr_reader :address - # The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_charged - # The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_received - # The total amount that was returned to the customer. The amount returned is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_returned - # Type of refund attribute method, one of `email`, `manual`, or `none`. sig { returns(String) } attr_reader :refund_attributes_method - # Type of refund attribute status, one of `missing`, `requested`, or `available`. sig { returns(String) } attr_reader :refund_attributes_status end class Redirect < Stripe::StripeObject - # The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_reason - # The URL you provide to redirect the customer to after they authenticated their payment. sig { returns(String) } attr_reader :return_url - # The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). sig { returns(String) } attr_reader :status - # The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. sig { returns(String) } attr_reader :url end class SepaCreditTransfer < Stripe::StripeObject - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic - # Attribute for field iban sig { returns(T.nilable(String)) } attr_reader :iban - # Attribute for field refund_account_holder_address_city sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_city - # Attribute for field refund_account_holder_address_country sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_country - # Attribute for field refund_account_holder_address_line1 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line1 - # Attribute for field refund_account_holder_address_line2 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line2 - # Attribute for field refund_account_holder_address_postal_code sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_postal_code - # Attribute for field refund_account_holder_address_state sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_state - # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name - # Attribute for field refund_iban sig { returns(T.nilable(String)) } attr_reader :refund_iban end class SepaDebit < Stripe::StripeObject - # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code - # Attribute for field branch_code sig { returns(T.nilable(String)) } attr_reader :branch_code - # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country - # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 - # Attribute for field mandate_reference sig { returns(T.nilable(String)) } attr_reader :mandate_reference - # Attribute for field mandate_url sig { returns(T.nilable(String)) } attr_reader :mandate_url end class Sofort < Stripe::StripeObject - # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code - # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name - # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic - # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country - # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 - # Attribute for field preferred_language sig { returns(T.nilable(String)) } attr_reader :preferred_language - # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class SourceOrder < Stripe::StripeObject class Item < Stripe::StripeObject - # The amount (price) for this order item. sig { returns(T.nilable(Integer)) } attr_reader :amount - # This currency of this order item. Required when `amount` is present. sig { returns(T.nilable(String)) } attr_reader :currency - # Human-readable description for this order item. sig { returns(T.nilable(String)) } attr_reader :description - # The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). sig { returns(T.nilable(String)) } attr_reader :parent - # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. sig { returns(Integer) } attr_reader :quantity - # The type of this order item. Must be `sku`, `tax`, or `shipping`. sig { returns(T.nilable(String)) } attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier - # Recipient name. sig { returns(String) } attr_reader :name - # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone - # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end - # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. sig { returns(Integer) } attr_reader :amount - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # The email address of the customer placing the order. sig { returns(String) } attr_reader :email - # List of items constituting the order. sig { returns(T.nilable(T::Array[Item])) } attr_reader :items - # Attribute for field shipping sig { returns(Shipping) } attr_reader :shipping end class ThreeDSecure < Stripe::StripeObject - # Attribute for field address_line1_check sig { returns(T.nilable(String)) } attr_reader :address_line1_check - # Attribute for field address_zip_check sig { returns(T.nilable(String)) } attr_reader :address_zip_check - # Attribute for field authenticated sig { returns(T.nilable(T::Boolean)) } attr_reader :authenticated - # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand - # Attribute for field card sig { returns(T.nilable(String)) } attr_reader :card - # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country - # Attribute for field customer sig { returns(T.nilable(String)) } attr_reader :customer - # Attribute for field cvc_check sig { returns(T.nilable(String)) } attr_reader :cvc_check - # Attribute for field description sig { returns(String) } attr_reader :description - # Attribute for field dynamic_last4 sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 - # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month - # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year - # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint - # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding - # Attribute for field iin sig { returns(String) } attr_reader :iin - # Attribute for field issuer sig { returns(String) } attr_reader :issuer - # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 - # Attribute for field name sig { returns(T.nilable(String)) } attr_reader :name - # Attribute for field three_d_secure sig { returns(String) } attr_reader :three_d_secure - # Attribute for field tokenization_method sig { returns(T.nilable(String)) } attr_reader :tokenization_method end class Wechat < Stripe::StripeObject - # Attribute for field prepay_id sig { returns(String) } attr_reader :prepay_id - # Attribute for field qr_code_url sig { returns(T.nilable(String)) } attr_reader :qr_code_url - # Attribute for field statement_descriptor sig { returns(String) } attr_reader :statement_descriptor end - # Attribute for field ach_credit_transfer sig { returns(AchCreditTransfer) } + # Attribute for field ach_credit_transfer attr_reader :ach_credit_transfer - - # Attribute for field ach_debit sig { returns(AchDebit) } + # Attribute for field ach_debit attr_reader :ach_debit - - # Attribute for field acss_debit sig { returns(AcssDebit) } + # Attribute for field acss_debit attr_reader :acss_debit - - # Attribute for field alipay sig { returns(Alipay) } + # Attribute for field alipay attr_reader :alipay - - # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. sig { returns(T.nilable(Integer)) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. attr_reader :amount - - # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } + # Attribute for field au_becs_debit attr_reader :au_becs_debit - - # Attribute for field bancontact sig { returns(Bancontact) } + # Attribute for field bancontact attr_reader :bancontact - - # Attribute for field card sig { returns(Card) } + # Attribute for field card attr_reader :card - - # Attribute for field card_present sig { returns(CardPresent) } + # Attribute for field card_present attr_reader :card_present - - # The client secret of the source. Used for client-side retrieval using a publishable key. sig { returns(String) } + # The client secret of the source. Used for client-side retrieval using a publishable key. attr_reader :client_secret - - # Attribute for field code_verification sig { returns(CodeVerification) } + # Attribute for field code_verification attr_reader :code_verification - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. sig { returns(T.nilable(String)) } + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. attr_reader :currency - - # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. sig { returns(String) } + # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. attr_reader :customer - - # Attribute for field eps sig { returns(Eps) } + # Attribute for field eps attr_reader :eps - - # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. sig { returns(String) } + # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. attr_reader :flow - - # Attribute for field giropay sig { returns(Giropay) } + # Attribute for field giropay attr_reader :giropay - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Attribute for field ideal sig { returns(Ideal) } + # Attribute for field ideal attr_reader :ideal - - # Attribute for field klarna sig { returns(Klarna) } + # Attribute for field klarna attr_reader :klarna - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Attribute for field multibanco sig { returns(Multibanco) } + # Attribute for field multibanco attr_reader :multibanco - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Information about the owner of the payment instrument that may be used or required by particular source types. sig { returns(T.nilable(Owner)) } + # Information about the owner of the payment instrument that may be used or required by particular source types. attr_reader :owner - - # Attribute for field p24 sig { returns(P24) } + # Attribute for field p24 attr_reader :p24 - - # Attribute for field paypal sig { returns(Paypal) } + # Attribute for field paypal attr_reader :paypal - - # Attribute for field receiver sig { returns(Receiver) } + # Attribute for field receiver attr_reader :receiver - - # Attribute for field redirect sig { returns(Redirect) } + # Attribute for field redirect attr_reader :redirect - - # Attribute for field sepa_credit_transfer sig { returns(SepaCreditTransfer) } + # Attribute for field sepa_credit_transfer attr_reader :sepa_credit_transfer - - # Attribute for field sepa_debit sig { returns(SepaDebit) } + # Attribute for field sepa_debit attr_reader :sepa_debit - - # Attribute for field sofort sig { returns(Sofort) } + # Attribute for field sofort attr_reader :sofort - - # Attribute for field source_order sig { returns(SourceOrder) } + # Attribute for field source_order attr_reader :source_order - - # Extra information about a source. This will appear on your customer's statement every time you charge the source. sig { returns(T.nilable(String)) } + # Extra information about a source. This will appear on your customer's statement every time you charge the source. attr_reader :statement_descriptor - - # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. sig { returns(String) } + # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. attr_reader :status - - # Attribute for field three_d_secure sig { returns(ThreeDSecure) } + # Attribute for field three_d_secure attr_reader :three_d_secure - - # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. sig { returns(String) } + # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. attr_reader :type - - # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. sig { returns(T.nilable(String)) } + # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. attr_reader :usage - - # Attribute for field wechat sig { returns(Wechat) } + # Attribute for field wechat attr_reader :wechat end end \ No newline at end of file diff --git a/rbi/stripe/resources/source_mandate_notification.rbi b/rbi/stripe/resources/source_mandate_notification.rbi index c998cb439..75df160c6 100644 --- a/rbi/stripe/resources/source_mandate_notification.rbi +++ b/rbi/stripe/resources/source_mandate_notification.rbi @@ -8,62 +8,49 @@ module Stripe # deliver an email to the customer. class SourceMandateNotification < APIResource class AcssDebit < Stripe::StripeObject - # The statement descriptor associate with the debit. sig { returns(String) } attr_reader :statement_descriptor end class BacsDebit < Stripe::StripeObject - # Last 4 digits of the account number associated with the debit. sig { returns(String) } attr_reader :last4 end class SepaDebit < Stripe::StripeObject - # SEPA creditor ID. sig { returns(String) } attr_reader :creditor_identifier - # Last 4 digits of the account number associated with the debit. sig { returns(String) } attr_reader :last4 - # Mandate reference associated with the debit. sig { returns(String) } attr_reader :mandate_reference end - # Attribute for field acss_debit sig { returns(AcssDebit) } + # Attribute for field acss_debit attr_reader :acss_debit - - # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. sig { returns(T.nilable(Integer)) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. attr_reader :amount - - # Attribute for field bacs_debit sig { returns(BacsDebit) } + # Attribute for field bacs_debit attr_reader :bacs_debit - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. sig { returns(String) } + # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. attr_reader :reason - - # Attribute for field sepa_debit sig { returns(SepaDebit) } + # Attribute for field sepa_debit attr_reader :sepa_debit - + sig { returns(Stripe::Source) } # `Source` objects allow you to accept a variety of payment methods. They # represent a customer's payment instrument, and can be used with the Stripe API # just like a `Card` object: once chargeable, they can be charged, or can be @@ -74,15 +61,12 @@ module Stripe # This newer API provides access to our latest features and payment method types. # # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). - sig { returns(Stripe::Source) } attr_reader :source - - # The status of the mandate notification. Valid statuses are `pending` or `submitted`. sig { returns(String) } + # The status of the mandate notification. Valid statuses are `pending` or `submitted`. attr_reader :status - - # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. sig { returns(String) } + # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/source_transaction.rbi b/rbi/stripe/resources/source_transaction.rbi index c16822192..7345a49f6 100644 --- a/rbi/stripe/resources/source_transaction.rbi +++ b/rbi/stripe/resources/source_transaction.rbi @@ -9,132 +9,98 @@ module Stripe # transactions. class SourceTransaction < StripeObject class AchCreditTransfer < Stripe::StripeObject - # Customer data associated with the transfer. sig { returns(String) } attr_reader :customer_data - # Bank account fingerprint associated with the transfer. sig { returns(String) } attr_reader :fingerprint - # Last 4 digits of the account number associated with the transfer. sig { returns(String) } attr_reader :last4 - # Routing number associated with the transfer. sig { returns(String) } attr_reader :routing_number end class ChfCreditTransfer < Stripe::StripeObject - # Reference associated with the transfer. sig { returns(String) } attr_reader :reference - # Sender's country address. sig { returns(String) } attr_reader :sender_address_country - # Sender's line 1 address. sig { returns(String) } attr_reader :sender_address_line1 - # Sender's bank account IBAN. sig { returns(String) } attr_reader :sender_iban - # Sender's name. sig { returns(String) } attr_reader :sender_name end class GbpCreditTransfer < Stripe::StripeObject - # Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. sig { returns(String) } attr_reader :fingerprint - # The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. sig { returns(String) } attr_reader :funding_method - # Last 4 digits of sender account number associated with the transfer. sig { returns(String) } attr_reader :last4 - # Sender entered arbitrary information about the transfer. sig { returns(String) } attr_reader :reference - # Sender account number associated with the transfer. sig { returns(String) } attr_reader :sender_account_number - # Sender name associated with the transfer. sig { returns(String) } attr_reader :sender_name - # Sender sort code associated with the transfer. sig { returns(String) } attr_reader :sender_sort_code end class PaperCheck < Stripe::StripeObject - # Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. sig { returns(String) } attr_reader :available_at - # Comma-separated list of invoice IDs associated with the paper check. sig { returns(String) } attr_reader :invoices end class SepaCreditTransfer < Stripe::StripeObject - # Reference associated with the transfer. sig { returns(String) } attr_reader :reference - # Sender's bank account IBAN. sig { returns(String) } attr_reader :sender_iban - # Sender's name. sig { returns(String) } attr_reader :sender_name end - # Attribute for field ach_credit_transfer sig { returns(AchCreditTransfer) } + # Attribute for field ach_credit_transfer attr_reader :ach_credit_transfer - - # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. sig { returns(Integer) } + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. attr_reader :amount - - # Attribute for field chf_credit_transfer sig { returns(ChfCreditTransfer) } + # Attribute for field chf_credit_transfer attr_reader :chf_credit_transfer - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # Attribute for field gbp_credit_transfer sig { returns(GbpCreditTransfer) } + # Attribute for field gbp_credit_transfer attr_reader :gbp_credit_transfer - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field paper_check sig { returns(PaperCheck) } + # Attribute for field paper_check attr_reader :paper_check - - # Attribute for field sepa_credit_transfer sig { returns(SepaCreditTransfer) } + # Attribute for field sepa_credit_transfer attr_reader :sepa_credit_transfer - - # The ID of the source this transaction is attached to. sig { returns(String) } + # The ID of the source this transaction is attached to. attr_reader :source - - # The status of the transaction, one of `succeeded`, `pending`, or `failed`. sig { returns(String) } + # The status of the transaction, one of `succeeded`, `pending`, or `failed`. attr_reader :status - - # The type of source this transaction is attached to. sig { returns(String) } + # The type of source this transaction is attached to. attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi index 5e44d61ff..8ffa4cce4 100644 --- a/rbi/stripe/resources/subscription.rbi +++ b/rbi/stripe/resources/subscription.rbi @@ -9,96 +9,73 @@ module Stripe class Subscription < APIResource class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Whether Stripe automatically computes tax on this subscription. + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingCycleAnchorConfig < Stripe::StripeObject - # The day of the month of the billing_cycle_anchor. sig { returns(Integer) } attr_reader :day_of_month - # The hour of the day of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :hour - # The minute of the hour of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :minute - # The month to start full cycle billing periods. sig { returns(T.nilable(Integer)) } attr_reader :month - # The second of the minute of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :second end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class CancellationDetails < Stripe::StripeObject - # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. sig { returns(T.nilable(String)) } attr_reader :comment - # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. sig { returns(T.nilable(String)) } attr_reader :feedback - # Why this subscription was canceled. sig { returns(T.nilable(String)) } attr_reader :reason end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - # The original price to be migrated. sig { returns(String) } attr_reader :source_price - # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end - # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at - # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions - # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior - # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end @@ -106,62 +83,47 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject - # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - # Amount to be charged for future payments. sig { returns(T.nilable(Integer)) } attr_reader :amount - # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(T.nilable(String)) } attr_reader :amount_type - # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description end - # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options - # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network - # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end - # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer - # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end - # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer - # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -171,295 +133,220 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories - # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end - # Attribute for field filters sig { returns(Filters) } attr_reader :filters - # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions - # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end - # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections - # Bank account verification method. sig { returns(String) } attr_reader :verification_method end - # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit - # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact - # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Card)) } attr_reader :card - # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance - # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer - # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Konbini)) } attr_reader :konbini - # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit - # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end - # Payment-method-specific configuration to provide to invoices created by the subscription. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types - # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. sig { returns(T.nilable(String)) } attr_reader :save_default_payment_method end class PendingInvoiceItemInterval < Stripe::StripeObject - # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval - # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). sig { returns(Integer) } attr_reader :interval_count end class PendingUpdate < Stripe::StripeObject - # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. sig { returns(T.nilable(Integer)) } attr_reader :billing_cycle_anchor - # The point after which the changes reflected by this update will be discarded and no longer applied. sig { returns(Integer) } attr_reader :expires_at - # The number of iterations of prebilling to apply. sig { returns(T.nilable(Integer)) } attr_reader :prebilling_iterations - # List of subscription items, each with an attached plan, that will be set if the update is applied. sig { returns(T.nilable(T::Array[Stripe::SubscriptionItem])) } attr_reader :subscription_items - # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. sig { returns(T.nilable(Integer)) } attr_reader :trial_end - # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. sig { returns(T.nilable(T::Boolean)) } attr_reader :trial_from_plan end class Prebilling < Stripe::StripeObject - # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice - # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end - # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start - # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. sig { returns(String) } attr_reader :missing_payment_method end - # Defines how a subscription behaves when a free trial ends. sig { returns(EndBehavior) } attr_reader :end_behavior end - # ID of the Connect Application that created the subscription. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the subscription. attr_reader :application - - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. sig { returns(T.nilable(Float)) } + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. attr_reader :application_fee_percent - - # Attribute for field automatic_tax sig { returns(AutomaticTax) } + # Attribute for field automatic_tax attr_reader :automatic_tax - - # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. sig { returns(Integer) } + # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. attr_reader :billing_cycle_anchor - - # The fixed values used to calculate the `billing_cycle_anchor`. sig { returns(T.nilable(BillingCycleAnchorConfig)) } + # The fixed values used to calculate the `billing_cycle_anchor`. attr_reader :billing_cycle_anchor_config - - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period attr_reader :billing_thresholds - - # A date in the future at which the subscription will automatically get canceled sig { returns(T.nilable(Integer)) } + # A date in the future at which the subscription will automatically get canceled attr_reader :cancel_at - - # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. sig { returns(T::Boolean) } + # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. attr_reader :cancel_at_period_end - - # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. sig { returns(T.nilable(Integer)) } + # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. attr_reader :canceled_at - - # Details about why this subscription was cancelled sig { returns(T.nilable(CancellationDetails)) } + # Details about why this subscription was cancelled attr_reader :cancellation_details - - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(String) } + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. attr_reader :collection_method - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. sig { returns(Integer) } + # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. attr_reader :current_period_end - - # Start of the current period that the subscription has been invoiced for. sig { returns(Integer) } + # Start of the current period that the subscription has been invoiced for. attr_reader :current_period_start - - # ID of the customer who owns the subscription. sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription. attr_reader :customer - - # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. sig { returns(T.nilable(Integer)) } + # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. attr_reader :days_until_due - - # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). attr_reader :default_payment_method - - # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). attr_reader :default_source - - # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. attr_reader :default_tax_rates - - # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. attr_reader :description - - # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. sig { returns(T.nilable(Stripe::Discount)) } + # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. attr_reader :discount - - # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - - # If the subscription has ended, the date the subscription ended. sig { returns(T.nilable(Integer)) } + # If the subscription has ended, the date the subscription ended. attr_reader :ended_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Attribute for field invoice_settings sig { returns(InvoiceSettings) } + # Attribute for field invoice_settings attr_reader :invoice_settings - - # List of subscription items, each with an attached price. sig { returns(Stripe::ListObject) } + # List of subscription items, each with an attached price. attr_reader :items - - # Details of the most recent price migration that failed for the subscription. sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription. attr_reader :last_price_migration_error - - # The most recent invoice this subscription has generated. sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } + # The most recent invoice this subscription has generated. attr_reader :latest_invoice - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. sig { returns(T.nilable(Integer)) } + # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. attr_reader :next_pending_invoice_item_invoice - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. attr_reader :on_behalf_of - - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). attr_reader :pause_collection - - # Payment settings passed on to invoices created by the subscription. sig { returns(T.nilable(PaymentSettings)) } + # Payment settings passed on to invoices created by the subscription. attr_reader :payment_settings - - # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. sig { returns(T.nilable(PendingInvoiceItemInterval)) } + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. attr_reader :pending_invoice_item_interval - - # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } + # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). attr_reader :pending_setup_intent - - # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. sig { returns(T.nilable(PendingUpdate)) } + # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. attr_reader :pending_update - - # Time period and invoice for a Subscription billed in advance. sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling - - # The schedule attached to the subscription sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } + # The schedule attached to the subscription attr_reader :schedule - - # Date when the subscription was first created. The date might differ from the `created` date due to backdating. sig { returns(Integer) } + # Date when the subscription was first created. The date might differ from the `created` date due to backdating. attr_reader :start_date - + sig { returns(String) } # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. # # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. @@ -471,27 +358,21 @@ module Stripe # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). # # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. - sig { returns(String) } attr_reader :status - - # ID of the test clock this subscription belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription belongs to. attr_reader :test_clock - - # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } + # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. attr_reader :transfer_data - - # If the subscription has a trial, the end of that trial. sig { returns(T.nilable(Integer)) } + # If the subscription has a trial, the end of that trial. attr_reader :trial_end - - # Settings related to subscription trials. sig { returns(T.nilable(TrialSettings)) } + # Settings related to subscription trials. attr_reader :trial_settings - - # If the subscription has a trial, the beginning of that trial. sig { returns(T.nilable(Integer)) } + # If the subscription has a trial, the beginning of that trial. attr_reader :trial_start end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription_item.rbi b/rbi/stripe/resources/subscription_item.rbi index b03485b30..ac87a5823 100644 --- a/rbi/stripe/resources/subscription_item.rbi +++ b/rbi/stripe/resources/subscription_item.rbi @@ -7,42 +7,34 @@ module Stripe # one plan, making it easy to represent complex billing relationships. class SubscriptionItem < APIResource class BillingThresholds < Stripe::StripeObject - # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to - # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end - # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period attr_reader :billing_thresholds - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[T.any(String, Stripe::Discount)]) } + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. attr_reader :discounts - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - + sig { returns(Stripe::Plan) } # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. # # Plans define the base price, currency, and billing cycle for recurring purchases of products. @@ -51,36 +43,29 @@ module Stripe # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). - sig { returns(Stripe::Plan) } attr_reader :plan - + sig { returns(Stripe::Price) } # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. # # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). - sig { returns(Stripe::Price) } attr_reader :price - - # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. sig { returns(Integer) } + # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. attr_reader :quantity - - # The `subscription` this `subscription_item` belongs to. sig { returns(String) } + # The `subscription` this `subscription_item` belongs to. attr_reader :subscription - - # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } + # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. attr_reader :tax_rates - - # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } + # Options that configure the trial on the subscription item. attr_reader :trial - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi index eda81647a..33c38d7e6 100644 --- a/rbi/stripe/resources/subscription_schedule.rbi +++ b/rbi/stripe/resources/subscription_schedule.rbi @@ -8,112 +8,84 @@ module Stripe # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) class SubscriptionSchedule < APIResource class CurrentPhase < Stripe::StripeObject - # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date - # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Whether Stripe automatically computes tax on invoices created during this phase. + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax - # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(String) } attr_reader :billing_cycle_anchor - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method - # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method - # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description - # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings - # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - # The original price to be migrated. sig { returns(String) } attr_reader :source_price - # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end - # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at - # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions - # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end @@ -121,357 +93,262 @@ module Stripe class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end - # The stackable discounts that will be applied to the item. sig { returns(T::Array[Discount]) } attr_reader :discounts - # ID of the price used to generate the invoice item. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price - # The quantity of the invoice item. sig { returns(T.nilable(Integer)) } attr_reader :quantity - # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # Whether Stripe automatically computes tax on invoices created during this phase. + sig { returns(T.nilable(String)) } + attr_reader :disabled_reason sig { returns(T::Boolean) } attr_reader :enabled - # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject - # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte - # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # Type of the account referenced. sig { returns(String) } attr_reader :type end - # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject - # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp - # The discount end type. sig { returns(String) } attr_reader :type end - # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount - # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end - # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject - # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to - # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end - # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # ID of the plan to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Plan)) } attr_reader :plan - # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price - # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity - # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates - # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class PauseCollection < Stripe::StripeObject - # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end class TransferData < Stripe::StripeObject - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent - # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject - # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end - # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end - # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. sig { returns(T::Array[AddInvoiceItem]) } attr_reader :add_invoice_items - # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax - # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor - # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method - # ID of the coupon to use during this phase of the subscription schedule. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method - # The default tax rates to apply to the subscription during this phase of the subscription schedule. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :default_tax_rates - # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description - # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts - # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date - # The invoice settings applicable during this phase. sig { returns(T.nilable(InvoiceSettings)) } attr_reader :invoice_settings - # Subscription items to configure the subscription to during this phase of the subscription schedule. sig { returns(T::Array[Item]) } attr_reader :items - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection - # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. sig { returns(String) } attr_reader :proration_behavior - # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date - # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - # Specify behavior of the trial when crossing schedule phase boundaries sig { returns(T.nilable(String)) } attr_reader :trial_continuation - # When the trial ends within the phase. sig { returns(T.nilable(Integer)) } attr_reader :trial_end - # Settings related to any trials on the subscription during this phase. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class Prebilling < Stripe::StripeObject - # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice - # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end - # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start - # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end - # ID of the Connect Application that created the schedule. sig { returns(T.nilable(T.any(String, Stripe::Application))) } + # ID of the Connect Application that created the schedule. attr_reader :application - - # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_reader :billing_behavior - - # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at - - # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. attr_reader :completed_at - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. sig { returns(T.nilable(CurrentPhase)) } + # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. attr_reader :current_phase - - # ID of the customer who owns the subscription schedule. sig { returns(T.any(String, Stripe::Customer)) } + # ID of the customer who owns the subscription schedule. attr_reader :customer - - # Attribute for field default_settings sig { returns(DefaultSettings) } + # Attribute for field default_settings attr_reader :default_settings - - # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. sig { returns(String) } + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. attr_reader :end_behavior - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Details of the most recent price migration that failed for the subscription schedule. sig { returns(T.nilable(LastPriceMigrationError)) } + # Details of the most recent price migration that failed for the subscription schedule. attr_reader :last_price_migration_error - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Configuration for the subscription schedule's phases. sig { returns(T::Array[Phase]) } + # Configuration for the subscription schedule's phases. attr_reader :phases - - # Time period and invoice for a Subscription billed in advance. sig { returns(T.nilable(Prebilling)) } + # Time period and invoice for a Subscription billed in advance. attr_reader :prebilling - - # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. attr_reader :released_at - - # ID of the subscription once managed by the subscription schedule (if it is released). sig { returns(T.nilable(String)) } + # ID of the subscription once managed by the subscription schedule (if it is released). attr_reader :released_subscription - - # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). sig { returns(String) } + # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). attr_reader :status - - # ID of the subscription managed by the subscription schedule. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } + # ID of the subscription managed by the subscription schedule. attr_reader :subscription - - # ID of the test clock this subscription schedule belongs to. sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } + # ID of the test clock this subscription schedule belongs to. attr_reader :test_clock end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/association.rbi b/rbi/stripe/resources/tax/association.rbi index 2ce5aa4ce..eed008d08 100644 --- a/rbi/stripe/resources/tax/association.rbi +++ b/rbi/stripe/resources/tax/association.rbi @@ -11,73 +11,56 @@ module Stripe class Reversal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject class Committed < Stripe::StripeObject - # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) sig { returns(String) } attr_reader :transaction end class Errored < Stripe::StripeObject - # Details on why we could not commit the reversal Tax Transaction sig { returns(String) } attr_reader :reason - # The [Refund](https://stripe.com/docs/api/refunds/object) ID that should have created a tax reversal. sig { returns(String) } attr_reader :refund_id end - # Attribute for field committed sig { returns(Committed) } attr_reader :committed - # Attribute for field errored sig { returns(Errored) } attr_reader :errored end - # Status of the attempted Tax Transaction reversal. sig { returns(String) } attr_reader :status - # Attribute for field status_details sig { returns(StatusDetails) } attr_reader :status_details end - # Attempts to create Tax Transaction reversals sig { returns(T::Array[Reversal]) } attr_reader :reversals - # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) sig { returns(String) } attr_reader :transaction end class Errored < Stripe::StripeObject - # Details on why we could not commit the Tax Transaction sig { returns(String) } attr_reader :reason end - # Attribute for field committed sig { returns(Committed) } attr_reader :committed - # Attribute for field errored sig { returns(Errored) } attr_reader :errored end - # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. sig { returns(String) } + # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. attr_reader :calculation - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. sig { returns(String) } + # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. attr_reader :payment_intent - - # Status of the Tax Association. sig { returns(String) } + # Status of the Tax Association. attr_reader :status - - # Attribute for field status_details sig { returns(StatusDetails) } + # Attribute for field status_details attr_reader :status_details end end diff --git a/rbi/stripe/resources/tax/calculation.rbi b/rbi/stripe/resources/tax/calculation.rbi index 1a067f224..04b5f4d2c 100644 --- a/rbi/stripe/resources/tax/calculation.rbi +++ b/rbi/stripe/resources/tax/calculation.rbi @@ -10,242 +10,176 @@ module Stripe class Calculation < APIResource class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type - # The value of the tax ID. sig { returns(String) } attr_reader :value end - # The customer's postal address (for example, home or business location). sig { returns(T.nilable(Address)) } attr_reader :address - # The type of customer address provided. sig { returns(T.nilable(String)) } attr_reader :address_source - # The customer's IP address (IPv4 or IPv6). sig { returns(T.nilable(String)) } attr_reader :ip_address - # The customer's tax IDs (for example, EU VAT numbers). sig { returns(T::Array[TaxId]) } attr_reader :tax_ids - # The taxability override used for taxation. sig { returns(String) } attr_reader :taxability_override end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name - # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level - # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject - # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name - # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal - # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end - # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction - # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing - # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason - # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end - # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. sig { returns(Integer) } attr_reader :amount - # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount_tax - # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). sig { returns(String) } attr_reader :shipping_rate - # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. sig { returns(String) } attr_reader :tax_behavior - # Detailed account of taxes relevant to shipping cost. sig { returns(T::Array[TaxBreakdown]) } attr_reader :tax_breakdown - # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. sig { returns(String) } attr_reader :tax_code end class TaxBreakdown < Stripe::StripeObject class TaxRateDetails < Stripe::StripeObject class FlatAmount < Stripe::StripeObject - # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount - # Three-letter ISO currency code, in lowercase. sig { returns(String) } attr_reader :currency end - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. sig { returns(T.nilable(FlatAmount)) } attr_reader :flat_amount - # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. sig { returns(String) } attr_reader :percentage_decimal - # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. sig { returns(T.nilable(String)) } attr_reader :rate_type - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state - # The tax type, such as `vat` or `sales_tax`. sig { returns(T.nilable(String)) } attr_reader :tax_type end - # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Specifies whether the tax amount is included in the line item amount. sig { returns(T::Boolean) } attr_reader :inclusive - # Attribute for field tax_rate_details sig { returns(TaxRateDetails) } attr_reader :tax_rate_details - # The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. sig { returns(String) } attr_reader :taxability_reason - # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end - # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } + # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_total - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. sig { returns(T.nilable(String)) } + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. attr_reader :customer - - # Attribute for field customer_details sig { returns(CustomerDetails) } + # Attribute for field customer_details attr_reader :customer_details - - # Timestamp of date at which the tax calculation will expire. sig { returns(T.nilable(Integer)) } + # Timestamp of date at which the tax calculation will expire. attr_reader :expires_at - - # Unique identifier for the calculation. sig { returns(T.nilable(String)) } + # Unique identifier for the calculation. attr_reader :id - - # The list of items the customer is purchasing. sig { returns(T.nilable(Stripe::ListObject)) } + # The list of items the customer is purchasing. attr_reader :line_items - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The details of the ship from location, such as the address. sig { returns(T.nilable(ShipFromDetails)) } + # The details of the ship from location, such as the address. attr_reader :ship_from_details - - # The shipping cost details for the calculation. sig { returns(T.nilable(ShippingCost)) } + # The shipping cost details for the calculation. attr_reader :shipping_cost - - # The amount of tax to be collected on top of the line item prices. sig { returns(Integer) } + # The amount of tax to be collected on top of the line item prices. attr_reader :tax_amount_exclusive - - # The amount of tax already included in the line item prices. sig { returns(Integer) } + # The amount of tax already included in the line item prices. attr_reader :tax_amount_inclusive - - # Breakdown of individual tax amounts that add up to the total. sig { returns(T::Array[TaxBreakdown]) } + # Breakdown of individual tax amounts that add up to the total. attr_reader :tax_breakdown - - # Timestamp of date at which the tax rules and rates in effect applies for the calculation. sig { returns(Integer) } + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. attr_reader :tax_date end end diff --git a/rbi/stripe/resources/tax/calculation_line_item.rbi b/rbi/stripe/resources/tax/calculation_line_item.rbi index 571ebbf63..7503a62bd 100644 --- a/rbi/stripe/resources/tax/calculation_line_item.rbi +++ b/rbi/stripe/resources/tax/calculation_line_item.rbi @@ -7,91 +7,68 @@ module Stripe class CalculationLineItem < APIResource class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name - # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level - # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject - # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name - # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal - # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end - # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction - # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing - # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason - # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end - # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. sig { returns(Integer) } + # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. attr_reader :amount - - # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_tax - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The ID of an existing [Product](https://stripe.com/docs/api/products/object). sig { returns(T.nilable(String)) } + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). attr_reader :product - - # The number of units of the item being purchased. For reversals, this is the quantity reversed. sig { returns(Integer) } + # The number of units of the item being purchased. For reversals, this is the quantity reversed. attr_reader :quantity - - # A custom identifier for this line item. sig { returns(T.nilable(String)) } + # A custom identifier for this line item. attr_reader :reference - - # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. sig { returns(String) } + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. attr_reader :tax_behavior - - # Detailed account of taxes relevant to this line item. sig { returns(T.nilable(T::Array[TaxBreakdown])) } + # Detailed account of taxes relevant to this line item. attr_reader :tax_breakdown - - # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. sig { returns(String) } + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. attr_reader :tax_code end end diff --git a/rbi/stripe/resources/tax/form.rbi b/rbi/stripe/resources/tax/form.rbi index f403f3b29..50eb235f4 100644 --- a/rbi/stripe/resources/tax/form.rbi +++ b/rbi/stripe/resources/tax/form.rbi @@ -9,155 +9,118 @@ module Stripe # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting) class Form < APIResource class AuSerr < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class CaMrdp < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class EuDac7 < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class FilingStatus < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Always `US`. sig { returns(String) } attr_reader :country - # Indicates the level of the jurisdiction where the form was filed. sig { returns(String) } attr_reader :level - # [ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end - # Time when the filing status was updated. sig { returns(Integer) } attr_reader :effective_at - # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction - # The current status of the filed form. sig { returns(String) } attr_reader :value end class GbMrdp < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class NzMrdp < Stripe::StripeObject - # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date - # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class Payee < Stripe::StripeObject - # The ID of the payee's Stripe account. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :account - # The external reference to this payee. sig { returns(T.nilable(String)) } attr_reader :external_reference - # Either `account` or `external_reference`. sig { returns(String) } attr_reader :type end class Us1099K < Stripe::StripeObject - # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end class Us1099Misc < Stripe::StripeObject - # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end class Us1099Nec < Stripe::StripeObject - # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end - # Attribute for field au_serr sig { returns(AuSerr) } + # Attribute for field au_serr attr_reader :au_serr - - # Attribute for field ca_mrdp sig { returns(CaMrdp) } + # Attribute for field ca_mrdp attr_reader :ca_mrdp - - # The form that corrects this form, if any. sig { returns(T.nilable(T.any(String, Stripe::Tax::Form))) } + # The form that corrects this form, if any. attr_reader :corrected_by - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Attribute for field eu_dac7 sig { returns(EuDac7) } + # Attribute for field eu_dac7 attr_reader :eu_dac7 - - # A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. sig { returns(T::Array[FilingStatus]) } + # A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. attr_reader :filing_statuses - - # Attribute for field gb_mrdp sig { returns(GbMrdp) } + # Attribute for field gb_mrdp attr_reader :gb_mrdp - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Attribute for field nz_mrdp sig { returns(NzMrdp) } + # Attribute for field nz_mrdp attr_reader :nz_mrdp - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field payee sig { returns(Payee) } + # Attribute for field payee attr_reader :payee - - # The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. sig { returns(String) } + # The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. attr_reader :type - - # Attribute for field us_1099_k sig { returns(Us1099K) } + # Attribute for field us_1099_k attr_reader :us_1099_k - - # Attribute for field us_1099_misc sig { returns(Us1099Misc) } + # Attribute for field us_1099_misc attr_reader :us_1099_misc - - # Attribute for field us_1099_nec sig { returns(Us1099Nec) } + # Attribute for field us_1099_nec attr_reader :us_1099_nec end end diff --git a/rbi/stripe/resources/tax/registration.rbi b/rbi/stripe/resources/tax/registration.rbi index 89587ba9d..71290cf95 100644 --- a/rbi/stripe/resources/tax/registration.rbi +++ b/rbi/stripe/resources/tax/registration.rbi @@ -12,819 +12,616 @@ module Stripe class Registration < APIResource class CountryOptions < Stripe::StripeObject class Ae < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class At < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Au < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Be < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Bg < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Bh < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class By < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ca < Stripe::StripeObject class ProvinceStandard < Stripe::StripeObject - # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). sig { returns(String) } attr_reader :province end - # Attribute for field province_standard sig { returns(ProvinceStandard) } attr_reader :province_standard - # Type of registration in Canada. sig { returns(String) } attr_reader :type end class Ch < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cl < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Co < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cr < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cy < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Cz < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class De < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Dk < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ec < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ee < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Eg < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Es < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Fi < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Fr < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Gb < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ge < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Gr < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Hr < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Hu < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Id < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ie < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Is < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class It < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Jp < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ke < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Kr < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Kz < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Lt < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Lu < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Lv < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ma < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Md < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Mt < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Mx < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class My < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ng < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Nl < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class No < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Nz < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Om < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Pl < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Pt < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ro < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Rs < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ru < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Sa < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Se < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Sg < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Si < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Sk < Stripe::StripeObject class Standard < Stripe::StripeObject - # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end - # Attribute for field standard sig { returns(Standard) } attr_reader :standard - # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Th < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Tr < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Tz < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Us < Stripe::StripeObject class LocalAmusementTax < Stripe::StripeObject - # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction end class LocalLeaseTax < Stripe::StripeObject - # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction end class StateSalesTax < Stripe::StripeObject class Election < Stripe::StripeObject - # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction - # The type of the election for the state sales tax registration. sig { returns(String) } attr_reader :type end - # Elections for the state sales tax registration. sig { returns(T::Array[Election]) } attr_reader :elections end - # Attribute for field local_amusement_tax sig { returns(LocalAmusementTax) } attr_reader :local_amusement_tax - # Attribute for field local_lease_tax sig { returns(LocalLeaseTax) } attr_reader :local_lease_tax - # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). sig { returns(String) } attr_reader :state - # Attribute for field state_sales_tax sig { returns(StateSalesTax) } attr_reader :state_sales_tax - # Type of registration in the US. sig { returns(String) } attr_reader :type end class Uz < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Vn < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Za < Stripe::StripeObject - # Type of registration in `country`. sig { returns(String) } attr_reader :type end - # Attribute for field ae sig { returns(Ae) } attr_reader :ae - # Attribute for field at sig { returns(At) } attr_reader :at - # Attribute for field au sig { returns(Au) } attr_reader :au - # Attribute for field be sig { returns(Be) } attr_reader :be - # Attribute for field bg sig { returns(Bg) } attr_reader :bg - # Attribute for field bh sig { returns(Bh) } attr_reader :bh - # Attribute for field by sig { returns(By) } attr_reader :by - # Attribute for field ca sig { returns(Ca) } attr_reader :ca - # Attribute for field ch sig { returns(Ch) } attr_reader :ch - # Attribute for field cl sig { returns(Cl) } attr_reader :cl - # Attribute for field co sig { returns(Co) } attr_reader :co - # Attribute for field cr sig { returns(Cr) } attr_reader :cr - # Attribute for field cy sig { returns(Cy) } attr_reader :cy - # Attribute for field cz sig { returns(Cz) } attr_reader :cz - # Attribute for field de sig { returns(De) } attr_reader :de - # Attribute for field dk sig { returns(Dk) } attr_reader :dk - # Attribute for field ec sig { returns(Ec) } attr_reader :ec - # Attribute for field ee sig { returns(Ee) } attr_reader :ee - # Attribute for field eg sig { returns(Eg) } attr_reader :eg - # Attribute for field es sig { returns(Es) } attr_reader :es - # Attribute for field fi sig { returns(Fi) } attr_reader :fi - # Attribute for field fr sig { returns(Fr) } attr_reader :fr - # Attribute for field gb sig { returns(Gb) } attr_reader :gb - # Attribute for field ge sig { returns(Ge) } attr_reader :ge - # Attribute for field gr sig { returns(Gr) } attr_reader :gr - # Attribute for field hr sig { returns(Hr) } attr_reader :hr - # Attribute for field hu sig { returns(Hu) } attr_reader :hu - # Attribute for field id sig { returns(Id) } attr_reader :id - # Attribute for field ie sig { returns(Ie) } attr_reader :ie - # Attribute for field is sig { returns(Is) } attr_reader :is - # Attribute for field it sig { returns(It) } attr_reader :it - # Attribute for field jp sig { returns(Jp) } attr_reader :jp - # Attribute for field ke sig { returns(Ke) } attr_reader :ke - # Attribute for field kr sig { returns(Kr) } attr_reader :kr - # Attribute for field kz sig { returns(Kz) } attr_reader :kz - # Attribute for field lt sig { returns(Lt) } attr_reader :lt - # Attribute for field lu sig { returns(Lu) } attr_reader :lu - # Attribute for field lv sig { returns(Lv) } attr_reader :lv - # Attribute for field ma sig { returns(Ma) } attr_reader :ma - # Attribute for field md sig { returns(Md) } attr_reader :md - # Attribute for field mt sig { returns(Mt) } attr_reader :mt - # Attribute for field mx sig { returns(Mx) } attr_reader :mx - # Attribute for field my sig { returns(My) } attr_reader :my - # Attribute for field ng sig { returns(Ng) } attr_reader :ng - # Attribute for field nl sig { returns(Nl) } attr_reader :nl - # Attribute for field no sig { returns(No) } attr_reader :no - # Attribute for field nz sig { returns(Nz) } attr_reader :nz - # Attribute for field om sig { returns(Om) } attr_reader :om - # Attribute for field pl sig { returns(Pl) } attr_reader :pl - # Attribute for field pt sig { returns(Pt) } attr_reader :pt - # Attribute for field ro sig { returns(Ro) } attr_reader :ro - # Attribute for field rs sig { returns(Rs) } attr_reader :rs - # Attribute for field ru sig { returns(Ru) } attr_reader :ru - # Attribute for field sa sig { returns(Sa) } attr_reader :sa - # Attribute for field se sig { returns(Se) } attr_reader :se - # Attribute for field sg sig { returns(Sg) } attr_reader :sg - # Attribute for field si sig { returns(Si) } attr_reader :si - # Attribute for field sk sig { returns(Sk) } attr_reader :sk - # Attribute for field th sig { returns(Th) } attr_reader :th - # Attribute for field tr sig { returns(Tr) } attr_reader :tr - # Attribute for field tz sig { returns(Tz) } attr_reader :tz - # Attribute for field us sig { returns(Us) } attr_reader :us - # Attribute for field uz sig { returns(Uz) } attr_reader :uz - # Attribute for field vn sig { returns(Vn) } attr_reader :vn - # Attribute for field za sig { returns(Za) } attr_reader :za end - # Time at which the registration becomes active. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the registration becomes active. Measured in seconds since the Unix epoch. attr_reader :active_from - - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country - - # Attribute for field country_options sig { returns(CountryOptions) } + # Attribute for field country_options attr_reader :country_options - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. attr_reader :expires_at - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. sig { returns(String) } + # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. attr_reader :status end end diff --git a/rbi/stripe/resources/tax/settings.rbi b/rbi/stripe/resources/tax/settings.rbi index 1c1ba5c93..33751bfb4 100644 --- a/rbi/stripe/resources/tax/settings.rbi +++ b/rbi/stripe/resources/tax/settings.rbi @@ -9,74 +9,57 @@ module Stripe # Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) class Settings < SingletonAPIResource class Defaults < Stripe::StripeObject - # Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. sig { returns(T.nilable(String)) } attr_reader :tax_behavior - # Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. sig { returns(T.nilable(String)) } attr_reader :tax_code end class HeadOffice < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address end class StatusDetails < Stripe::StripeObject class Active < Stripe::StripeObject; end class Pending < Stripe::StripeObject - # The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. sig { returns(T.nilable(T::Array[String])) } attr_reader :missing_fields end - # Attribute for field active sig { returns(Active) } attr_reader :active - # Attribute for field pending sig { returns(Pending) } attr_reader :pending end - # Attribute for field defaults sig { returns(Defaults) } + # Attribute for field defaults attr_reader :defaults - - # The place where your business is located. sig { returns(T.nilable(HeadOffice)) } + # The place where your business is located. attr_reader :head_office - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The status of the Tax `Settings`. sig { returns(String) } + # The status of the Tax `Settings`. attr_reader :status - - # Attribute for field status_details sig { returns(StatusDetails) } + # Attribute for field status_details attr_reader :status_details end end diff --git a/rbi/stripe/resources/tax/transaction.rbi b/rbi/stripe/resources/tax/transaction.rbi index 8740d9f58..1000305d7 100644 --- a/rbi/stripe/resources/tax/transaction.rbi +++ b/rbi/stripe/resources/tax/transaction.rbi @@ -10,206 +10,151 @@ module Stripe class Transaction < APIResource class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject - # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` sig { returns(String) } attr_reader :type - # The value of the tax ID. sig { returns(String) } attr_reader :value end - # The customer's postal address (for example, home or business location). sig { returns(T.nilable(Address)) } attr_reader :address - # The type of customer address provided. sig { returns(T.nilable(String)) } attr_reader :address_source - # The customer's IP address (IPv4 or IPv6). sig { returns(T.nilable(String)) } attr_reader :ip_address - # The customer's tax IDs (for example, EU VAT numbers). sig { returns(T::Array[TaxId]) } attr_reader :tax_ids - # The taxability override used for taxation. sig { returns(String) } attr_reader :taxability_override end class Reversal < Stripe::StripeObject - # The `id` of the reversed `Transaction` object. sig { returns(T.nilable(String)) } attr_reader :original_transaction end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country - # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name - # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level - # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject - # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name - # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal - # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end - # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction - # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing - # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details - # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason - # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end - # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. sig { returns(Integer) } attr_reader :amount - # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount_tax - # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). sig { returns(String) } attr_reader :shipping_rate - # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. sig { returns(String) } attr_reader :tax_behavior - # Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) sig { returns(T::Array[TaxBreakdown]) } attr_reader :tax_breakdown - # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. sig { returns(String) } attr_reader :tax_code end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. sig { returns(T.nilable(String)) } + # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. attr_reader :customer - - # Attribute for field customer_details sig { returns(CustomerDetails) } + # Attribute for field customer_details attr_reader :customer_details - - # Unique identifier for the transaction. sig { returns(String) } + # Unique identifier for the transaction. attr_reader :id - - # The tax collected or refunded, by line item. sig { returns(T.nilable(Stripe::ListObject)) } + # The tax collected or refunded, by line item. attr_reader :line_items - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The Unix timestamp representing when the tax liability is assumed or reduced. sig { returns(Integer) } + # The Unix timestamp representing when the tax liability is assumed or reduced. attr_reader :posted_at - - # A custom unique identifier, such as 'myOrder_123'. sig { returns(String) } + # A custom unique identifier, such as 'myOrder_123'. attr_reader :reference - - # If `type=reversal`, contains information about what was reversed. sig { returns(T.nilable(Reversal)) } + # If `type=reversal`, contains information about what was reversed. attr_reader :reversal - - # The details of the ship from location, such as the address. sig { returns(T.nilable(ShipFromDetails)) } + # The details of the ship from location, such as the address. attr_reader :ship_from_details - - # The shipping cost details for the transaction. sig { returns(T.nilable(ShippingCost)) } + # The shipping cost details for the transaction. attr_reader :shipping_cost - - # Timestamp of date at which the tax rules and rates in effect applies for the calculation. sig { returns(Integer) } + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. attr_reader :tax_date - - # If `reversal`, this transaction reverses an earlier transaction. sig { returns(String) } + # If `reversal`, this transaction reverses an earlier transaction. attr_reader :type end end diff --git a/rbi/stripe/resources/tax/transaction_line_item.rbi b/rbi/stripe/resources/tax/transaction_line_item.rbi index 2b65c9c53..0425f2f49 100644 --- a/rbi/stripe/resources/tax/transaction_line_item.rbi +++ b/rbi/stripe/resources/tax/transaction_line_item.rbi @@ -6,60 +6,47 @@ module Stripe module Tax class TransactionLineItem < APIResource class Reversal < Stripe::StripeObject - # The `id` of the line item to reverse in the original transaction. sig { returns(String) } attr_reader :original_line_item end - # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. sig { returns(Integer) } + # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. attr_reader :amount - - # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } + # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_tax - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The ID of an existing [Product](https://stripe.com/docs/api/products/object). sig { returns(T.nilable(String)) } + # The ID of an existing [Product](https://stripe.com/docs/api/products/object). attr_reader :product - - # The number of units of the item being purchased. For reversals, this is the quantity reversed. sig { returns(Integer) } + # The number of units of the item being purchased. For reversals, this is the quantity reversed. attr_reader :quantity - - # A custom identifier for this line item in the transaction. sig { returns(String) } + # A custom identifier for this line item in the transaction. attr_reader :reference - - # If `type=reversal`, contains information about what was reversed. sig { returns(T.nilable(Reversal)) } + # If `type=reversal`, contains information about what was reversed. attr_reader :reversal - - # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. sig { returns(String) } + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. attr_reader :tax_behavior - - # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. sig { returns(String) } + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. attr_reader :tax_code - - # If `reversal`, this line item reverses an earlier transaction. sig { returns(String) } + # If `reversal`, this line item reverses an earlier transaction. attr_reader :type end end diff --git a/rbi/stripe/resources/tax_code.rbi b/rbi/stripe/resources/tax_code.rbi index 38d6b5174..61d513279 100644 --- a/rbi/stripe/resources/tax_code.rbi +++ b/rbi/stripe/resources/tax_code.rbi @@ -5,20 +5,17 @@ module Stripe # [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. class TaxCode < APIResource - # A detailed description of which types of products the tax code represents. sig { returns(String) } + # A detailed description of which types of products the tax code represents. attr_reader :description - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # A short name for the tax code. sig { returns(String) } + # A short name for the tax code. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_deducted_at_source.rbi b/rbi/stripe/resources/tax_deducted_at_source.rbi index ef2601f3c..4271140df 100644 --- a/rbi/stripe/resources/tax_deducted_at_source.rbi +++ b/rbi/stripe/resources/tax_deducted_at_source.rbi @@ -4,24 +4,20 @@ # typed: true module Stripe class TaxDeductedAtSource < APIResource - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. sig { returns(Integer) } + # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. attr_reader :period_end - - # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. sig { returns(Integer) } + # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. attr_reader :period_start - - # The TAN that was supplied to Stripe when TDS was assessed sig { returns(String) } + # The TAN that was supplied to Stripe when TDS was assessed attr_reader :tax_deduction_account_number end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_id.rbi b/rbi/stripe/resources/tax_id.rbi index a06192bae..9844a442f 100644 --- a/rbi/stripe/resources/tax_id.rbi +++ b/rbi/stripe/resources/tax_id.rbi @@ -9,72 +9,55 @@ module Stripe # Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids) class TaxId < APIResource class Owner < Stripe::StripeObject - # The account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - # The Connect Application being referenced when `type` is `application`. sig { returns(T.any(String, Stripe::Application)) } attr_reader :application - # The customer being referenced when `type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - # Type of owner referenced. sig { returns(String) } attr_reader :type end class Verification < Stripe::StripeObject - # Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. sig { returns(String) } attr_reader :status - # Verified address. sig { returns(T.nilable(String)) } attr_reader :verified_address - # Verified name. sig { returns(T.nilable(String)) } attr_reader :verified_name end - # Two-letter ISO code representing the country of the tax ID. sig { returns(T.nilable(String)) } + # Two-letter ISO code representing the country of the tax ID. attr_reader :country - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # ID of the customer. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } + # ID of the customer. attr_reader :customer - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The account or customer the tax ID belongs to. sig { returns(T.nilable(Owner)) } + # The account or customer the tax ID belongs to. attr_reader :owner - - # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` sig { returns(String) } + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` attr_reader :type - - # Value of the tax ID. sig { returns(String) } + # Value of the tax ID. attr_reader :value - - # Tax ID verification information. sig { returns(T.nilable(Verification)) } + # Tax ID verification information. attr_reader :verification - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_rate.rbi b/rbi/stripe/resources/tax_rate.rbi index 47cbecc99..952ef7f8d 100644 --- a/rbi/stripe/resources/tax_rate.rbi +++ b/rbi/stripe/resources/tax_rate.rbi @@ -8,85 +8,66 @@ module Stripe # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) class TaxRate < APIResource class FlatAmount < Stripe::StripeObject - # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount - # Three-letter ISO currency code, in lowercase. sig { returns(String) } attr_reader :currency end - # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. sig { returns(T::Boolean) } + # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. attr_reader :active - - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. attr_reader :description - - # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. sig { returns(String) } + # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. attr_reader :display_name - + sig { returns(T.nilable(Float)) } # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, # this percentage reflects the rate actually used to calculate tax based on the product's taxability # and whether the user is registered to collect taxes in the corresponding jurisdiction. - sig { returns(T.nilable(Float)) } attr_reader :effective_percentage - - # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. sig { returns(T.nilable(FlatAmount)) } + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. attr_reader :flat_amount - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # This specifies if the tax rate is inclusive or exclusive. sig { returns(T::Boolean) } + # This specifies if the tax rate is inclusive or exclusive. attr_reader :inclusive - - # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. sig { returns(T.nilable(String)) } + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. attr_reader :jurisdiction - - # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. sig { returns(T.nilable(String)) } + # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. attr_reader :jurisdiction_level - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. sig { returns(Float) } + # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. attr_reader :percentage - - # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. sig { returns(T.nilable(String)) } + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. attr_reader :rate_type - - # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. attr_reader :state - - # The high-level tax type, such as `vat` or `sales_tax`. sig { returns(T.nilable(String)) } + # The high-level tax type, such as `vat` or `sales_tax`. attr_reader :tax_type end end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/configuration.rbi b/rbi/stripe/resources/terminal/configuration.rbi index a3e7e7eb3..c1fe96bfc 100644 --- a/rbi/stripe/resources/terminal/configuration.rbi +++ b/rbi/stripe/resources/terminal/configuration.rbi @@ -7,291 +7,214 @@ module Stripe # A Configurations object represents how features should be configured for terminal readers. class Configuration < APIResource class BbposWiseposE < Stripe::StripeObject - # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end class Offline < Stripe::StripeObject - # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end class RebootWindow < Stripe::StripeObject - # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. sig { returns(Integer) } attr_reader :end_hour - # Integer between 0 to 23 that represents the start hour of the reboot time window. sig { returns(Integer) } attr_reader :start_hour end class StripeS700 < Stripe::StripeObject - # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end class Tipping < Stripe::StripeObject class Aud < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Cad < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Chf < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Czk < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Dkk < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Eur < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Gbp < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Hkd < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Myr < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Nok < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Nzd < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Pln < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Sek < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Sgd < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Usd < Stripe::StripeObject - # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts - # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages - # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end - # Attribute for field aud sig { returns(Aud) } attr_reader :aud - # Attribute for field cad sig { returns(Cad) } attr_reader :cad - # Attribute for field chf sig { returns(Chf) } attr_reader :chf - # Attribute for field czk sig { returns(Czk) } attr_reader :czk - # Attribute for field dkk sig { returns(Dkk) } attr_reader :dkk - # Attribute for field eur sig { returns(Eur) } attr_reader :eur - # Attribute for field gbp sig { returns(Gbp) } attr_reader :gbp - # Attribute for field hkd sig { returns(Hkd) } attr_reader :hkd - # Attribute for field myr sig { returns(Myr) } attr_reader :myr - # Attribute for field nok sig { returns(Nok) } attr_reader :nok - # Attribute for field nzd sig { returns(Nzd) } attr_reader :nzd - # Attribute for field pln sig { returns(Pln) } attr_reader :pln - # Attribute for field sek sig { returns(Sek) } attr_reader :sek - # Attribute for field sgd sig { returns(Sgd) } attr_reader :sgd - # Attribute for field usd sig { returns(Usd) } attr_reader :usd end class VerifoneP400 < Stripe::StripeObject - # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end - # Attribute for field bbpos_wisepos_e sig { returns(BbposWiseposE) } + # Attribute for field bbpos_wisepos_e attr_reader :bbpos_wisepos_e - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Whether this Configuration is the default for your account sig { returns(T.nilable(T::Boolean)) } + # Whether this Configuration is the default for your account attr_reader :is_account_default - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String indicating the name of the Configuration object, set by the user sig { returns(T.nilable(String)) } + # String indicating the name of the Configuration object, set by the user attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field offline sig { returns(Offline) } + # Attribute for field offline attr_reader :offline - - # Attribute for field reboot_window sig { returns(RebootWindow) } + # Attribute for field reboot_window attr_reader :reboot_window - - # Attribute for field stripe_s700 sig { returns(StripeS700) } + # Attribute for field stripe_s700 attr_reader :stripe_s700 - - # Attribute for field tipping sig { returns(Tipping) } + # Attribute for field tipping attr_reader :tipping - - # Attribute for field verifone_p400 sig { returns(VerifoneP400) } + # Attribute for field verifone_p400 attr_reader :verifone_p400 - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end diff --git a/rbi/stripe/resources/terminal/connection_token.rbi b/rbi/stripe/resources/terminal/connection_token.rbi index c6cb936bf..a22e7d28e 100644 --- a/rbi/stripe/resources/terminal/connection_token.rbi +++ b/rbi/stripe/resources/terminal/connection_token.rbi @@ -8,16 +8,14 @@ module Stripe # # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) class ConnectionToken < APIResource - # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). sig { returns(String) } + # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). attr_reader :location - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Your application should pass this token to the Stripe Terminal SDK. sig { returns(String) } + # Your application should pass this token to the Stripe Terminal SDK. attr_reader :secret end end diff --git a/rbi/stripe/resources/terminal/location.rbi b/rbi/stripe/resources/terminal/location.rbi index 6600b4059..eea6a8ce6 100644 --- a/rbi/stripe/resources/terminal/location.rbi +++ b/rbi/stripe/resources/terminal/location.rbi @@ -9,55 +9,42 @@ module Stripe # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) class Location < APIResource class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } + # Attribute for field address attr_reader :address - - # The ID of a configuration that will be used to customize all readers in this location. sig { returns(String) } + # The ID of a configuration that will be used to customize all readers in this location. attr_reader :configuration_overrides - - # The display name of the location. sig { returns(String) } + # The display name of the location. attr_reader :display_name - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi index 7a6067202..d6d31698e 100644 --- a/rbi/stripe/resources/terminal/reader.rbi +++ b/rbi/stripe/resources/terminal/reader.rbi @@ -12,354 +12,256 @@ module Stripe class CollectInputs < Stripe::StripeObject class Input < Stripe::StripeObject class CustomText < Stripe::StripeObject - # Customize the default description for this input sig { returns(T.nilable(String)) } attr_reader :description - # Customize the default label for this input's skip button sig { returns(T.nilable(String)) } attr_reader :skip_button - # Customize the default label for this input's submit button sig { returns(T.nilable(String)) } attr_reader :submit_button - # Customize the default title for this input sig { returns(T.nilable(String)) } attr_reader :title end class Email < Stripe::StripeObject - # The collected email address sig { returns(T.nilable(String)) } attr_reader :value end class Numeric < Stripe::StripeObject - # The collected number sig { returns(T.nilable(String)) } attr_reader :value end class Phone < Stripe::StripeObject - # The collected phone number sig { returns(T.nilable(String)) } attr_reader :value end class Selection < Stripe::StripeObject class Choice < Stripe::StripeObject - # The button style for the choice sig { returns(T.nilable(String)) } attr_reader :style - # A value to be selected sig { returns(String) } attr_reader :value end - # List of possible choices to be selected sig { returns(T::Array[Choice]) } attr_reader :choices - # The value of the selected choice sig { returns(T.nilable(String)) } attr_reader :value end class Signature < Stripe::StripeObject - # The File ID of a collected signature image sig { returns(T.nilable(String)) } attr_reader :value end class Text < Stripe::StripeObject - # The collected text value sig { returns(T.nilable(String)) } attr_reader :value end class Toggle < Stripe::StripeObject - # The toggle's default value sig { returns(T.nilable(String)) } attr_reader :default_value - # The toggle's description text sig { returns(T.nilable(String)) } attr_reader :description - # The toggle's title text sig { returns(T.nilable(String)) } attr_reader :title - # The toggle's collected value sig { returns(T.nilable(String)) } attr_reader :value end - # Default text of input being collected. sig { returns(T.nilable(CustomText)) } attr_reader :custom_text - # Information about a email being collected using a reader sig { returns(Email) } attr_reader :email - # Information about a number being collected using a reader sig { returns(Numeric) } attr_reader :numeric - # Information about a phone number being collected using a reader sig { returns(Phone) } attr_reader :phone - # Indicate that this input is required, disabling the skip button. sig { returns(T.nilable(T::Boolean)) } attr_reader :required - # Information about a selection being collected using a reader sig { returns(Selection) } attr_reader :selection - # Information about a signature being collected using a reader sig { returns(Signature) } attr_reader :signature - # Indicate that this input was skipped by the user. sig { returns(T::Boolean) } attr_reader :skipped - # Information about text being collected using a reader sig { returns(Text) } attr_reader :text - # List of toggles being collected. Values are present if collection is complete. sig { returns(T.nilable(T::Array[Toggle])) } attr_reader :toggles - # Type of input being collected. sig { returns(String) } attr_reader :type end - # List of inputs to be collected. sig { returns(T::Array[Input]) } attr_reader :inputs - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata end class CollectPaymentMethod < Stripe::StripeObject class CollectConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject - # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :amount_eligible end - # Enable customer initiated cancellation when processing this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation - # Override showing a tipping selection screen on this transaction. sig { returns(T::Boolean) } attr_reader :skip_tipping - # Represents a per-transaction tipping configuration sig { returns(Tipping) } attr_reader :tipping end - # Represents a per-transaction override of a reader configuration sig { returns(CollectConfig) } attr_reader :collect_config - # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent - # PaymentMethod objects represent your customer's payment instruments. - # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to - # Customer objects to store instrument details for future payments. - # - # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method - # Attribute for field stripe_account sig { returns(String) } attr_reader :stripe_account end class ConfirmPaymentIntent < Stripe::StripeObject - # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent - # Attribute for field stripe_account sig { returns(String) } attr_reader :stripe_account end class ProcessPaymentIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject - # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :amount_eligible end - # Enable customer initiated cancellation when processing this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation - # Override showing a tipping selection screen on this transaction. sig { returns(T::Boolean) } attr_reader :skip_tipping - # Represents a per-transaction tipping configuration sig { returns(Tipping) } attr_reader :tipping end - # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent - # Represents a per-transaction override of a reader configuration sig { returns(ProcessConfig) } attr_reader :process_config - # Attribute for field stripe_account sig { returns(String) } attr_reader :stripe_account end class ProcessSetupIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject - # Enable customer initiated cancellation when processing this SetupIntent. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation end - # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(String) } attr_reader :generated_card - # Represents a per-setup override of a reader configuration sig { returns(ProcessConfig) } attr_reader :process_config - # Most recent SetupIntent processed by the reader. sig { returns(T.any(String, Stripe::SetupIntent)) } attr_reader :setup_intent end class RefundPayment < Stripe::StripeObject class RefundPaymentConfig < Stripe::StripeObject - # Enable customer initiated cancellation when refunding this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation end - # The amount being refunded. sig { returns(Integer) } attr_reader :amount - # Charge that is being refunded. sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } attr_reader :metadata - # Payment intent that is being refunded. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent - # The reason for the refund. sig { returns(String) } attr_reader :reason - # Unique identifier for the refund object. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund - # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. sig { returns(T::Boolean) } attr_reader :refund_application_fee - # Represents a per-transaction override of a reader configuration sig { returns(RefundPaymentConfig) } attr_reader :refund_payment_config - # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. sig { returns(T::Boolean) } attr_reader :reverse_transfer - # Attribute for field stripe_account sig { returns(String) } attr_reader :stripe_account end class SetReaderDisplay < Stripe::StripeObject class Cart < Stripe::StripeObject class LineItem < Stripe::StripeObject - # The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount - # Description of the line item. sig { returns(String) } attr_reader :description - # The quantity of the line item. sig { returns(Integer) } attr_reader :quantity end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency - # List of line items in the cart. sig { returns(T::Array[LineItem]) } attr_reader :line_items - # Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } attr_reader :tax - # Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :total end - # Cart object to be displayed by the reader. sig { returns(T.nilable(Cart)) } attr_reader :cart - # Type of information to be displayed by the reader. sig { returns(String) } attr_reader :type end - # Represents a reader action to collect customer inputs sig { returns(CollectInputs) } attr_reader :collect_inputs - # Represents a reader action to collect a payment method sig { returns(CollectPaymentMethod) } attr_reader :collect_payment_method - # Represents a reader action to confirm a payment sig { returns(ConfirmPaymentIntent) } attr_reader :confirm_payment_intent - # Failure code, only set if status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_code - # Detailed failure message, only set if status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_message - # Represents a reader action to process a payment intent sig { returns(ProcessPaymentIntent) } attr_reader :process_payment_intent - # Represents a reader action to process a setup intent sig { returns(ProcessSetupIntent) } attr_reader :process_setup_intent - # Represents a reader action to refund a payment sig { returns(RefundPayment) } attr_reader :refund_payment - # Represents a reader action to set the reader display sig { returns(SetReaderDisplay) } attr_reader :set_reader_display - # Status of the action performed by the reader. sig { returns(String) } attr_reader :status - # Type of action performed by the reader. sig { returns(String) } attr_reader :type end - # The most recent action performed by the reader. sig { returns(T.nilable(Action)) } + # The most recent action performed by the reader. attr_reader :action - - # The current software version of the reader. sig { returns(T.nilable(String)) } + # The current software version of the reader. attr_reader :device_sw_version - - # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. sig { returns(String) } + # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. attr_reader :device_type - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The local IP address of the reader. sig { returns(T.nilable(String)) } + # The local IP address of the reader. attr_reader :ip_address - - # Custom label given to the reader for easier identification. sig { returns(String) } + # Custom label given to the reader for easier identification. attr_reader :label - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The location identifier of the reader. sig { returns(T.nilable(T.any(String, Stripe::Terminal::Location))) } + # The location identifier of the reader. attr_reader :location - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Serial number of the reader. sig { returns(String) } + # Serial number of the reader. attr_reader :serial_number - - # The networking status of the reader. We do not recommend using this field in flows that may block taking payments. sig { returns(T.nilable(String)) } + # The networking status of the reader. We do not recommend using this field in flows that may block taking payments. attr_reader :status - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end diff --git a/rbi/stripe/resources/terminal/reader_collected_data.rbi b/rbi/stripe/resources/terminal/reader_collected_data.rbi index fed8d0de3..fe0db0af9 100644 --- a/rbi/stripe/resources/terminal/reader_collected_data.rbi +++ b/rbi/stripe/resources/terminal/reader_collected_data.rbi @@ -7,32 +7,26 @@ module Stripe # Returns data collected by Terminal readers. This data is only stored for 24 hours. class ReaderCollectedData < APIResource class Magstripe < Stripe::StripeObject - # The raw magstripe data collected by the reader. sig { returns(T.nilable(String)) } attr_reader :data end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The magstripe data collected by the reader. sig { returns(T.nilable(Magstripe)) } + # The magstripe data collected by the reader. attr_reader :magstripe - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The type of data collected by the reader. sig { returns(String) } + # The type of data collected by the reader. attr_reader :type end end diff --git a/rbi/stripe/resources/test_helpers/test_clock.rbi b/rbi/stripe/resources/test_helpers/test_clock.rbi index 0d33ce0cf..8beba43e9 100644 --- a/rbi/stripe/resources/test_helpers/test_clock.rbi +++ b/rbi/stripe/resources/test_helpers/test_clock.rbi @@ -10,52 +10,41 @@ module Stripe class TestClock < APIResource class StatusDetails < Stripe::StripeObject class Advancing < Stripe::StripeObject - # The `frozen_time` that the Test Clock is advancing towards. sig { returns(Integer) } attr_reader :target_frozen_time end - # Attribute for field advancing sig { returns(Advancing) } attr_reader :advancing end - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Time at which this clock is scheduled to auto delete. sig { returns(Integer) } + # Time at which this clock is scheduled to auto delete. attr_reader :deletes_after - - # Time at which all objects belonging to this clock are frozen. sig { returns(Integer) } + # Time at which all objects belonging to this clock are frozen. attr_reader :frozen_time - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The custom name supplied at creation. sig { returns(T.nilable(String)) } + # The custom name supplied at creation. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The status of the Test Clock. sig { returns(String) } + # The status of the Test Clock. attr_reader :status - - # Attribute for field status_details sig { returns(StatusDetails) } + # Attribute for field status_details attr_reader :status_details - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end diff --git a/rbi/stripe/resources/token.rbi b/rbi/stripe/resources/token.rbi index 837f55af7..0c81fe46e 100644 --- a/rbi/stripe/resources/token.rbi +++ b/rbi/stripe/resources/token.rbi @@ -24,6 +24,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. class Token < APIResource + sig { returns(Stripe::BankAccount) } # These bank accounts are payment methods on `Customer` objects. # # On the other hand [External Accounts](/api#external_accounts) are transfer @@ -31,43 +32,34 @@ module Stripe # They can be bank accounts or debit cards as well, and are documented in the links above. # # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) - sig { returns(Stripe::BankAccount) } attr_reader :bank_account - + sig { returns(Stripe::Card) } # You can store multiple cards on a customer in order to charge the customer # later. You can also store multiple debit cards on a recipient in order to # transfer to those cards later. # # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) - sig { returns(Stripe::Card) } attr_reader :card - - # IP address of the client that generates the token. sig { returns(T.nilable(String)) } + # IP address of the client that generates the token. attr_reader :client_ip - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Type of the token: `account`, `bank_account`, `card`, or `pii`. sig { returns(String) } + # Type of the token: `account`, `bank_account`, `card`, or `pii`. attr_reader :type - - # Determines if you have already used this token (you can only use tokens once). sig { returns(T::Boolean) } + # Determines if you have already used this token (you can only use tokens once). attr_reader :used end end \ No newline at end of file diff --git a/rbi/stripe/resources/topup.rbi b/rbi/stripe/resources/topup.rbi index 1b2a2b76f..98c75e6ea 100644 --- a/rbi/stripe/resources/topup.rbi +++ b/rbi/stripe/resources/topup.rbi @@ -9,68 +9,53 @@ module Stripe # # Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) class Topup < APIResource - # Amount transferred. sig { returns(Integer) } + # Amount transferred. attr_reader :amount - - # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. attr_reader :balance_transaction - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. sig { returns(T.nilable(Integer)) } + # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. attr_reader :expected_availability_date - - # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). sig { returns(T.nilable(String)) } + # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). attr_reader :failure_code - - # Message to user further explaining reason for top-up failure if available. sig { returns(T.nilable(String)) } + # Message to user further explaining reason for top-up failure if available. attr_reader :failure_message - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The source field is deprecated. It might not always be present in the API response. sig { returns(T.nilable(Stripe::Source)) } + # The source field is deprecated. It might not always be present in the API response. attr_reader :source - - # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. sig { returns(T.nilable(String)) } + # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. attr_reader :statement_descriptor - - # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. sig { returns(String) } + # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. attr_reader :status - - # A string that identifies this top-up as part of a group. sig { returns(T.nilable(String)) } + # A string that identifies this top-up as part of a group. attr_reader :transfer_group end end \ No newline at end of file diff --git a/rbi/stripe/resources/transfer.rbi b/rbi/stripe/resources/transfer.rbi index 6f8b53315..40b84eadf 100644 --- a/rbi/stripe/resources/transfer.rbi +++ b/rbi/stripe/resources/transfer.rbi @@ -14,72 +14,56 @@ module Stripe # # Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) class Transfer < APIResource - # Amount in cents (or local equivalent) to be transferred. sig { returns(Integer) } + # Amount in cents (or local equivalent) to be transferred. attr_reader :amount - - # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). sig { returns(Integer) } + # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). attr_reader :amount_reversed - - # Balance transaction that describes the impact of this transfer on your account balance. sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } + # Balance transaction that describes the impact of this transfer on your account balance. attr_reader :balance_transaction - - # Time that this record of the transfer was first created. sig { returns(Integer) } + # Time that this record of the transfer was first created. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # ID of the Stripe account the transfer was sent to. sig { returns(T.nilable(T.any(String, Stripe::Account))) } + # ID of the Stripe account the transfer was sent to. attr_reader :destination - - # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. sig { returns(T.any(String, Stripe::Charge)) } + # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. attr_reader :destination_payment - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # A list of reversals that have been applied to the transfer. sig { returns(Stripe::ListObject) } + # A list of reversals that have been applied to the transfer. attr_reader :reversals - - # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. sig { returns(T::Boolean) } + # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. attr_reader :reversed - - # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } + # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. attr_reader :source_transaction - - # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. sig { returns(String) } + # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. attr_reader :source_type - - # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. sig { returns(T.nilable(String)) } + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. attr_reader :transfer_group end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/credit_reversal.rbi b/rbi/stripe/resources/treasury/credit_reversal.rbi index 896520e7d..973ec06af 100644 --- a/rbi/stripe/resources/treasury/credit_reversal.rbi +++ b/rbi/stripe/resources/treasury/credit_reversal.rbi @@ -7,64 +7,50 @@ module Stripe # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. class CreditReversal < APIResource class StatusTransitions < Stripe::StripeObject - # Timestamp describing when the CreditReversal changed status to `posted` sig { returns(T.nilable(Integer)) } attr_reader :posted_at end - # Amount (in cents) transferred. sig { returns(Integer) } + # Amount (in cents) transferred. attr_reader :amount - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The FinancialAccount to reverse funds from. sig { returns(String) } + # The FinancialAccount to reverse funds from. attr_reader :financial_account - - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The rails used to reverse the funds. sig { returns(String) } + # The rails used to reverse the funds. attr_reader :network - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The ReceivedCredit being reversed. sig { returns(String) } + # The ReceivedCredit being reversed. attr_reader :received_credit - - # Status of the CreditReversal sig { returns(String) } + # Status of the CreditReversal attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # The Transaction associated with this object. sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/debit_reversal.rbi b/rbi/stripe/resources/treasury/debit_reversal.rbi index 53877a75a..d611cf1df 100644 --- a/rbi/stripe/resources/treasury/debit_reversal.rbi +++ b/rbi/stripe/resources/treasury/debit_reversal.rbi @@ -7,73 +7,57 @@ module Stripe # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. class DebitReversal < APIResource class LinkedFlows < Stripe::StripeObject - # Set if there is an Issuing dispute associated with the DebitReversal. sig { returns(T.nilable(String)) } attr_reader :issuing_dispute end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when the DebitReversal changed status to `completed`. sig { returns(T.nilable(Integer)) } attr_reader :completed_at end - # Amount (in cents) transferred. sig { returns(Integer) } + # Amount (in cents) transferred. attr_reader :amount - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # The FinancialAccount to reverse funds from. sig { returns(T.nilable(String)) } + # The FinancialAccount to reverse funds from. attr_reader :financial_account - - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Other flows linked to a DebitReversal. sig { returns(T.nilable(LinkedFlows)) } + # Other flows linked to a DebitReversal. attr_reader :linked_flows - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # The rails used to reverse the funds. sig { returns(String) } + # The rails used to reverse the funds. attr_reader :network - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The ReceivedDebit being reversed. sig { returns(String) } + # The ReceivedDebit being reversed. attr_reader :received_debit - - # Status of the DebitReversal sig { returns(String) } + # Status of the DebitReversal attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # The Transaction associated with this object. sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/financial_account.rbi b/rbi/stripe/resources/treasury/financial_account.rbi index 377c17f2d..eff745d44 100644 --- a/rbi/stripe/resources/treasury/financial_account.rbi +++ b/rbi/stripe/resources/treasury/financial_account.rbi @@ -8,129 +8,98 @@ module Stripe # FinancialAccounts serve as the source and destination of Treasury's money movement APIs. class FinancialAccount < APIResource class Balance < Stripe::StripeObject - # Funds the user can spend right now. sig { returns(T::Hash[String, Integer]) } attr_reader :cash - # Funds not spendable yet, but will become available at a later time. sig { returns(T::Hash[String, Integer]) } attr_reader :inbound_pending - # Funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(T::Hash[String, Integer]) } attr_reader :outbound_pending end class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject - # The name of the person or business that owns the bank account. sig { returns(String) } attr_reader :account_holder_name - # The account number. sig { returns(T.nilable(String)) } attr_reader :account_number - # The last four characters of the account number. sig { returns(String) } attr_reader :account_number_last4 - # Name of the bank. sig { returns(String) } attr_reader :bank_name - # Routing number for the account. sig { returns(String) } attr_reader :routing_number end - # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba - # The list of networks that the address supports sig { returns(T::Array[String]) } attr_reader :supported_networks - # The type of financial address sig { returns(String) } attr_reader :type end class PlatformRestrictions < Stripe::StripeObject - # Restricts all inbound money movement. sig { returns(T.nilable(String)) } attr_reader :inbound_flows - # Restricts all outbound money movement. sig { returns(T.nilable(String)) } attr_reader :outbound_flows end class StatusDetails < Stripe::StripeObject class Closed < Stripe::StripeObject - # The array that contains reasons for a FinancialAccount closure. sig { returns(T::Array[String]) } attr_reader :reasons end - # Details related to the closure of this FinancialAccount sig { returns(T.nilable(Closed)) } attr_reader :closed end - # The array of paths to active Features in the Features hash. sig { returns(T::Array[String]) } + # The array of paths to active Features in the Features hash. attr_reader :active_features - - # Balance information for the FinancialAccount sig { returns(Balance) } + # Balance information for the FinancialAccount attr_reader :balance - - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). attr_reader :country - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. sig { returns(T.nilable(String)) } + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. attr_reader :display_name - + sig { returns(Stripe::Treasury::FinancialAccountFeatures) } # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. # Stripe or the platform can control Features via the requested field. - sig { returns(Stripe::Treasury::FinancialAccountFeatures) } attr_reader :features - - # The set of credentials that resolve to a FinancialAccount. sig { returns(T::Array[FinancialAddress]) } + # The set of credentials that resolve to a FinancialAccount. attr_reader :financial_addresses - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The array of paths to pending Features in the Features hash. sig { returns(T::Array[String]) } + # The array of paths to pending Features in the Features hash. attr_reader :pending_features - - # The set of functionalities that the platform can restrict on the FinancialAccount. sig { returns(T.nilable(PlatformRestrictions)) } + # The set of functionalities that the platform can restrict on the FinancialAccount. attr_reader :platform_restrictions - - # The array of paths to restricted Features in the Features hash. sig { returns(T::Array[String]) } + # The array of paths to restricted Features in the Features hash. attr_reader :restricted_features - - # Status of this FinancialAccount. sig { returns(String) } + # Status of this FinancialAccount. attr_reader :status - - # Attribute for field status_details sig { returns(StatusDetails) } + # Attribute for field status_details attr_reader :status_details - - # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. sig { returns(T::Array[String]) } + # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. attr_reader :supported_currencies end end diff --git a/rbi/stripe/resources/treasury/financial_account_features.rbi b/rbi/stripe/resources/treasury/financial_account_features.rbi index 963f94413..672124d22 100644 --- a/rbi/stripe/resources/treasury/financial_account_features.rbi +++ b/rbi/stripe/resources/treasury/financial_account_features.rbi @@ -9,261 +9,193 @@ module Stripe class FinancialAccountFeatures < APIResource class CardIssuing < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class DepositInsurance < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class FinancialAddresses < Stripe::StripeObject class Aba < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Requested bank partner for this Financial Account sig { returns(String) } attr_reader :bank - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end - # Toggle settings for enabling/disabling the ABA address feature sig { returns(Aba) } attr_reader :aba end class InboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end - # Toggle settings for enabling/disabling an ACH specific feature sig { returns(Ach) } attr_reader :ach end class IntraStripeFlows < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class OutboundPayments < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end - # Toggle settings for enabling/disabling an ACH specific feature sig { returns(Ach) } attr_reader :ach - # Toggle settings for enabling/disabling a feature sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end class OutboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code - # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution - # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end - # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested - # Whether the Feature is operational. sig { returns(String) } attr_reader :status - # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end - # Toggle settings for enabling/disabling an ACH specific feature sig { returns(Ach) } attr_reader :ach - # Toggle settings for enabling/disabling a feature sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - # Toggle settings for enabling/disabling a feature sig { returns(CardIssuing) } - attr_reader :card_issuing - # Toggle settings for enabling/disabling a feature + attr_reader :card_issuing sig { returns(DepositInsurance) } + # Toggle settings for enabling/disabling a feature attr_reader :deposit_insurance - - # Settings related to Financial Addresses features on a Financial Account sig { returns(FinancialAddresses) } + # Settings related to Financial Addresses features on a Financial Account attr_reader :financial_addresses - - # InboundTransfers contains inbound transfers features for a FinancialAccount. sig { returns(InboundTransfers) } + # InboundTransfers contains inbound transfers features for a FinancialAccount. attr_reader :inbound_transfers - - # Toggle settings for enabling/disabling a feature sig { returns(IntraStripeFlows) } + # Toggle settings for enabling/disabling a feature attr_reader :intra_stripe_flows - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Settings related to Outbound Payments features on a Financial Account sig { returns(OutboundPayments) } + # Settings related to Outbound Payments features on a Financial Account attr_reader :outbound_payments - - # OutboundTransfers contains outbound transfers features for a FinancialAccount. sig { returns(OutboundTransfers) } + # OutboundTransfers contains outbound transfers features for a FinancialAccount. attr_reader :outbound_transfers end end diff --git a/rbi/stripe/resources/treasury/inbound_transfer.rbi b/rbi/stripe/resources/treasury/inbound_transfer.rbi index 2604cb156..694cf5077 100644 --- a/rbi/stripe/resources/treasury/inbound_transfer.rbi +++ b/rbi/stripe/resources/treasury/inbound_transfer.rbi @@ -9,172 +9,128 @@ module Stripe # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) class InboundTransfer < APIResource class FailureDetails < Stripe::StripeObject - # Reason for the failure. sig { returns(String) } attr_reader :code end class LinkedFlows < Stripe::StripeObject - # If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. sig { returns(T.nilable(String)) } attr_reader :received_debit end class OriginPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # Email address. sig { returns(T.nilable(String)) } attr_reader :email - # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class UsBankAccount < Stripe::StripeObject - # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate - # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network - # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end - # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details - # The type of the payment method used in the InboundTransfer. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when an InboundTransfer changed status to `canceled`. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - # Timestamp describing when an InboundTransfer changed status to `failed`. sig { returns(T.nilable(Integer)) } attr_reader :failed_at - # Timestamp describing when an InboundTransfer changed status to `succeeded`. sig { returns(T.nilable(Integer)) } attr_reader :succeeded_at end - # Amount (in cents) transferred. sig { returns(Integer) } + # Amount (in cents) transferred. attr_reader :amount - - # Returns `true` if the InboundTransfer is able to be canceled. sig { returns(T::Boolean) } + # Returns `true` if the InboundTransfer is able to be canceled. attr_reader :cancelable - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Details about this InboundTransfer's failure. Only set when status is `failed`. sig { returns(T.nilable(FailureDetails)) } + # Details about this InboundTransfer's failure. Only set when status is `failed`. attr_reader :failure_details - - # The FinancialAccount that received the funds. sig { returns(String) } + # The FinancialAccount that received the funds. attr_reader :financial_account - - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Attribute for field linked_flows sig { returns(LinkedFlows) } + # Attribute for field linked_flows attr_reader :linked_flows - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The origin payment method to be debited for an InboundTransfer. sig { returns(T.nilable(String)) } + # The origin payment method to be debited for an InboundTransfer. attr_reader :origin_payment_method - - # Details about the PaymentMethod for an InboundTransfer. sig { returns(T.nilable(OriginPaymentMethodDetails)) } + # Details about the PaymentMethod for an InboundTransfer. attr_reader :origin_payment_method_details - - # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. sig { returns(T.nilable(T::Boolean)) } + # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. attr_reader :returned - - # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. sig { returns(String) } + # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. attr_reader :statement_descriptor - - # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. sig { returns(String) } + # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # The Transaction associated with this object. sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/outbound_payment.rbi b/rbi/stripe/resources/treasury/outbound_payment.rbi index 464f24e57..6fdd0acb1 100644 --- a/rbi/stripe/resources/treasury/outbound_payment.rbi +++ b/rbi/stripe/resources/treasury/outbound_payment.rbi @@ -13,225 +13,166 @@ module Stripe class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # Email address. sig { returns(T.nilable(String)) } attr_reader :email - # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject - # Token of the FinancialAccount. sig { returns(String) } attr_reader :id - # The rails used to send funds. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject - # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate - # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network - # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end - # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details - # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account - # The type of the payment method used in the OutboundPayment. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class EndUserDetails < Stripe::StripeObject - # IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. sig { returns(T.nilable(String)) } attr_reader :ip_address - # `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. sig { returns(T::Boolean) } attr_reader :present end class ReturnedDetails < Stripe::StripeObject - # Reason for the return. sig { returns(String) } attr_reader :code - # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when an OutboundPayment changed status to `canceled`. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - # Timestamp describing when an OutboundPayment changed status to `failed`. sig { returns(T.nilable(Integer)) } attr_reader :failed_at - # Timestamp describing when an OutboundPayment changed status to `posted`. sig { returns(T.nilable(Integer)) } attr_reader :posted_at - # Timestamp describing when an OutboundPayment changed status to `returned`. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH trace ID of the OutboundPayment for payments sent over the `ach` network. sig { returns(String) } attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject - # CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :chips - # IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :imad - # OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :omad end - # Attribute for field ach sig { returns(Ach) } attr_reader :ach - # The US bank account network used to send funds. sig { returns(String) } attr_reader :type - # Attribute for field us_domestic_wire sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - # Amount (in cents) transferred. sig { returns(Integer) } + # Amount (in cents) transferred. attr_reader :amount - - # Returns `true` if the object can be canceled, and `false` otherwise. sig { returns(T::Boolean) } + # Returns `true` if the object can be canceled, and `false` otherwise. attr_reader :cancelable - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. sig { returns(T.nilable(String)) } + # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. attr_reader :customer - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. sig { returns(T.nilable(String)) } + # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. attr_reader :destination_payment_method - - # Details about the PaymentMethod for an OutboundPayment. sig { returns(T.nilable(DestinationPaymentMethodDetails)) } + # Details about the PaymentMethod for an OutboundPayment. attr_reader :destination_payment_method_details - - # Details about the end user. sig { returns(T.nilable(EndUserDetails)) } + # Details about the end user. attr_reader :end_user_details - - # The date when funds are expected to arrive in the destination account. sig { returns(Integer) } + # The date when funds are expected to arrive in the destination account. attr_reader :expected_arrival_date - - # The FinancialAccount that funds were pulled from. sig { returns(String) } + # The FinancialAccount that funds were pulled from. attr_reader :financial_account - - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Details about a returned OutboundPayment. Only set when the status is `returned`. sig { returns(T.nilable(ReturnedDetails)) } + # Details about a returned OutboundPayment. Only set when the status is `returned`. attr_reader :returned_details - - # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). sig { returns(String) } + # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). attr_reader :statement_descriptor - - # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. sig { returns(String) } + # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # Details about network-specific tracking information if available. sig { returns(T.nilable(TrackingDetails)) } + # Details about network-specific tracking information if available. attr_reader :tracking_details - - # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/outbound_transfer.rbi b/rbi/stripe/resources/treasury/outbound_transfer.rbi index f601a02b1..fdca99065 100644 --- a/rbi/stripe/resources/treasury/outbound_transfer.rbi +++ b/rbi/stripe/resources/treasury/outbound_transfer.rbi @@ -13,215 +13,159 @@ module Stripe class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # Email address. sig { returns(T.nilable(String)) } attr_reader :email - # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class UsBankAccount < Stripe::StripeObject - # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type - # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type - # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name - # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint - # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate - # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network - # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end - # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details - # The type of the payment method used in the OutboundTransfer. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end - # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach - # The type of flow that originated the OutboundTransfer. sig { returns(String) } attr_reader :type end class ReturnedDetails < Stripe::StripeObject - # Reason for the return. sig { returns(String) } attr_reader :code - # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when an OutboundTransfer changed status to `canceled` sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - # Timestamp describing when an OutboundTransfer changed status to `failed` sig { returns(T.nilable(Integer)) } attr_reader :failed_at - # Timestamp describing when an OutboundTransfer changed status to `posted` sig { returns(T.nilable(Integer)) } attr_reader :posted_at - # Timestamp describing when an OutboundTransfer changed status to `returned` sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. sig { returns(String) } attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject - # CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :chips - # IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :imad - # OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :omad end - # Attribute for field ach sig { returns(Ach) } attr_reader :ach - # The US bank account network used to send funds. sig { returns(String) } attr_reader :type - # Attribute for field us_domestic_wire sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - # Amount (in cents) transferred. sig { returns(Integer) } + # Amount (in cents) transferred. attr_reader :amount - - # Returns `true` if the object can be canceled, and `false` otherwise. sig { returns(T::Boolean) } + # Returns `true` if the object can be canceled, and `false` otherwise. attr_reader :cancelable - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # The PaymentMethod used as the payment instrument for an OutboundTransfer. sig { returns(T.nilable(String)) } + # The PaymentMethod used as the payment instrument for an OutboundTransfer. attr_reader :destination_payment_method - - # Attribute for field destination_payment_method_details sig { returns(DestinationPaymentMethodDetails) } + # Attribute for field destination_payment_method_details attr_reader :destination_payment_method_details - - # The date when funds are expected to arrive in the destination account. sig { returns(Integer) } + # The date when funds are expected to arrive in the destination account. attr_reader :expected_arrival_date - - # The FinancialAccount that funds were pulled from. sig { returns(String) } + # The FinancialAccount that funds were pulled from. attr_reader :financial_account - - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # Details about the network used for the OutboundTransfer. sig { returns(T.nilable(NetworkDetails)) } + # Details about the network used for the OutboundTransfer. attr_reader :network_details - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Details about a returned OutboundTransfer. Only set when the status is `returned`. sig { returns(T.nilable(ReturnedDetails)) } + # Details about a returned OutboundTransfer. Only set when the status is `returned`. attr_reader :returned_details - - # Information about the OutboundTransfer to be sent to the recipient account. sig { returns(String) } + # Information about the OutboundTransfer to be sent to the recipient account. attr_reader :statement_descriptor - - # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. sig { returns(String) } + # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions - - # Details about network-specific tracking information if available. sig { returns(T.nilable(TrackingDetails)) } + # Details about network-specific tracking information if available. attr_reader :tracking_details - - # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/received_credit.rbi b/rbi/stripe/resources/treasury/received_credit.rbi index 3ec511d14..a293dafdb 100644 --- a/rbi/stripe/resources/treasury/received_credit.rbi +++ b/rbi/stripe/resources/treasury/received_credit.rbi @@ -9,205 +9,143 @@ module Stripe class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # Email address. sig { returns(T.nilable(String)) } attr_reader :email - # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject - # The FinancialAccount ID. sig { returns(String) } attr_reader :id - # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject - # Bank name. sig { returns(T.nilable(String)) } attr_reader :bank_name - # The last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # The routing number for the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end - # Set when `type` is `balance`. sig { returns(String) } attr_reader :balance - # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details - # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account - # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. sig { returns(String) } attr_reader :issuing_card - # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject class SourceFlowDetails < Stripe::StripeObject - # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal - # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). - # - # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment - # A `Payout` object is created when you receive funds from Stripe, or when you - # initiate a payout to either a bank account or debit card of a [connected - # Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, - # and list all payouts. Payouts are made on [varying - # schedules](/docs/connect/manage-payout-schedule), depending on your country and - # industry. - # - # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) sig { returns(Stripe::Payout) } attr_reader :payout - # The type of the source flow that originated the ReceivedCredit. sig { returns(String) } attr_reader :type end - # The CreditReversal created as a result of this ReceivedCredit being reversed. sig { returns(T.nilable(String)) } attr_reader :credit_reversal - # Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. sig { returns(T.nilable(String)) } attr_reader :issuing_authorization - # Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. sig { returns(T.nilable(String)) } attr_reader :issuing_transaction - # ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. sig { returns(T.nilable(String)) } attr_reader :source_flow - # The expandable object of the source flow. sig { returns(T.nilable(SourceFlowDetails)) } attr_reader :source_flow_details - # The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). sig { returns(T.nilable(String)) } attr_reader :source_flow_type end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end - # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach - # The type of flow that originated the ReceivedCredit. sig { returns(String) } attr_reader :type end class ReversalDetails < Stripe::StripeObject - # Time before which a ReceivedCredit can be reversed. sig { returns(T.nilable(Integer)) } attr_reader :deadline - # Set if a ReceivedCredit cannot be reversed. sig { returns(T.nilable(String)) } attr_reader :restricted_reason end - # Amount (in cents) transferred. sig { returns(Integer) } + # Amount (in cents) transferred. attr_reader :amount - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(String) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. sig { returns(T.nilable(String)) } + # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. attr_reader :failure_code - - # The FinancialAccount that received the funds. sig { returns(T.nilable(String)) } + # The FinancialAccount that received the funds. attr_reader :financial_account - - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Attribute for field initiating_payment_method_details sig { returns(InitiatingPaymentMethodDetails) } + # Attribute for field initiating_payment_method_details attr_reader :initiating_payment_method_details - - # Attribute for field linked_flows sig { returns(LinkedFlows) } + # Attribute for field linked_flows attr_reader :linked_flows - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The rails used to send the funds. sig { returns(String) } + # The rails used to send the funds. attr_reader :network - - # Details specific to the money movement rails. sig { returns(T.nilable(NetworkDetails)) } + # Details specific to the money movement rails. attr_reader :network_details - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Details describing when a ReceivedCredit may be reversed. sig { returns(T.nilable(ReversalDetails)) } + # Details describing when a ReceivedCredit may be reversed. attr_reader :reversal_details - - # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. sig { returns(String) } + # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. attr_reader :status - - # The Transaction associated with this object. sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/received_debit.rbi b/rbi/stripe/resources/treasury/received_debit.rbi index eff9d4935..acd5e2a18 100644 --- a/rbi/stripe/resources/treasury/received_debit.rbi +++ b/rbi/stripe/resources/treasury/received_debit.rbi @@ -9,180 +9,133 @@ module Stripe class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city - # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country - # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 - # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 - # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code - # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - # Attribute for field address sig { returns(Address) } attr_reader :address - # Email address. sig { returns(T.nilable(String)) } attr_reader :email - # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject - # The FinancialAccount ID. sig { returns(String) } attr_reader :id - # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject - # Bank name. sig { returns(T.nilable(String)) } attr_reader :bank_name - # The last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 - # The routing number for the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end - # Set when `type` is `balance`. sig { returns(String) } attr_reader :balance - # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details - # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account - # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. sig { returns(String) } attr_reader :issuing_card - # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. sig { returns(String) } attr_reader :type - # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject - # The DebitReversal created as a result of this ReceivedDebit being reversed. sig { returns(T.nilable(String)) } attr_reader :debit_reversal - # Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. sig { returns(T.nilable(String)) } attr_reader :inbound_transfer - # Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. sig { returns(T.nilable(String)) } attr_reader :issuing_authorization - # Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. sig { returns(T.nilable(String)) } attr_reader :issuing_transaction - # Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. sig { returns(T.nilable(String)) } attr_reader :payout - # The ReceivedCredit that Capital withheld from sig { returns(T.nilable(String)) } attr_reader :received_credit_capital_withholding end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject - # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end - # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach - # The type of flow that originated the ReceivedDebit. sig { returns(String) } attr_reader :type end class ReversalDetails < Stripe::StripeObject - # Time before which a ReceivedDebit can be reversed. sig { returns(T.nilable(Integer)) } attr_reader :deadline - # Set if a ReceivedDebit can't be reversed. sig { returns(T.nilable(String)) } attr_reader :restricted_reason end - # Amount (in cents) transferred. sig { returns(Integer) } + # Amount (in cents) transferred. attr_reader :amount - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(String) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. sig { returns(T.nilable(String)) } + # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. attr_reader :failure_code - - # The FinancialAccount that funds were pulled from. sig { returns(T.nilable(String)) } + # The FinancialAccount that funds were pulled from. attr_reader :financial_account - - # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. sig { returns(T.nilable(String)) } + # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. attr_reader :hosted_regulatory_receipt_url - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Attribute for field initiating_payment_method_details sig { returns(InitiatingPaymentMethodDetails) } + # Attribute for field initiating_payment_method_details attr_reader :initiating_payment_method_details - - # Attribute for field linked_flows sig { returns(LinkedFlows) } + # Attribute for field linked_flows attr_reader :linked_flows - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # The network used for the ReceivedDebit. sig { returns(String) } + # The network used for the ReceivedDebit. attr_reader :network - - # Details specific to the money movement rails. sig { returns(T.nilable(NetworkDetails)) } + # Details specific to the money movement rails. attr_reader :network_details - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Details describing when a ReceivedDebit might be reversed. sig { returns(T.nilable(ReversalDetails)) } + # Details describing when a ReceivedDebit might be reversed. attr_reader :reversal_details - - # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. sig { returns(String) } + # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. attr_reader :status - - # The Transaction associated with this object. sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } + # The Transaction associated with this object. attr_reader :transaction end end diff --git a/rbi/stripe/resources/treasury/transaction.rbi b/rbi/stripe/resources/treasury/transaction.rbi index 25f487040..68c4c2e71 100644 --- a/rbi/stripe/resources/treasury/transaction.rbi +++ b/rbi/stripe/resources/treasury/transaction.rbi @@ -7,125 +7,83 @@ module Stripe # Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. class Transaction < APIResource class BalanceImpact < Stripe::StripeObject - # The change made to funds the user can spend right now. sig { returns(Integer) } attr_reader :cash - # The change made to funds that are not spendable yet, but will become available at a later time. sig { returns(Integer) } attr_reader :inbound_pending - # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(Integer) } attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject - # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal - # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. sig { returns(Stripe::Treasury::DebitReversal) } attr_reader :debit_reversal - # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. - # - # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) sig { returns(Stripe::Treasury::InboundTransfer) } attr_reader :inbound_transfer - # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` - # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the - # purchase to be completed successfully. - # - # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) sig { returns(Stripe::Issuing::Authorization) } attr_reader :issuing_authorization - # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). - # - # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment - # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. - # - # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) sig { returns(Stripe::Treasury::OutboundTransfer) } attr_reader :outbound_transfer - # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedCredit) } attr_reader :received_credit - # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedDebit) } attr_reader :received_debit - # Type of the flow that created the Transaction. Set to the same value as `flow_type`. sig { returns(String) } attr_reader :type end class StatusTransitions < Stripe::StripeObject - # Timestamp describing when the Transaction changed status to `posted`. sig { returns(T.nilable(Integer)) } attr_reader :posted_at - # Timestamp describing when the Transaction changed status to `void`. sig { returns(T.nilable(Integer)) } attr_reader :void_at end - # Amount (in cents) transferred. sig { returns(Integer) } + # Amount (in cents) transferred. attr_reader :amount - - # Change to a FinancialAccount's balance sig { returns(BalanceImpact) } + # Change to a FinancialAccount's balance attr_reader :balance_impact - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(String) } + # An arbitrary string attached to the object. Often useful for displaying to users. attr_reader :description - - # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. sig { returns(T.nilable(Stripe::ListObject)) } + # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. attr_reader :entries - - # The FinancialAccount associated with this object. sig { returns(String) } + # The FinancialAccount associated with this object. attr_reader :financial_account - - # ID of the flow that created the Transaction. sig { returns(T.nilable(String)) } + # ID of the flow that created the Transaction. attr_reader :flow - - # Details of the flow that created the Transaction. sig { returns(T.nilable(FlowDetails)) } + # Details of the flow that created the Transaction. attr_reader :flow_details - - # Type of the flow that created the Transaction. sig { returns(String) } + # Type of the flow that created the Transaction. attr_reader :flow_type - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Status of the Transaction. sig { returns(String) } + # Status of the Transaction. attr_reader :status - - # Attribute for field status_transitions sig { returns(StatusTransitions) } + # Attribute for field status_transitions attr_reader :status_transitions end end diff --git a/rbi/stripe/resources/treasury/transaction_entry.rbi b/rbi/stripe/resources/treasury/transaction_entry.rbi index 2b9b495b0..0bb3955a5 100644 --- a/rbi/stripe/resources/treasury/transaction_entry.rbi +++ b/rbi/stripe/resources/treasury/transaction_entry.rbi @@ -7,109 +7,71 @@ module Stripe # TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). class TransactionEntry < APIResource class BalanceImpact < Stripe::StripeObject - # The change made to funds the user can spend right now. sig { returns(Integer) } attr_reader :cash - # The change made to funds that are not spendable yet, but will become available at a later time. sig { returns(Integer) } attr_reader :inbound_pending - # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(Integer) } attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject - # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal - # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. sig { returns(Stripe::Treasury::DebitReversal) } attr_reader :debit_reversal - # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. - # - # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) sig { returns(Stripe::Treasury::InboundTransfer) } attr_reader :inbound_transfer - # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` - # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the - # purchase to be completed successfully. - # - # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) sig { returns(Stripe::Issuing::Authorization) } attr_reader :issuing_authorization - # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). - # - # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment - # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. - # - # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. - # - # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) sig { returns(Stripe::Treasury::OutboundTransfer) } attr_reader :outbound_transfer - # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedCredit) } attr_reader :received_credit - # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedDebit) } attr_reader :received_debit - # Type of the flow that created the Transaction. Set to the same value as `flow_type`. sig { returns(String) } attr_reader :type end - # Change to a FinancialAccount's balance sig { returns(BalanceImpact) } + # Change to a FinancialAccount's balance attr_reader :balance_impact - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). attr_reader :currency - - # When the TransactionEntry will impact the FinancialAccount's balance. sig { returns(Integer) } + # When the TransactionEntry will impact the FinancialAccount's balance. attr_reader :effective_at - - # The FinancialAccount associated with this object. sig { returns(String) } + # The FinancialAccount associated with this object. attr_reader :financial_account - - # Token of the flow associated with the TransactionEntry. sig { returns(T.nilable(String)) } + # Token of the flow associated with the TransactionEntry. attr_reader :flow - - # Details of the flow associated with the TransactionEntry. sig { returns(T.nilable(FlowDetails)) } + # Details of the flow associated with the TransactionEntry. attr_reader :flow_details - - # Type of the flow associated with the TransactionEntry. sig { returns(String) } + # Type of the flow associated with the TransactionEntry. attr_reader :flow_type - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } + # The Transaction associated with this object. attr_reader :transaction - - # The specific money movement that generated the TransactionEntry. sig { returns(String) } + # The specific money movement that generated the TransactionEntry. attr_reader :type end end diff --git a/rbi/stripe/resources/usage_record.rbi b/rbi/stripe/resources/usage_record.rbi index ebf73d749..19a45b9da 100644 --- a/rbi/stripe/resources/usage_record.rbi +++ b/rbi/stripe/resources/usage_record.rbi @@ -10,28 +10,23 @@ module Stripe # # This is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based). class UsageRecord < APIResource - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The usage quantity for the specified date. sig { returns(Integer) } + # The usage quantity for the specified date. attr_reader :quantity - - # The ID of the subscription item this usage record contains data for. sig { returns(String) } + # The ID of the subscription item this usage record contains data for. attr_reader :subscription_item - - # The timestamp when this usage occurred. sig { returns(Integer) } + # The timestamp when this usage occurred. attr_reader :timestamp end end \ No newline at end of file diff --git a/rbi/stripe/resources/usage_record_summary.rbi b/rbi/stripe/resources/usage_record_summary.rbi index ae0d8c170..9524b5741 100644 --- a/rbi/stripe/resources/usage_record_summary.rbi +++ b/rbi/stripe/resources/usage_record_summary.rbi @@ -6,39 +6,31 @@ module Stripe # A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. class UsageRecordSummary < StripeObject class Period < Stripe::StripeObject - # The end date of this usage period. All usage up to and including this point in time is included. sig { returns(T.nilable(Integer)) } attr_reader :end - # The start date of this usage period. All usage after this point in time is included. sig { returns(T.nilable(Integer)) } attr_reader :start end - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # The invoice in which this usage period has been billed for. sig { returns(T.nilable(String)) } + # The invoice in which this usage period has been billed for. attr_reader :invoice - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # Attribute for field period sig { returns(Period) } + # Attribute for field period attr_reader :period - - # The ID of the subscription item this summary is describing. sig { returns(String) } + # The ID of the subscription item this summary is describing. attr_reader :subscription_item - - # The total usage within this usage period. sig { returns(Integer) } + # The total usage within this usage period. attr_reader :total_usage end end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/billing/meter_event.rbi b/rbi/stripe/resources/v2/billing/meter_event.rbi index 69665cb66..ae44845c5 100644 --- a/rbi/stripe/resources/v2/billing/meter_event.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event.rbi @@ -7,35 +7,29 @@ module Stripe module Billing # Fix me empty_doc_string. class MeterEvent < APIResource - # The creation time of this meter event. sig { returns(String) } + # The creation time of this meter event. attr_reader :created - - # The name of the meter event. Corresponds with the `event_name` field on a meter. sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name - - # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. sig { returns(String) } + # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. attr_reader :identifier - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - + sig { returns(T::Hash[String, String]) } # The payload of the event. This must contain the fields corresponding to a meter’s # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and # `value_settings.event_payload_key` (default is `value`). Read more about the payload. - sig { returns(T::Hash[String, String]) } attr_reader :payload - + sig { returns(String) } # The time of the event. Must be within the past 35 calendar days or up to # 5 minutes in the future. Defaults to current timestamp if not specified. - sig { returns(String) } attr_reader :timestamp end end diff --git a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi index 6701ef32a..c58053b98 100644 --- a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi @@ -7,40 +7,32 @@ module Stripe module Billing class MeterEventAdjustment < APIResource class Cancel < Stripe::StripeObject - # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. sig { returns(String) } attr_reader :identifier end - # Specifies which event to cancel. sig { returns(Cancel) } + # Specifies which event to cancel. attr_reader :cancel - - # The time the adjustment was created. sig { returns(String) } + # The time the adjustment was created. attr_reader :created - - # The name of the meter event. Corresponds with the `event_name` field on a meter. sig { returns(String) } + # The name of the meter event. Corresponds with the `event_name` field on a meter. attr_reader :event_name - - # The unique id of this meter event adjustment. sig { returns(String) } + # The unique id of this meter event adjustment. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - - # Open Enum. The meter event adjustment’s status. sig { returns(String) } + # Open Enum. The meter event adjustment’s status. attr_reader :status - - # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. sig { returns(String) } + # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. attr_reader :type end end diff --git a/rbi/stripe/resources/v2/billing/meter_event_session.rbi b/rbi/stripe/resources/v2/billing/meter_event_session.rbi index c70d2a261..4dbab8e6b 100644 --- a/rbi/stripe/resources/v2/billing/meter_event_session.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event_session.rbi @@ -6,29 +6,24 @@ module Stripe module V2 module Billing class MeterEventSession < APIResource + sig { returns(String) } # The authentication token for this session. Use this token when calling the # high-throughput meter event API. - sig { returns(String) } attr_reader :authentication_token - - # The creation time of this session. sig { returns(String) } + # The creation time of this session. attr_reader :created - - # The time at which this session will expire. sig { returns(String) } + # The time at which this session will expire. attr_reader :expires_at - - # The unique id of this auth session. sig { returns(String) } + # The unique id of this auth session. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object end end diff --git a/rbi/stripe/resources/v2/event.rbi b/rbi/stripe/resources/v2/event.rbi index 7cd77aba1..4b6821920 100644 --- a/rbi/stripe/resources/v2/event.rbi +++ b/rbi/stripe/resources/v2/event.rbi @@ -7,46 +7,36 @@ module Stripe class Event < APIResource class Reason < Stripe::StripeObject class Request < Stripe::StripeObject - # ID of the API request that caused the event. sig { returns(String) } attr_reader :id - # The idempotency key transmitted during the request. sig { returns(String) } attr_reader :idempotency_key end - # Event reason type. sig { returns(String) } attr_reader :type - # Information on the API request that instigated the event. sig { returns(T.nilable(Request)) } attr_reader :request end - # Authentication context needed to fetch the event or related object. sig { returns(T.nilable(String)) } + # Authentication context needed to fetch the event or related object. attr_reader :context - - # Time at which the object was created. sig { returns(String) } + # Time at which the object was created. attr_reader :created - - # Unique identifier for the event. sig { returns(String) } + # Unique identifier for the event. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - - # Reason for the event. sig { returns(T.nilable(Reason)) } + # Reason for the event. attr_reader :reason - - # The type of the event. sig { returns(String) } + # The type of the event. attr_reader :type end end diff --git a/rbi/stripe/resources/v2/event_destination.rbi b/rbi/stripe/resources/v2/event_destination.rbi index 5872889bf..91f97cd28 100644 --- a/rbi/stripe/resources/v2/event_destination.rbi +++ b/rbi/stripe/resources/v2/event_destination.rbi @@ -7,99 +7,76 @@ module Stripe class EventDestination < APIResource class StatusDetails < Stripe::StripeObject class Disabled < Stripe::StripeObject - # Reason event destination has been disabled. sig { returns(String) } attr_reader :reason end - # Details about why the event destination has been disabled. sig { returns(T.nilable(Disabled)) } attr_reader :disabled end class AmazonEventbridge < Stripe::StripeObject - # The AWS account ID. sig { returns(String) } attr_reader :aws_account_id - # The ARN of the AWS event source. sig { returns(String) } attr_reader :aws_event_source_arn - # The state of the AWS event source. sig { returns(String) } attr_reader :aws_event_source_status end class WebhookEndpoint < Stripe::StripeObject - # The signing secret of the webhook endpoint, only includable on creation. sig { returns(T.nilable(String)) } attr_reader :signing_secret - # The URL of the webhook endpoint, includable. sig { returns(T.nilable(String)) } attr_reader :url end - # Time at which the object was created. sig { returns(String) } + # Time at which the object was created. attr_reader :created - - # An optional description of what the event destination is used for. sig { returns(String) } + # An optional description of what the event destination is used for. attr_reader :description - - # The list of events to enable for this endpoint. sig { returns(T::Array[String]) } + # The list of events to enable for this endpoint. attr_reader :enabled_events - - # Payload type of events being subscribed to. sig { returns(String) } + # Payload type of events being subscribed to. attr_reader :event_payload - - # Where events should be routed from. sig { returns(T.nilable(T::Array[String])) } + # Where events should be routed from. attr_reader :events_from - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Metadata. sig { returns(T.nilable(T::Hash[String, String])) } + # Metadata. attr_reader :metadata - - # Event destination name. sig { returns(String) } + # Event destination name. attr_reader :name - - # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - - # If using the snapshot event payload, the API version events are rendered as. sig { returns(T.nilable(String)) } + # If using the snapshot event payload, the API version events are rendered as. attr_reader :snapshot_api_version - - # Status. It can be set to either enabled or disabled. sig { returns(String) } + # Status. It can be set to either enabled or disabled. attr_reader :status - - # Additional information about event destination status. sig { returns(T.nilable(StatusDetails)) } + # Additional information about event destination status. attr_reader :status_details - - # Event destination type. sig { returns(String) } + # Event destination type. attr_reader :type - - # Time at which the object was last updated. sig { returns(String) } + # Time at which the object was last updated. attr_reader :updated - - # Amazon EventBridge configuration. sig { returns(T.nilable(AmazonEventbridge)) } + # Amazon EventBridge configuration. attr_reader :amazon_eventbridge - - # Webhook endpoint configuration. sig { returns(T.nilable(WebhookEndpoint)) } + # Webhook endpoint configuration. attr_reader :webhook_endpoint end end diff --git a/rbi/stripe/resources/webhook_endpoint.rbi b/rbi/stripe/resources/webhook_endpoint.rbi index 3894a599a..b72d73542 100644 --- a/rbi/stripe/resources/webhook_endpoint.rbi +++ b/rbi/stripe/resources/webhook_endpoint.rbi @@ -11,56 +11,44 @@ module Stripe # # Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) class WebhookEndpoint < APIResource - # The API version events are rendered as for this webhook endpoint. sig { returns(T.nilable(String)) } + # The API version events are rendered as for this webhook endpoint. attr_reader :api_version - - # The ID of the associated Connect application. sig { returns(T.nilable(String)) } + # The ID of the associated Connect application. attr_reader :application - - # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } + # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created - - # An optional description of what the webhook is used for. sig { returns(T.nilable(String)) } + # An optional description of what the webhook is used for. attr_reader :description - - # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. sig { returns(T::Array[String]) } + # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. attr_reader :enabled_events - - # Unique identifier for the object. sig { returns(String) } + # Unique identifier for the object. attr_reader :id - - # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } + # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode - - # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. attr_reader :metadata - - # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } + # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. sig { returns(String) } + # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. attr_reader :secret - - # The status of the webhook. It can be `enabled` or `disabled`. sig { returns(String) } + # The status of the webhook. It can be `enabled` or `disabled`. attr_reader :status - - # The URL of the webhook endpoint. sig { returns(String) } + # The URL of the webhook endpoint. attr_reader :url - - # Always true for a deleted object sig { returns(T::Boolean) } + # Always true for a deleted object attr_reader :deleted end end \ No newline at end of file