stripe 14.1.0.pre.beta.1 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +689 -1512
- data/OPENAPI_VERSION +1 -1
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/stripe/api_operations/save.rb +2 -1
- data/lib/stripe/api_operations/singleton_save.rb +2 -1
- data/lib/stripe/api_requestor.rb +3 -29
- data/lib/stripe/api_resource.rb +10 -3
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +0 -54
- data/lib/stripe/event_types.rb +0 -75
- data/lib/stripe/object_types.rb +0 -48
- data/lib/stripe/request_options.rb +2 -1
- data/lib/stripe/resources/account.rb +1 -653
- data/lib/stripe/resources/account_session.rb +1 -247
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +0 -10
- data/lib/stripe/resources/billing_portal/session.rb +0 -6
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +0 -1454
- data/lib/stripe/resources/checkout/session.rb +4 -260
- data/lib/stripe/resources/confirmation_token.rb +0 -234
- data/lib/stripe/resources/coupon.rb +1 -1
- data/lib/stripe/resources/credit_note.rb +0 -10
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +0 -2
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +1 -6
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/event.rb +0 -33
- data/lib/stripe/resources/financial_connections/account.rb +1 -20
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +16 -1176
- data/lib/stripe/resources/invoice_item.rb +2 -78
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/transaction.rb +0 -6
- data/lib/stripe/resources/line_item.rb +0 -37
- data/lib/stripe/resources/mandate.rb +0 -24
- data/lib/stripe/resources/payment_intent.rb +307 -5109
- data/lib/stripe/resources/payment_method.rb +1 -196
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/payout.rb +0 -6
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/product.rb +0 -59
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +6 -2042
- data/lib/stripe/resources/refund.rb +0 -9
- data/lib/stripe/resources/setup_attempt.rb +0 -21
- data/lib/stripe/resources/setup_intent.rb +9 -596
- data/lib/stripe/resources/source.rb +1 -30
- data/lib/stripe/resources/subscription.rb +9 -292
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +10 -1007
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/reader.rb +0 -406
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources.rb +0 -85
- data/lib/stripe/services/account_service.rb +1 -562
- data/lib/stripe/services/account_session_service.rb +1 -217
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +0 -1334
- data/lib/stripe/services/checkout/session_service.rb +2 -172
- data/lib/stripe/services/credit_note_service.rb +0 -4
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/invoice_item_service.rb +2 -74
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +33 -5
- data/lib/stripe/services/invoice_service.rb +17 -1088
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +264 -4637
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +1 -126
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/product_service.rb +0 -38
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +7 -1726
- data/lib/stripe/services/setup_intent_service.rb +9 -556
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +10 -911
- data/lib/stripe/services/subscription_service.rb +9 -253
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/reader_service.rb +0 -180
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -148
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -10
- data/lib/stripe/services/v2/core/event_service.rb +5 -3
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +2 -4
- data/lib/stripe/services.rb +0 -49
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +14 -4
- data/lib/stripe/util.rb +12 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -55
- data/rbi/stripe/resources/account.rbi +4840 -0
- data/rbi/stripe/resources/account_link.rbi +74 -0
- data/rbi/stripe/resources/account_session.rbi +894 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +90 -0
- data/rbi/stripe/resources/application.rbi +20 -0
- data/rbi/stripe/resources/application_fee.rbi +118 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
- data/rbi/stripe/resources/apps/secret.rbi +195 -0
- data/rbi/stripe/resources/balance.rbi +180 -0
- data/rbi/stripe/resources/balance_transaction.rbi +144 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2054 -0
- data/rbi/stripe/resources/checkout/session.rbi +3951 -0
- data/rbi/stripe/resources/climate/order.rbi +245 -0
- data/rbi/stripe/resources/climate/product.rbi +75 -0
- data/rbi/stripe/resources/climate/supplier.rbi +72 -0
- data/rbi/stripe/resources/confirmation_token.rbi +1793 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
- data/rbi/stripe/resources/country_spec.rbi +85 -0
- data/rbi/stripe/resources/coupon.rbi +252 -0
- data/rbi/stripe/resources/credit_note.rbi +747 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1009 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
- data/rbi/stripe/resources/customer_session.rbi +200 -0
- data/rbi/stripe/resources/discount.rbi +53 -0
- data/rbi/stripe/resources/dispute.rbi +761 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
- data/rbi/stripe/resources/event.rbi +146 -0
- data/rbi/stripe/resources/exchange_rate.rbi +66 -0
- data/rbi/stripe/resources/file.rbi +143 -0
- data/rbi/stripe/resources/file_link.rbi +141 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
- data/rbi/stripe/resources/forwarding/request.rbi +216 -0
- data/rbi/stripe/resources/funding_instructions.rbi +437 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +351 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +517 -0
- data/rbi/stripe/resources/invoice.rbi +3733 -0
- data/rbi/stripe/resources/invoice_item.rbi +475 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +114 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
- data/rbi/stripe/resources/issuing/card.rbi +741 -0
- data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
- data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
- data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
- data/rbi/stripe/resources/issuing/token.rbi +226 -0
- data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
- data/rbi/stripe/resources/line_item.rbi +72 -0
- data/rbi/stripe/resources/login_link.rbi +18 -0
- data/rbi/stripe/resources/mandate.rbi +187 -0
- data/rbi/stripe/resources/payment_intent.rbi +9731 -0
- data/rbi/stripe/resources/payment_link.rbi +1801 -0
- data/rbi/stripe/resources/payment_method.rbi +1822 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3154 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +212 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +371 -0
- data/rbi/stripe/resources/plan.rbi +373 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +557 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +261 -0
- data/rbi/stripe/resources/quote.rbi +1123 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +170 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +131 -0
- data/rbi/stripe/resources/refund.rbi +516 -0
- data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
- data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
- data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
- data/rbi/stripe/resources/reversal.rbi +51 -0
- data/rbi/stripe/resources/review.rbi +154 -0
- data/rbi/stripe/resources/setup_attempt.rbi +477 -0
- data/rbi/stripe/resources/setup_intent.rbi +3860 -0
- data/rbi/stripe/resources/shipping_rate.rbi +305 -0
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
- data/rbi/stripe/resources/source.rbi +1496 -0
- data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
- data/rbi/stripe/resources/source_transaction.rbi +127 -0
- data/rbi/stripe/resources/subscription.rbi +1964 -0
- data/rbi/stripe/resources/subscription_item.rbi +370 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1495 -0
- data/rbi/stripe/resources/tax/calculation.rbi +474 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
- data/rbi/stripe/resources/tax/registration.rbi +2485 -0
- data/rbi/stripe/resources/tax/settings.rbi +141 -0
- data/rbi/stripe/resources/tax/transaction.rbi +351 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
- data/rbi/stripe/resources/tax_code.rbi +44 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
- data/rbi/stripe/resources/tax_id.rbi +167 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1388 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +224 -0
- data/rbi/stripe/resources/terminal/reader.rbi +587 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +134 -0
- data/rbi/stripe/resources/token.rbi +1217 -0
- data/rbi/stripe/resources/topup.rbi +222 -0
- data/rbi/stripe/resources/transfer.rbi +199 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
- data/rbi/stripe/resources/v2/event.rbi +48 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +170 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/rbi/stripe/services/account_external_account_service.rbi +306 -0
- data/rbi/stripe/services/account_link_service.rbi +58 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +923 -0
- data/rbi/stripe/services/account_service.rbi +4143 -0
- data/rbi/stripe/services/account_session_service.rbi +572 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2585 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +142 -0
- data/rbi/stripe/services/climate/product_service.rbi +46 -0
- data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
- data/rbi/stripe/services/climate_service.rbi +11 -0
- data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
- data/rbi/stripe/services/country_spec_service.rbi +44 -0
- data/rbi/stripe/services/coupon_service.rbi +196 -0
- data/{lib/stripe/services/quote_preview_subscription_schedule_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +416 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
- data/rbi/stripe/services/customer_service.rbi +651 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
- data/rbi/stripe/services/dispute_service.rbi +424 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
- data/rbi/stripe/services/event_service.rbi +83 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
- data/rbi/stripe/services/file_link_service.rbi +124 -0
- data/rbi/stripe/services/file_service.rbi +116 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
- data/rbi/stripe/services/financial_connections_service.rbi +11 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +368 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
- data/rbi/stripe/services/invoice_service.rbi +2920 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +495 -0
- data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
- data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
- data/rbi/stripe/services/issuing/token_service.rbi +99 -0
- data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
- data/rbi/stripe/services/issuing_service.rbi +16 -0
- data/rbi/stripe/services/mandate_service.rbi +20 -0
- data/rbi/stripe/services/payment_intent_service.rbi +7759 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1352 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2211 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +840 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +284 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +69 -0
- data/rbi/stripe/services/product_service.rbi +479 -0
- data/rbi/stripe/services/promotion_code_service.rbi +214 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
- data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/quote_service.rbi +686 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +111 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +143 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +185 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +84 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
- data/rbi/stripe/services/setup_intent_service.rbi +3596 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +663 -0
- data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +324 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1192 -0
- data/rbi/stripe/services/subscription_service.rbi +1596 -0
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
- data/rbi/stripe/services/tax/calculation_service.rbi +230 -0
- data/rbi/stripe/services/tax/registration_service.rbi +1689 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +112 -0
- data/rbi/stripe/services/tax_rate_service.rbi +185 -0
- data/rbi/stripe/services/tax_service.rbi +12 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +1120 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +184 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +344 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
- data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
- data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +62 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +92 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
- data/rbi/stripe/services/test_helpers_service.rbi +15 -0
- data/rbi/stripe/services/token_service.rbi +1189 -0
- data/rbi/stripe/services/topup_service.rbi +176 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
- data/rbi/stripe/services/transfer_service.rbi +152 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +77 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +200 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +38 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
- data/stripe.gemspec +1 -4
- metadata +324 -140
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
- data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -101
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- data/lib/stripe/resources/capital/financing_offer.rb +0 -179
- data/lib/stripe/resources/capital/financing_summary.rb +0 -55
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -90
- data/lib/stripe/resources/gift_cards/card.rb +0 -208
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
- data/lib/stripe/resources/issuing/settlement.rb +0 -53
- data/lib/stripe/resources/margin.rb +0 -115
- data/lib/stripe/resources/order.rb +0 -2859
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1078
- data/lib/stripe/resources/payment_record.rb +0 -1607
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -337
- data/lib/stripe/resources/tax/association.rb +0 -89
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1715
- data/lib/stripe/resources/v2/core/account_link.rb +0 -54
- data/lib/stripe/resources/v2/core/person.rb +0 -272
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -72
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -37
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -18
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -20
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -49
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -56
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -66
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -92
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -127
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -74
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -43
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -115
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -73
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -47
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -134
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -106
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -76
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -66
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/balance_settings_service.rb +0 -96
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/external_account_service.rb +0 -206
- data/lib/stripe/services/gift_cards/card_service.rb +0 -170
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
- data/lib/stripe/services/gift_cards_service.rb +0 -14
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_service.rb +0 -2268
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
- data/lib/stripe/services/v2/core/account_service.rb +0 -4130
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1040
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -135
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -109
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -75
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -44
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -126
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -80
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -202
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -237
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -174
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -71
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -44
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -74
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -50
- data/rbi/stripe.rbi +0 -189274
@@ -0,0 +1,3733 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# typed: true
|
5
|
+
module Stripe
|
6
|
+
# Invoices are statements of amounts owed by a customer, and are either
|
7
|
+
# generated one-off, or generated periodically from a subscription.
|
8
|
+
#
|
9
|
+
# They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
|
10
|
+
# that may be caused by subscription upgrades/downgrades (if necessary).
|
11
|
+
#
|
12
|
+
# If your invoice is configured to be billed through automatic charges,
|
13
|
+
# Stripe automatically finalizes your invoice and attempts payment. Note
|
14
|
+
# that finalizing the invoice,
|
15
|
+
# [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
|
16
|
+
# not happen immediately as the invoice is created. Stripe waits
|
17
|
+
# until one hour after the last webhook was successfully sent (or the last
|
18
|
+
# webhook timed out after failing). If you (and the platforms you may have
|
19
|
+
# connected to) have no webhooks configured, Stripe waits one hour after
|
20
|
+
# creation to finalize the invoice.
|
21
|
+
#
|
22
|
+
# If your invoice is configured to be billed by sending an email, then based on your
|
23
|
+
# [email settings](https://dashboard.stripe.com/account/billing/automatic),
|
24
|
+
# Stripe will email the invoice to your customer and await payment. These
|
25
|
+
# emails can contain a link to a hosted page to pay the invoice.
|
26
|
+
#
|
27
|
+
# Stripe applies any customer credit on the account before determining the
|
28
|
+
# amount due for the invoice (i.e., the amount that will be actually
|
29
|
+
# charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
|
30
|
+
# per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
|
31
|
+
# invoice is automatically marked paid, and we add the amount due to the
|
32
|
+
# customer's credit balance which is applied to the next invoice.
|
33
|
+
#
|
34
|
+
# More details on the customer's credit balance are
|
35
|
+
# [here](https://stripe.com/docs/billing/customer/balance).
|
36
|
+
#
|
37
|
+
# Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
|
38
|
+
class Invoice < APIResource
|
39
|
+
class AutomaticTax < Stripe::StripeObject
|
40
|
+
class Liability < Stripe::StripeObject
|
41
|
+
# The connected account being referenced when `type` is `account`.
|
42
|
+
sig { returns(T.any(String, Stripe::Account)) }
|
43
|
+
attr_reader :account
|
44
|
+
# Type of the account referenced.
|
45
|
+
sig { returns(String) }
|
46
|
+
attr_reader :type
|
47
|
+
end
|
48
|
+
# If Stripe disabled automatic tax, this enum describes why.
|
49
|
+
sig { returns(T.nilable(String)) }
|
50
|
+
attr_reader :disabled_reason
|
51
|
+
# 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.
|
52
|
+
sig { returns(T::Boolean) }
|
53
|
+
attr_reader :enabled
|
54
|
+
# 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.
|
55
|
+
sig { returns(T.nilable(Liability)) }
|
56
|
+
attr_reader :liability
|
57
|
+
# The status of the most recent automated tax calculation for this invoice.
|
58
|
+
sig { returns(T.nilable(String)) }
|
59
|
+
attr_reader :status
|
60
|
+
end
|
61
|
+
class ConfirmationSecret < Stripe::StripeObject
|
62
|
+
# The client_secret of the payment that Stripe creates for the invoice after finalization.
|
63
|
+
sig { returns(String) }
|
64
|
+
attr_reader :client_secret
|
65
|
+
# The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization
|
66
|
+
sig { returns(String) }
|
67
|
+
attr_reader :type
|
68
|
+
end
|
69
|
+
class CustomField < Stripe::StripeObject
|
70
|
+
# The name of the custom field.
|
71
|
+
sig { returns(String) }
|
72
|
+
attr_reader :name
|
73
|
+
# The value of the custom field.
|
74
|
+
sig { returns(String) }
|
75
|
+
attr_reader :value
|
76
|
+
end
|
77
|
+
class CustomerAddress < Stripe::StripeObject
|
78
|
+
# City, district, suburb, town, or village.
|
79
|
+
sig { returns(T.nilable(String)) }
|
80
|
+
attr_reader :city
|
81
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
82
|
+
sig { returns(T.nilable(String)) }
|
83
|
+
attr_reader :country
|
84
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
85
|
+
sig { returns(T.nilable(String)) }
|
86
|
+
attr_reader :line1
|
87
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
88
|
+
sig { returns(T.nilable(String)) }
|
89
|
+
attr_reader :line2
|
90
|
+
# ZIP or postal code.
|
91
|
+
sig { returns(T.nilable(String)) }
|
92
|
+
attr_reader :postal_code
|
93
|
+
# State, county, province, or region.
|
94
|
+
sig { returns(T.nilable(String)) }
|
95
|
+
attr_reader :state
|
96
|
+
end
|
97
|
+
class CustomerShipping < Stripe::StripeObject
|
98
|
+
class Address < Stripe::StripeObject
|
99
|
+
# City, district, suburb, town, or village.
|
100
|
+
sig { returns(T.nilable(String)) }
|
101
|
+
attr_reader :city
|
102
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
103
|
+
sig { returns(T.nilable(String)) }
|
104
|
+
attr_reader :country
|
105
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
106
|
+
sig { returns(T.nilable(String)) }
|
107
|
+
attr_reader :line1
|
108
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
109
|
+
sig { returns(T.nilable(String)) }
|
110
|
+
attr_reader :line2
|
111
|
+
# ZIP or postal code.
|
112
|
+
sig { returns(T.nilable(String)) }
|
113
|
+
attr_reader :postal_code
|
114
|
+
# State, county, province, or region.
|
115
|
+
sig { returns(T.nilable(String)) }
|
116
|
+
attr_reader :state
|
117
|
+
end
|
118
|
+
# Attribute for field address
|
119
|
+
sig { returns(Address) }
|
120
|
+
attr_reader :address
|
121
|
+
# The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
|
122
|
+
sig { returns(T.nilable(String)) }
|
123
|
+
attr_reader :carrier
|
124
|
+
# Recipient name.
|
125
|
+
sig { returns(String) }
|
126
|
+
attr_reader :name
|
127
|
+
# Recipient phone (including extension).
|
128
|
+
sig { returns(T.nilable(String)) }
|
129
|
+
attr_reader :phone
|
130
|
+
# 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.
|
131
|
+
sig { returns(T.nilable(String)) }
|
132
|
+
attr_reader :tracking_number
|
133
|
+
end
|
134
|
+
class CustomerTaxId < Stripe::StripeObject
|
135
|
+
# 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`, `al_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`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
|
136
|
+
sig { returns(String) }
|
137
|
+
attr_reader :type
|
138
|
+
# The value of the tax ID.
|
139
|
+
sig { returns(T.nilable(String)) }
|
140
|
+
attr_reader :value
|
141
|
+
end
|
142
|
+
class FromInvoice < Stripe::StripeObject
|
143
|
+
# The relation between this invoice and the cloned invoice
|
144
|
+
sig { returns(String) }
|
145
|
+
attr_reader :action
|
146
|
+
# The invoice that was cloned.
|
147
|
+
sig { returns(T.any(String, Stripe::Invoice)) }
|
148
|
+
attr_reader :invoice
|
149
|
+
end
|
150
|
+
class Issuer < Stripe::StripeObject
|
151
|
+
# The connected account being referenced when `type` is `account`.
|
152
|
+
sig { returns(T.any(String, Stripe::Account)) }
|
153
|
+
attr_reader :account
|
154
|
+
# Type of the account referenced.
|
155
|
+
sig { returns(String) }
|
156
|
+
attr_reader :type
|
157
|
+
end
|
158
|
+
class LastFinalizationError < Stripe::StripeObject
|
159
|
+
# For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
|
160
|
+
sig { returns(String) }
|
161
|
+
attr_reader :advice_code
|
162
|
+
# For card errors, the ID of the failed charge.
|
163
|
+
sig { returns(String) }
|
164
|
+
attr_reader :charge
|
165
|
+
# For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
|
166
|
+
sig { returns(String) }
|
167
|
+
attr_reader :code
|
168
|
+
# 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.
|
169
|
+
sig { returns(String) }
|
170
|
+
attr_reader :decline_code
|
171
|
+
# A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
|
172
|
+
sig { returns(String) }
|
173
|
+
attr_reader :doc_url
|
174
|
+
# A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
|
175
|
+
sig { returns(String) }
|
176
|
+
attr_reader :message
|
177
|
+
# 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.
|
178
|
+
sig { returns(String) }
|
179
|
+
attr_reader :network_advice_code
|
180
|
+
# 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.
|
181
|
+
sig { returns(String) }
|
182
|
+
attr_reader :network_decline_code
|
183
|
+
# 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.
|
184
|
+
sig { returns(String) }
|
185
|
+
attr_reader :param
|
186
|
+
# A PaymentIntent guides you through the process of collecting a payment from your customer.
|
187
|
+
# We recommend that you create exactly one PaymentIntent for each order or
|
188
|
+
# customer session in your system. You can reference the PaymentIntent later to
|
189
|
+
# see the history of payment attempts for a particular session.
|
190
|
+
#
|
191
|
+
# A PaymentIntent transitions through
|
192
|
+
# [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
|
193
|
+
# throughout its lifetime as it interfaces with Stripe.js to perform
|
194
|
+
# authentication flows and ultimately creates at most one successful charge.
|
195
|
+
#
|
196
|
+
# Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
|
197
|
+
sig { returns(Stripe::PaymentIntent) }
|
198
|
+
attr_reader :payment_intent
|
199
|
+
# PaymentMethod objects represent your customer's payment instruments.
|
200
|
+
# You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
|
201
|
+
# Customer objects to store instrument details for future payments.
|
202
|
+
#
|
203
|
+
# Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
|
204
|
+
sig { returns(Stripe::PaymentMethod) }
|
205
|
+
attr_reader :payment_method
|
206
|
+
# 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.
|
207
|
+
sig { returns(String) }
|
208
|
+
attr_reader :payment_method_type
|
209
|
+
# A URL to the request log entry in your dashboard.
|
210
|
+
sig { returns(String) }
|
211
|
+
attr_reader :request_log_url
|
212
|
+
# A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
|
213
|
+
# For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
|
214
|
+
# Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
|
215
|
+
#
|
216
|
+
# Create a SetupIntent when you're ready to collect your customer's payment credentials.
|
217
|
+
# Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
|
218
|
+
# The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
|
219
|
+
# you through the setup process.
|
220
|
+
#
|
221
|
+
# Successful SetupIntents result in payment credentials that are optimized for future payments.
|
222
|
+
# For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
|
223
|
+
# [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
|
224
|
+
# to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
|
225
|
+
# If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
|
226
|
+
# it automatically attaches the resulting payment method to that Customer after successful setup.
|
227
|
+
# We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
|
228
|
+
# PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
|
229
|
+
#
|
230
|
+
# By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
|
231
|
+
#
|
232
|
+
# Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
|
233
|
+
sig { returns(Stripe::SetupIntent) }
|
234
|
+
attr_reader :setup_intent
|
235
|
+
# Attribute for field source
|
236
|
+
sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) }
|
237
|
+
attr_reader :source
|
238
|
+
# The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
|
239
|
+
sig { returns(String) }
|
240
|
+
attr_reader :type
|
241
|
+
end
|
242
|
+
class Parent < Stripe::StripeObject
|
243
|
+
class QuoteDetails < Stripe::StripeObject
|
244
|
+
# The quote that generated this invoice
|
245
|
+
sig { returns(String) }
|
246
|
+
attr_reader :quote
|
247
|
+
end
|
248
|
+
class SubscriptionDetails < Stripe::StripeObject
|
249
|
+
# 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.
|
250
|
+
# *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
251
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
252
|
+
attr_reader :metadata
|
253
|
+
# The subscription that generated this invoice
|
254
|
+
sig { returns(T.any(String, Stripe::Subscription)) }
|
255
|
+
attr_reader :subscription
|
256
|
+
# Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
257
|
+
sig { returns(Integer) }
|
258
|
+
attr_reader :subscription_proration_date
|
259
|
+
end
|
260
|
+
# Details about the quote that generated this invoice
|
261
|
+
sig { returns(T.nilable(QuoteDetails)) }
|
262
|
+
attr_reader :quote_details
|
263
|
+
# Details about the subscription that generated this invoice
|
264
|
+
sig { returns(T.nilable(SubscriptionDetails)) }
|
265
|
+
attr_reader :subscription_details
|
266
|
+
# The type of parent that generated this invoice
|
267
|
+
sig { returns(String) }
|
268
|
+
attr_reader :type
|
269
|
+
end
|
270
|
+
class PaymentSettings < Stripe::StripeObject
|
271
|
+
class PaymentMethodOptions < Stripe::StripeObject
|
272
|
+
class AcssDebit < Stripe::StripeObject
|
273
|
+
class MandateOptions < Stripe::StripeObject
|
274
|
+
# Transaction type of the mandate.
|
275
|
+
sig { returns(T.nilable(String)) }
|
276
|
+
attr_reader :transaction_type
|
277
|
+
end
|
278
|
+
# Attribute for field mandate_options
|
279
|
+
sig { returns(MandateOptions) }
|
280
|
+
attr_reader :mandate_options
|
281
|
+
# Bank account verification method.
|
282
|
+
sig { returns(String) }
|
283
|
+
attr_reader :verification_method
|
284
|
+
end
|
285
|
+
class Bancontact < Stripe::StripeObject
|
286
|
+
# Preferred language of the Bancontact authorization page that the customer is redirected to.
|
287
|
+
sig { returns(String) }
|
288
|
+
attr_reader :preferred_language
|
289
|
+
end
|
290
|
+
class Card < Stripe::StripeObject
|
291
|
+
class Installments < Stripe::StripeObject
|
292
|
+
# Whether Installments are enabled for this Invoice.
|
293
|
+
sig { returns(T.nilable(T::Boolean)) }
|
294
|
+
attr_reader :enabled
|
295
|
+
end
|
296
|
+
# Attribute for field installments
|
297
|
+
sig { returns(Installments) }
|
298
|
+
attr_reader :installments
|
299
|
+
# 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.
|
300
|
+
sig { returns(T.nilable(String)) }
|
301
|
+
attr_reader :request_three_d_secure
|
302
|
+
end
|
303
|
+
class CustomerBalance < Stripe::StripeObject
|
304
|
+
class BankTransfer < Stripe::StripeObject
|
305
|
+
class EuBankTransfer < Stripe::StripeObject
|
306
|
+
# The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
|
307
|
+
sig { returns(String) }
|
308
|
+
attr_reader :country
|
309
|
+
end
|
310
|
+
# Attribute for field eu_bank_transfer
|
311
|
+
sig { returns(EuBankTransfer) }
|
312
|
+
attr_reader :eu_bank_transfer
|
313
|
+
# 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`.
|
314
|
+
sig { returns(T.nilable(String)) }
|
315
|
+
attr_reader :type
|
316
|
+
end
|
317
|
+
# Attribute for field bank_transfer
|
318
|
+
sig { returns(BankTransfer) }
|
319
|
+
attr_reader :bank_transfer
|
320
|
+
# The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
|
321
|
+
sig { returns(T.nilable(String)) }
|
322
|
+
attr_reader :funding_type
|
323
|
+
end
|
324
|
+
class Konbini < Stripe::StripeObject; end
|
325
|
+
class SepaDebit < Stripe::StripeObject; end
|
326
|
+
class UsBankAccount < Stripe::StripeObject
|
327
|
+
class FinancialConnections < Stripe::StripeObject
|
328
|
+
class Filters < Stripe::StripeObject
|
329
|
+
# The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
330
|
+
sig { returns(T::Array[String]) }
|
331
|
+
attr_reader :account_subcategories
|
332
|
+
end
|
333
|
+
# Attribute for field filters
|
334
|
+
sig { returns(Filters) }
|
335
|
+
attr_reader :filters
|
336
|
+
# The list of permissions to request. The `payment_method` permission must be included.
|
337
|
+
sig { returns(T::Array[String]) }
|
338
|
+
attr_reader :permissions
|
339
|
+
# Data features requested to be retrieved upon account creation.
|
340
|
+
sig { returns(T.nilable(T::Array[String])) }
|
341
|
+
attr_reader :prefetch
|
342
|
+
end
|
343
|
+
# Attribute for field financial_connections
|
344
|
+
sig { returns(FinancialConnections) }
|
345
|
+
attr_reader :financial_connections
|
346
|
+
# Bank account verification method.
|
347
|
+
sig { returns(String) }
|
348
|
+
attr_reader :verification_method
|
349
|
+
end
|
350
|
+
# 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.
|
351
|
+
sig { returns(T.nilable(AcssDebit)) }
|
352
|
+
attr_reader :acss_debit
|
353
|
+
# If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
354
|
+
sig { returns(T.nilable(Bancontact)) }
|
355
|
+
attr_reader :bancontact
|
356
|
+
# If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
357
|
+
sig { returns(T.nilable(Card)) }
|
358
|
+
attr_reader :card
|
359
|
+
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
360
|
+
sig { returns(T.nilable(CustomerBalance)) }
|
361
|
+
attr_reader :customer_balance
|
362
|
+
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
363
|
+
sig { returns(T.nilable(Konbini)) }
|
364
|
+
attr_reader :konbini
|
365
|
+
# 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.
|
366
|
+
sig { returns(T.nilable(SepaDebit)) }
|
367
|
+
attr_reader :sepa_debit
|
368
|
+
# 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.
|
369
|
+
sig { returns(T.nilable(UsBankAccount)) }
|
370
|
+
attr_reader :us_bank_account
|
371
|
+
end
|
372
|
+
# 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.
|
373
|
+
sig { returns(T.nilable(String)) }
|
374
|
+
attr_reader :default_mandate
|
375
|
+
# Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
|
376
|
+
sig { returns(T.nilable(PaymentMethodOptions)) }
|
377
|
+
attr_reader :payment_method_options
|
378
|
+
# 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).
|
379
|
+
sig { returns(T.nilable(T::Array[String])) }
|
380
|
+
attr_reader :payment_method_types
|
381
|
+
end
|
382
|
+
class Rendering < Stripe::StripeObject
|
383
|
+
class Pdf < Stripe::StripeObject
|
384
|
+
# 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.
|
385
|
+
sig { returns(T.nilable(String)) }
|
386
|
+
attr_reader :page_size
|
387
|
+
end
|
388
|
+
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
|
389
|
+
sig { returns(T.nilable(String)) }
|
390
|
+
attr_reader :amount_tax_display
|
391
|
+
# Invoice pdf rendering options
|
392
|
+
sig { returns(T.nilable(Pdf)) }
|
393
|
+
attr_reader :pdf
|
394
|
+
# ID of the rendering template that the invoice is formatted by.
|
395
|
+
sig { returns(T.nilable(String)) }
|
396
|
+
attr_reader :template
|
397
|
+
# Version of the rendering template that the invoice is using.
|
398
|
+
sig { returns(T.nilable(Integer)) }
|
399
|
+
attr_reader :template_version
|
400
|
+
end
|
401
|
+
class ShippingCost < Stripe::StripeObject
|
402
|
+
class Tax < Stripe::StripeObject
|
403
|
+
# Amount of tax applied for this rate.
|
404
|
+
sig { returns(Integer) }
|
405
|
+
attr_reader :amount
|
406
|
+
# Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
|
407
|
+
#
|
408
|
+
# Related guide: [Tax rates](/billing/taxes/tax-rates)
|
409
|
+
sig { returns(Stripe::TaxRate) }
|
410
|
+
attr_reader :rate
|
411
|
+
# 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.
|
412
|
+
sig { returns(T.nilable(String)) }
|
413
|
+
attr_reader :taxability_reason
|
414
|
+
# The amount on which tax is calculated, in cents (or local equivalent).
|
415
|
+
sig { returns(T.nilable(Integer)) }
|
416
|
+
attr_reader :taxable_amount
|
417
|
+
end
|
418
|
+
# Total shipping cost before any taxes are applied.
|
419
|
+
sig { returns(Integer) }
|
420
|
+
attr_reader :amount_subtotal
|
421
|
+
# Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
|
422
|
+
sig { returns(Integer) }
|
423
|
+
attr_reader :amount_tax
|
424
|
+
# Total shipping cost after taxes are applied.
|
425
|
+
sig { returns(Integer) }
|
426
|
+
attr_reader :amount_total
|
427
|
+
# The ID of the ShippingRate for this invoice.
|
428
|
+
sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) }
|
429
|
+
attr_reader :shipping_rate
|
430
|
+
# The taxes applied to the shipping rate.
|
431
|
+
sig { returns(T::Array[Tax]) }
|
432
|
+
attr_reader :taxes
|
433
|
+
end
|
434
|
+
class ShippingDetails < Stripe::StripeObject
|
435
|
+
class Address < Stripe::StripeObject
|
436
|
+
# City, district, suburb, town, or village.
|
437
|
+
sig { returns(T.nilable(String)) }
|
438
|
+
attr_reader :city
|
439
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
440
|
+
sig { returns(T.nilable(String)) }
|
441
|
+
attr_reader :country
|
442
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
443
|
+
sig { returns(T.nilable(String)) }
|
444
|
+
attr_reader :line1
|
445
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
446
|
+
sig { returns(T.nilable(String)) }
|
447
|
+
attr_reader :line2
|
448
|
+
# ZIP or postal code.
|
449
|
+
sig { returns(T.nilable(String)) }
|
450
|
+
attr_reader :postal_code
|
451
|
+
# State, county, province, or region.
|
452
|
+
sig { returns(T.nilable(String)) }
|
453
|
+
attr_reader :state
|
454
|
+
end
|
455
|
+
# Attribute for field address
|
456
|
+
sig { returns(Address) }
|
457
|
+
attr_reader :address
|
458
|
+
# The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
|
459
|
+
sig { returns(T.nilable(String)) }
|
460
|
+
attr_reader :carrier
|
461
|
+
# Recipient name.
|
462
|
+
sig { returns(String) }
|
463
|
+
attr_reader :name
|
464
|
+
# Recipient phone (including extension).
|
465
|
+
sig { returns(T.nilable(String)) }
|
466
|
+
attr_reader :phone
|
467
|
+
# 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.
|
468
|
+
sig { returns(T.nilable(String)) }
|
469
|
+
attr_reader :tracking_number
|
470
|
+
end
|
471
|
+
class StatusTransitions < Stripe::StripeObject
|
472
|
+
# The time that the invoice draft was finalized.
|
473
|
+
sig { returns(T.nilable(Integer)) }
|
474
|
+
attr_reader :finalized_at
|
475
|
+
# The time that the invoice was marked uncollectible.
|
476
|
+
sig { returns(T.nilable(Integer)) }
|
477
|
+
attr_reader :marked_uncollectible_at
|
478
|
+
# The time that the invoice was paid.
|
479
|
+
sig { returns(T.nilable(Integer)) }
|
480
|
+
attr_reader :paid_at
|
481
|
+
# The time that the invoice was voided.
|
482
|
+
sig { returns(T.nilable(Integer)) }
|
483
|
+
attr_reader :voided_at
|
484
|
+
end
|
485
|
+
class ThresholdReason < Stripe::StripeObject
|
486
|
+
class ItemReason < Stripe::StripeObject
|
487
|
+
# The IDs of the line items that triggered the threshold invoice.
|
488
|
+
sig { returns(T::Array[String]) }
|
489
|
+
attr_reader :line_item_ids
|
490
|
+
# The quantity threshold boundary that applied to the given line item.
|
491
|
+
sig { returns(Integer) }
|
492
|
+
attr_reader :usage_gte
|
493
|
+
end
|
494
|
+
# The total invoice amount threshold boundary if it triggered the threshold invoice.
|
495
|
+
sig { returns(T.nilable(Integer)) }
|
496
|
+
attr_reader :amount_gte
|
497
|
+
# Indicates which line items triggered a threshold invoice.
|
498
|
+
sig { returns(T::Array[ItemReason]) }
|
499
|
+
attr_reader :item_reasons
|
500
|
+
end
|
501
|
+
class TotalDiscountAmount < Stripe::StripeObject
|
502
|
+
# The amount, in cents (or local equivalent), of the discount.
|
503
|
+
sig { returns(Integer) }
|
504
|
+
attr_reader :amount
|
505
|
+
# The discount that was applied to get this discount amount.
|
506
|
+
sig { returns(T.any(String, Stripe::Discount)) }
|
507
|
+
attr_reader :discount
|
508
|
+
end
|
509
|
+
class TotalPretaxCreditAmount < Stripe::StripeObject
|
510
|
+
# The amount, in cents (or local equivalent), of the pretax credit amount.
|
511
|
+
sig { returns(Integer) }
|
512
|
+
attr_reader :amount
|
513
|
+
# The credit balance transaction that was applied to get this pretax credit amount.
|
514
|
+
sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) }
|
515
|
+
attr_reader :credit_balance_transaction
|
516
|
+
# The discount that was applied to get this pretax credit amount.
|
517
|
+
sig { returns(T.any(String, Stripe::Discount)) }
|
518
|
+
attr_reader :discount
|
519
|
+
# Type of the pretax credit amount referenced.
|
520
|
+
sig { returns(String) }
|
521
|
+
attr_reader :type
|
522
|
+
end
|
523
|
+
class TotalTax < Stripe::StripeObject
|
524
|
+
class TaxRateDetails < Stripe::StripeObject
|
525
|
+
# Attribute for field tax_rate
|
526
|
+
sig { returns(String) }
|
527
|
+
attr_reader :tax_rate
|
528
|
+
end
|
529
|
+
# The amount of the tax, in cents (or local equivalent).
|
530
|
+
sig { returns(Integer) }
|
531
|
+
attr_reader :amount
|
532
|
+
# Whether this tax is inclusive or exclusive.
|
533
|
+
sig { returns(String) }
|
534
|
+
attr_reader :tax_behavior
|
535
|
+
# Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
|
536
|
+
sig { returns(T.nilable(TaxRateDetails)) }
|
537
|
+
attr_reader :tax_rate_details
|
538
|
+
# 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.
|
539
|
+
sig { returns(String) }
|
540
|
+
attr_reader :taxability_reason
|
541
|
+
# The amount on which tax is calculated, in cents (or local equivalent).
|
542
|
+
sig { returns(T.nilable(Integer)) }
|
543
|
+
attr_reader :taxable_amount
|
544
|
+
# The type of tax information.
|
545
|
+
sig { returns(String) }
|
546
|
+
attr_reader :type
|
547
|
+
end
|
548
|
+
# The country of the business associated with this invoice, most often the business creating the invoice.
|
549
|
+
sig { returns(T.nilable(String)) }
|
550
|
+
attr_reader :account_country
|
551
|
+
# The public name of the business associated with this invoice, most often the business creating the invoice.
|
552
|
+
sig { returns(T.nilable(String)) }
|
553
|
+
attr_reader :account_name
|
554
|
+
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
555
|
+
sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
|
556
|
+
attr_reader :account_tax_ids
|
557
|
+
# 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`.
|
558
|
+
sig { returns(Integer) }
|
559
|
+
attr_reader :amount_due
|
560
|
+
# Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.
|
561
|
+
sig { returns(Integer) }
|
562
|
+
attr_reader :amount_overpaid
|
563
|
+
# The amount, in cents (or local equivalent), that was paid.
|
564
|
+
sig { returns(Integer) }
|
565
|
+
attr_reader :amount_paid
|
566
|
+
# The difference between amount_due and amount_paid, in cents (or local equivalent).
|
567
|
+
sig { returns(Integer) }
|
568
|
+
attr_reader :amount_remaining
|
569
|
+
# This is the sum of all the shipping amounts.
|
570
|
+
sig { returns(Integer) }
|
571
|
+
attr_reader :amount_shipping
|
572
|
+
# ID of the Connect Application that created the invoice.
|
573
|
+
sig { returns(T.nilable(T.any(String, Stripe::Application))) }
|
574
|
+
attr_reader :application
|
575
|
+
# 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.
|
576
|
+
sig { returns(Integer) }
|
577
|
+
attr_reader :attempt_count
|
578
|
+
# 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.
|
579
|
+
sig { returns(T::Boolean) }
|
580
|
+
attr_reader :attempted
|
581
|
+
# 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.
|
582
|
+
sig { returns(T::Boolean) }
|
583
|
+
attr_reader :auto_advance
|
584
|
+
# Attribute for field automatic_tax
|
585
|
+
sig { returns(AutomaticTax) }
|
586
|
+
attr_reader :automatic_tax
|
587
|
+
# 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.
|
588
|
+
sig { returns(T.nilable(Integer)) }
|
589
|
+
attr_reader :automatically_finalizes_at
|
590
|
+
# Indicates the reason why the invoice was created.
|
591
|
+
#
|
592
|
+
# * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
|
593
|
+
# * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
|
594
|
+
# * `subscription_create`: A new subscription was created.
|
595
|
+
# * `subscription_cycle`: A subscription advanced into a new period.
|
596
|
+
# * `subscription_threshold`: A subscription reached a billing threshold.
|
597
|
+
# * `subscription_update`: A subscription was updated.
|
598
|
+
# * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
|
599
|
+
sig { returns(T.nilable(String)) }
|
600
|
+
attr_reader :billing_reason
|
601
|
+
# 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.
|
602
|
+
sig { returns(String) }
|
603
|
+
attr_reader :collection_method
|
604
|
+
# The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.
|
605
|
+
sig { returns(T.nilable(ConfirmationSecret)) }
|
606
|
+
attr_reader :confirmation_secret
|
607
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
608
|
+
sig { returns(Integer) }
|
609
|
+
attr_reader :created
|
610
|
+
# 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).
|
611
|
+
sig { returns(String) }
|
612
|
+
attr_reader :currency
|
613
|
+
# Custom fields displayed on the invoice.
|
614
|
+
sig { returns(T.nilable(T::Array[CustomField])) }
|
615
|
+
attr_reader :custom_fields
|
616
|
+
# The ID of the customer who will be billed.
|
617
|
+
sig { returns(T.nilable(T.any(String, Stripe::Customer))) }
|
618
|
+
attr_reader :customer
|
619
|
+
# 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.
|
620
|
+
sig { returns(T.nilable(CustomerAddress)) }
|
621
|
+
attr_reader :customer_address
|
622
|
+
# 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.
|
623
|
+
sig { returns(T.nilable(String)) }
|
624
|
+
attr_reader :customer_email
|
625
|
+
# 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.
|
626
|
+
sig { returns(T.nilable(String)) }
|
627
|
+
attr_reader :customer_name
|
628
|
+
# 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.
|
629
|
+
sig { returns(T.nilable(String)) }
|
630
|
+
attr_reader :customer_phone
|
631
|
+
# 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.
|
632
|
+
sig { returns(T.nilable(CustomerShipping)) }
|
633
|
+
attr_reader :customer_shipping
|
634
|
+
# 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.
|
635
|
+
sig { returns(T.nilable(String)) }
|
636
|
+
attr_reader :customer_tax_exempt
|
637
|
+
# 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.
|
638
|
+
sig { returns(T.nilable(T::Array[CustomerTaxId])) }
|
639
|
+
attr_reader :customer_tax_ids
|
640
|
+
# 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.
|
641
|
+
sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
|
642
|
+
attr_reader :default_payment_method
|
643
|
+
# 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.
|
644
|
+
sig {
|
645
|
+
returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))))
|
646
|
+
}
|
647
|
+
attr_reader :default_source
|
648
|
+
# The tax rates applied to this invoice, if any.
|
649
|
+
sig { returns(T::Array[Stripe::TaxRate]) }
|
650
|
+
attr_reader :default_tax_rates
|
651
|
+
# An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
|
652
|
+
sig { returns(T.nilable(String)) }
|
653
|
+
attr_reader :description
|
654
|
+
# The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
|
655
|
+
sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
|
656
|
+
attr_reader :discounts
|
657
|
+
# The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
|
658
|
+
sig { returns(T.nilable(Integer)) }
|
659
|
+
attr_reader :due_date
|
660
|
+
# 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.
|
661
|
+
sig { returns(T.nilable(Integer)) }
|
662
|
+
attr_reader :effective_at
|
663
|
+
# 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.
|
664
|
+
sig { returns(T.nilable(Integer)) }
|
665
|
+
attr_reader :ending_balance
|
666
|
+
# Footer displayed on the invoice.
|
667
|
+
sig { returns(T.nilable(String)) }
|
668
|
+
attr_reader :footer
|
669
|
+
# Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
|
670
|
+
sig { returns(T.nilable(FromInvoice)) }
|
671
|
+
attr_reader :from_invoice
|
672
|
+
# 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.
|
673
|
+
sig { returns(T.nilable(String)) }
|
674
|
+
attr_reader :hosted_invoice_url
|
675
|
+
# 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.
|
676
|
+
sig { returns(String) }
|
677
|
+
attr_reader :id
|
678
|
+
# The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
|
679
|
+
sig { returns(T.nilable(String)) }
|
680
|
+
attr_reader :invoice_pdf
|
681
|
+
# Attribute for field issuer
|
682
|
+
sig { returns(Issuer) }
|
683
|
+
attr_reader :issuer
|
684
|
+
# The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
|
685
|
+
sig { returns(T.nilable(LastFinalizationError)) }
|
686
|
+
attr_reader :last_finalization_error
|
687
|
+
# The ID of the most recent non-draft revision of this invoice
|
688
|
+
sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
|
689
|
+
attr_reader :latest_revision
|
690
|
+
# 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.
|
691
|
+
sig { returns(Stripe::ListObject) }
|
692
|
+
attr_reader :lines
|
693
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
694
|
+
sig { returns(T::Boolean) }
|
695
|
+
attr_reader :livemode
|
696
|
+
# 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.
|
697
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
698
|
+
attr_reader :metadata
|
699
|
+
# The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
|
700
|
+
sig { returns(T.nilable(Integer)) }
|
701
|
+
attr_reader :next_payment_attempt
|
702
|
+
# 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.
|
703
|
+
sig { returns(T.nilable(String)) }
|
704
|
+
attr_reader :number
|
705
|
+
# String representing the object's type. Objects of the same type share the same value.
|
706
|
+
sig { returns(String) }
|
707
|
+
attr_reader :object
|
708
|
+
# 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.
|
709
|
+
sig { returns(T.nilable(T.any(String, Stripe::Account))) }
|
710
|
+
attr_reader :on_behalf_of
|
711
|
+
# The parent that generated this invoice
|
712
|
+
sig { returns(T.nilable(Parent)) }
|
713
|
+
attr_reader :parent
|
714
|
+
# Attribute for field payment_settings
|
715
|
+
sig { returns(PaymentSettings) }
|
716
|
+
attr_reader :payment_settings
|
717
|
+
# Payments for this invoice
|
718
|
+
sig { returns(Stripe::ListObject) }
|
719
|
+
attr_reader :payments
|
720
|
+
# 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.
|
721
|
+
sig { returns(Integer) }
|
722
|
+
attr_reader :period_end
|
723
|
+
# 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.
|
724
|
+
sig { returns(Integer) }
|
725
|
+
attr_reader :period_start
|
726
|
+
# Total amount of all post-payment credit notes issued for this invoice.
|
727
|
+
sig { returns(Integer) }
|
728
|
+
attr_reader :post_payment_credit_notes_amount
|
729
|
+
# Total amount of all pre-payment credit notes issued for this invoice.
|
730
|
+
sig { returns(Integer) }
|
731
|
+
attr_reader :pre_payment_credit_notes_amount
|
732
|
+
# This is the transaction number that appears on email receipts sent for this invoice.
|
733
|
+
sig { returns(T.nilable(String)) }
|
734
|
+
attr_reader :receipt_number
|
735
|
+
# The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
|
736
|
+
sig { returns(T.nilable(Rendering)) }
|
737
|
+
attr_reader :rendering
|
738
|
+
# The details of the cost of shipping, including the ShippingRate applied on the invoice.
|
739
|
+
sig { returns(T.nilable(ShippingCost)) }
|
740
|
+
attr_reader :shipping_cost
|
741
|
+
# 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.
|
742
|
+
sig { returns(T.nilable(ShippingDetails)) }
|
743
|
+
attr_reader :shipping_details
|
744
|
+
# 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.
|
745
|
+
sig { returns(Integer) }
|
746
|
+
attr_reader :starting_balance
|
747
|
+
# Extra information about an invoice for the customer's credit card statement.
|
748
|
+
sig { returns(T.nilable(String)) }
|
749
|
+
attr_reader :statement_descriptor
|
750
|
+
# The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
|
751
|
+
sig { returns(T.nilable(String)) }
|
752
|
+
attr_reader :status
|
753
|
+
# Attribute for field status_transitions
|
754
|
+
sig { returns(StatusTransitions) }
|
755
|
+
attr_reader :status_transitions
|
756
|
+
# 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
|
757
|
+
sig { returns(Integer) }
|
758
|
+
attr_reader :subtotal
|
759
|
+
# 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
|
760
|
+
sig { returns(T.nilable(Integer)) }
|
761
|
+
attr_reader :subtotal_excluding_tax
|
762
|
+
# ID of the test clock this invoice belongs to.
|
763
|
+
sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
|
764
|
+
attr_reader :test_clock
|
765
|
+
# Attribute for field threshold_reason
|
766
|
+
sig { returns(ThresholdReason) }
|
767
|
+
attr_reader :threshold_reason
|
768
|
+
# Total after discounts and taxes.
|
769
|
+
sig { returns(Integer) }
|
770
|
+
attr_reader :total
|
771
|
+
# The aggregate amounts calculated per discount across all line items.
|
772
|
+
sig { returns(T.nilable(T::Array[TotalDiscountAmount])) }
|
773
|
+
attr_reader :total_discount_amounts
|
774
|
+
# The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
|
775
|
+
sig { returns(T.nilable(Integer)) }
|
776
|
+
attr_reader :total_excluding_tax
|
777
|
+
# 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.
|
778
|
+
sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) }
|
779
|
+
attr_reader :total_pretax_credit_amounts
|
780
|
+
# The aggregate tax information of all line items.
|
781
|
+
sig { returns(T.nilable(T::Array[TotalTax])) }
|
782
|
+
attr_reader :total_taxes
|
783
|
+
# 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.
|
784
|
+
sig { returns(T.nilable(Integer)) }
|
785
|
+
attr_reader :webhooks_delivered_at
|
786
|
+
# Always true for a deleted object
|
787
|
+
sig { returns(T::Boolean) }
|
788
|
+
attr_reader :deleted
|
789
|
+
class DeleteParams < Stripe::RequestParams
|
790
|
+
|
791
|
+
end
|
792
|
+
class UpdateParams < Stripe::RequestParams
|
793
|
+
class AutomaticTax < Stripe::RequestParams
|
794
|
+
class Liability < Stripe::RequestParams
|
795
|
+
# The connected account being referenced when `type` is `account`.
|
796
|
+
sig { returns(T.nilable(String)) }
|
797
|
+
attr_accessor :account
|
798
|
+
# Type of the account referenced in the request.
|
799
|
+
sig { returns(String) }
|
800
|
+
attr_accessor :type
|
801
|
+
sig { params(account: T.nilable(String), type: String).void }
|
802
|
+
def initialize(account: nil, type: nil); end
|
803
|
+
end
|
804
|
+
# 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.
|
805
|
+
sig { returns(T::Boolean) }
|
806
|
+
attr_accessor :enabled
|
807
|
+
# 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.
|
808
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax::Liability)) }
|
809
|
+
attr_accessor :liability
|
810
|
+
sig {
|
811
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax::Liability)).void
|
812
|
+
}
|
813
|
+
def initialize(enabled: nil, liability: nil); end
|
814
|
+
end
|
815
|
+
class CustomField < Stripe::RequestParams
|
816
|
+
# The name of the custom field. This may be up to 40 characters.
|
817
|
+
sig { returns(String) }
|
818
|
+
attr_accessor :name
|
819
|
+
# The value of the custom field. This may be up to 140 characters.
|
820
|
+
sig { returns(String) }
|
821
|
+
attr_accessor :value
|
822
|
+
sig { params(name: String, value: String).void }
|
823
|
+
def initialize(name: nil, value: nil); end
|
824
|
+
end
|
825
|
+
class Discount < Stripe::RequestParams
|
826
|
+
# ID of the coupon to create a new discount for.
|
827
|
+
sig { returns(T.nilable(String)) }
|
828
|
+
attr_accessor :coupon
|
829
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
830
|
+
sig { returns(T.nilable(String)) }
|
831
|
+
attr_accessor :discount
|
832
|
+
# ID of the promotion code to create a new discount for.
|
833
|
+
sig { returns(T.nilable(String)) }
|
834
|
+
attr_accessor :promotion_code
|
835
|
+
sig {
|
836
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
837
|
+
}
|
838
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
839
|
+
end
|
840
|
+
class Issuer < Stripe::RequestParams
|
841
|
+
# The connected account being referenced when `type` is `account`.
|
842
|
+
sig { returns(T.nilable(String)) }
|
843
|
+
attr_accessor :account
|
844
|
+
# Type of the account referenced in the request.
|
845
|
+
sig { returns(String) }
|
846
|
+
attr_accessor :type
|
847
|
+
sig { params(account: T.nilable(String), type: String).void }
|
848
|
+
def initialize(account: nil, type: nil); end
|
849
|
+
end
|
850
|
+
class PaymentSettings < Stripe::RequestParams
|
851
|
+
class PaymentMethodOptions < Stripe::RequestParams
|
852
|
+
class AcssDebit < Stripe::RequestParams
|
853
|
+
class MandateOptions < Stripe::RequestParams
|
854
|
+
# Transaction type of the mandate.
|
855
|
+
sig { returns(T.nilable(String)) }
|
856
|
+
attr_accessor :transaction_type
|
857
|
+
sig { params(transaction_type: T.nilable(String)).void }
|
858
|
+
def initialize(transaction_type: nil); end
|
859
|
+
end
|
860
|
+
# Additional fields for Mandate creation
|
861
|
+
sig {
|
862
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
|
863
|
+
}
|
864
|
+
attr_accessor :mandate_options
|
865
|
+
# Verification method for the intent
|
866
|
+
sig { returns(T.nilable(String)) }
|
867
|
+
attr_accessor :verification_method
|
868
|
+
sig {
|
869
|
+
params(mandate_options: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
|
870
|
+
}
|
871
|
+
def initialize(mandate_options: nil, verification_method: nil); end
|
872
|
+
end
|
873
|
+
class Bancontact < Stripe::RequestParams
|
874
|
+
# Preferred language of the Bancontact authorization page that the customer is redirected to.
|
875
|
+
sig { returns(T.nilable(String)) }
|
876
|
+
attr_accessor :preferred_language
|
877
|
+
sig { params(preferred_language: T.nilable(String)).void }
|
878
|
+
def initialize(preferred_language: nil); end
|
879
|
+
end
|
880
|
+
class Card < Stripe::RequestParams
|
881
|
+
class Installments < Stripe::RequestParams
|
882
|
+
class Plan < Stripe::RequestParams
|
883
|
+
# For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
|
884
|
+
sig { returns(T.nilable(Integer)) }
|
885
|
+
attr_accessor :count
|
886
|
+
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
887
|
+
# One of `month`.
|
888
|
+
sig { returns(T.nilable(String)) }
|
889
|
+
attr_accessor :interval
|
890
|
+
# Type of installment plan, one of `fixed_count`.
|
891
|
+
sig { returns(String) }
|
892
|
+
attr_accessor :type
|
893
|
+
sig {
|
894
|
+
params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
|
895
|
+
}
|
896
|
+
def initialize(count: nil, interval: nil, type: nil); end
|
897
|
+
end
|
898
|
+
# Setting to true enables installments for this invoice.
|
899
|
+
# Setting to false will prevent any selected plan from applying to a payment.
|
900
|
+
sig { returns(T.nilable(T::Boolean)) }
|
901
|
+
attr_accessor :enabled
|
902
|
+
# The selected installment plan to use for this invoice.
|
903
|
+
sig {
|
904
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))))
|
905
|
+
}
|
906
|
+
attr_accessor :plan
|
907
|
+
sig {
|
908
|
+
params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))).void
|
909
|
+
}
|
910
|
+
def initialize(enabled: nil, plan: nil); end
|
911
|
+
end
|
912
|
+
# Installment configuration for payments attempted on this invoice (Mexico Only).
|
913
|
+
#
|
914
|
+
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
915
|
+
sig {
|
916
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
|
917
|
+
}
|
918
|
+
attr_accessor :installments
|
919
|
+
# 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.
|
920
|
+
sig { returns(T.nilable(String)) }
|
921
|
+
attr_accessor :request_three_d_secure
|
922
|
+
sig {
|
923
|
+
params(installments: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
|
924
|
+
}
|
925
|
+
def initialize(installments: nil, request_three_d_secure: nil); end
|
926
|
+
end
|
927
|
+
class CustomerBalance < Stripe::RequestParams
|
928
|
+
class BankTransfer < Stripe::RequestParams
|
929
|
+
class EuBankTransfer < Stripe::RequestParams
|
930
|
+
# The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
|
931
|
+
sig { returns(String) }
|
932
|
+
attr_accessor :country
|
933
|
+
sig { params(country: String).void }
|
934
|
+
def initialize(country: nil); end
|
935
|
+
end
|
936
|
+
# Configuration for eu_bank_transfer funding type.
|
937
|
+
sig {
|
938
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
|
939
|
+
}
|
940
|
+
attr_accessor :eu_bank_transfer
|
941
|
+
# 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`.
|
942
|
+
sig { returns(T.nilable(String)) }
|
943
|
+
attr_accessor :type
|
944
|
+
sig {
|
945
|
+
params(eu_bank_transfer: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
|
946
|
+
}
|
947
|
+
def initialize(eu_bank_transfer: nil, type: nil); end
|
948
|
+
end
|
949
|
+
# Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
|
950
|
+
sig {
|
951
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
|
952
|
+
}
|
953
|
+
attr_accessor :bank_transfer
|
954
|
+
# The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
|
955
|
+
sig { returns(T.nilable(String)) }
|
956
|
+
attr_accessor :funding_type
|
957
|
+
sig {
|
958
|
+
params(bank_transfer: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
|
959
|
+
}
|
960
|
+
def initialize(bank_transfer: nil, funding_type: nil); end
|
961
|
+
end
|
962
|
+
class Konbini < Stripe::RequestParams
|
963
|
+
|
964
|
+
end
|
965
|
+
class SepaDebit < Stripe::RequestParams
|
966
|
+
|
967
|
+
end
|
968
|
+
class UsBankAccount < Stripe::RequestParams
|
969
|
+
class FinancialConnections < Stripe::RequestParams
|
970
|
+
class Filters < Stripe::RequestParams
|
971
|
+
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
972
|
+
sig { returns(T.nilable(T::Array[String])) }
|
973
|
+
attr_accessor :account_subcategories
|
974
|
+
sig { params(account_subcategories: T.nilable(T::Array[String])).void }
|
975
|
+
def initialize(account_subcategories: nil); end
|
976
|
+
end
|
977
|
+
# Provide filters for the linked accounts that the customer can select for the payment method.
|
978
|
+
sig {
|
979
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
|
980
|
+
}
|
981
|
+
attr_accessor :filters
|
982
|
+
# The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
|
983
|
+
sig { returns(T.nilable(T::Array[String])) }
|
984
|
+
attr_accessor :permissions
|
985
|
+
# List of data features that you would like to retrieve upon account creation.
|
986
|
+
sig { returns(T.nilable(T::Array[String])) }
|
987
|
+
attr_accessor :prefetch
|
988
|
+
sig {
|
989
|
+
params(filters: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
|
990
|
+
}
|
991
|
+
def initialize(filters: nil, permissions: nil, prefetch: nil); end
|
992
|
+
end
|
993
|
+
# Additional fields for Financial Connections Session creation
|
994
|
+
sig {
|
995
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
|
996
|
+
}
|
997
|
+
attr_accessor :financial_connections
|
998
|
+
# Verification method for the intent
|
999
|
+
sig { returns(T.nilable(String)) }
|
1000
|
+
attr_accessor :verification_method
|
1001
|
+
sig {
|
1002
|
+
params(financial_connections: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
|
1003
|
+
}
|
1004
|
+
def initialize(financial_connections: nil, verification_method: nil); end
|
1005
|
+
end
|
1006
|
+
# 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.
|
1007
|
+
sig {
|
1008
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
|
1009
|
+
}
|
1010
|
+
attr_accessor :acss_debit
|
1011
|
+
# If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
1012
|
+
sig {
|
1013
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
|
1014
|
+
}
|
1015
|
+
attr_accessor :bancontact
|
1016
|
+
# If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
1017
|
+
sig {
|
1018
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
|
1019
|
+
}
|
1020
|
+
attr_accessor :card
|
1021
|
+
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1022
|
+
sig {
|
1023
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
|
1024
|
+
}
|
1025
|
+
attr_accessor :customer_balance
|
1026
|
+
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1027
|
+
sig {
|
1028
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
|
1029
|
+
}
|
1030
|
+
attr_accessor :konbini
|
1031
|
+
# 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.
|
1032
|
+
sig {
|
1033
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
|
1034
|
+
}
|
1035
|
+
attr_accessor :sepa_debit
|
1036
|
+
# 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.
|
1037
|
+
sig {
|
1038
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
|
1039
|
+
}
|
1040
|
+
attr_accessor :us_bank_account
|
1041
|
+
sig {
|
1042
|
+
params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
|
1043
|
+
}
|
1044
|
+
def initialize(
|
1045
|
+
acss_debit: nil,
|
1046
|
+
bancontact: nil,
|
1047
|
+
card: nil,
|
1048
|
+
customer_balance: nil,
|
1049
|
+
konbini: nil,
|
1050
|
+
sepa_debit: nil,
|
1051
|
+
us_bank_account: nil
|
1052
|
+
); end
|
1053
|
+
end
|
1054
|
+
# 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.
|
1055
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1056
|
+
attr_accessor :default_mandate
|
1057
|
+
# Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
|
1058
|
+
sig {
|
1059
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions))
|
1060
|
+
}
|
1061
|
+
attr_accessor :payment_method_options
|
1062
|
+
# 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). Should not be specified with payment_method_configuration
|
1063
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1064
|
+
attr_accessor :payment_method_types
|
1065
|
+
sig {
|
1066
|
+
params(default_mandate: T.nilable(T.nilable(String)), payment_method_options: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1067
|
+
}
|
1068
|
+
def initialize(
|
1069
|
+
default_mandate: nil,
|
1070
|
+
payment_method_options: nil,
|
1071
|
+
payment_method_types: nil
|
1072
|
+
); end
|
1073
|
+
end
|
1074
|
+
class Rendering < Stripe::RequestParams
|
1075
|
+
class Pdf < Stripe::RequestParams
|
1076
|
+
# Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
|
1077
|
+
# If set to `auto`, invoice PDF page size defaults to `a4` for customers with
|
1078
|
+
# Japanese locale and `letter` for customers with other locales.
|
1079
|
+
sig { returns(T.nilable(String)) }
|
1080
|
+
attr_accessor :page_size
|
1081
|
+
sig { params(page_size: T.nilable(String)).void }
|
1082
|
+
def initialize(page_size: nil); end
|
1083
|
+
end
|
1084
|
+
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
|
1085
|
+
sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
|
1086
|
+
attr_accessor :amount_tax_display
|
1087
|
+
# Invoice pdf rendering options
|
1088
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Rendering::Pdf)) }
|
1089
|
+
attr_accessor :pdf
|
1090
|
+
# ID of the invoice rendering template to use for this invoice.
|
1091
|
+
sig { returns(T.nilable(String)) }
|
1092
|
+
attr_accessor :template
|
1093
|
+
# The specific version of invoice rendering template to use for this invoice.
|
1094
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
1095
|
+
attr_accessor :template_version
|
1096
|
+
sig {
|
1097
|
+
params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), pdf: T.nilable(::Stripe::Invoice::UpdateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.nilable(T.any(String, Integer)))).void
|
1098
|
+
}
|
1099
|
+
def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
|
1100
|
+
end
|
1101
|
+
class ShippingCost < Stripe::RequestParams
|
1102
|
+
class ShippingRateData < Stripe::RequestParams
|
1103
|
+
class DeliveryEstimate < Stripe::RequestParams
|
1104
|
+
class Maximum < Stripe::RequestParams
|
1105
|
+
# A unit of time.
|
1106
|
+
sig { returns(String) }
|
1107
|
+
attr_accessor :unit
|
1108
|
+
# Must be greater than 0.
|
1109
|
+
sig { returns(Integer) }
|
1110
|
+
attr_accessor :value
|
1111
|
+
sig { params(unit: String, value: Integer).void }
|
1112
|
+
def initialize(unit: nil, value: nil); end
|
1113
|
+
end
|
1114
|
+
class Minimum < Stripe::RequestParams
|
1115
|
+
# A unit of time.
|
1116
|
+
sig { returns(String) }
|
1117
|
+
attr_accessor :unit
|
1118
|
+
# Must be greater than 0.
|
1119
|
+
sig { returns(Integer) }
|
1120
|
+
attr_accessor :value
|
1121
|
+
sig { params(unit: String, value: Integer).void }
|
1122
|
+
def initialize(unit: nil, value: nil); end
|
1123
|
+
end
|
1124
|
+
# The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
|
1125
|
+
sig {
|
1126
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
|
1127
|
+
}
|
1128
|
+
attr_accessor :maximum
|
1129
|
+
# The lower bound of the estimated range. If empty, represents no lower bound.
|
1130
|
+
sig {
|
1131
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
|
1132
|
+
}
|
1133
|
+
attr_accessor :minimum
|
1134
|
+
sig {
|
1135
|
+
params(maximum: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
|
1136
|
+
}
|
1137
|
+
def initialize(maximum: nil, minimum: nil); end
|
1138
|
+
end
|
1139
|
+
class FixedAmount < Stripe::RequestParams
|
1140
|
+
class CurrencyOptions < Stripe::RequestParams
|
1141
|
+
# A non-negative integer in cents representing how much to charge.
|
1142
|
+
sig { returns(Integer) }
|
1143
|
+
attr_accessor :amount
|
1144
|
+
# Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
1145
|
+
sig { returns(T.nilable(String)) }
|
1146
|
+
attr_accessor :tax_behavior
|
1147
|
+
sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
|
1148
|
+
def initialize(amount: nil, tax_behavior: nil); end
|
1149
|
+
end
|
1150
|
+
# A non-negative integer in cents representing how much to charge.
|
1151
|
+
sig { returns(Integer) }
|
1152
|
+
attr_accessor :amount
|
1153
|
+
# 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).
|
1154
|
+
sig { returns(String) }
|
1155
|
+
attr_accessor :currency
|
1156
|
+
# 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).
|
1157
|
+
sig {
|
1158
|
+
returns(T.nilable(T::Hash[String, ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
|
1159
|
+
}
|
1160
|
+
attr_accessor :currency_options
|
1161
|
+
sig {
|
1162
|
+
params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
|
1163
|
+
}
|
1164
|
+
def initialize(amount: nil, currency: nil, currency_options: nil); end
|
1165
|
+
end
|
1166
|
+
# The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
1167
|
+
sig {
|
1168
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
|
1169
|
+
}
|
1170
|
+
attr_accessor :delivery_estimate
|
1171
|
+
# The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
1172
|
+
sig { returns(String) }
|
1173
|
+
attr_accessor :display_name
|
1174
|
+
# Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
|
1175
|
+
sig {
|
1176
|
+
returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount))
|
1177
|
+
}
|
1178
|
+
attr_accessor :fixed_amount
|
1179
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1180
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
1181
|
+
attr_accessor :metadata
|
1182
|
+
# Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
1183
|
+
sig { returns(T.nilable(String)) }
|
1184
|
+
attr_accessor :tax_behavior
|
1185
|
+
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
|
1186
|
+
sig { returns(T.nilable(String)) }
|
1187
|
+
attr_accessor :tax_code
|
1188
|
+
# The type of calculation to use on the shipping rate.
|
1189
|
+
sig { returns(T.nilable(String)) }
|
1190
|
+
attr_accessor :type
|
1191
|
+
sig {
|
1192
|
+
params(delivery_estimate: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
|
1193
|
+
}
|
1194
|
+
def initialize(
|
1195
|
+
delivery_estimate: nil,
|
1196
|
+
display_name: nil,
|
1197
|
+
fixed_amount: nil,
|
1198
|
+
metadata: nil,
|
1199
|
+
tax_behavior: nil,
|
1200
|
+
tax_code: nil,
|
1201
|
+
type: nil
|
1202
|
+
); end
|
1203
|
+
end
|
1204
|
+
# The ID of the shipping rate to use for this order.
|
1205
|
+
sig { returns(T.nilable(String)) }
|
1206
|
+
attr_accessor :shipping_rate
|
1207
|
+
# Parameters to create a new ad-hoc shipping rate for this order.
|
1208
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData)) }
|
1209
|
+
attr_accessor :shipping_rate_data
|
1210
|
+
sig {
|
1211
|
+
params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData)).void
|
1212
|
+
}
|
1213
|
+
def initialize(shipping_rate: nil, shipping_rate_data: nil); end
|
1214
|
+
end
|
1215
|
+
class ShippingDetails < Stripe::RequestParams
|
1216
|
+
class Address < Stripe::RequestParams
|
1217
|
+
# City, district, suburb, town, or village.
|
1218
|
+
sig { returns(T.nilable(String)) }
|
1219
|
+
attr_accessor :city
|
1220
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
1221
|
+
sig { returns(T.nilable(String)) }
|
1222
|
+
attr_accessor :country
|
1223
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
1224
|
+
sig { returns(T.nilable(String)) }
|
1225
|
+
attr_accessor :line1
|
1226
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
1227
|
+
sig { returns(T.nilable(String)) }
|
1228
|
+
attr_accessor :line2
|
1229
|
+
# ZIP or postal code.
|
1230
|
+
sig { returns(T.nilable(String)) }
|
1231
|
+
attr_accessor :postal_code
|
1232
|
+
# State, county, province, or region.
|
1233
|
+
sig { returns(T.nilable(String)) }
|
1234
|
+
attr_accessor :state
|
1235
|
+
sig {
|
1236
|
+
params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
|
1237
|
+
}
|
1238
|
+
def initialize(
|
1239
|
+
city: nil,
|
1240
|
+
country: nil,
|
1241
|
+
line1: nil,
|
1242
|
+
line2: nil,
|
1243
|
+
postal_code: nil,
|
1244
|
+
state: nil
|
1245
|
+
); end
|
1246
|
+
end
|
1247
|
+
# Shipping address
|
1248
|
+
sig { returns(::Stripe::Invoice::UpdateParams::ShippingDetails::Address) }
|
1249
|
+
attr_accessor :address
|
1250
|
+
# Recipient name.
|
1251
|
+
sig { returns(String) }
|
1252
|
+
attr_accessor :name
|
1253
|
+
# Recipient phone (including extension)
|
1254
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1255
|
+
attr_accessor :phone
|
1256
|
+
sig {
|
1257
|
+
params(address: ::Stripe::Invoice::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(T.nilable(String))).void
|
1258
|
+
}
|
1259
|
+
def initialize(address: nil, name: nil, phone: nil); end
|
1260
|
+
end
|
1261
|
+
class TransferData < Stripe::RequestParams
|
1262
|
+
# The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
|
1263
|
+
sig { returns(T.nilable(Integer)) }
|
1264
|
+
attr_accessor :amount
|
1265
|
+
# ID of an existing, connected Stripe account.
|
1266
|
+
sig { returns(String) }
|
1267
|
+
attr_accessor :destination
|
1268
|
+
sig { params(amount: T.nilable(Integer), destination: String).void }
|
1269
|
+
def initialize(amount: nil, destination: nil); end
|
1270
|
+
end
|
1271
|
+
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1272
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1273
|
+
attr_accessor :account_tax_ids
|
1274
|
+
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
1275
|
+
sig { returns(T.nilable(Integer)) }
|
1276
|
+
attr_accessor :application_fee_amount
|
1277
|
+
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
1278
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1279
|
+
attr_accessor :auto_advance
|
1280
|
+
# Settings for automatic tax lookup for this invoice.
|
1281
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax)) }
|
1282
|
+
attr_accessor :automatic_tax
|
1283
|
+
# The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.
|
1284
|
+
sig { returns(T.nilable(Integer)) }
|
1285
|
+
attr_accessor :automatically_finalizes_at
|
1286
|
+
# Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
|
1287
|
+
sig { returns(T.nilable(String)) }
|
1288
|
+
attr_accessor :collection_method
|
1289
|
+
# A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
|
1290
|
+
sig {
|
1291
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::CustomField]))))
|
1292
|
+
}
|
1293
|
+
attr_accessor :custom_fields
|
1294
|
+
# The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
|
1295
|
+
sig { returns(T.nilable(Integer)) }
|
1296
|
+
attr_accessor :days_until_due
|
1297
|
+
# 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.
|
1298
|
+
sig { returns(T.nilable(String)) }
|
1299
|
+
attr_accessor :default_payment_method
|
1300
|
+
# 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.
|
1301
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1302
|
+
attr_accessor :default_source
|
1303
|
+
# The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
|
1304
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1305
|
+
attr_accessor :default_tax_rates
|
1306
|
+
# An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
|
1307
|
+
sig { returns(T.nilable(String)) }
|
1308
|
+
attr_accessor :description
|
1309
|
+
# The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
|
1310
|
+
sig {
|
1311
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::Discount]))))
|
1312
|
+
}
|
1313
|
+
attr_accessor :discounts
|
1314
|
+
# The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
|
1315
|
+
sig { returns(T.nilable(Integer)) }
|
1316
|
+
attr_accessor :due_date
|
1317
|
+
# 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.
|
1318
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
1319
|
+
attr_accessor :effective_at
|
1320
|
+
# Specifies which fields in the response should be expanded.
|
1321
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1322
|
+
attr_accessor :expand
|
1323
|
+
# Footer to be displayed on the invoice.
|
1324
|
+
sig { returns(T.nilable(String)) }
|
1325
|
+
attr_accessor :footer
|
1326
|
+
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
1327
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Issuer)) }
|
1328
|
+
attr_accessor :issuer
|
1329
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1330
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
1331
|
+
attr_accessor :metadata
|
1332
|
+
# Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
|
1333
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1334
|
+
attr_accessor :number
|
1335
|
+
# 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.
|
1336
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1337
|
+
attr_accessor :on_behalf_of
|
1338
|
+
# Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
|
1339
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings)) }
|
1340
|
+
attr_accessor :payment_settings
|
1341
|
+
# The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
|
1342
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::Rendering)) }
|
1343
|
+
attr_accessor :rendering
|
1344
|
+
# Settings for the cost of shipping for this invoice.
|
1345
|
+
sig {
|
1346
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingCost))))
|
1347
|
+
}
|
1348
|
+
attr_accessor :shipping_cost
|
1349
|
+
# 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.
|
1350
|
+
sig {
|
1351
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingDetails))))
|
1352
|
+
}
|
1353
|
+
attr_accessor :shipping_details
|
1354
|
+
# Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
|
1355
|
+
sig { returns(T.nilable(String)) }
|
1356
|
+
attr_accessor :statement_descriptor
|
1357
|
+
# If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
|
1358
|
+
sig {
|
1359
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::TransferData))))
|
1360
|
+
}
|
1361
|
+
attr_accessor :transfer_data
|
1362
|
+
sig {
|
1363
|
+
params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), application_fee_amount: T.nilable(Integer), auto_advance: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::Invoice::UpdateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::CustomField]))), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateParams::Discount]))), due_date: T.nilable(Integer), effective_at: T.nilable(T.nilable(T.any(String, Integer))), expand: T.nilable(T::Array[String]), footer: T.nilable(String), issuer: T.nilable(::Stripe::Invoice::UpdateParams::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), number: T.nilable(T.nilable(String)), on_behalf_of: T.nilable(T.nilable(String)), payment_settings: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings), rendering: T.nilable(::Stripe::Invoice::UpdateParams::Rendering), shipping_cost: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingCost))), shipping_details: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::ShippingDetails))), statement_descriptor: T.nilable(String), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::UpdateParams::TransferData)))).void
|
1364
|
+
}
|
1365
|
+
def initialize(
|
1366
|
+
account_tax_ids: nil,
|
1367
|
+
application_fee_amount: nil,
|
1368
|
+
auto_advance: nil,
|
1369
|
+
automatic_tax: nil,
|
1370
|
+
automatically_finalizes_at: nil,
|
1371
|
+
collection_method: nil,
|
1372
|
+
custom_fields: nil,
|
1373
|
+
days_until_due: nil,
|
1374
|
+
default_payment_method: nil,
|
1375
|
+
default_source: nil,
|
1376
|
+
default_tax_rates: nil,
|
1377
|
+
description: nil,
|
1378
|
+
discounts: nil,
|
1379
|
+
due_date: nil,
|
1380
|
+
effective_at: nil,
|
1381
|
+
expand: nil,
|
1382
|
+
footer: nil,
|
1383
|
+
issuer: nil,
|
1384
|
+
metadata: nil,
|
1385
|
+
number: nil,
|
1386
|
+
on_behalf_of: nil,
|
1387
|
+
payment_settings: nil,
|
1388
|
+
rendering: nil,
|
1389
|
+
shipping_cost: nil,
|
1390
|
+
shipping_details: nil,
|
1391
|
+
statement_descriptor: nil,
|
1392
|
+
transfer_data: nil
|
1393
|
+
); end
|
1394
|
+
end
|
1395
|
+
class ListParams < Stripe::RequestParams
|
1396
|
+
class Created < Stripe::RequestParams
|
1397
|
+
# Minimum value to filter by (exclusive)
|
1398
|
+
sig { returns(T.nilable(Integer)) }
|
1399
|
+
attr_accessor :gt
|
1400
|
+
# Minimum value to filter by (inclusive)
|
1401
|
+
sig { returns(T.nilable(Integer)) }
|
1402
|
+
attr_accessor :gte
|
1403
|
+
# Maximum value to filter by (exclusive)
|
1404
|
+
sig { returns(T.nilable(Integer)) }
|
1405
|
+
attr_accessor :lt
|
1406
|
+
# Maximum value to filter by (inclusive)
|
1407
|
+
sig { returns(T.nilable(Integer)) }
|
1408
|
+
attr_accessor :lte
|
1409
|
+
sig {
|
1410
|
+
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
|
1411
|
+
}
|
1412
|
+
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
|
1413
|
+
end
|
1414
|
+
class DueDate < Stripe::RequestParams
|
1415
|
+
# Minimum value to filter by (exclusive)
|
1416
|
+
sig { returns(T.nilable(Integer)) }
|
1417
|
+
attr_accessor :gt
|
1418
|
+
# Minimum value to filter by (inclusive)
|
1419
|
+
sig { returns(T.nilable(Integer)) }
|
1420
|
+
attr_accessor :gte
|
1421
|
+
# Maximum value to filter by (exclusive)
|
1422
|
+
sig { returns(T.nilable(Integer)) }
|
1423
|
+
attr_accessor :lt
|
1424
|
+
# Maximum value to filter by (inclusive)
|
1425
|
+
sig { returns(T.nilable(Integer)) }
|
1426
|
+
attr_accessor :lte
|
1427
|
+
sig {
|
1428
|
+
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
|
1429
|
+
}
|
1430
|
+
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
|
1431
|
+
end
|
1432
|
+
# The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
|
1433
|
+
sig { returns(T.nilable(String)) }
|
1434
|
+
attr_accessor :collection_method
|
1435
|
+
# Only return invoices that were created during the given date interval.
|
1436
|
+
sig { returns(T.nilable(T.any(::Stripe::Invoice::ListParams::Created, Integer))) }
|
1437
|
+
attr_accessor :created
|
1438
|
+
# Only return invoices for the customer specified by this customer ID.
|
1439
|
+
sig { returns(T.nilable(String)) }
|
1440
|
+
attr_accessor :customer
|
1441
|
+
# Attribute for param field due_date
|
1442
|
+
sig { returns(T.nilable(T.any(::Stripe::Invoice::ListParams::DueDate, Integer))) }
|
1443
|
+
attr_accessor :due_date
|
1444
|
+
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
1445
|
+
sig { returns(T.nilable(String)) }
|
1446
|
+
attr_accessor :ending_before
|
1447
|
+
# Specifies which fields in the response should be expanded.
|
1448
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1449
|
+
attr_accessor :expand
|
1450
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
1451
|
+
sig { returns(T.nilable(Integer)) }
|
1452
|
+
attr_accessor :limit
|
1453
|
+
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
1454
|
+
sig { returns(T.nilable(String)) }
|
1455
|
+
attr_accessor :starting_after
|
1456
|
+
# The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
|
1457
|
+
sig { returns(T.nilable(String)) }
|
1458
|
+
attr_accessor :status
|
1459
|
+
# Only return invoices for the subscription specified by this subscription ID.
|
1460
|
+
sig { returns(T.nilable(String)) }
|
1461
|
+
attr_accessor :subscription
|
1462
|
+
sig {
|
1463
|
+
params(collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::Invoice::ListParams::Created, Integer)), customer: T.nilable(String), due_date: T.nilable(T.any(::Stripe::Invoice::ListParams::DueDate, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), subscription: T.nilable(String)).void
|
1464
|
+
}
|
1465
|
+
def initialize(
|
1466
|
+
collection_method: nil,
|
1467
|
+
created: nil,
|
1468
|
+
customer: nil,
|
1469
|
+
due_date: nil,
|
1470
|
+
ending_before: nil,
|
1471
|
+
expand: nil,
|
1472
|
+
limit: nil,
|
1473
|
+
starting_after: nil,
|
1474
|
+
status: nil,
|
1475
|
+
subscription: nil
|
1476
|
+
); end
|
1477
|
+
end
|
1478
|
+
class CreateParams < Stripe::RequestParams
|
1479
|
+
class AutomaticTax < Stripe::RequestParams
|
1480
|
+
class Liability < Stripe::RequestParams
|
1481
|
+
# The connected account being referenced when `type` is `account`.
|
1482
|
+
sig { returns(T.nilable(String)) }
|
1483
|
+
attr_accessor :account
|
1484
|
+
# Type of the account referenced in the request.
|
1485
|
+
sig { returns(String) }
|
1486
|
+
attr_accessor :type
|
1487
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1488
|
+
def initialize(account: nil, type: nil); end
|
1489
|
+
end
|
1490
|
+
# 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.
|
1491
|
+
sig { returns(T::Boolean) }
|
1492
|
+
attr_accessor :enabled
|
1493
|
+
# 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.
|
1494
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax::Liability)) }
|
1495
|
+
attr_accessor :liability
|
1496
|
+
sig {
|
1497
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax::Liability)).void
|
1498
|
+
}
|
1499
|
+
def initialize(enabled: nil, liability: nil); end
|
1500
|
+
end
|
1501
|
+
class CustomField < Stripe::RequestParams
|
1502
|
+
# The name of the custom field. This may be up to 40 characters.
|
1503
|
+
sig { returns(String) }
|
1504
|
+
attr_accessor :name
|
1505
|
+
# The value of the custom field. This may be up to 140 characters.
|
1506
|
+
sig { returns(String) }
|
1507
|
+
attr_accessor :value
|
1508
|
+
sig { params(name: String, value: String).void }
|
1509
|
+
def initialize(name: nil, value: nil); end
|
1510
|
+
end
|
1511
|
+
class Discount < Stripe::RequestParams
|
1512
|
+
# ID of the coupon to create a new discount for.
|
1513
|
+
sig { returns(T.nilable(String)) }
|
1514
|
+
attr_accessor :coupon
|
1515
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1516
|
+
sig { returns(T.nilable(String)) }
|
1517
|
+
attr_accessor :discount
|
1518
|
+
# ID of the promotion code to create a new discount for.
|
1519
|
+
sig { returns(T.nilable(String)) }
|
1520
|
+
attr_accessor :promotion_code
|
1521
|
+
sig {
|
1522
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1523
|
+
}
|
1524
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1525
|
+
end
|
1526
|
+
class FromInvoice < Stripe::RequestParams
|
1527
|
+
# The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
|
1528
|
+
sig { returns(String) }
|
1529
|
+
attr_accessor :action
|
1530
|
+
# The `id` of the invoice that will be cloned.
|
1531
|
+
sig { returns(String) }
|
1532
|
+
attr_accessor :invoice
|
1533
|
+
sig { params(action: String, invoice: String).void }
|
1534
|
+
def initialize(action: nil, invoice: nil); end
|
1535
|
+
end
|
1536
|
+
class Issuer < Stripe::RequestParams
|
1537
|
+
# The connected account being referenced when `type` is `account`.
|
1538
|
+
sig { returns(T.nilable(String)) }
|
1539
|
+
attr_accessor :account
|
1540
|
+
# Type of the account referenced in the request.
|
1541
|
+
sig { returns(String) }
|
1542
|
+
attr_accessor :type
|
1543
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1544
|
+
def initialize(account: nil, type: nil); end
|
1545
|
+
end
|
1546
|
+
class PaymentSettings < Stripe::RequestParams
|
1547
|
+
class PaymentMethodOptions < Stripe::RequestParams
|
1548
|
+
class AcssDebit < Stripe::RequestParams
|
1549
|
+
class MandateOptions < Stripe::RequestParams
|
1550
|
+
# Transaction type of the mandate.
|
1551
|
+
sig { returns(T.nilable(String)) }
|
1552
|
+
attr_accessor :transaction_type
|
1553
|
+
sig { params(transaction_type: T.nilable(String)).void }
|
1554
|
+
def initialize(transaction_type: nil); end
|
1555
|
+
end
|
1556
|
+
# Additional fields for Mandate creation
|
1557
|
+
sig {
|
1558
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
|
1559
|
+
}
|
1560
|
+
attr_accessor :mandate_options
|
1561
|
+
# Verification method for the intent
|
1562
|
+
sig { returns(T.nilable(String)) }
|
1563
|
+
attr_accessor :verification_method
|
1564
|
+
sig {
|
1565
|
+
params(mandate_options: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
|
1566
|
+
}
|
1567
|
+
def initialize(mandate_options: nil, verification_method: nil); end
|
1568
|
+
end
|
1569
|
+
class Bancontact < Stripe::RequestParams
|
1570
|
+
# Preferred language of the Bancontact authorization page that the customer is redirected to.
|
1571
|
+
sig { returns(T.nilable(String)) }
|
1572
|
+
attr_accessor :preferred_language
|
1573
|
+
sig { params(preferred_language: T.nilable(String)).void }
|
1574
|
+
def initialize(preferred_language: nil); end
|
1575
|
+
end
|
1576
|
+
class Card < Stripe::RequestParams
|
1577
|
+
class Installments < Stripe::RequestParams
|
1578
|
+
class Plan < Stripe::RequestParams
|
1579
|
+
# For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
|
1580
|
+
sig { returns(T.nilable(Integer)) }
|
1581
|
+
attr_accessor :count
|
1582
|
+
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
1583
|
+
# One of `month`.
|
1584
|
+
sig { returns(T.nilable(String)) }
|
1585
|
+
attr_accessor :interval
|
1586
|
+
# Type of installment plan, one of `fixed_count`.
|
1587
|
+
sig { returns(String) }
|
1588
|
+
attr_accessor :type
|
1589
|
+
sig {
|
1590
|
+
params(count: T.nilable(Integer), interval: T.nilable(String), type: String).void
|
1591
|
+
}
|
1592
|
+
def initialize(count: nil, interval: nil, type: nil); end
|
1593
|
+
end
|
1594
|
+
# Setting to true enables installments for this invoice.
|
1595
|
+
# Setting to false will prevent any selected plan from applying to a payment.
|
1596
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1597
|
+
attr_accessor :enabled
|
1598
|
+
# The selected installment plan to use for this invoice.
|
1599
|
+
sig {
|
1600
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan))))
|
1601
|
+
}
|
1602
|
+
attr_accessor :plan
|
1603
|
+
sig {
|
1604
|
+
params(enabled: T.nilable(T::Boolean), plan: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)))).void
|
1605
|
+
}
|
1606
|
+
def initialize(enabled: nil, plan: nil); end
|
1607
|
+
end
|
1608
|
+
# Installment configuration for payments attempted on this invoice (Mexico Only).
|
1609
|
+
#
|
1610
|
+
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
1611
|
+
sig {
|
1612
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments))
|
1613
|
+
}
|
1614
|
+
attr_accessor :installments
|
1615
|
+
# 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.
|
1616
|
+
sig { returns(T.nilable(String)) }
|
1617
|
+
attr_accessor :request_three_d_secure
|
1618
|
+
sig {
|
1619
|
+
params(installments: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments), request_three_d_secure: T.nilable(String)).void
|
1620
|
+
}
|
1621
|
+
def initialize(installments: nil, request_three_d_secure: nil); end
|
1622
|
+
end
|
1623
|
+
class CustomerBalance < Stripe::RequestParams
|
1624
|
+
class BankTransfer < Stripe::RequestParams
|
1625
|
+
class EuBankTransfer < Stripe::RequestParams
|
1626
|
+
# The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
|
1627
|
+
sig { returns(String) }
|
1628
|
+
attr_accessor :country
|
1629
|
+
sig { params(country: String).void }
|
1630
|
+
def initialize(country: nil); end
|
1631
|
+
end
|
1632
|
+
# Configuration for eu_bank_transfer funding type.
|
1633
|
+
sig {
|
1634
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
|
1635
|
+
}
|
1636
|
+
attr_accessor :eu_bank_transfer
|
1637
|
+
# 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`.
|
1638
|
+
sig { returns(T.nilable(String)) }
|
1639
|
+
attr_accessor :type
|
1640
|
+
sig {
|
1641
|
+
params(eu_bank_transfer: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
|
1642
|
+
}
|
1643
|
+
def initialize(eu_bank_transfer: nil, type: nil); end
|
1644
|
+
end
|
1645
|
+
# Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
|
1646
|
+
sig {
|
1647
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
|
1648
|
+
}
|
1649
|
+
attr_accessor :bank_transfer
|
1650
|
+
# The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
|
1651
|
+
sig { returns(T.nilable(String)) }
|
1652
|
+
attr_accessor :funding_type
|
1653
|
+
sig {
|
1654
|
+
params(bank_transfer: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
|
1655
|
+
}
|
1656
|
+
def initialize(bank_transfer: nil, funding_type: nil); end
|
1657
|
+
end
|
1658
|
+
class Konbini < Stripe::RequestParams
|
1659
|
+
|
1660
|
+
end
|
1661
|
+
class SepaDebit < Stripe::RequestParams
|
1662
|
+
|
1663
|
+
end
|
1664
|
+
class UsBankAccount < Stripe::RequestParams
|
1665
|
+
class FinancialConnections < Stripe::RequestParams
|
1666
|
+
class Filters < Stripe::RequestParams
|
1667
|
+
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
1668
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1669
|
+
attr_accessor :account_subcategories
|
1670
|
+
sig { params(account_subcategories: T.nilable(T::Array[String])).void }
|
1671
|
+
def initialize(account_subcategories: nil); end
|
1672
|
+
end
|
1673
|
+
# Provide filters for the linked accounts that the customer can select for the payment method.
|
1674
|
+
sig {
|
1675
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
|
1676
|
+
}
|
1677
|
+
attr_accessor :filters
|
1678
|
+
# The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
|
1679
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1680
|
+
attr_accessor :permissions
|
1681
|
+
# List of data features that you would like to retrieve upon account creation.
|
1682
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1683
|
+
attr_accessor :prefetch
|
1684
|
+
sig {
|
1685
|
+
params(filters: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
|
1686
|
+
}
|
1687
|
+
def initialize(filters: nil, permissions: nil, prefetch: nil); end
|
1688
|
+
end
|
1689
|
+
# Additional fields for Financial Connections Session creation
|
1690
|
+
sig {
|
1691
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
|
1692
|
+
}
|
1693
|
+
attr_accessor :financial_connections
|
1694
|
+
# Verification method for the intent
|
1695
|
+
sig { returns(T.nilable(String)) }
|
1696
|
+
attr_accessor :verification_method
|
1697
|
+
sig {
|
1698
|
+
params(financial_connections: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
|
1699
|
+
}
|
1700
|
+
def initialize(financial_connections: nil, verification_method: nil); end
|
1701
|
+
end
|
1702
|
+
# 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.
|
1703
|
+
sig {
|
1704
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
|
1705
|
+
}
|
1706
|
+
attr_accessor :acss_debit
|
1707
|
+
# If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
1708
|
+
sig {
|
1709
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
|
1710
|
+
}
|
1711
|
+
attr_accessor :bancontact
|
1712
|
+
# If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
1713
|
+
sig {
|
1714
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
|
1715
|
+
}
|
1716
|
+
attr_accessor :card
|
1717
|
+
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1718
|
+
sig {
|
1719
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
|
1720
|
+
}
|
1721
|
+
attr_accessor :customer_balance
|
1722
|
+
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1723
|
+
sig {
|
1724
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
|
1725
|
+
}
|
1726
|
+
attr_accessor :konbini
|
1727
|
+
# 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.
|
1728
|
+
sig {
|
1729
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
|
1730
|
+
}
|
1731
|
+
attr_accessor :sepa_debit
|
1732
|
+
# 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.
|
1733
|
+
sig {
|
1734
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
|
1735
|
+
}
|
1736
|
+
attr_accessor :us_bank_account
|
1737
|
+
sig {
|
1738
|
+
params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
|
1739
|
+
}
|
1740
|
+
def initialize(
|
1741
|
+
acss_debit: nil,
|
1742
|
+
bancontact: nil,
|
1743
|
+
card: nil,
|
1744
|
+
customer_balance: nil,
|
1745
|
+
konbini: nil,
|
1746
|
+
sepa_debit: nil,
|
1747
|
+
us_bank_account: nil
|
1748
|
+
); end
|
1749
|
+
end
|
1750
|
+
# 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.
|
1751
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1752
|
+
attr_accessor :default_mandate
|
1753
|
+
# Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
|
1754
|
+
sig {
|
1755
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions))
|
1756
|
+
}
|
1757
|
+
attr_accessor :payment_method_options
|
1758
|
+
# 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). Should not be specified with payment_method_configuration
|
1759
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1760
|
+
attr_accessor :payment_method_types
|
1761
|
+
sig {
|
1762
|
+
params(default_mandate: T.nilable(T.nilable(String)), payment_method_options: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1763
|
+
}
|
1764
|
+
def initialize(
|
1765
|
+
default_mandate: nil,
|
1766
|
+
payment_method_options: nil,
|
1767
|
+
payment_method_types: nil
|
1768
|
+
); end
|
1769
|
+
end
|
1770
|
+
class Rendering < Stripe::RequestParams
|
1771
|
+
class Pdf < Stripe::RequestParams
|
1772
|
+
# Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
|
1773
|
+
# If set to `auto`, invoice PDF page size defaults to `a4` for customers with
|
1774
|
+
# Japanese locale and `letter` for customers with other locales.
|
1775
|
+
sig { returns(T.nilable(String)) }
|
1776
|
+
attr_accessor :page_size
|
1777
|
+
sig { params(page_size: T.nilable(String)).void }
|
1778
|
+
def initialize(page_size: nil); end
|
1779
|
+
end
|
1780
|
+
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
|
1781
|
+
sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
|
1782
|
+
attr_accessor :amount_tax_display
|
1783
|
+
# Invoice pdf rendering options
|
1784
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Rendering::Pdf)) }
|
1785
|
+
attr_accessor :pdf
|
1786
|
+
# ID of the invoice rendering template to use for this invoice.
|
1787
|
+
sig { returns(T.nilable(String)) }
|
1788
|
+
attr_accessor :template
|
1789
|
+
# The specific version of invoice rendering template to use for this invoice.
|
1790
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
1791
|
+
attr_accessor :template_version
|
1792
|
+
sig {
|
1793
|
+
params(amount_tax_display: T.nilable(T.nilable(T.any(String, String))), pdf: T.nilable(::Stripe::Invoice::CreateParams::Rendering::Pdf), template: T.nilable(String), template_version: T.nilable(T.nilable(T.any(String, Integer)))).void
|
1794
|
+
}
|
1795
|
+
def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end
|
1796
|
+
end
|
1797
|
+
class ShippingCost < Stripe::RequestParams
|
1798
|
+
class ShippingRateData < Stripe::RequestParams
|
1799
|
+
class DeliveryEstimate < Stripe::RequestParams
|
1800
|
+
class Maximum < Stripe::RequestParams
|
1801
|
+
# A unit of time.
|
1802
|
+
sig { returns(String) }
|
1803
|
+
attr_accessor :unit
|
1804
|
+
# Must be greater than 0.
|
1805
|
+
sig { returns(Integer) }
|
1806
|
+
attr_accessor :value
|
1807
|
+
sig { params(unit: String, value: Integer).void }
|
1808
|
+
def initialize(unit: nil, value: nil); end
|
1809
|
+
end
|
1810
|
+
class Minimum < Stripe::RequestParams
|
1811
|
+
# A unit of time.
|
1812
|
+
sig { returns(String) }
|
1813
|
+
attr_accessor :unit
|
1814
|
+
# Must be greater than 0.
|
1815
|
+
sig { returns(Integer) }
|
1816
|
+
attr_accessor :value
|
1817
|
+
sig { params(unit: String, value: Integer).void }
|
1818
|
+
def initialize(unit: nil, value: nil); end
|
1819
|
+
end
|
1820
|
+
# The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
|
1821
|
+
sig {
|
1822
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum))
|
1823
|
+
}
|
1824
|
+
attr_accessor :maximum
|
1825
|
+
# The lower bound of the estimated range. If empty, represents no lower bound.
|
1826
|
+
sig {
|
1827
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum))
|
1828
|
+
}
|
1829
|
+
attr_accessor :minimum
|
1830
|
+
sig {
|
1831
|
+
params(maximum: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum), minimum: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum)).void
|
1832
|
+
}
|
1833
|
+
def initialize(maximum: nil, minimum: nil); end
|
1834
|
+
end
|
1835
|
+
class FixedAmount < Stripe::RequestParams
|
1836
|
+
class CurrencyOptions < Stripe::RequestParams
|
1837
|
+
# A non-negative integer in cents representing how much to charge.
|
1838
|
+
sig { returns(Integer) }
|
1839
|
+
attr_accessor :amount
|
1840
|
+
# Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
1841
|
+
sig { returns(T.nilable(String)) }
|
1842
|
+
attr_accessor :tax_behavior
|
1843
|
+
sig { params(amount: Integer, tax_behavior: T.nilable(String)).void }
|
1844
|
+
def initialize(amount: nil, tax_behavior: nil); end
|
1845
|
+
end
|
1846
|
+
# A non-negative integer in cents representing how much to charge.
|
1847
|
+
sig { returns(Integer) }
|
1848
|
+
attr_accessor :amount
|
1849
|
+
# 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).
|
1850
|
+
sig { returns(String) }
|
1851
|
+
attr_accessor :currency
|
1852
|
+
# 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).
|
1853
|
+
sig {
|
1854
|
+
returns(T.nilable(T::Hash[String, ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]))
|
1855
|
+
}
|
1856
|
+
attr_accessor :currency_options
|
1857
|
+
sig {
|
1858
|
+
params(amount: Integer, currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions])).void
|
1859
|
+
}
|
1860
|
+
def initialize(amount: nil, currency: nil, currency_options: nil); end
|
1861
|
+
end
|
1862
|
+
# The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
1863
|
+
sig {
|
1864
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate))
|
1865
|
+
}
|
1866
|
+
attr_accessor :delivery_estimate
|
1867
|
+
# The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
1868
|
+
sig { returns(String) }
|
1869
|
+
attr_accessor :display_name
|
1870
|
+
# Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
|
1871
|
+
sig {
|
1872
|
+
returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount))
|
1873
|
+
}
|
1874
|
+
attr_accessor :fixed_amount
|
1875
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1876
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
1877
|
+
attr_accessor :metadata
|
1878
|
+
# Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
1879
|
+
sig { returns(T.nilable(String)) }
|
1880
|
+
attr_accessor :tax_behavior
|
1881
|
+
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
|
1882
|
+
sig { returns(T.nilable(String)) }
|
1883
|
+
attr_accessor :tax_code
|
1884
|
+
# The type of calculation to use on the shipping rate.
|
1885
|
+
sig { returns(T.nilable(String)) }
|
1886
|
+
attr_accessor :type
|
1887
|
+
sig {
|
1888
|
+
params(delivery_estimate: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate), display_name: String, fixed_amount: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount), metadata: T.nilable(T::Hash[String, String]), tax_behavior: T.nilable(String), tax_code: T.nilable(String), type: T.nilable(String)).void
|
1889
|
+
}
|
1890
|
+
def initialize(
|
1891
|
+
delivery_estimate: nil,
|
1892
|
+
display_name: nil,
|
1893
|
+
fixed_amount: nil,
|
1894
|
+
metadata: nil,
|
1895
|
+
tax_behavior: nil,
|
1896
|
+
tax_code: nil,
|
1897
|
+
type: nil
|
1898
|
+
); end
|
1899
|
+
end
|
1900
|
+
# The ID of the shipping rate to use for this order.
|
1901
|
+
sig { returns(T.nilable(String)) }
|
1902
|
+
attr_accessor :shipping_rate
|
1903
|
+
# Parameters to create a new ad-hoc shipping rate for this order.
|
1904
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData)) }
|
1905
|
+
attr_accessor :shipping_rate_data
|
1906
|
+
sig {
|
1907
|
+
params(shipping_rate: T.nilable(String), shipping_rate_data: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData)).void
|
1908
|
+
}
|
1909
|
+
def initialize(shipping_rate: nil, shipping_rate_data: nil); end
|
1910
|
+
end
|
1911
|
+
class ShippingDetails < Stripe::RequestParams
|
1912
|
+
class Address < Stripe::RequestParams
|
1913
|
+
# City, district, suburb, town, or village.
|
1914
|
+
sig { returns(T.nilable(String)) }
|
1915
|
+
attr_accessor :city
|
1916
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
1917
|
+
sig { returns(T.nilable(String)) }
|
1918
|
+
attr_accessor :country
|
1919
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
1920
|
+
sig { returns(T.nilable(String)) }
|
1921
|
+
attr_accessor :line1
|
1922
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
1923
|
+
sig { returns(T.nilable(String)) }
|
1924
|
+
attr_accessor :line2
|
1925
|
+
# ZIP or postal code.
|
1926
|
+
sig { returns(T.nilable(String)) }
|
1927
|
+
attr_accessor :postal_code
|
1928
|
+
# State, county, province, or region.
|
1929
|
+
sig { returns(T.nilable(String)) }
|
1930
|
+
attr_accessor :state
|
1931
|
+
sig {
|
1932
|
+
params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
|
1933
|
+
}
|
1934
|
+
def initialize(
|
1935
|
+
city: nil,
|
1936
|
+
country: nil,
|
1937
|
+
line1: nil,
|
1938
|
+
line2: nil,
|
1939
|
+
postal_code: nil,
|
1940
|
+
state: nil
|
1941
|
+
); end
|
1942
|
+
end
|
1943
|
+
# Shipping address
|
1944
|
+
sig { returns(::Stripe::Invoice::CreateParams::ShippingDetails::Address) }
|
1945
|
+
attr_accessor :address
|
1946
|
+
# Recipient name.
|
1947
|
+
sig { returns(String) }
|
1948
|
+
attr_accessor :name
|
1949
|
+
# Recipient phone (including extension)
|
1950
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1951
|
+
attr_accessor :phone
|
1952
|
+
sig {
|
1953
|
+
params(address: ::Stripe::Invoice::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(T.nilable(String))).void
|
1954
|
+
}
|
1955
|
+
def initialize(address: nil, name: nil, phone: nil); end
|
1956
|
+
end
|
1957
|
+
class TransferData < Stripe::RequestParams
|
1958
|
+
# The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
|
1959
|
+
sig { returns(T.nilable(Integer)) }
|
1960
|
+
attr_accessor :amount
|
1961
|
+
# ID of an existing, connected Stripe account.
|
1962
|
+
sig { returns(String) }
|
1963
|
+
attr_accessor :destination
|
1964
|
+
sig { params(amount: T.nilable(Integer), destination: String).void }
|
1965
|
+
def initialize(amount: nil, destination: nil); end
|
1966
|
+
end
|
1967
|
+
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1968
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1969
|
+
attr_accessor :account_tax_ids
|
1970
|
+
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
1971
|
+
sig { returns(T.nilable(Integer)) }
|
1972
|
+
attr_accessor :application_fee_amount
|
1973
|
+
# 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.
|
1974
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1975
|
+
attr_accessor :auto_advance
|
1976
|
+
# Settings for automatic tax lookup for this invoice.
|
1977
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax)) }
|
1978
|
+
attr_accessor :automatic_tax
|
1979
|
+
# The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.
|
1980
|
+
sig { returns(T.nilable(Integer)) }
|
1981
|
+
attr_accessor :automatically_finalizes_at
|
1982
|
+
# 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. Defaults to `charge_automatically`.
|
1983
|
+
sig { returns(T.nilable(String)) }
|
1984
|
+
attr_accessor :collection_method
|
1985
|
+
# The currency to create this invoice in. Defaults to that of `customer` if not specified.
|
1986
|
+
sig { returns(T.nilable(String)) }
|
1987
|
+
attr_accessor :currency
|
1988
|
+
# A list of up to 4 custom fields to be displayed on the invoice.
|
1989
|
+
sig {
|
1990
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::CustomField]))))
|
1991
|
+
}
|
1992
|
+
attr_accessor :custom_fields
|
1993
|
+
# The ID of the customer who will be billed.
|
1994
|
+
sig { returns(T.nilable(String)) }
|
1995
|
+
attr_accessor :customer
|
1996
|
+
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1997
|
+
sig { returns(T.nilable(Integer)) }
|
1998
|
+
attr_accessor :days_until_due
|
1999
|
+
# 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.
|
2000
|
+
sig { returns(T.nilable(String)) }
|
2001
|
+
attr_accessor :default_payment_method
|
2002
|
+
# 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.
|
2003
|
+
sig { returns(T.nilable(String)) }
|
2004
|
+
attr_accessor :default_source
|
2005
|
+
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
2006
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2007
|
+
attr_accessor :default_tax_rates
|
2008
|
+
# An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
|
2009
|
+
sig { returns(T.nilable(String)) }
|
2010
|
+
attr_accessor :description
|
2011
|
+
# The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
|
2012
|
+
sig {
|
2013
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::Discount]))))
|
2014
|
+
}
|
2015
|
+
attr_accessor :discounts
|
2016
|
+
# The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
|
2017
|
+
sig { returns(T.nilable(Integer)) }
|
2018
|
+
attr_accessor :due_date
|
2019
|
+
# 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.
|
2020
|
+
sig { returns(T.nilable(Integer)) }
|
2021
|
+
attr_accessor :effective_at
|
2022
|
+
# Specifies which fields in the response should be expanded.
|
2023
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2024
|
+
attr_accessor :expand
|
2025
|
+
# Footer to be displayed on the invoice.
|
2026
|
+
sig { returns(T.nilable(String)) }
|
2027
|
+
attr_accessor :footer
|
2028
|
+
# Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
|
2029
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::FromInvoice)) }
|
2030
|
+
attr_accessor :from_invoice
|
2031
|
+
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
2032
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Issuer)) }
|
2033
|
+
attr_accessor :issuer
|
2034
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2035
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
2036
|
+
attr_accessor :metadata
|
2037
|
+
# Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
|
2038
|
+
sig { returns(T.nilable(String)) }
|
2039
|
+
attr_accessor :number
|
2040
|
+
# 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.
|
2041
|
+
sig { returns(T.nilable(String)) }
|
2042
|
+
attr_accessor :on_behalf_of
|
2043
|
+
# Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
|
2044
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings)) }
|
2045
|
+
attr_accessor :payment_settings
|
2046
|
+
# How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
|
2047
|
+
sig { returns(T.nilable(String)) }
|
2048
|
+
attr_accessor :pending_invoice_items_behavior
|
2049
|
+
# The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
|
2050
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::Rendering)) }
|
2051
|
+
attr_accessor :rendering
|
2052
|
+
# Settings for the cost of shipping for this invoice.
|
2053
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingCost)) }
|
2054
|
+
attr_accessor :shipping_cost
|
2055
|
+
# 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.
|
2056
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::ShippingDetails)) }
|
2057
|
+
attr_accessor :shipping_details
|
2058
|
+
# Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
|
2059
|
+
sig { returns(T.nilable(String)) }
|
2060
|
+
attr_accessor :statement_descriptor
|
2061
|
+
# The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.
|
2062
|
+
sig { returns(T.nilable(String)) }
|
2063
|
+
attr_accessor :subscription
|
2064
|
+
# If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
|
2065
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreateParams::TransferData)) }
|
2066
|
+
attr_accessor :transfer_data
|
2067
|
+
sig {
|
2068
|
+
params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), application_fee_amount: T.nilable(Integer), auto_advance: T.nilable(T::Boolean), automatic_tax: T.nilable(::Stripe::Invoice::CreateParams::AutomaticTax), automatically_finalizes_at: T.nilable(Integer), collection_method: T.nilable(String), currency: T.nilable(String), custom_fields: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::CustomField]))), customer: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreateParams::Discount]))), due_date: T.nilable(Integer), effective_at: T.nilable(Integer), expand: T.nilable(T::Array[String]), footer: T.nilable(String), from_invoice: T.nilable(::Stripe::Invoice::CreateParams::FromInvoice), issuer: T.nilable(::Stripe::Invoice::CreateParams::Issuer), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), number: T.nilable(String), on_behalf_of: T.nilable(String), payment_settings: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings), pending_invoice_items_behavior: T.nilable(String), rendering: T.nilable(::Stripe::Invoice::CreateParams::Rendering), shipping_cost: T.nilable(::Stripe::Invoice::CreateParams::ShippingCost), shipping_details: T.nilable(::Stripe::Invoice::CreateParams::ShippingDetails), statement_descriptor: T.nilable(String), subscription: T.nilable(String), transfer_data: T.nilable(::Stripe::Invoice::CreateParams::TransferData)).void
|
2069
|
+
}
|
2070
|
+
def initialize(
|
2071
|
+
account_tax_ids: nil,
|
2072
|
+
application_fee_amount: nil,
|
2073
|
+
auto_advance: nil,
|
2074
|
+
automatic_tax: nil,
|
2075
|
+
automatically_finalizes_at: nil,
|
2076
|
+
collection_method: nil,
|
2077
|
+
currency: nil,
|
2078
|
+
custom_fields: nil,
|
2079
|
+
customer: nil,
|
2080
|
+
days_until_due: nil,
|
2081
|
+
default_payment_method: nil,
|
2082
|
+
default_source: nil,
|
2083
|
+
default_tax_rates: nil,
|
2084
|
+
description: nil,
|
2085
|
+
discounts: nil,
|
2086
|
+
due_date: nil,
|
2087
|
+
effective_at: nil,
|
2088
|
+
expand: nil,
|
2089
|
+
footer: nil,
|
2090
|
+
from_invoice: nil,
|
2091
|
+
issuer: nil,
|
2092
|
+
metadata: nil,
|
2093
|
+
number: nil,
|
2094
|
+
on_behalf_of: nil,
|
2095
|
+
payment_settings: nil,
|
2096
|
+
pending_invoice_items_behavior: nil,
|
2097
|
+
rendering: nil,
|
2098
|
+
shipping_cost: nil,
|
2099
|
+
shipping_details: nil,
|
2100
|
+
statement_descriptor: nil,
|
2101
|
+
subscription: nil,
|
2102
|
+
transfer_data: nil
|
2103
|
+
); end
|
2104
|
+
end
|
2105
|
+
class SearchParams < Stripe::RequestParams
|
2106
|
+
# Specifies which fields in the response should be expanded.
|
2107
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2108
|
+
attr_accessor :expand
|
2109
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2110
|
+
sig { returns(T.nilable(Integer)) }
|
2111
|
+
attr_accessor :limit
|
2112
|
+
# A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
|
2113
|
+
sig { returns(T.nilable(String)) }
|
2114
|
+
attr_accessor :page
|
2115
|
+
# The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).
|
2116
|
+
sig { returns(String) }
|
2117
|
+
attr_accessor :query
|
2118
|
+
sig {
|
2119
|
+
params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
|
2120
|
+
}
|
2121
|
+
def initialize(expand: nil, limit: nil, page: nil, query: nil); end
|
2122
|
+
end
|
2123
|
+
class AddLinesParams < Stripe::RequestParams
|
2124
|
+
class Line < Stripe::RequestParams
|
2125
|
+
class Discount < Stripe::RequestParams
|
2126
|
+
# ID of the coupon to create a new discount for.
|
2127
|
+
sig { returns(T.nilable(String)) }
|
2128
|
+
attr_accessor :coupon
|
2129
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2130
|
+
sig { returns(T.nilable(String)) }
|
2131
|
+
attr_accessor :discount
|
2132
|
+
# ID of the promotion code to create a new discount for.
|
2133
|
+
sig { returns(T.nilable(String)) }
|
2134
|
+
attr_accessor :promotion_code
|
2135
|
+
sig {
|
2136
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
2137
|
+
}
|
2138
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
2139
|
+
end
|
2140
|
+
class Period < Stripe::RequestParams
|
2141
|
+
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
2142
|
+
sig { returns(Integer) }
|
2143
|
+
attr_accessor :end
|
2144
|
+
# The start of the period. This value is inclusive.
|
2145
|
+
sig { returns(Integer) }
|
2146
|
+
attr_accessor :start
|
2147
|
+
sig { params(end_: Integer, start: Integer).void }
|
2148
|
+
def initialize(end_: nil, start: nil); end
|
2149
|
+
end
|
2150
|
+
class PriceData < Stripe::RequestParams
|
2151
|
+
class ProductData < Stripe::RequestParams
|
2152
|
+
# 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.
|
2153
|
+
sig { returns(T.nilable(String)) }
|
2154
|
+
attr_accessor :description
|
2155
|
+
# A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
|
2156
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2157
|
+
attr_accessor :images
|
2158
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2159
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
2160
|
+
attr_accessor :metadata
|
2161
|
+
# The product's name, meant to be displayable to the customer.
|
2162
|
+
sig { returns(String) }
|
2163
|
+
attr_accessor :name
|
2164
|
+
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
2165
|
+
sig { returns(T.nilable(String)) }
|
2166
|
+
attr_accessor :tax_code
|
2167
|
+
sig {
|
2168
|
+
params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
|
2169
|
+
}
|
2170
|
+
def initialize(
|
2171
|
+
description: nil,
|
2172
|
+
images: nil,
|
2173
|
+
metadata: nil,
|
2174
|
+
name: nil,
|
2175
|
+
tax_code: nil
|
2176
|
+
); end
|
2177
|
+
end
|
2178
|
+
# 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).
|
2179
|
+
sig { returns(String) }
|
2180
|
+
attr_accessor :currency
|
2181
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
|
2182
|
+
sig { returns(T.nilable(String)) }
|
2183
|
+
attr_accessor :product
|
2184
|
+
# Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
|
2185
|
+
sig {
|
2186
|
+
returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData::ProductData))
|
2187
|
+
}
|
2188
|
+
attr_accessor :product_data
|
2189
|
+
# 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.
|
2190
|
+
sig { returns(T.nilable(String)) }
|
2191
|
+
attr_accessor :tax_behavior
|
2192
|
+
# A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
|
2193
|
+
sig { returns(T.nilable(Integer)) }
|
2194
|
+
attr_accessor :unit_amount
|
2195
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
2196
|
+
sig { returns(T.nilable(String)) }
|
2197
|
+
attr_accessor :unit_amount_decimal
|
2198
|
+
sig {
|
2199
|
+
params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
2200
|
+
}
|
2201
|
+
def initialize(
|
2202
|
+
currency: nil,
|
2203
|
+
product: nil,
|
2204
|
+
product_data: nil,
|
2205
|
+
tax_behavior: nil,
|
2206
|
+
unit_amount: nil,
|
2207
|
+
unit_amount_decimal: nil
|
2208
|
+
); end
|
2209
|
+
end
|
2210
|
+
class Pricing < Stripe::RequestParams
|
2211
|
+
# The ID of the price object.
|
2212
|
+
sig { returns(T.nilable(String)) }
|
2213
|
+
attr_accessor :price
|
2214
|
+
sig { params(price: T.nilable(String)).void }
|
2215
|
+
def initialize(price: nil); end
|
2216
|
+
end
|
2217
|
+
class TaxAmount < Stripe::RequestParams
|
2218
|
+
class TaxRateData < Stripe::RequestParams
|
2219
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
2220
|
+
sig { returns(T.nilable(String)) }
|
2221
|
+
attr_accessor :country
|
2222
|
+
# An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
|
2223
|
+
sig { returns(T.nilable(String)) }
|
2224
|
+
attr_accessor :description
|
2225
|
+
# The display name of the tax rate, which will be shown to users.
|
2226
|
+
sig { returns(String) }
|
2227
|
+
attr_accessor :display_name
|
2228
|
+
# This specifies if the tax rate is inclusive or exclusive.
|
2229
|
+
sig { returns(T::Boolean) }
|
2230
|
+
attr_accessor :inclusive
|
2231
|
+
# The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
|
2232
|
+
sig { returns(T.nilable(String)) }
|
2233
|
+
attr_accessor :jurisdiction
|
2234
|
+
# The level of the jurisdiction that imposes this tax rate.
|
2235
|
+
sig { returns(T.nilable(String)) }
|
2236
|
+
attr_accessor :jurisdiction_level
|
2237
|
+
# The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
|
2238
|
+
sig { returns(Float) }
|
2239
|
+
attr_accessor :percentage
|
2240
|
+
# [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.
|
2241
|
+
sig { returns(T.nilable(String)) }
|
2242
|
+
attr_accessor :state
|
2243
|
+
# The high-level tax type, such as `vat` or `sales_tax`.
|
2244
|
+
sig { returns(T.nilable(String)) }
|
2245
|
+
attr_accessor :tax_type
|
2246
|
+
sig {
|
2247
|
+
params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
|
2248
|
+
}
|
2249
|
+
def initialize(
|
2250
|
+
country: nil,
|
2251
|
+
description: nil,
|
2252
|
+
display_name: nil,
|
2253
|
+
inclusive: nil,
|
2254
|
+
jurisdiction: nil,
|
2255
|
+
jurisdiction_level: nil,
|
2256
|
+
percentage: nil,
|
2257
|
+
state: nil,
|
2258
|
+
tax_type: nil
|
2259
|
+
); end
|
2260
|
+
end
|
2261
|
+
# The amount, in cents (or local equivalent), of the tax.
|
2262
|
+
sig { returns(Integer) }
|
2263
|
+
attr_accessor :amount
|
2264
|
+
# Data to find or create a TaxRate object.
|
2265
|
+
#
|
2266
|
+
# Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
|
2267
|
+
sig { returns(::Stripe::Invoice::AddLinesParams::Line::TaxAmount::TaxRateData) }
|
2268
|
+
attr_accessor :tax_rate_data
|
2269
|
+
# The reasoning behind this tax, for example, if the product is tax exempt.
|
2270
|
+
sig { returns(T.nilable(String)) }
|
2271
|
+
attr_accessor :taxability_reason
|
2272
|
+
# The amount on which tax is calculated, in cents (or local equivalent).
|
2273
|
+
sig { returns(Integer) }
|
2274
|
+
attr_accessor :taxable_amount
|
2275
|
+
sig {
|
2276
|
+
params(amount: Integer, tax_rate_data: ::Stripe::Invoice::AddLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
|
2277
|
+
}
|
2278
|
+
def initialize(
|
2279
|
+
amount: nil,
|
2280
|
+
tax_rate_data: nil,
|
2281
|
+
taxability_reason: nil,
|
2282
|
+
taxable_amount: nil
|
2283
|
+
); end
|
2284
|
+
end
|
2285
|
+
# The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
|
2286
|
+
sig { returns(T.nilable(Integer)) }
|
2287
|
+
attr_accessor :amount
|
2288
|
+
# An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
2289
|
+
sig { returns(T.nilable(String)) }
|
2290
|
+
attr_accessor :description
|
2291
|
+
# Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
|
2292
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2293
|
+
attr_accessor :discountable
|
2294
|
+
# The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
|
2295
|
+
sig {
|
2296
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::Discount]))))
|
2297
|
+
}
|
2298
|
+
attr_accessor :discounts
|
2299
|
+
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
2300
|
+
sig { returns(T.nilable(String)) }
|
2301
|
+
attr_accessor :invoice_item
|
2302
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2303
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
2304
|
+
attr_accessor :metadata
|
2305
|
+
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
2306
|
+
sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::Period)) }
|
2307
|
+
attr_accessor :period
|
2308
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
2309
|
+
sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData)) }
|
2310
|
+
attr_accessor :price_data
|
2311
|
+
# The pricing information for the invoice item.
|
2312
|
+
sig { returns(T.nilable(::Stripe::Invoice::AddLinesParams::Line::Pricing)) }
|
2313
|
+
attr_accessor :pricing
|
2314
|
+
# Non-negative integer. The quantity of units for the line item.
|
2315
|
+
sig { returns(T.nilable(Integer)) }
|
2316
|
+
attr_accessor :quantity
|
2317
|
+
# A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
|
2318
|
+
sig {
|
2319
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::TaxAmount]))))
|
2320
|
+
}
|
2321
|
+
attr_accessor :tax_amounts
|
2322
|
+
# The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
|
2323
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2324
|
+
attr_accessor :tax_rates
|
2325
|
+
sig {
|
2326
|
+
params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::Discount]))), invoice_item: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::Invoice::AddLinesParams::Line::Period), price_data: T.nilable(::Stripe::Invoice::AddLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::Invoice::AddLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::AddLinesParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
2327
|
+
}
|
2328
|
+
def initialize(
|
2329
|
+
amount: nil,
|
2330
|
+
description: nil,
|
2331
|
+
discountable: nil,
|
2332
|
+
discounts: nil,
|
2333
|
+
invoice_item: nil,
|
2334
|
+
metadata: nil,
|
2335
|
+
period: nil,
|
2336
|
+
price_data: nil,
|
2337
|
+
pricing: nil,
|
2338
|
+
quantity: nil,
|
2339
|
+
tax_amounts: nil,
|
2340
|
+
tax_rates: nil
|
2341
|
+
); end
|
2342
|
+
end
|
2343
|
+
# Specifies which fields in the response should be expanded.
|
2344
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2345
|
+
attr_accessor :expand
|
2346
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2347
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
2348
|
+
attr_accessor :invoice_metadata
|
2349
|
+
# The line items to add.
|
2350
|
+
sig { returns(T::Array[::Stripe::Invoice::AddLinesParams::Line]) }
|
2351
|
+
attr_accessor :lines
|
2352
|
+
sig {
|
2353
|
+
params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::Invoice::AddLinesParams::Line]).void
|
2354
|
+
}
|
2355
|
+
def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
|
2356
|
+
end
|
2357
|
+
class FinalizeInvoiceParams < Stripe::RequestParams
|
2358
|
+
# 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.
|
2359
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2360
|
+
attr_accessor :auto_advance
|
2361
|
+
# Specifies which fields in the response should be expanded.
|
2362
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2363
|
+
attr_accessor :expand
|
2364
|
+
sig { params(auto_advance: T.nilable(T::Boolean), expand: T.nilable(T::Array[String])).void }
|
2365
|
+
def initialize(auto_advance: nil, expand: nil); end
|
2366
|
+
end
|
2367
|
+
class MarkUncollectibleParams < Stripe::RequestParams
|
2368
|
+
# Specifies which fields in the response should be expanded.
|
2369
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2370
|
+
attr_accessor :expand
|
2371
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
2372
|
+
def initialize(expand: nil); end
|
2373
|
+
end
|
2374
|
+
class PayParams < Stripe::RequestParams
|
2375
|
+
# Specifies which fields in the response should be expanded.
|
2376
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2377
|
+
attr_accessor :expand
|
2378
|
+
# In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
|
2379
|
+
#
|
2380
|
+
# Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
|
2381
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2382
|
+
attr_accessor :forgive
|
2383
|
+
# ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
|
2384
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2385
|
+
attr_accessor :mandate
|
2386
|
+
# Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
|
2387
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2388
|
+
attr_accessor :off_session
|
2389
|
+
# Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
|
2390
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2391
|
+
attr_accessor :paid_out_of_band
|
2392
|
+
# A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
|
2393
|
+
sig { returns(T.nilable(String)) }
|
2394
|
+
attr_accessor :payment_method
|
2395
|
+
# A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
|
2396
|
+
sig { returns(T.nilable(String)) }
|
2397
|
+
attr_accessor :source
|
2398
|
+
sig {
|
2399
|
+
params(expand: T.nilable(T::Array[String]), forgive: T.nilable(T::Boolean), mandate: T.nilable(T.nilable(String)), off_session: T.nilable(T::Boolean), paid_out_of_band: T.nilable(T::Boolean), payment_method: T.nilable(String), source: T.nilable(String)).void
|
2400
|
+
}
|
2401
|
+
def initialize(
|
2402
|
+
expand: nil,
|
2403
|
+
forgive: nil,
|
2404
|
+
mandate: nil,
|
2405
|
+
off_session: nil,
|
2406
|
+
paid_out_of_band: nil,
|
2407
|
+
payment_method: nil,
|
2408
|
+
source: nil
|
2409
|
+
); end
|
2410
|
+
end
|
2411
|
+
class RemoveLinesParams < Stripe::RequestParams
|
2412
|
+
class Line < Stripe::RequestParams
|
2413
|
+
# Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
|
2414
|
+
sig { returns(String) }
|
2415
|
+
attr_accessor :behavior
|
2416
|
+
# ID of an existing line item to remove from this invoice.
|
2417
|
+
sig { returns(String) }
|
2418
|
+
attr_accessor :id
|
2419
|
+
sig { params(behavior: String, id: String).void }
|
2420
|
+
def initialize(behavior: nil, id: nil); end
|
2421
|
+
end
|
2422
|
+
# Specifies which fields in the response should be expanded.
|
2423
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2424
|
+
attr_accessor :expand
|
2425
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2426
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
2427
|
+
attr_accessor :invoice_metadata
|
2428
|
+
# The line items to remove.
|
2429
|
+
sig { returns(T::Array[::Stripe::Invoice::RemoveLinesParams::Line]) }
|
2430
|
+
attr_accessor :lines
|
2431
|
+
sig {
|
2432
|
+
params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::Invoice::RemoveLinesParams::Line]).void
|
2433
|
+
}
|
2434
|
+
def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
|
2435
|
+
end
|
2436
|
+
class SendInvoiceParams < Stripe::RequestParams
|
2437
|
+
# Specifies which fields in the response should be expanded.
|
2438
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2439
|
+
attr_accessor :expand
|
2440
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
2441
|
+
def initialize(expand: nil); end
|
2442
|
+
end
|
2443
|
+
class UpdateLinesParams < Stripe::RequestParams
|
2444
|
+
class Line < Stripe::RequestParams
|
2445
|
+
class Discount < Stripe::RequestParams
|
2446
|
+
# ID of the coupon to create a new discount for.
|
2447
|
+
sig { returns(T.nilable(String)) }
|
2448
|
+
attr_accessor :coupon
|
2449
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2450
|
+
sig { returns(T.nilable(String)) }
|
2451
|
+
attr_accessor :discount
|
2452
|
+
# ID of the promotion code to create a new discount for.
|
2453
|
+
sig { returns(T.nilable(String)) }
|
2454
|
+
attr_accessor :promotion_code
|
2455
|
+
sig {
|
2456
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
2457
|
+
}
|
2458
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
2459
|
+
end
|
2460
|
+
class Period < Stripe::RequestParams
|
2461
|
+
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
2462
|
+
sig { returns(Integer) }
|
2463
|
+
attr_accessor :end
|
2464
|
+
# The start of the period. This value is inclusive.
|
2465
|
+
sig { returns(Integer) }
|
2466
|
+
attr_accessor :start
|
2467
|
+
sig { params(end_: Integer, start: Integer).void }
|
2468
|
+
def initialize(end_: nil, start: nil); end
|
2469
|
+
end
|
2470
|
+
class PriceData < Stripe::RequestParams
|
2471
|
+
class ProductData < Stripe::RequestParams
|
2472
|
+
# 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.
|
2473
|
+
sig { returns(T.nilable(String)) }
|
2474
|
+
attr_accessor :description
|
2475
|
+
# A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
|
2476
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2477
|
+
attr_accessor :images
|
2478
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2479
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
2480
|
+
attr_accessor :metadata
|
2481
|
+
# The product's name, meant to be displayable to the customer.
|
2482
|
+
sig { returns(String) }
|
2483
|
+
attr_accessor :name
|
2484
|
+
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
2485
|
+
sig { returns(T.nilable(String)) }
|
2486
|
+
attr_accessor :tax_code
|
2487
|
+
sig {
|
2488
|
+
params(description: T.nilable(String), images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, tax_code: T.nilable(String)).void
|
2489
|
+
}
|
2490
|
+
def initialize(
|
2491
|
+
description: nil,
|
2492
|
+
images: nil,
|
2493
|
+
metadata: nil,
|
2494
|
+
name: nil,
|
2495
|
+
tax_code: nil
|
2496
|
+
); end
|
2497
|
+
end
|
2498
|
+
# 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).
|
2499
|
+
sig { returns(String) }
|
2500
|
+
attr_accessor :currency
|
2501
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
|
2502
|
+
sig { returns(T.nilable(String)) }
|
2503
|
+
attr_accessor :product
|
2504
|
+
# Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
|
2505
|
+
sig {
|
2506
|
+
returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData::ProductData))
|
2507
|
+
}
|
2508
|
+
attr_accessor :product_data
|
2509
|
+
# 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.
|
2510
|
+
sig { returns(T.nilable(String)) }
|
2511
|
+
attr_accessor :tax_behavior
|
2512
|
+
# A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
|
2513
|
+
sig { returns(T.nilable(Integer)) }
|
2514
|
+
attr_accessor :unit_amount
|
2515
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
2516
|
+
sig { returns(T.nilable(String)) }
|
2517
|
+
attr_accessor :unit_amount_decimal
|
2518
|
+
sig {
|
2519
|
+
params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
2520
|
+
}
|
2521
|
+
def initialize(
|
2522
|
+
currency: nil,
|
2523
|
+
product: nil,
|
2524
|
+
product_data: nil,
|
2525
|
+
tax_behavior: nil,
|
2526
|
+
unit_amount: nil,
|
2527
|
+
unit_amount_decimal: nil
|
2528
|
+
); end
|
2529
|
+
end
|
2530
|
+
class Pricing < Stripe::RequestParams
|
2531
|
+
# The ID of the price object.
|
2532
|
+
sig { returns(T.nilable(String)) }
|
2533
|
+
attr_accessor :price
|
2534
|
+
sig { params(price: T.nilable(String)).void }
|
2535
|
+
def initialize(price: nil); end
|
2536
|
+
end
|
2537
|
+
class TaxAmount < Stripe::RequestParams
|
2538
|
+
class TaxRateData < Stripe::RequestParams
|
2539
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
2540
|
+
sig { returns(T.nilable(String)) }
|
2541
|
+
attr_accessor :country
|
2542
|
+
# An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
|
2543
|
+
sig { returns(T.nilable(String)) }
|
2544
|
+
attr_accessor :description
|
2545
|
+
# The display name of the tax rate, which will be shown to users.
|
2546
|
+
sig { returns(String) }
|
2547
|
+
attr_accessor :display_name
|
2548
|
+
# This specifies if the tax rate is inclusive or exclusive.
|
2549
|
+
sig { returns(T::Boolean) }
|
2550
|
+
attr_accessor :inclusive
|
2551
|
+
# The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
|
2552
|
+
sig { returns(T.nilable(String)) }
|
2553
|
+
attr_accessor :jurisdiction
|
2554
|
+
# The level of the jurisdiction that imposes this tax rate.
|
2555
|
+
sig { returns(T.nilable(String)) }
|
2556
|
+
attr_accessor :jurisdiction_level
|
2557
|
+
# The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
|
2558
|
+
sig { returns(Float) }
|
2559
|
+
attr_accessor :percentage
|
2560
|
+
# [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.
|
2561
|
+
sig { returns(T.nilable(String)) }
|
2562
|
+
attr_accessor :state
|
2563
|
+
# The high-level tax type, such as `vat` or `sales_tax`.
|
2564
|
+
sig { returns(T.nilable(String)) }
|
2565
|
+
attr_accessor :tax_type
|
2566
|
+
sig {
|
2567
|
+
params(country: T.nilable(String), description: T.nilable(String), display_name: String, inclusive: T::Boolean, jurisdiction: T.nilable(String), jurisdiction_level: T.nilable(String), percentage: Float, state: T.nilable(String), tax_type: T.nilable(String)).void
|
2568
|
+
}
|
2569
|
+
def initialize(
|
2570
|
+
country: nil,
|
2571
|
+
description: nil,
|
2572
|
+
display_name: nil,
|
2573
|
+
inclusive: nil,
|
2574
|
+
jurisdiction: nil,
|
2575
|
+
jurisdiction_level: nil,
|
2576
|
+
percentage: nil,
|
2577
|
+
state: nil,
|
2578
|
+
tax_type: nil
|
2579
|
+
); end
|
2580
|
+
end
|
2581
|
+
# The amount, in cents (or local equivalent), of the tax.
|
2582
|
+
sig { returns(Integer) }
|
2583
|
+
attr_accessor :amount
|
2584
|
+
# Data to find or create a TaxRate object.
|
2585
|
+
#
|
2586
|
+
# Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
|
2587
|
+
sig { returns(::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount::TaxRateData) }
|
2588
|
+
attr_accessor :tax_rate_data
|
2589
|
+
# The reasoning behind this tax, for example, if the product is tax exempt.
|
2590
|
+
sig { returns(T.nilable(String)) }
|
2591
|
+
attr_accessor :taxability_reason
|
2592
|
+
# The amount on which tax is calculated, in cents (or local equivalent).
|
2593
|
+
sig { returns(Integer) }
|
2594
|
+
attr_accessor :taxable_amount
|
2595
|
+
sig {
|
2596
|
+
params(amount: Integer, tax_rate_data: ::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount::TaxRateData, taxability_reason: T.nilable(String), taxable_amount: Integer).void
|
2597
|
+
}
|
2598
|
+
def initialize(
|
2599
|
+
amount: nil,
|
2600
|
+
tax_rate_data: nil,
|
2601
|
+
taxability_reason: nil,
|
2602
|
+
taxable_amount: nil
|
2603
|
+
); end
|
2604
|
+
end
|
2605
|
+
# The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
|
2606
|
+
sig { returns(T.nilable(Integer)) }
|
2607
|
+
attr_accessor :amount
|
2608
|
+
# An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
2609
|
+
sig { returns(T.nilable(String)) }
|
2610
|
+
attr_accessor :description
|
2611
|
+
# Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
|
2612
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2613
|
+
attr_accessor :discountable
|
2614
|
+
# The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
|
2615
|
+
sig {
|
2616
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::Discount]))))
|
2617
|
+
}
|
2618
|
+
attr_accessor :discounts
|
2619
|
+
# ID of an existing line item on the invoice.
|
2620
|
+
sig { returns(String) }
|
2621
|
+
attr_accessor :id
|
2622
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
2623
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
2624
|
+
attr_accessor :metadata
|
2625
|
+
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
2626
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Period)) }
|
2627
|
+
attr_accessor :period
|
2628
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
2629
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData)) }
|
2630
|
+
attr_accessor :price_data
|
2631
|
+
# The pricing information for the invoice item.
|
2632
|
+
sig { returns(T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Pricing)) }
|
2633
|
+
attr_accessor :pricing
|
2634
|
+
# Non-negative integer. The quantity of units for the line item.
|
2635
|
+
sig { returns(T.nilable(Integer)) }
|
2636
|
+
attr_accessor :quantity
|
2637
|
+
# A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
|
2638
|
+
sig {
|
2639
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount]))))
|
2640
|
+
}
|
2641
|
+
attr_accessor :tax_amounts
|
2642
|
+
# The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
|
2643
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2644
|
+
attr_accessor :tax_rates
|
2645
|
+
sig {
|
2646
|
+
params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::Discount]))), id: String, metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Period), price_data: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::PriceData), pricing: T.nilable(::Stripe::Invoice::UpdateLinesParams::Line::Pricing), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount]))), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
2647
|
+
}
|
2648
|
+
def initialize(
|
2649
|
+
amount: nil,
|
2650
|
+
description: nil,
|
2651
|
+
discountable: nil,
|
2652
|
+
discounts: nil,
|
2653
|
+
id: nil,
|
2654
|
+
metadata: nil,
|
2655
|
+
period: nil,
|
2656
|
+
price_data: nil,
|
2657
|
+
pricing: nil,
|
2658
|
+
quantity: nil,
|
2659
|
+
tax_amounts: nil,
|
2660
|
+
tax_rates: nil
|
2661
|
+
); end
|
2662
|
+
end
|
2663
|
+
# Specifies which fields in the response should be expanded.
|
2664
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2665
|
+
attr_accessor :expand
|
2666
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
2667
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
2668
|
+
attr_accessor :invoice_metadata
|
2669
|
+
# The line items to update.
|
2670
|
+
sig { returns(T::Array[::Stripe::Invoice::UpdateLinesParams::Line]) }
|
2671
|
+
attr_accessor :lines
|
2672
|
+
sig {
|
2673
|
+
params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), lines: T::Array[::Stripe::Invoice::UpdateLinesParams::Line]).void
|
2674
|
+
}
|
2675
|
+
def initialize(expand: nil, invoice_metadata: nil, lines: nil); end
|
2676
|
+
end
|
2677
|
+
class VoidInvoiceParams < Stripe::RequestParams
|
2678
|
+
# Specifies which fields in the response should be expanded.
|
2679
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2680
|
+
attr_accessor :expand
|
2681
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
2682
|
+
def initialize(expand: nil); end
|
2683
|
+
end
|
2684
|
+
class CreatePreviewParams < Stripe::RequestParams
|
2685
|
+
class AutomaticTax < Stripe::RequestParams
|
2686
|
+
class Liability < Stripe::RequestParams
|
2687
|
+
# The connected account being referenced when `type` is `account`.
|
2688
|
+
sig { returns(T.nilable(String)) }
|
2689
|
+
attr_accessor :account
|
2690
|
+
# Type of the account referenced in the request.
|
2691
|
+
sig { returns(String) }
|
2692
|
+
attr_accessor :type
|
2693
|
+
sig { params(account: T.nilable(String), type: String).void }
|
2694
|
+
def initialize(account: nil, type: nil); end
|
2695
|
+
end
|
2696
|
+
# 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.
|
2697
|
+
sig { returns(T::Boolean) }
|
2698
|
+
attr_accessor :enabled
|
2699
|
+
# 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.
|
2700
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax::Liability)) }
|
2701
|
+
attr_accessor :liability
|
2702
|
+
sig {
|
2703
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax::Liability)).void
|
2704
|
+
}
|
2705
|
+
def initialize(enabled: nil, liability: nil); end
|
2706
|
+
end
|
2707
|
+
class CustomerDetails < Stripe::RequestParams
|
2708
|
+
class Address < Stripe::RequestParams
|
2709
|
+
# City, district, suburb, town, or village.
|
2710
|
+
sig { returns(T.nilable(String)) }
|
2711
|
+
attr_accessor :city
|
2712
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
2713
|
+
sig { returns(T.nilable(String)) }
|
2714
|
+
attr_accessor :country
|
2715
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
2716
|
+
sig { returns(T.nilable(String)) }
|
2717
|
+
attr_accessor :line1
|
2718
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
2719
|
+
sig { returns(T.nilable(String)) }
|
2720
|
+
attr_accessor :line2
|
2721
|
+
# ZIP or postal code.
|
2722
|
+
sig { returns(T.nilable(String)) }
|
2723
|
+
attr_accessor :postal_code
|
2724
|
+
# State, county, province, or region.
|
2725
|
+
sig { returns(T.nilable(String)) }
|
2726
|
+
attr_accessor :state
|
2727
|
+
sig {
|
2728
|
+
params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
|
2729
|
+
}
|
2730
|
+
def initialize(
|
2731
|
+
city: nil,
|
2732
|
+
country: nil,
|
2733
|
+
line1: nil,
|
2734
|
+
line2: nil,
|
2735
|
+
postal_code: nil,
|
2736
|
+
state: nil
|
2737
|
+
); end
|
2738
|
+
end
|
2739
|
+
class Shipping < Stripe::RequestParams
|
2740
|
+
class Address < Stripe::RequestParams
|
2741
|
+
# City, district, suburb, town, or village.
|
2742
|
+
sig { returns(T.nilable(String)) }
|
2743
|
+
attr_accessor :city
|
2744
|
+
# A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
2745
|
+
sig { returns(T.nilable(String)) }
|
2746
|
+
attr_accessor :country
|
2747
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
2748
|
+
sig { returns(T.nilable(String)) }
|
2749
|
+
attr_accessor :line1
|
2750
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
2751
|
+
sig { returns(T.nilable(String)) }
|
2752
|
+
attr_accessor :line2
|
2753
|
+
# ZIP or postal code.
|
2754
|
+
sig { returns(T.nilable(String)) }
|
2755
|
+
attr_accessor :postal_code
|
2756
|
+
# State, county, province, or region.
|
2757
|
+
sig { returns(T.nilable(String)) }
|
2758
|
+
attr_accessor :state
|
2759
|
+
sig {
|
2760
|
+
params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void
|
2761
|
+
}
|
2762
|
+
def initialize(
|
2763
|
+
city: nil,
|
2764
|
+
country: nil,
|
2765
|
+
line1: nil,
|
2766
|
+
line2: nil,
|
2767
|
+
postal_code: nil,
|
2768
|
+
state: nil
|
2769
|
+
); end
|
2770
|
+
end
|
2771
|
+
# Customer shipping address.
|
2772
|
+
sig {
|
2773
|
+
returns(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping::Address)
|
2774
|
+
}
|
2775
|
+
attr_accessor :address
|
2776
|
+
# Customer name.
|
2777
|
+
sig { returns(String) }
|
2778
|
+
attr_accessor :name
|
2779
|
+
# Customer phone (including extension).
|
2780
|
+
sig { returns(T.nilable(String)) }
|
2781
|
+
attr_accessor :phone
|
2782
|
+
sig {
|
2783
|
+
params(address: ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping::Address, name: String, phone: T.nilable(String)).void
|
2784
|
+
}
|
2785
|
+
def initialize(address: nil, name: nil, phone: nil); end
|
2786
|
+
end
|
2787
|
+
class Tax < Stripe::RequestParams
|
2788
|
+
# A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
|
2789
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2790
|
+
attr_accessor :ip_address
|
2791
|
+
sig { params(ip_address: T.nilable(T.nilable(String))).void }
|
2792
|
+
def initialize(ip_address: nil); end
|
2793
|
+
end
|
2794
|
+
class TaxId < Stripe::RequestParams
|
2795
|
+
# Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `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`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
2796
|
+
sig { returns(String) }
|
2797
|
+
attr_accessor :type
|
2798
|
+
# Value of the tax ID.
|
2799
|
+
sig { returns(String) }
|
2800
|
+
attr_accessor :value
|
2801
|
+
sig { params(type: String, value: String).void }
|
2802
|
+
def initialize(type: nil, value: nil); end
|
2803
|
+
end
|
2804
|
+
# The customer's address.
|
2805
|
+
sig {
|
2806
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Address))))
|
2807
|
+
}
|
2808
|
+
attr_accessor :address
|
2809
|
+
# The customer's shipping information. Appears on invoices emailed to this customer.
|
2810
|
+
sig {
|
2811
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping))))
|
2812
|
+
}
|
2813
|
+
attr_accessor :shipping
|
2814
|
+
# Tax details about the customer.
|
2815
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Tax)) }
|
2816
|
+
attr_accessor :tax
|
2817
|
+
# The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
|
2818
|
+
sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
|
2819
|
+
attr_accessor :tax_exempt
|
2820
|
+
# The customer's tax IDs.
|
2821
|
+
sig {
|
2822
|
+
returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::CustomerDetails::TaxId]))
|
2823
|
+
}
|
2824
|
+
attr_accessor :tax_ids
|
2825
|
+
sig {
|
2826
|
+
params(address: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Address))), shipping: T.nilable(T.nilable(T.any(String, ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping))), tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Tax), tax_exempt: T.nilable(T.nilable(T.any(String, String))), tax_ids: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::CustomerDetails::TaxId])).void
|
2827
|
+
}
|
2828
|
+
def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end
|
2829
|
+
end
|
2830
|
+
class Discount < Stripe::RequestParams
|
2831
|
+
# ID of the coupon to create a new discount for.
|
2832
|
+
sig { returns(T.nilable(String)) }
|
2833
|
+
attr_accessor :coupon
|
2834
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2835
|
+
sig { returns(T.nilable(String)) }
|
2836
|
+
attr_accessor :discount
|
2837
|
+
# ID of the promotion code to create a new discount for.
|
2838
|
+
sig { returns(T.nilable(String)) }
|
2839
|
+
attr_accessor :promotion_code
|
2840
|
+
sig {
|
2841
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
2842
|
+
}
|
2843
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
2844
|
+
end
|
2845
|
+
class InvoiceItem < Stripe::RequestParams
|
2846
|
+
class Discount < Stripe::RequestParams
|
2847
|
+
# ID of the coupon to create a new discount for.
|
2848
|
+
sig { returns(T.nilable(String)) }
|
2849
|
+
attr_accessor :coupon
|
2850
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2851
|
+
sig { returns(T.nilable(String)) }
|
2852
|
+
attr_accessor :discount
|
2853
|
+
# ID of the promotion code to create a new discount for.
|
2854
|
+
sig { returns(T.nilable(String)) }
|
2855
|
+
attr_accessor :promotion_code
|
2856
|
+
sig {
|
2857
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
2858
|
+
}
|
2859
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
2860
|
+
end
|
2861
|
+
class Period < Stripe::RequestParams
|
2862
|
+
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
2863
|
+
sig { returns(Integer) }
|
2864
|
+
attr_accessor :end
|
2865
|
+
# The start of the period. This value is inclusive.
|
2866
|
+
sig { returns(Integer) }
|
2867
|
+
attr_accessor :start
|
2868
|
+
sig { params(end_: Integer, start: Integer).void }
|
2869
|
+
def initialize(end_: nil, start: nil); end
|
2870
|
+
end
|
2871
|
+
class PriceData < Stripe::RequestParams
|
2872
|
+
# 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).
|
2873
|
+
sig { returns(String) }
|
2874
|
+
attr_accessor :currency
|
2875
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
2876
|
+
sig { returns(String) }
|
2877
|
+
attr_accessor :product
|
2878
|
+
# 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.
|
2879
|
+
sig { returns(T.nilable(String)) }
|
2880
|
+
attr_accessor :tax_behavior
|
2881
|
+
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
2882
|
+
sig { returns(T.nilable(Integer)) }
|
2883
|
+
attr_accessor :unit_amount
|
2884
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
2885
|
+
sig { returns(T.nilable(String)) }
|
2886
|
+
attr_accessor :unit_amount_decimal
|
2887
|
+
sig {
|
2888
|
+
params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
2889
|
+
}
|
2890
|
+
def initialize(
|
2891
|
+
currency: nil,
|
2892
|
+
product: nil,
|
2893
|
+
tax_behavior: nil,
|
2894
|
+
unit_amount: nil,
|
2895
|
+
unit_amount_decimal: nil
|
2896
|
+
); end
|
2897
|
+
end
|
2898
|
+
# The integer amount in cents (or local equivalent) of previewed invoice item.
|
2899
|
+
sig { returns(T.nilable(Integer)) }
|
2900
|
+
attr_accessor :amount
|
2901
|
+
# 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). Only applicable to new invoice items.
|
2902
|
+
sig { returns(T.nilable(String)) }
|
2903
|
+
attr_accessor :currency
|
2904
|
+
# An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
2905
|
+
sig { returns(T.nilable(String)) }
|
2906
|
+
attr_accessor :description
|
2907
|
+
# Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
|
2908
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2909
|
+
attr_accessor :discountable
|
2910
|
+
# The coupons to redeem into discounts for the invoice item in the preview.
|
2911
|
+
sig {
|
2912
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount]))))
|
2913
|
+
}
|
2914
|
+
attr_accessor :discounts
|
2915
|
+
# The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
|
2916
|
+
sig { returns(T.nilable(String)) }
|
2917
|
+
attr_accessor :invoiceitem
|
2918
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2919
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
2920
|
+
attr_accessor :metadata
|
2921
|
+
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
2922
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Period)) }
|
2923
|
+
attr_accessor :period
|
2924
|
+
# The ID of the price object. One of `price` or `price_data` is required.
|
2925
|
+
sig { returns(T.nilable(String)) }
|
2926
|
+
attr_accessor :price
|
2927
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
2928
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::PriceData)) }
|
2929
|
+
attr_accessor :price_data
|
2930
|
+
# Non-negative integer. The quantity of units for the invoice item.
|
2931
|
+
sig { returns(T.nilable(Integer)) }
|
2932
|
+
attr_accessor :quantity
|
2933
|
+
# 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.
|
2934
|
+
sig { returns(T.nilable(String)) }
|
2935
|
+
attr_accessor :tax_behavior
|
2936
|
+
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
2937
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2938
|
+
attr_accessor :tax_code
|
2939
|
+
# The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
|
2940
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2941
|
+
attr_accessor :tax_rates
|
2942
|
+
# The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
|
2943
|
+
sig { returns(T.nilable(Integer)) }
|
2944
|
+
attr_accessor :unit_amount
|
2945
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
2946
|
+
sig { returns(T.nilable(String)) }
|
2947
|
+
attr_accessor :unit_amount_decimal
|
2948
|
+
sig {
|
2949
|
+
params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount]))), invoiceitem: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), period: T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(T.nilable(String)), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
2950
|
+
}
|
2951
|
+
def initialize(
|
2952
|
+
amount: nil,
|
2953
|
+
currency: nil,
|
2954
|
+
description: nil,
|
2955
|
+
discountable: nil,
|
2956
|
+
discounts: nil,
|
2957
|
+
invoiceitem: nil,
|
2958
|
+
metadata: nil,
|
2959
|
+
period: nil,
|
2960
|
+
price: nil,
|
2961
|
+
price_data: nil,
|
2962
|
+
quantity: nil,
|
2963
|
+
tax_behavior: nil,
|
2964
|
+
tax_code: nil,
|
2965
|
+
tax_rates: nil,
|
2966
|
+
unit_amount: nil,
|
2967
|
+
unit_amount_decimal: nil
|
2968
|
+
); end
|
2969
|
+
end
|
2970
|
+
class Issuer < Stripe::RequestParams
|
2971
|
+
# The connected account being referenced when `type` is `account`.
|
2972
|
+
sig { returns(T.nilable(String)) }
|
2973
|
+
attr_accessor :account
|
2974
|
+
# Type of the account referenced in the request.
|
2975
|
+
sig { returns(String) }
|
2976
|
+
attr_accessor :type
|
2977
|
+
sig { params(account: T.nilable(String), type: String).void }
|
2978
|
+
def initialize(account: nil, type: nil); end
|
2979
|
+
end
|
2980
|
+
class ScheduleDetails < Stripe::RequestParams
|
2981
|
+
class Phase < Stripe::RequestParams
|
2982
|
+
class AddInvoiceItem < Stripe::RequestParams
|
2983
|
+
class Discount < Stripe::RequestParams
|
2984
|
+
# ID of the coupon to create a new discount for.
|
2985
|
+
sig { returns(T.nilable(String)) }
|
2986
|
+
attr_accessor :coupon
|
2987
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2988
|
+
sig { returns(T.nilable(String)) }
|
2989
|
+
attr_accessor :discount
|
2990
|
+
# ID of the promotion code to create a new discount for.
|
2991
|
+
sig { returns(T.nilable(String)) }
|
2992
|
+
attr_accessor :promotion_code
|
2993
|
+
sig {
|
2994
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
2995
|
+
}
|
2996
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
2997
|
+
end
|
2998
|
+
class PriceData < Stripe::RequestParams
|
2999
|
+
# 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).
|
3000
|
+
sig { returns(String) }
|
3001
|
+
attr_accessor :currency
|
3002
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
3003
|
+
sig { returns(String) }
|
3004
|
+
attr_accessor :product
|
3005
|
+
# 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.
|
3006
|
+
sig { returns(T.nilable(String)) }
|
3007
|
+
attr_accessor :tax_behavior
|
3008
|
+
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
|
3009
|
+
sig { returns(T.nilable(Integer)) }
|
3010
|
+
attr_accessor :unit_amount
|
3011
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
3012
|
+
sig { returns(T.nilable(String)) }
|
3013
|
+
attr_accessor :unit_amount_decimal
|
3014
|
+
sig {
|
3015
|
+
params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
3016
|
+
}
|
3017
|
+
def initialize(
|
3018
|
+
currency: nil,
|
3019
|
+
product: nil,
|
3020
|
+
tax_behavior: nil,
|
3021
|
+
unit_amount: nil,
|
3022
|
+
unit_amount_decimal: nil
|
3023
|
+
); end
|
3024
|
+
end
|
3025
|
+
# The coupons to redeem into discounts for the item.
|
3026
|
+
sig {
|
3027
|
+
returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]))
|
3028
|
+
}
|
3029
|
+
attr_accessor :discounts
|
3030
|
+
# The ID of the price object. One of `price` or `price_data` is required.
|
3031
|
+
sig { returns(T.nilable(String)) }
|
3032
|
+
attr_accessor :price
|
3033
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
3034
|
+
sig {
|
3035
|
+
returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData))
|
3036
|
+
}
|
3037
|
+
attr_accessor :price_data
|
3038
|
+
# Quantity for this item. Defaults to 1.
|
3039
|
+
sig { returns(T.nilable(Integer)) }
|
3040
|
+
attr_accessor :quantity
|
3041
|
+
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
3042
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
3043
|
+
attr_accessor :tax_rates
|
3044
|
+
sig {
|
3045
|
+
params(discounts: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
3046
|
+
}
|
3047
|
+
def initialize(
|
3048
|
+
discounts: nil,
|
3049
|
+
price: nil,
|
3050
|
+
price_data: nil,
|
3051
|
+
quantity: nil,
|
3052
|
+
tax_rates: nil
|
3053
|
+
); end
|
3054
|
+
end
|
3055
|
+
class AutomaticTax < Stripe::RequestParams
|
3056
|
+
class Liability < Stripe::RequestParams
|
3057
|
+
# The connected account being referenced when `type` is `account`.
|
3058
|
+
sig { returns(T.nilable(String)) }
|
3059
|
+
attr_accessor :account
|
3060
|
+
# Type of the account referenced in the request.
|
3061
|
+
sig { returns(String) }
|
3062
|
+
attr_accessor :type
|
3063
|
+
sig { params(account: T.nilable(String), type: String).void }
|
3064
|
+
def initialize(account: nil, type: nil); end
|
3065
|
+
end
|
3066
|
+
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
3067
|
+
sig { returns(T::Boolean) }
|
3068
|
+
attr_accessor :enabled
|
3069
|
+
# 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.
|
3070
|
+
sig {
|
3071
|
+
returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability))
|
3072
|
+
}
|
3073
|
+
attr_accessor :liability
|
3074
|
+
sig {
|
3075
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability)).void
|
3076
|
+
}
|
3077
|
+
def initialize(enabled: nil, liability: nil); end
|
3078
|
+
end
|
3079
|
+
class Discount < Stripe::RequestParams
|
3080
|
+
# ID of the coupon to create a new discount for.
|
3081
|
+
sig { returns(T.nilable(String)) }
|
3082
|
+
attr_accessor :coupon
|
3083
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3084
|
+
sig { returns(T.nilable(String)) }
|
3085
|
+
attr_accessor :discount
|
3086
|
+
# ID of the promotion code to create a new discount for.
|
3087
|
+
sig { returns(T.nilable(String)) }
|
3088
|
+
attr_accessor :promotion_code
|
3089
|
+
sig {
|
3090
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
3091
|
+
}
|
3092
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
3093
|
+
end
|
3094
|
+
class InvoiceSettings < Stripe::RequestParams
|
3095
|
+
class Issuer < Stripe::RequestParams
|
3096
|
+
# The connected account being referenced when `type` is `account`.
|
3097
|
+
sig { returns(T.nilable(String)) }
|
3098
|
+
attr_accessor :account
|
3099
|
+
# Type of the account referenced in the request.
|
3100
|
+
sig { returns(String) }
|
3101
|
+
attr_accessor :type
|
3102
|
+
sig { params(account: T.nilable(String), type: String).void }
|
3103
|
+
def initialize(account: nil, type: nil); end
|
3104
|
+
end
|
3105
|
+
# 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.
|
3106
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
3107
|
+
attr_accessor :account_tax_ids
|
3108
|
+
# 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`.
|
3109
|
+
sig { returns(T.nilable(Integer)) }
|
3110
|
+
attr_accessor :days_until_due
|
3111
|
+
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
3112
|
+
sig {
|
3113
|
+
returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer))
|
3114
|
+
}
|
3115
|
+
attr_accessor :issuer
|
3116
|
+
sig {
|
3117
|
+
params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer)).void
|
3118
|
+
}
|
3119
|
+
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
|
3120
|
+
end
|
3121
|
+
class Item < Stripe::RequestParams
|
3122
|
+
class Discount < Stripe::RequestParams
|
3123
|
+
# ID of the coupon to create a new discount for.
|
3124
|
+
sig { returns(T.nilable(String)) }
|
3125
|
+
attr_accessor :coupon
|
3126
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3127
|
+
sig { returns(T.nilable(String)) }
|
3128
|
+
attr_accessor :discount
|
3129
|
+
# ID of the promotion code to create a new discount for.
|
3130
|
+
sig { returns(T.nilable(String)) }
|
3131
|
+
attr_accessor :promotion_code
|
3132
|
+
sig {
|
3133
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
3134
|
+
}
|
3135
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
3136
|
+
end
|
3137
|
+
class PriceData < Stripe::RequestParams
|
3138
|
+
class Recurring < Stripe::RequestParams
|
3139
|
+
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
3140
|
+
sig { returns(String) }
|
3141
|
+
attr_accessor :interval
|
3142
|
+
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
3143
|
+
sig { returns(T.nilable(Integer)) }
|
3144
|
+
attr_accessor :interval_count
|
3145
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
3146
|
+
def initialize(interval: nil, interval_count: nil); end
|
3147
|
+
end
|
3148
|
+
# 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).
|
3149
|
+
sig { returns(String) }
|
3150
|
+
attr_accessor :currency
|
3151
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
3152
|
+
sig { returns(String) }
|
3153
|
+
attr_accessor :product
|
3154
|
+
# The recurring components of a price such as `interval` and `interval_count`.
|
3155
|
+
sig {
|
3156
|
+
returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring)
|
3157
|
+
}
|
3158
|
+
attr_accessor :recurring
|
3159
|
+
# 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.
|
3160
|
+
sig { returns(T.nilable(String)) }
|
3161
|
+
attr_accessor :tax_behavior
|
3162
|
+
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
3163
|
+
sig { returns(T.nilable(Integer)) }
|
3164
|
+
attr_accessor :unit_amount
|
3165
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
3166
|
+
sig { returns(T.nilable(String)) }
|
3167
|
+
attr_accessor :unit_amount_decimal
|
3168
|
+
sig {
|
3169
|
+
params(currency: String, product: String, recurring: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
3170
|
+
}
|
3171
|
+
def initialize(
|
3172
|
+
currency: nil,
|
3173
|
+
product: nil,
|
3174
|
+
recurring: nil,
|
3175
|
+
tax_behavior: nil,
|
3176
|
+
unit_amount: nil,
|
3177
|
+
unit_amount_decimal: nil
|
3178
|
+
); end
|
3179
|
+
end
|
3180
|
+
# The coupons to redeem into discounts for the subscription item.
|
3181
|
+
sig {
|
3182
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))))
|
3183
|
+
}
|
3184
|
+
attr_accessor :discounts
|
3185
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
3186
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
3187
|
+
attr_accessor :metadata
|
3188
|
+
# The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
|
3189
|
+
sig { returns(T.nilable(String)) }
|
3190
|
+
attr_accessor :plan
|
3191
|
+
# The ID of the price object.
|
3192
|
+
sig { returns(T.nilable(String)) }
|
3193
|
+
attr_accessor :price
|
3194
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
3195
|
+
sig {
|
3196
|
+
returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData))
|
3197
|
+
}
|
3198
|
+
attr_accessor :price_data
|
3199
|
+
# Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
|
3200
|
+
sig { returns(T.nilable(Integer)) }
|
3201
|
+
attr_accessor :quantity
|
3202
|
+
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
3203
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
3204
|
+
attr_accessor :tax_rates
|
3205
|
+
sig {
|
3206
|
+
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
3207
|
+
}
|
3208
|
+
def initialize(
|
3209
|
+
discounts: nil,
|
3210
|
+
metadata: nil,
|
3211
|
+
plan: nil,
|
3212
|
+
price: nil,
|
3213
|
+
price_data: nil,
|
3214
|
+
quantity: nil,
|
3215
|
+
tax_rates: nil
|
3216
|
+
); end
|
3217
|
+
end
|
3218
|
+
class TransferData < Stripe::RequestParams
|
3219
|
+
# 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.
|
3220
|
+
sig { returns(T.nilable(Float)) }
|
3221
|
+
attr_accessor :amount_percent
|
3222
|
+
# ID of an existing, connected Stripe account.
|
3223
|
+
sig { returns(String) }
|
3224
|
+
attr_accessor :destination
|
3225
|
+
sig { params(amount_percent: T.nilable(Float), destination: String).void }
|
3226
|
+
def initialize(amount_percent: nil, destination: nil); end
|
3227
|
+
end
|
3228
|
+
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
|
3229
|
+
sig {
|
3230
|
+
returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]))
|
3231
|
+
}
|
3232
|
+
attr_accessor :add_invoice_items
|
3233
|
+
# 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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
3234
|
+
sig { returns(T.nilable(Float)) }
|
3235
|
+
attr_accessor :application_fee_percent
|
3236
|
+
# Automatic tax settings for this phase.
|
3237
|
+
sig {
|
3238
|
+
returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax))
|
3239
|
+
}
|
3240
|
+
attr_accessor :automatic_tax
|
3241
|
+
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
3242
|
+
sig { returns(T.nilable(String)) }
|
3243
|
+
attr_accessor :billing_cycle_anchor
|
3244
|
+
# 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`. Defaults to `charge_automatically` on creation.
|
3245
|
+
sig { returns(T.nilable(String)) }
|
3246
|
+
attr_accessor :collection_method
|
3247
|
+
# 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).
|
3248
|
+
sig { returns(T.nilable(String)) }
|
3249
|
+
attr_accessor :currency
|
3250
|
+
# 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.
|
3251
|
+
sig { returns(T.nilable(String)) }
|
3252
|
+
attr_accessor :default_payment_method
|
3253
|
+
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
|
3254
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
3255
|
+
attr_accessor :default_tax_rates
|
3256
|
+
# 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.
|
3257
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
3258
|
+
attr_accessor :description
|
3259
|
+
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
3260
|
+
sig {
|
3261
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount]))))
|
3262
|
+
}
|
3263
|
+
attr_accessor :discounts
|
3264
|
+
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
3265
|
+
sig { returns(T.nilable(T.any(Integer, String))) }
|
3266
|
+
attr_accessor :end_date
|
3267
|
+
# All invoices will be billed using the specified settings.
|
3268
|
+
sig {
|
3269
|
+
returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings))
|
3270
|
+
}
|
3271
|
+
attr_accessor :invoice_settings
|
3272
|
+
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
3273
|
+
sig {
|
3274
|
+
returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item])
|
3275
|
+
}
|
3276
|
+
attr_accessor :items
|
3277
|
+
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
3278
|
+
sig { returns(T.nilable(Integer)) }
|
3279
|
+
attr_accessor :iterations
|
3280
|
+
# 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, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
3281
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
3282
|
+
attr_accessor :metadata
|
3283
|
+
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3284
|
+
sig { returns(T.nilable(String)) }
|
3285
|
+
attr_accessor :on_behalf_of
|
3286
|
+
# Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
|
3287
|
+
sig { returns(T.nilable(String)) }
|
3288
|
+
attr_accessor :proration_behavior
|
3289
|
+
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
3290
|
+
sig { returns(T.nilable(T.any(Integer, String))) }
|
3291
|
+
attr_accessor :start_date
|
3292
|
+
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
3293
|
+
sig {
|
3294
|
+
returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData))
|
3295
|
+
}
|
3296
|
+
attr_accessor :transfer_data
|
3297
|
+
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
3298
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3299
|
+
attr_accessor :trial
|
3300
|
+
# Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
|
3301
|
+
sig { returns(T.nilable(T.any(Integer, String))) }
|
3302
|
+
attr_accessor :trial_end
|
3303
|
+
sig {
|
3304
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings), items: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
|
3305
|
+
}
|
3306
|
+
def initialize(
|
3307
|
+
add_invoice_items: nil,
|
3308
|
+
application_fee_percent: nil,
|
3309
|
+
automatic_tax: nil,
|
3310
|
+
billing_cycle_anchor: nil,
|
3311
|
+
collection_method: nil,
|
3312
|
+
currency: nil,
|
3313
|
+
default_payment_method: nil,
|
3314
|
+
default_tax_rates: nil,
|
3315
|
+
description: nil,
|
3316
|
+
discounts: nil,
|
3317
|
+
end_date: nil,
|
3318
|
+
invoice_settings: nil,
|
3319
|
+
items: nil,
|
3320
|
+
iterations: nil,
|
3321
|
+
metadata: nil,
|
3322
|
+
on_behalf_of: nil,
|
3323
|
+
proration_behavior: nil,
|
3324
|
+
start_date: nil,
|
3325
|
+
transfer_data: nil,
|
3326
|
+
trial: nil,
|
3327
|
+
trial_end: nil
|
3328
|
+
); end
|
3329
|
+
end
|
3330
|
+
# 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.
|
3331
|
+
sig { returns(T.nilable(String)) }
|
3332
|
+
attr_accessor :end_behavior
|
3333
|
+
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
3334
|
+
sig {
|
3335
|
+
returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]))
|
3336
|
+
}
|
3337
|
+
attr_accessor :phases
|
3338
|
+
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
3339
|
+
sig { returns(T.nilable(String)) }
|
3340
|
+
attr_accessor :proration_behavior
|
3341
|
+
sig {
|
3342
|
+
params(end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
|
3343
|
+
}
|
3344
|
+
def initialize(end_behavior: nil, phases: nil, proration_behavior: nil); end
|
3345
|
+
end
|
3346
|
+
class SubscriptionDetails < Stripe::RequestParams
|
3347
|
+
class Item < Stripe::RequestParams
|
3348
|
+
class Discount < Stripe::RequestParams
|
3349
|
+
# ID of the coupon to create a new discount for.
|
3350
|
+
sig { returns(T.nilable(String)) }
|
3351
|
+
attr_accessor :coupon
|
3352
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3353
|
+
sig { returns(T.nilable(String)) }
|
3354
|
+
attr_accessor :discount
|
3355
|
+
# ID of the promotion code to create a new discount for.
|
3356
|
+
sig { returns(T.nilable(String)) }
|
3357
|
+
attr_accessor :promotion_code
|
3358
|
+
sig {
|
3359
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
3360
|
+
}
|
3361
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
3362
|
+
end
|
3363
|
+
class PriceData < Stripe::RequestParams
|
3364
|
+
class Recurring < Stripe::RequestParams
|
3365
|
+
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
3366
|
+
sig { returns(String) }
|
3367
|
+
attr_accessor :interval
|
3368
|
+
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
3369
|
+
sig { returns(T.nilable(Integer)) }
|
3370
|
+
attr_accessor :interval_count
|
3371
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
3372
|
+
def initialize(interval: nil, interval_count: nil); end
|
3373
|
+
end
|
3374
|
+
# 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).
|
3375
|
+
sig { returns(String) }
|
3376
|
+
attr_accessor :currency
|
3377
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
3378
|
+
sig { returns(String) }
|
3379
|
+
attr_accessor :product
|
3380
|
+
# The recurring components of a price such as `interval` and `interval_count`.
|
3381
|
+
sig {
|
3382
|
+
returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring)
|
3383
|
+
}
|
3384
|
+
attr_accessor :recurring
|
3385
|
+
# 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.
|
3386
|
+
sig { returns(T.nilable(String)) }
|
3387
|
+
attr_accessor :tax_behavior
|
3388
|
+
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
3389
|
+
sig { returns(T.nilable(Integer)) }
|
3390
|
+
attr_accessor :unit_amount
|
3391
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
3392
|
+
sig { returns(T.nilable(String)) }
|
3393
|
+
attr_accessor :unit_amount_decimal
|
3394
|
+
sig {
|
3395
|
+
params(currency: String, product: String, recurring: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
3396
|
+
}
|
3397
|
+
def initialize(
|
3398
|
+
currency: nil,
|
3399
|
+
product: nil,
|
3400
|
+
recurring: nil,
|
3401
|
+
tax_behavior: nil,
|
3402
|
+
unit_amount: nil,
|
3403
|
+
unit_amount_decimal: nil
|
3404
|
+
); end
|
3405
|
+
end
|
3406
|
+
# Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
3407
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3408
|
+
attr_accessor :clear_usage
|
3409
|
+
# A flag that, if set to `true`, will delete the specified item.
|
3410
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3411
|
+
attr_accessor :deleted
|
3412
|
+
# The coupons to redeem into discounts for the subscription item.
|
3413
|
+
sig {
|
3414
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount]))))
|
3415
|
+
}
|
3416
|
+
attr_accessor :discounts
|
3417
|
+
# Subscription item to update.
|
3418
|
+
sig { returns(T.nilable(String)) }
|
3419
|
+
attr_accessor :id
|
3420
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
3421
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
3422
|
+
attr_accessor :metadata
|
3423
|
+
# Plan ID for this item, as a string.
|
3424
|
+
sig { returns(T.nilable(String)) }
|
3425
|
+
attr_accessor :plan
|
3426
|
+
# The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
|
3427
|
+
sig { returns(T.nilable(String)) }
|
3428
|
+
attr_accessor :price
|
3429
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
3430
|
+
sig {
|
3431
|
+
returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData))
|
3432
|
+
}
|
3433
|
+
attr_accessor :price_data
|
3434
|
+
# Quantity for this item.
|
3435
|
+
sig { returns(T.nilable(Integer)) }
|
3436
|
+
attr_accessor :quantity
|
3437
|
+
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
3438
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
3439
|
+
attr_accessor :tax_rates
|
3440
|
+
sig {
|
3441
|
+
params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
3442
|
+
}
|
3443
|
+
def initialize(
|
3444
|
+
clear_usage: nil,
|
3445
|
+
deleted: nil,
|
3446
|
+
discounts: nil,
|
3447
|
+
id: nil,
|
3448
|
+
metadata: nil,
|
3449
|
+
plan: nil,
|
3450
|
+
price: nil,
|
3451
|
+
price_data: nil,
|
3452
|
+
quantity: nil,
|
3453
|
+
tax_rates: nil
|
3454
|
+
); end
|
3455
|
+
end
|
3456
|
+
# For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
3457
|
+
sig { returns(T.nilable(T.any(String, Integer))) }
|
3458
|
+
attr_accessor :billing_cycle_anchor
|
3459
|
+
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
3460
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
3461
|
+
attr_accessor :cancel_at
|
3462
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
3463
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3464
|
+
attr_accessor :cancel_at_period_end
|
3465
|
+
# This simulates the subscription being canceled or expired immediately.
|
3466
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3467
|
+
attr_accessor :cancel_now
|
3468
|
+
# If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
|
3469
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
3470
|
+
attr_accessor :default_tax_rates
|
3471
|
+
# A list of up to 20 subscription items, each with an attached price.
|
3472
|
+
sig {
|
3473
|
+
returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]))
|
3474
|
+
}
|
3475
|
+
attr_accessor :items
|
3476
|
+
# Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
3477
|
+
sig { returns(T.nilable(String)) }
|
3478
|
+
attr_accessor :proration_behavior
|
3479
|
+
# If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
|
3480
|
+
sig { returns(T.nilable(Integer)) }
|
3481
|
+
attr_accessor :proration_date
|
3482
|
+
# For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
|
3483
|
+
sig { returns(T.nilable(String)) }
|
3484
|
+
attr_accessor :resume_at
|
3485
|
+
# Date a subscription is intended to start (can be future or past).
|
3486
|
+
sig { returns(T.nilable(Integer)) }
|
3487
|
+
attr_accessor :start_date
|
3488
|
+
# If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
|
3489
|
+
sig { returns(T.nilable(T.any(String, Integer))) }
|
3490
|
+
attr_accessor :trial_end
|
3491
|
+
sig {
|
3492
|
+
params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void
|
3493
|
+
}
|
3494
|
+
def initialize(
|
3495
|
+
billing_cycle_anchor: nil,
|
3496
|
+
cancel_at: nil,
|
3497
|
+
cancel_at_period_end: nil,
|
3498
|
+
cancel_now: nil,
|
3499
|
+
default_tax_rates: nil,
|
3500
|
+
items: nil,
|
3501
|
+
proration_behavior: nil,
|
3502
|
+
proration_date: nil,
|
3503
|
+
resume_at: nil,
|
3504
|
+
start_date: nil,
|
3505
|
+
trial_end: nil
|
3506
|
+
); end
|
3507
|
+
end
|
3508
|
+
# Settings for automatic tax lookup for this invoice preview.
|
3509
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax)) }
|
3510
|
+
attr_accessor :automatic_tax
|
3511
|
+
# The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
3512
|
+
sig { returns(T.nilable(String)) }
|
3513
|
+
attr_accessor :currency
|
3514
|
+
# The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
3515
|
+
sig { returns(T.nilable(String)) }
|
3516
|
+
attr_accessor :customer
|
3517
|
+
# Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
3518
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails)) }
|
3519
|
+
attr_accessor :customer_details
|
3520
|
+
# The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
|
3521
|
+
sig {
|
3522
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::Discount]))))
|
3523
|
+
}
|
3524
|
+
attr_accessor :discounts
|
3525
|
+
# Specifies which fields in the response should be expanded.
|
3526
|
+
sig { returns(T.nilable(T::Array[String])) }
|
3527
|
+
attr_accessor :expand
|
3528
|
+
# List of invoice items to add or update in the upcoming invoice preview (up to 250).
|
3529
|
+
sig { returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem])) }
|
3530
|
+
attr_accessor :invoice_items
|
3531
|
+
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
3532
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::Issuer)) }
|
3533
|
+
attr_accessor :issuer
|
3534
|
+
# 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.
|
3535
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
3536
|
+
attr_accessor :on_behalf_of
|
3537
|
+
# Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
|
3538
|
+
sig { returns(T.nilable(String)) }
|
3539
|
+
attr_accessor :preview_mode
|
3540
|
+
# The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
|
3541
|
+
sig { returns(T.nilable(String)) }
|
3542
|
+
attr_accessor :schedule
|
3543
|
+
# The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
|
3544
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails)) }
|
3545
|
+
attr_accessor :schedule_details
|
3546
|
+
# The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
|
3547
|
+
sig { returns(T.nilable(String)) }
|
3548
|
+
attr_accessor :subscription
|
3549
|
+
# The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
|
3550
|
+
sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails)) }
|
3551
|
+
attr_accessor :subscription_details
|
3552
|
+
sig {
|
3553
|
+
params(automatic_tax: T.nilable(::Stripe::Invoice::CreatePreviewParams::AutomaticTax), currency: T.nilable(String), customer: T.nilable(String), customer_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem]), issuer: T.nilable(::Stripe::Invoice::CreatePreviewParams::Issuer), on_behalf_of: T.nilable(T.nilable(String)), preview_mode: T.nilable(String), schedule: T.nilable(String), schedule_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails), subscription: T.nilable(String), subscription_details: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails)).void
|
3554
|
+
}
|
3555
|
+
def initialize(
|
3556
|
+
automatic_tax: nil,
|
3557
|
+
currency: nil,
|
3558
|
+
customer: nil,
|
3559
|
+
customer_details: nil,
|
3560
|
+
discounts: nil,
|
3561
|
+
expand: nil,
|
3562
|
+
invoice_items: nil,
|
3563
|
+
issuer: nil,
|
3564
|
+
on_behalf_of: nil,
|
3565
|
+
preview_mode: nil,
|
3566
|
+
schedule: nil,
|
3567
|
+
schedule_details: nil,
|
3568
|
+
subscription: nil,
|
3569
|
+
subscription_details: nil
|
3570
|
+
); end
|
3571
|
+
end
|
3572
|
+
# Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
|
3573
|
+
sig {
|
3574
|
+
params(params: T.any(::Stripe::Invoice::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3575
|
+
}
|
3576
|
+
def add_lines(params = {}, opts = {}); end
|
3577
|
+
|
3578
|
+
# Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
|
3579
|
+
sig {
|
3580
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3581
|
+
}
|
3582
|
+
def self.add_lines(invoice, params = {}, opts = {}); end
|
3583
|
+
|
3584
|
+
# This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
|
3585
|
+
sig {
|
3586
|
+
params(params: T.any(::Stripe::Invoice::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3587
|
+
}
|
3588
|
+
def self.create(params = {}, opts = {}); end
|
3589
|
+
|
3590
|
+
# At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
|
3591
|
+
#
|
3592
|
+
# Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
|
3593
|
+
#
|
3594
|
+
# You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
|
3595
|
+
#
|
3596
|
+
# Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
|
3597
|
+
sig {
|
3598
|
+
params(params: T.any(::Stripe::Invoice::CreatePreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3599
|
+
}
|
3600
|
+
def self.create_preview(params = {}, opts = {}); end
|
3601
|
+
|
3602
|
+
# Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
|
3603
|
+
sig {
|
3604
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3605
|
+
}
|
3606
|
+
def self.delete(invoice, params = {}, opts = {}); end
|
3607
|
+
|
3608
|
+
# Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
|
3609
|
+
sig {
|
3610
|
+
params(params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3611
|
+
}
|
3612
|
+
def delete(params = {}, opts = {}); end
|
3613
|
+
|
3614
|
+
# Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
|
3615
|
+
sig {
|
3616
|
+
params(params: T.any(::Stripe::Invoice::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3617
|
+
}
|
3618
|
+
def finalize_invoice(params = {}, opts = {}); end
|
3619
|
+
|
3620
|
+
# Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
|
3621
|
+
sig {
|
3622
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3623
|
+
}
|
3624
|
+
def self.finalize_invoice(invoice, params = {}, opts = {}); end
|
3625
|
+
|
3626
|
+
# You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
|
3627
|
+
sig {
|
3628
|
+
params(params: T.any(::Stripe::Invoice::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
|
3629
|
+
}
|
3630
|
+
def self.list(params = {}, opts = {}); end
|
3631
|
+
|
3632
|
+
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
|
3633
|
+
sig {
|
3634
|
+
params(params: T.any(::Stripe::Invoice::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3635
|
+
}
|
3636
|
+
def mark_uncollectible(params = {}, opts = {}); end
|
3637
|
+
|
3638
|
+
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
|
3639
|
+
sig {
|
3640
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3641
|
+
}
|
3642
|
+
def self.mark_uncollectible(invoice, params = {}, opts = {}); end
|
3643
|
+
|
3644
|
+
# Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
|
3645
|
+
sig {
|
3646
|
+
params(params: T.any(::Stripe::Invoice::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3647
|
+
}
|
3648
|
+
def pay(params = {}, opts = {}); end
|
3649
|
+
|
3650
|
+
# Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
|
3651
|
+
sig {
|
3652
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3653
|
+
}
|
3654
|
+
def self.pay(invoice, params = {}, opts = {}); end
|
3655
|
+
|
3656
|
+
# Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
|
3657
|
+
sig {
|
3658
|
+
params(params: T.any(::Stripe::Invoice::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3659
|
+
}
|
3660
|
+
def remove_lines(params = {}, opts = {}); end
|
3661
|
+
|
3662
|
+
# Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
|
3663
|
+
sig {
|
3664
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3665
|
+
}
|
3666
|
+
def self.remove_lines(invoice, params = {}, opts = {}); end
|
3667
|
+
|
3668
|
+
sig {
|
3669
|
+
params(params: T.any(::Stripe::Invoice::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
|
3670
|
+
}
|
3671
|
+
def self.search(params = {}, opts = {}); end
|
3672
|
+
|
3673
|
+
sig {
|
3674
|
+
params(params: T.any(::Stripe::Invoice::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
|
3675
|
+
}
|
3676
|
+
def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
|
3677
|
+
|
3678
|
+
# Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
|
3679
|
+
#
|
3680
|
+
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
|
3681
|
+
sig {
|
3682
|
+
params(params: T.any(::Stripe::Invoice::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3683
|
+
}
|
3684
|
+
def send_invoice(params = {}, opts = {}); end
|
3685
|
+
|
3686
|
+
# Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
|
3687
|
+
#
|
3688
|
+
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
|
3689
|
+
sig {
|
3690
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3691
|
+
}
|
3692
|
+
def self.send_invoice(invoice, params = {}, opts = {}); end
|
3693
|
+
|
3694
|
+
# Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
|
3695
|
+
# monetary values, as well as collection_method, become uneditable.
|
3696
|
+
#
|
3697
|
+
# If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
|
3698
|
+
# sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
3699
|
+
# auto_advance=false.
|
3700
|
+
sig {
|
3701
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3702
|
+
}
|
3703
|
+
def self.update(invoice, params = {}, opts = {}); end
|
3704
|
+
|
3705
|
+
# Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
|
3706
|
+
sig {
|
3707
|
+
params(params: T.any(::Stripe::Invoice::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3708
|
+
}
|
3709
|
+
def update_lines(params = {}, opts = {}); end
|
3710
|
+
|
3711
|
+
# Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
|
3712
|
+
sig {
|
3713
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3714
|
+
}
|
3715
|
+
def self.update_lines(invoice, params = {}, opts = {}); end
|
3716
|
+
|
3717
|
+
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
|
3718
|
+
#
|
3719
|
+
# Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
|
3720
|
+
sig {
|
3721
|
+
params(params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3722
|
+
}
|
3723
|
+
def void_invoice(params = {}, opts = {}); end
|
3724
|
+
|
3725
|
+
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
|
3726
|
+
#
|
3727
|
+
# Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
|
3728
|
+
sig {
|
3729
|
+
params(invoice: String, params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice)
|
3730
|
+
}
|
3731
|
+
def self.void_invoice(invoice, params = {}, opts = {}); end
|
3732
|
+
end
|
3733
|
+
end
|