stripe 15.4.0.pre.beta.2 → 15.4.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/API_VERSION +1 -1
- data/CHANGELOG.md +686 -1602
- data/OPENAPI_VERSION +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -32
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -60
- data/lib/stripe/event_types.rb +0 -102
- data/lib/stripe/object_types.rb +0 -50
- data/lib/stripe/resources/account.rb +6 -658
- data/lib/stripe/resources/account_link.rb +3 -1
- data/lib/stripe/resources/account_session.rb +52 -256
- 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 +1 -11
- data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
- 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 +7 -1543
- data/lib/stripe/resources/checkout/session.rb +24 -320
- data/lib/stripe/resources/confirmation_token.rb +3 -173
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +0 -6
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +1 -3
- 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/dispute.rb +1 -3
- data/lib/stripe/resources/event.rb +14 -57
- data/lib/stripe/resources/financial_connections/account.rb +1 -22
- 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 +40 -1071
- data/lib/stripe/resources/invoice_item.rb +3 -79
- 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 +297 -5243
- data/lib/stripe/resources/payment_link.rb +83 -5
- data/lib/stripe/resources/payment_method.rb +5 -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/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +8 -2039
- data/lib/stripe/resources/radar/value_list.rb +2 -2
- data/lib/stripe/resources/refund.rb +1 -10
- data/lib/stripe/resources/review.rb +2 -2
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +9 -578
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +11 -290
- data/lib/stripe/resources/subscription_item.rb +5 -86
- data/lib/stripe/resources/subscription_schedule.rb +45 -1010
- data/lib/stripe/resources/tax/registration.rb +408 -30
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +196 -0
- data/lib/stripe/resources/terminal/reader.rb +0 -8
- data/lib/stripe/resources/transfer.rb +0 -6
- 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 -106
- data/lib/stripe/services/account_link_service.rb +3 -1
- data/lib/stripe/services/account_service.rb +4 -565
- data/lib/stripe/services/account_session_service.rb +35 -226
- 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 +1 -9
- data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +16 -241
- data/lib/stripe/services/coupon_service.rb +1 -17
- 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 +3 -75
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +83 -0
- data/lib/stripe/services/invoice_service.rb +40 -1022
- 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 +399 -4882
- data/lib/stripe/services/payment_link_service.rb +81 -5
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +2 -121
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +9 -1724
- data/lib/stripe/services/radar/value_list_service.rb +1 -1
- data/lib/stripe/services/setup_intent_service.rb +9 -538
- data/lib/stripe/services/subscription_item_service.rb +5 -77
- data/lib/stripe/services/subscription_schedule_service.rb +45 -914
- data/lib/stripe/services/subscription_service.rb +11 -251
- data/lib/stripe/services/tax/registration_service.rb +360 -30
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +152 -0
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -97
- 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/transfer_service.rb +0 -4
- 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 -11
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +1 -4
- data/lib/stripe/services.rb +1 -53
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4995 -0
- data/rbi/stripe/resources/account_link.rbi +76 -0
- data/rbi/stripe/resources/account_session.rbi +1074 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +88 -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 +235 -0
- data/rbi/stripe/resources/balance_transaction.rbi +147 -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 +703 -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 +2089 -0
- data/rbi/stripe/resources/checkout/session.rbi +4095 -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 +1818 -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 +250 -0
- data/rbi/stripe/resources/credit_note.rbi +752 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1005 -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 +137 -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 +360 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
- data/rbi/stripe/resources/invoice.rbi +3858 -0
- data/rbi/stripe/resources/invoice_item.rbi +470 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +121 -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 +19 -0
- data/rbi/stripe/resources/mandate.rbi +191 -0
- data/rbi/stripe/resources/payment_intent.rbi +9997 -0
- data/rbi/stripe/resources/payment_link.rbi +1893 -0
- data/rbi/stripe/resources/payment_method.rbi +1770 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +401 -0
- data/rbi/stripe/resources/plan.rbi +371 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +555 -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 +1145 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +168 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
- data/rbi/stripe/resources/refund.rbi +523 -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 +3978 -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 +2080 -0
- data/rbi/stripe/resources/subscription_item.rbi +404 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1673 -0
- data/rbi/stripe/resources/tax/calculation.rbi +478 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
- data/rbi/stripe/resources/tax/registration.rbi +3216 -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 +165 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1595 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +222 -0
- data/rbi/stripe/resources/terminal/reader.rbi +994 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
- data/rbi/stripe/resources/token.rbi +1283 -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 +869 -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 +168 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
- data/rbi/stripe/services/account_link_service.rbi +60 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +1011 -0
- data/rbi/stripe/services/account_service.rbi +4281 -0
- data/rbi/stripe/services/account_session_service.rbi +685 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -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 +555 -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 +2690 -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 +194 -0
- data/{lib/stripe/services/quote_preview_invoice_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 +415 -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 +647 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +70 -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 +339 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +366 -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 +3027 -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 +7994 -0
- data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1441 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +781 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +282 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +67 -0
- data/rbi/stripe/services/product_service.rbi +477 -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 +699 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +141 -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 +3709 -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_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +350 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1333 -0
- data/rbi/stripe/services/subscription_service.rbi +1684 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
- data/rbi/stripe/services/tax/registration_service.rbi +2278 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_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 +110 -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 +1286 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +182 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +540 -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 +93 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -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 +1257 -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 +566 -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 +18 -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 +192 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +36 -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 +129 -0
- data/stripe.gemspec +1 -4
- metadata +325 -164
- data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
- 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_configuration_storer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_defaults_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_core_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_updated_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_payment_updated_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_outbound_transfer_updated_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/events/v2_money_management_transaction_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
- data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -105
- 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 -92
- data/lib/stripe/resources/fx_quote.rb +0 -184
- 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 -2958
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1099
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1628
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
- 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 -371
- data/lib/stripe/resources/tax/association.rb +0 -66
- 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 -1919
- data/lib/stripe/resources/v2/core/account_link.rb +0 -56
- data/lib/stripe/resources/v2/core/person.rb +0 -276
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -77
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -72
- 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/fx_quote_service.rb +0 -123
- 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 -2388
- 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/privacy/redaction_job_service.rb +0 -240
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- 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 -4486
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -116
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
- 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 -70
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/payment_service.rb +0 -15
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -137
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -49
- data/rbi/stripe.rbi +0 -194513
@@ -22,24 +22,6 @@ module Stripe
|
|
22
22
|
end
|
23
23
|
|
24
24
|
class UpdateParams < Stripe::RequestParams
|
25
|
-
class AmountsDue < Stripe::RequestParams
|
26
|
-
# The amount in cents (or local equivalent).
|
27
|
-
attr_accessor :amount
|
28
|
-
# Number of days from when invoice is finalized until the payment is due.
|
29
|
-
attr_accessor :days_until_due
|
30
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
31
|
-
attr_accessor :description
|
32
|
-
# Date on which a payment plan’s payment is due.
|
33
|
-
attr_accessor :due_date
|
34
|
-
|
35
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
36
|
-
@amount = amount
|
37
|
-
@days_until_due = days_until_due
|
38
|
-
@description = description
|
39
|
-
@due_date = due_date
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
25
|
class AutomaticTax < Stripe::RequestParams
|
44
26
|
class Liability < Stripe::RequestParams
|
45
27
|
# The connected account being referenced when `type` is `account`.
|
@@ -76,44 +58,16 @@ module Stripe
|
|
76
58
|
end
|
77
59
|
|
78
60
|
class Discount < Stripe::RequestParams
|
79
|
-
class DiscountEnd < Stripe::RequestParams
|
80
|
-
class Duration < Stripe::RequestParams
|
81
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
82
|
-
attr_accessor :interval
|
83
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
84
|
-
attr_accessor :interval_count
|
85
|
-
|
86
|
-
def initialize(interval: nil, interval_count: nil)
|
87
|
-
@interval = interval
|
88
|
-
@interval_count = interval_count
|
89
|
-
end
|
90
|
-
end
|
91
|
-
# Time span for the redeemed discount.
|
92
|
-
attr_accessor :duration
|
93
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
94
|
-
attr_accessor :timestamp
|
95
|
-
# The type of calculation made to determine when the discount ends.
|
96
|
-
attr_accessor :type
|
97
|
-
|
98
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
99
|
-
@duration = duration
|
100
|
-
@timestamp = timestamp
|
101
|
-
@type = type
|
102
|
-
end
|
103
|
-
end
|
104
61
|
# ID of the coupon to create a new discount for.
|
105
62
|
attr_accessor :coupon
|
106
63
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
107
64
|
attr_accessor :discount
|
108
|
-
# Details to determine how long the discount should be applied for.
|
109
|
-
attr_accessor :discount_end
|
110
65
|
# ID of the promotion code to create a new discount for.
|
111
66
|
attr_accessor :promotion_code
|
112
67
|
|
113
|
-
def initialize(coupon: nil, discount: nil,
|
68
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
114
69
|
@coupon = coupon
|
115
70
|
@discount = discount
|
116
|
-
@discount_end = discount_end
|
117
71
|
@promotion_code = promotion_code
|
118
72
|
end
|
119
73
|
end
|
@@ -189,7 +143,7 @@ module Stripe
|
|
189
143
|
@plan = plan
|
190
144
|
end
|
191
145
|
end
|
192
|
-
# Installment configuration for payments attempted on this invoice
|
146
|
+
# Installment configuration for payments attempted on this invoice.
|
193
147
|
#
|
194
148
|
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
195
149
|
attr_accessor :installments
|
@@ -233,7 +187,6 @@ module Stripe
|
|
233
187
|
end
|
234
188
|
end
|
235
189
|
|
236
|
-
class IdBankTransfer < Stripe::RequestParams; end
|
237
190
|
class Konbini < Stripe::RequestParams; end
|
238
191
|
class SepaDebit < Stripe::RequestParams; end
|
239
192
|
|
@@ -242,12 +195,9 @@ module Stripe
|
|
242
195
|
class Filters < Stripe::RequestParams
|
243
196
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
244
197
|
attr_accessor :account_subcategories
|
245
|
-
# ID of the institution to use to filter for selectable accounts.
|
246
|
-
attr_accessor :institution
|
247
198
|
|
248
|
-
def initialize(account_subcategories: nil
|
199
|
+
def initialize(account_subcategories: nil)
|
249
200
|
@account_subcategories = account_subcategories
|
250
|
-
@institution = institution
|
251
201
|
end
|
252
202
|
end
|
253
203
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -281,8 +231,6 @@ module Stripe
|
|
281
231
|
attr_accessor :card
|
282
232
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
283
233
|
attr_accessor :customer_balance
|
284
|
-
# If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
285
|
-
attr_accessor :id_bank_transfer
|
286
234
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
287
235
|
attr_accessor :konbini
|
288
236
|
# 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.
|
@@ -295,7 +243,6 @@ module Stripe
|
|
295
243
|
bancontact: nil,
|
296
244
|
card: nil,
|
297
245
|
customer_balance: nil,
|
298
|
-
id_bank_transfer: nil,
|
299
246
|
konbini: nil,
|
300
247
|
sepa_debit: nil,
|
301
248
|
us_bank_account: nil
|
@@ -304,7 +251,6 @@ module Stripe
|
|
304
251
|
@bancontact = bancontact
|
305
252
|
@card = card
|
306
253
|
@customer_balance = customer_balance
|
307
|
-
@id_bank_transfer = id_bank_transfer
|
308
254
|
@konbini = konbini
|
309
255
|
@sepa_debit = sepa_debit
|
310
256
|
@us_bank_account = us_bank_account
|
@@ -516,15 +462,13 @@ module Stripe
|
|
516
462
|
end
|
517
463
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
518
464
|
attr_accessor :account_tax_ids
|
519
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
520
|
-
attr_accessor :amounts_due
|
521
465
|
# 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).
|
522
466
|
attr_accessor :application_fee_amount
|
523
467
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
524
468
|
attr_accessor :auto_advance
|
525
469
|
# Settings for automatic tax lookup for this invoice.
|
526
470
|
attr_accessor :automatic_tax
|
527
|
-
# The time when this invoice should be scheduled to finalize. The invoice
|
471
|
+
# The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false.
|
528
472
|
attr_accessor :automatically_finalizes_at
|
529
473
|
# Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
|
530
474
|
attr_accessor :collection_method
|
@@ -532,8 +476,6 @@ module Stripe
|
|
532
476
|
attr_accessor :custom_fields
|
533
477
|
# 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.
|
534
478
|
attr_accessor :days_until_due
|
535
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
536
|
-
attr_accessor :default_margins
|
537
479
|
# 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.
|
538
480
|
attr_accessor :default_payment_method
|
539
481
|
# 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.
|
@@ -575,7 +517,6 @@ module Stripe
|
|
575
517
|
|
576
518
|
def initialize(
|
577
519
|
account_tax_ids: nil,
|
578
|
-
amounts_due: nil,
|
579
520
|
application_fee_amount: nil,
|
580
521
|
auto_advance: nil,
|
581
522
|
automatic_tax: nil,
|
@@ -583,7 +524,6 @@ module Stripe
|
|
583
524
|
collection_method: nil,
|
584
525
|
custom_fields: nil,
|
585
526
|
days_until_due: nil,
|
586
|
-
default_margins: nil,
|
587
527
|
default_payment_method: nil,
|
588
528
|
default_source: nil,
|
589
529
|
default_tax_rates: nil,
|
@@ -605,7 +545,6 @@ module Stripe
|
|
605
545
|
transfer_data: nil
|
606
546
|
)
|
607
547
|
@account_tax_ids = account_tax_ids
|
608
|
-
@amounts_due = amounts_due
|
609
548
|
@application_fee_amount = application_fee_amount
|
610
549
|
@auto_advance = auto_advance
|
611
550
|
@automatic_tax = automatic_tax
|
@@ -613,7 +552,6 @@ module Stripe
|
|
613
552
|
@collection_method = collection_method
|
614
553
|
@custom_fields = custom_fields
|
615
554
|
@days_until_due = days_until_due
|
616
|
-
@default_margins = default_margins
|
617
555
|
@default_payment_method = default_payment_method
|
618
556
|
@default_source = default_source
|
619
557
|
@default_tax_rates = default_tax_rates
|
@@ -678,8 +616,6 @@ module Stripe
|
|
678
616
|
attr_accessor :created
|
679
617
|
# Only return invoices for the customer specified by this customer ID.
|
680
618
|
attr_accessor :customer
|
681
|
-
# Only return invoices for the account specified by this account ID.
|
682
|
-
attr_accessor :customer_account
|
683
619
|
# Attribute for param field due_date
|
684
620
|
attr_accessor :due_date
|
685
621
|
# 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.
|
@@ -699,7 +635,6 @@ module Stripe
|
|
699
635
|
collection_method: nil,
|
700
636
|
created: nil,
|
701
637
|
customer: nil,
|
702
|
-
customer_account: nil,
|
703
638
|
due_date: nil,
|
704
639
|
ending_before: nil,
|
705
640
|
expand: nil,
|
@@ -711,7 +646,6 @@ module Stripe
|
|
711
646
|
@collection_method = collection_method
|
712
647
|
@created = created
|
713
648
|
@customer = customer
|
714
|
-
@customer_account = customer_account
|
715
649
|
@due_date = due_date
|
716
650
|
@ending_before = ending_before
|
717
651
|
@expand = expand
|
@@ -723,24 +657,6 @@ module Stripe
|
|
723
657
|
end
|
724
658
|
|
725
659
|
class CreateParams < Stripe::RequestParams
|
726
|
-
class AmountsDue < Stripe::RequestParams
|
727
|
-
# The amount in cents (or local equivalent).
|
728
|
-
attr_accessor :amount
|
729
|
-
# Number of days from when invoice is finalized until the payment is due.
|
730
|
-
attr_accessor :days_until_due
|
731
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
732
|
-
attr_accessor :description
|
733
|
-
# Date on which a payment plan’s payment is due.
|
734
|
-
attr_accessor :due_date
|
735
|
-
|
736
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
737
|
-
@amount = amount
|
738
|
-
@days_until_due = days_until_due
|
739
|
-
@description = description
|
740
|
-
@due_date = due_date
|
741
|
-
end
|
742
|
-
end
|
743
|
-
|
744
660
|
class AutomaticTax < Stripe::RequestParams
|
745
661
|
class Liability < Stripe::RequestParams
|
746
662
|
# The connected account being referenced when `type` is `account`.
|
@@ -777,44 +693,16 @@ module Stripe
|
|
777
693
|
end
|
778
694
|
|
779
695
|
class Discount < Stripe::RequestParams
|
780
|
-
class DiscountEnd < Stripe::RequestParams
|
781
|
-
class Duration < Stripe::RequestParams
|
782
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
783
|
-
attr_accessor :interval
|
784
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
785
|
-
attr_accessor :interval_count
|
786
|
-
|
787
|
-
def initialize(interval: nil, interval_count: nil)
|
788
|
-
@interval = interval
|
789
|
-
@interval_count = interval_count
|
790
|
-
end
|
791
|
-
end
|
792
|
-
# Time span for the redeemed discount.
|
793
|
-
attr_accessor :duration
|
794
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
795
|
-
attr_accessor :timestamp
|
796
|
-
# The type of calculation made to determine when the discount ends.
|
797
|
-
attr_accessor :type
|
798
|
-
|
799
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
800
|
-
@duration = duration
|
801
|
-
@timestamp = timestamp
|
802
|
-
@type = type
|
803
|
-
end
|
804
|
-
end
|
805
696
|
# ID of the coupon to create a new discount for.
|
806
697
|
attr_accessor :coupon
|
807
698
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
808
699
|
attr_accessor :discount
|
809
|
-
# Details to determine how long the discount should be applied for.
|
810
|
-
attr_accessor :discount_end
|
811
700
|
# ID of the promotion code to create a new discount for.
|
812
701
|
attr_accessor :promotion_code
|
813
702
|
|
814
|
-
def initialize(coupon: nil, discount: nil,
|
703
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
815
704
|
@coupon = coupon
|
816
705
|
@discount = discount
|
817
|
-
@discount_end = discount_end
|
818
706
|
@promotion_code = promotion_code
|
819
707
|
end
|
820
708
|
end
|
@@ -902,7 +790,7 @@ module Stripe
|
|
902
790
|
@plan = plan
|
903
791
|
end
|
904
792
|
end
|
905
|
-
# Installment configuration for payments attempted on this invoice
|
793
|
+
# Installment configuration for payments attempted on this invoice.
|
906
794
|
#
|
907
795
|
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
908
796
|
attr_accessor :installments
|
@@ -946,7 +834,6 @@ module Stripe
|
|
946
834
|
end
|
947
835
|
end
|
948
836
|
|
949
|
-
class IdBankTransfer < Stripe::RequestParams; end
|
950
837
|
class Konbini < Stripe::RequestParams; end
|
951
838
|
class SepaDebit < Stripe::RequestParams; end
|
952
839
|
|
@@ -955,12 +842,9 @@ module Stripe
|
|
955
842
|
class Filters < Stripe::RequestParams
|
956
843
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
957
844
|
attr_accessor :account_subcategories
|
958
|
-
# ID of the institution to use to filter for selectable accounts.
|
959
|
-
attr_accessor :institution
|
960
845
|
|
961
|
-
def initialize(account_subcategories: nil
|
846
|
+
def initialize(account_subcategories: nil)
|
962
847
|
@account_subcategories = account_subcategories
|
963
|
-
@institution = institution
|
964
848
|
end
|
965
849
|
end
|
966
850
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -994,8 +878,6 @@ module Stripe
|
|
994
878
|
attr_accessor :card
|
995
879
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
996
880
|
attr_accessor :customer_balance
|
997
|
-
# If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
998
|
-
attr_accessor :id_bank_transfer
|
999
881
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1000
882
|
attr_accessor :konbini
|
1001
883
|
# 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.
|
@@ -1008,7 +890,6 @@ module Stripe
|
|
1008
890
|
bancontact: nil,
|
1009
891
|
card: nil,
|
1010
892
|
customer_balance: nil,
|
1011
|
-
id_bank_transfer: nil,
|
1012
893
|
konbini: nil,
|
1013
894
|
sepa_debit: nil,
|
1014
895
|
us_bank_account: nil
|
@@ -1017,7 +898,6 @@ module Stripe
|
|
1017
898
|
@bancontact = bancontact
|
1018
899
|
@card = card
|
1019
900
|
@customer_balance = customer_balance
|
1020
|
-
@id_bank_transfer = id_bank_transfer
|
1021
901
|
@konbini = konbini
|
1022
902
|
@sepa_debit = sepa_debit
|
1023
903
|
@us_bank_account = us_bank_account
|
@@ -1229,15 +1109,13 @@ module Stripe
|
|
1229
1109
|
end
|
1230
1110
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1231
1111
|
attr_accessor :account_tax_ids
|
1232
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1233
|
-
attr_accessor :amounts_due
|
1234
1112
|
# 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).
|
1235
1113
|
attr_accessor :application_fee_amount
|
1236
|
-
# 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.
|
1114
|
+
# 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. Defaults to false.
|
1237
1115
|
attr_accessor :auto_advance
|
1238
1116
|
# Settings for automatic tax lookup for this invoice.
|
1239
1117
|
attr_accessor :automatic_tax
|
1240
|
-
# The time when this invoice should be scheduled to finalize. The invoice
|
1118
|
+
# The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state.
|
1241
1119
|
attr_accessor :automatically_finalizes_at
|
1242
1120
|
# 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`.
|
1243
1121
|
attr_accessor :collection_method
|
@@ -1247,12 +1125,8 @@ module Stripe
|
|
1247
1125
|
attr_accessor :custom_fields
|
1248
1126
|
# The ID of the customer who will be billed.
|
1249
1127
|
attr_accessor :customer
|
1250
|
-
# The ID of the account who will be billed.
|
1251
|
-
attr_accessor :customer_account
|
1252
1128
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1253
1129
|
attr_accessor :days_until_due
|
1254
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1255
|
-
attr_accessor :default_margins
|
1256
1130
|
# 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.
|
1257
1131
|
attr_accessor :default_payment_method
|
1258
1132
|
# 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.
|
@@ -1300,7 +1174,6 @@ module Stripe
|
|
1300
1174
|
|
1301
1175
|
def initialize(
|
1302
1176
|
account_tax_ids: nil,
|
1303
|
-
amounts_due: nil,
|
1304
1177
|
application_fee_amount: nil,
|
1305
1178
|
auto_advance: nil,
|
1306
1179
|
automatic_tax: nil,
|
@@ -1309,9 +1182,7 @@ module Stripe
|
|
1309
1182
|
currency: nil,
|
1310
1183
|
custom_fields: nil,
|
1311
1184
|
customer: nil,
|
1312
|
-
customer_account: nil,
|
1313
1185
|
days_until_due: nil,
|
1314
|
-
default_margins: nil,
|
1315
1186
|
default_payment_method: nil,
|
1316
1187
|
default_source: nil,
|
1317
1188
|
default_tax_rates: nil,
|
@@ -1336,7 +1207,6 @@ module Stripe
|
|
1336
1207
|
transfer_data: nil
|
1337
1208
|
)
|
1338
1209
|
@account_tax_ids = account_tax_ids
|
1339
|
-
@amounts_due = amounts_due
|
1340
1210
|
@application_fee_amount = application_fee_amount
|
1341
1211
|
@auto_advance = auto_advance
|
1342
1212
|
@automatic_tax = automatic_tax
|
@@ -1345,9 +1215,7 @@ module Stripe
|
|
1345
1215
|
@currency = currency
|
1346
1216
|
@custom_fields = custom_fields
|
1347
1217
|
@customer = customer
|
1348
|
-
@customer_account = customer_account
|
1349
1218
|
@days_until_due = days_until_due
|
1350
|
-
@default_margins = default_margins
|
1351
1219
|
@default_payment_method = default_payment_method
|
1352
1220
|
@default_source = default_source
|
1353
1221
|
@default_tax_rates = default_tax_rates
|
@@ -1394,44 +1262,16 @@ module Stripe
|
|
1394
1262
|
class AddLinesParams < Stripe::RequestParams
|
1395
1263
|
class Line < Stripe::RequestParams
|
1396
1264
|
class Discount < Stripe::RequestParams
|
1397
|
-
class DiscountEnd < Stripe::RequestParams
|
1398
|
-
class Duration < Stripe::RequestParams
|
1399
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1400
|
-
attr_accessor :interval
|
1401
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1402
|
-
attr_accessor :interval_count
|
1403
|
-
|
1404
|
-
def initialize(interval: nil, interval_count: nil)
|
1405
|
-
@interval = interval
|
1406
|
-
@interval_count = interval_count
|
1407
|
-
end
|
1408
|
-
end
|
1409
|
-
# Time span for the redeemed discount.
|
1410
|
-
attr_accessor :duration
|
1411
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1412
|
-
attr_accessor :timestamp
|
1413
|
-
# The type of calculation made to determine when the discount ends.
|
1414
|
-
attr_accessor :type
|
1415
|
-
|
1416
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1417
|
-
@duration = duration
|
1418
|
-
@timestamp = timestamp
|
1419
|
-
@type = type
|
1420
|
-
end
|
1421
|
-
end
|
1422
1265
|
# ID of the coupon to create a new discount for.
|
1423
1266
|
attr_accessor :coupon
|
1424
1267
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1425
1268
|
attr_accessor :discount
|
1426
|
-
# Details to determine how long the discount should be applied for.
|
1427
|
-
attr_accessor :discount_end
|
1428
1269
|
# ID of the promotion code to create a new discount for.
|
1429
1270
|
attr_accessor :promotion_code
|
1430
1271
|
|
1431
|
-
def initialize(coupon: nil, discount: nil,
|
1272
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1432
1273
|
@coupon = coupon
|
1433
1274
|
@discount = discount
|
1434
|
-
@discount_end = discount_end
|
1435
1275
|
@promotion_code = promotion_code
|
1436
1276
|
end
|
1437
1277
|
end
|
@@ -1584,8 +1424,6 @@ module Stripe
|
|
1584
1424
|
attr_accessor :discounts
|
1585
1425
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1586
1426
|
attr_accessor :invoice_item
|
1587
|
-
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
1588
|
-
attr_accessor :margins
|
1589
1427
|
# 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`.
|
1590
1428
|
attr_accessor :metadata
|
1591
1429
|
# 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.
|
@@ -1607,7 +1445,6 @@ module Stripe
|
|
1607
1445
|
discountable: nil,
|
1608
1446
|
discounts: nil,
|
1609
1447
|
invoice_item: nil,
|
1610
|
-
margins: nil,
|
1611
1448
|
metadata: nil,
|
1612
1449
|
period: nil,
|
1613
1450
|
price_data: nil,
|
@@ -1621,7 +1458,6 @@ module Stripe
|
|
1621
1458
|
@discountable = discountable
|
1622
1459
|
@discounts = discounts
|
1623
1460
|
@invoice_item = invoice_item
|
1624
|
-
@margins = margins
|
1625
1461
|
@metadata = metadata
|
1626
1462
|
@period = period
|
1627
1463
|
@price_data = price_data
|
@@ -1646,59 +1482,14 @@ module Stripe
|
|
1646
1482
|
end
|
1647
1483
|
|
1648
1484
|
class AttachPaymentParams < Stripe::RequestParams
|
1649
|
-
class PaymentRecordData < Stripe::RequestParams
|
1650
|
-
# The amount that was paid out of band.
|
1651
|
-
attr_accessor :amount
|
1652
|
-
# The currency that was paid out of band.
|
1653
|
-
attr_accessor :currency
|
1654
|
-
# 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`.
|
1655
|
-
attr_accessor :metadata
|
1656
|
-
# The type of money movement for this out of band payment record.
|
1657
|
-
attr_accessor :money_movement_type
|
1658
|
-
# The timestamp when this out of band payment was paid.
|
1659
|
-
attr_accessor :paid_at
|
1660
|
-
# The reference for this out of band payment record.
|
1661
|
-
attr_accessor :payment_reference
|
1662
|
-
|
1663
|
-
def initialize(
|
1664
|
-
amount: nil,
|
1665
|
-
currency: nil,
|
1666
|
-
metadata: nil,
|
1667
|
-
money_movement_type: nil,
|
1668
|
-
paid_at: nil,
|
1669
|
-
payment_reference: nil
|
1670
|
-
)
|
1671
|
-
@amount = amount
|
1672
|
-
@currency = currency
|
1673
|
-
@metadata = metadata
|
1674
|
-
@money_movement_type = money_movement_type
|
1675
|
-
@paid_at = paid_at
|
1676
|
-
@payment_reference = payment_reference
|
1677
|
-
end
|
1678
|
-
end
|
1679
|
-
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
1680
|
-
attr_accessor :amount_requested
|
1681
1485
|
# Specifies which fields in the response should be expanded.
|
1682
1486
|
attr_accessor :expand
|
1683
1487
|
# The ID of the PaymentIntent to attach to the invoice.
|
1684
1488
|
attr_accessor :payment_intent
|
1685
|
-
# The ID of the PaymentRecord to attach to the invoice.
|
1686
|
-
attr_accessor :payment_record
|
1687
|
-
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
1688
|
-
attr_accessor :payment_record_data
|
1689
1489
|
|
1690
|
-
def initialize(
|
1691
|
-
amount_requested: nil,
|
1692
|
-
expand: nil,
|
1693
|
-
payment_intent: nil,
|
1694
|
-
payment_record: nil,
|
1695
|
-
payment_record_data: nil
|
1696
|
-
)
|
1697
|
-
@amount_requested = amount_requested
|
1490
|
+
def initialize(expand: nil, payment_intent: nil)
|
1698
1491
|
@expand = expand
|
1699
1492
|
@payment_intent = payment_intent
|
1700
|
-
@payment_record = payment_record
|
1701
|
-
@payment_record_data = payment_record_data
|
1702
1493
|
end
|
1703
1494
|
end
|
1704
1495
|
|
@@ -1798,44 +1589,16 @@ module Stripe
|
|
1798
1589
|
class UpdateLinesParams < Stripe::RequestParams
|
1799
1590
|
class Line < Stripe::RequestParams
|
1800
1591
|
class Discount < Stripe::RequestParams
|
1801
|
-
class DiscountEnd < Stripe::RequestParams
|
1802
|
-
class Duration < Stripe::RequestParams
|
1803
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1804
|
-
attr_accessor :interval
|
1805
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1806
|
-
attr_accessor :interval_count
|
1807
|
-
|
1808
|
-
def initialize(interval: nil, interval_count: nil)
|
1809
|
-
@interval = interval
|
1810
|
-
@interval_count = interval_count
|
1811
|
-
end
|
1812
|
-
end
|
1813
|
-
# Time span for the redeemed discount.
|
1814
|
-
attr_accessor :duration
|
1815
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1816
|
-
attr_accessor :timestamp
|
1817
|
-
# The type of calculation made to determine when the discount ends.
|
1818
|
-
attr_accessor :type
|
1819
|
-
|
1820
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1821
|
-
@duration = duration
|
1822
|
-
@timestamp = timestamp
|
1823
|
-
@type = type
|
1824
|
-
end
|
1825
|
-
end
|
1826
1592
|
# ID of the coupon to create a new discount for.
|
1827
1593
|
attr_accessor :coupon
|
1828
1594
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1829
1595
|
attr_accessor :discount
|
1830
|
-
# Details to determine how long the discount should be applied for.
|
1831
|
-
attr_accessor :discount_end
|
1832
1596
|
# ID of the promotion code to create a new discount for.
|
1833
1597
|
attr_accessor :promotion_code
|
1834
1598
|
|
1835
|
-
def initialize(coupon: nil, discount: nil,
|
1599
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1836
1600
|
@coupon = coupon
|
1837
1601
|
@discount = discount
|
1838
|
-
@discount_end = discount_end
|
1839
1602
|
@promotion_code = promotion_code
|
1840
1603
|
end
|
1841
1604
|
end
|
@@ -1988,8 +1751,6 @@ module Stripe
|
|
1988
1751
|
attr_accessor :discounts
|
1989
1752
|
# ID of an existing line item on the invoice.
|
1990
1753
|
attr_accessor :id
|
1991
|
-
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
1992
|
-
attr_accessor :margins
|
1993
1754
|
# 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.
|
1994
1755
|
attr_accessor :metadata
|
1995
1756
|
# 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.
|
@@ -2011,7 +1772,6 @@ module Stripe
|
|
2011
1772
|
discountable: nil,
|
2012
1773
|
discounts: nil,
|
2013
1774
|
id: nil,
|
2014
|
-
margins: nil,
|
2015
1775
|
metadata: nil,
|
2016
1776
|
period: nil,
|
2017
1777
|
price_data: nil,
|
@@ -2025,7 +1785,6 @@ module Stripe
|
|
2025
1785
|
@discountable = discountable
|
2026
1786
|
@discounts = discounts
|
2027
1787
|
@id = id
|
2028
|
-
@margins = margins
|
2029
1788
|
@metadata = metadata
|
2030
1789
|
@period = period
|
2031
1790
|
@price_data = price_data
|
@@ -2200,88 +1959,32 @@ module Stripe
|
|
2200
1959
|
end
|
2201
1960
|
|
2202
1961
|
class Discount < Stripe::RequestParams
|
2203
|
-
class DiscountEnd < Stripe::RequestParams
|
2204
|
-
class Duration < Stripe::RequestParams
|
2205
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2206
|
-
attr_accessor :interval
|
2207
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2208
|
-
attr_accessor :interval_count
|
2209
|
-
|
2210
|
-
def initialize(interval: nil, interval_count: nil)
|
2211
|
-
@interval = interval
|
2212
|
-
@interval_count = interval_count
|
2213
|
-
end
|
2214
|
-
end
|
2215
|
-
# Time span for the redeemed discount.
|
2216
|
-
attr_accessor :duration
|
2217
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2218
|
-
attr_accessor :timestamp
|
2219
|
-
# The type of calculation made to determine when the discount ends.
|
2220
|
-
attr_accessor :type
|
2221
|
-
|
2222
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2223
|
-
@duration = duration
|
2224
|
-
@timestamp = timestamp
|
2225
|
-
@type = type
|
2226
|
-
end
|
2227
|
-
end
|
2228
1962
|
# ID of the coupon to create a new discount for.
|
2229
1963
|
attr_accessor :coupon
|
2230
1964
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2231
1965
|
attr_accessor :discount
|
2232
|
-
# Details to determine how long the discount should be applied for.
|
2233
|
-
attr_accessor :discount_end
|
2234
1966
|
# ID of the promotion code to create a new discount for.
|
2235
1967
|
attr_accessor :promotion_code
|
2236
1968
|
|
2237
|
-
def initialize(coupon: nil, discount: nil,
|
1969
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2238
1970
|
@coupon = coupon
|
2239
1971
|
@discount = discount
|
2240
|
-
@discount_end = discount_end
|
2241
1972
|
@promotion_code = promotion_code
|
2242
1973
|
end
|
2243
1974
|
end
|
2244
1975
|
|
2245
1976
|
class InvoiceItem < Stripe::RequestParams
|
2246
1977
|
class Discount < Stripe::RequestParams
|
2247
|
-
class DiscountEnd < Stripe::RequestParams
|
2248
|
-
class Duration < Stripe::RequestParams
|
2249
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2250
|
-
attr_accessor :interval
|
2251
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2252
|
-
attr_accessor :interval_count
|
2253
|
-
|
2254
|
-
def initialize(interval: nil, interval_count: nil)
|
2255
|
-
@interval = interval
|
2256
|
-
@interval_count = interval_count
|
2257
|
-
end
|
2258
|
-
end
|
2259
|
-
# Time span for the redeemed discount.
|
2260
|
-
attr_accessor :duration
|
2261
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2262
|
-
attr_accessor :timestamp
|
2263
|
-
# The type of calculation made to determine when the discount ends.
|
2264
|
-
attr_accessor :type
|
2265
|
-
|
2266
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2267
|
-
@duration = duration
|
2268
|
-
@timestamp = timestamp
|
2269
|
-
@type = type
|
2270
|
-
end
|
2271
|
-
end
|
2272
1978
|
# ID of the coupon to create a new discount for.
|
2273
1979
|
attr_accessor :coupon
|
2274
1980
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2275
1981
|
attr_accessor :discount
|
2276
|
-
# Details to determine how long the discount should be applied for.
|
2277
|
-
attr_accessor :discount_end
|
2278
1982
|
# ID of the promotion code to create a new discount for.
|
2279
1983
|
attr_accessor :promotion_code
|
2280
1984
|
|
2281
|
-
def initialize(coupon: nil, discount: nil,
|
1985
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2282
1986
|
@coupon = coupon
|
2283
1987
|
@discount = discount
|
2284
|
-
@discount_end = discount_end
|
2285
1988
|
@promotion_code = promotion_code
|
2286
1989
|
end
|
2287
1990
|
end
|
@@ -2407,460 +2110,8 @@ module Stripe
|
|
2407
2110
|
end
|
2408
2111
|
|
2409
2112
|
class ScheduleDetails < Stripe::RequestParams
|
2410
|
-
class Amendment < Stripe::RequestParams
|
2411
|
-
class AmendmentEnd < Stripe::RequestParams
|
2412
|
-
class DiscountEnd < Stripe::RequestParams
|
2413
|
-
# The ID of a specific discount.
|
2414
|
-
attr_accessor :discount
|
2415
|
-
|
2416
|
-
def initialize(discount: nil)
|
2417
|
-
@discount = discount
|
2418
|
-
end
|
2419
|
-
end
|
2420
|
-
|
2421
|
-
class Duration < Stripe::RequestParams
|
2422
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2423
|
-
attr_accessor :interval
|
2424
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2425
|
-
attr_accessor :interval_count
|
2426
|
-
|
2427
|
-
def initialize(interval: nil, interval_count: nil)
|
2428
|
-
@interval = interval
|
2429
|
-
@interval_count = interval_count
|
2430
|
-
end
|
2431
|
-
end
|
2432
|
-
# Use the `end` time of a given discount.
|
2433
|
-
attr_accessor :discount_end
|
2434
|
-
# Time span for the amendment starting from the `amendment_start`.
|
2435
|
-
attr_accessor :duration
|
2436
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2437
|
-
attr_accessor :timestamp
|
2438
|
-
# Select one of three ways to pass the `amendment_end`.
|
2439
|
-
attr_accessor :type
|
2440
|
-
|
2441
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2442
|
-
@discount_end = discount_end
|
2443
|
-
@duration = duration
|
2444
|
-
@timestamp = timestamp
|
2445
|
-
@type = type
|
2446
|
-
end
|
2447
|
-
end
|
2448
|
-
|
2449
|
-
class AmendmentStart < Stripe::RequestParams
|
2450
|
-
class AmendmentEnd < Stripe::RequestParams
|
2451
|
-
# The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
|
2452
|
-
attr_accessor :index
|
2453
|
-
|
2454
|
-
def initialize(index: nil)
|
2455
|
-
@index = index
|
2456
|
-
end
|
2457
|
-
end
|
2458
|
-
|
2459
|
-
class DiscountEnd < Stripe::RequestParams
|
2460
|
-
# The ID of a specific discount.
|
2461
|
-
attr_accessor :discount
|
2462
|
-
|
2463
|
-
def initialize(discount: nil)
|
2464
|
-
@discount = discount
|
2465
|
-
end
|
2466
|
-
end
|
2467
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2468
|
-
attr_accessor :amendment_end
|
2469
|
-
# Use the `end` time of a given discount.
|
2470
|
-
attr_accessor :discount_end
|
2471
|
-
# A precise Unix timestamp for the amendment to start.
|
2472
|
-
attr_accessor :timestamp
|
2473
|
-
# Select one of three ways to pass the `amendment_start`.
|
2474
|
-
attr_accessor :type
|
2475
|
-
|
2476
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2477
|
-
@amendment_end = amendment_end
|
2478
|
-
@discount_end = discount_end
|
2479
|
-
@timestamp = timestamp
|
2480
|
-
@type = type
|
2481
|
-
end
|
2482
|
-
end
|
2483
|
-
|
2484
|
-
class DiscountAction < Stripe::RequestParams
|
2485
|
-
class Add < Stripe::RequestParams
|
2486
|
-
class DiscountEnd < Stripe::RequestParams
|
2487
|
-
# The type of calculation made to determine when the discount ends.
|
2488
|
-
attr_accessor :type
|
2489
|
-
|
2490
|
-
def initialize(type: nil)
|
2491
|
-
@type = type
|
2492
|
-
end
|
2493
|
-
end
|
2494
|
-
# The coupon code to redeem.
|
2495
|
-
attr_accessor :coupon
|
2496
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
2497
|
-
attr_accessor :discount
|
2498
|
-
# Details to determine how long the discount should be applied for.
|
2499
|
-
attr_accessor :discount_end
|
2500
|
-
# The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
|
2501
|
-
attr_accessor :index
|
2502
|
-
# The promotion code to redeem.
|
2503
|
-
attr_accessor :promotion_code
|
2504
|
-
|
2505
|
-
def initialize(
|
2506
|
-
coupon: nil,
|
2507
|
-
discount: nil,
|
2508
|
-
discount_end: nil,
|
2509
|
-
index: nil,
|
2510
|
-
promotion_code: nil
|
2511
|
-
)
|
2512
|
-
@coupon = coupon
|
2513
|
-
@discount = discount
|
2514
|
-
@discount_end = discount_end
|
2515
|
-
@index = index
|
2516
|
-
@promotion_code = promotion_code
|
2517
|
-
end
|
2518
|
-
end
|
2519
|
-
|
2520
|
-
class Remove < Stripe::RequestParams
|
2521
|
-
# The coupon code to remove from the `discounts` array.
|
2522
|
-
attr_accessor :coupon
|
2523
|
-
# The ID of a discount to remove from the `discounts` array.
|
2524
|
-
attr_accessor :discount
|
2525
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
2526
|
-
attr_accessor :promotion_code
|
2527
|
-
|
2528
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2529
|
-
@coupon = coupon
|
2530
|
-
@discount = discount
|
2531
|
-
@promotion_code = promotion_code
|
2532
|
-
end
|
2533
|
-
end
|
2534
|
-
|
2535
|
-
class Set < Stripe::RequestParams
|
2536
|
-
# The coupon code to replace the `discounts` array with.
|
2537
|
-
attr_accessor :coupon
|
2538
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
2539
|
-
attr_accessor :discount
|
2540
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
2541
|
-
attr_accessor :promotion_code
|
2542
|
-
|
2543
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2544
|
-
@coupon = coupon
|
2545
|
-
@discount = discount
|
2546
|
-
@promotion_code = promotion_code
|
2547
|
-
end
|
2548
|
-
end
|
2549
|
-
# Details of the discount to add.
|
2550
|
-
attr_accessor :add
|
2551
|
-
# Details of the discount to remove.
|
2552
|
-
attr_accessor :remove
|
2553
|
-
# Details of the discount to replace the existing discounts with.
|
2554
|
-
attr_accessor :set
|
2555
|
-
# Determines the type of discount action.
|
2556
|
-
attr_accessor :type
|
2557
|
-
|
2558
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2559
|
-
@add = add
|
2560
|
-
@remove = remove
|
2561
|
-
@set = set
|
2562
|
-
@type = type
|
2563
|
-
end
|
2564
|
-
end
|
2565
|
-
|
2566
|
-
class ItemAction < Stripe::RequestParams
|
2567
|
-
class Add < Stripe::RequestParams
|
2568
|
-
class Discount < Stripe::RequestParams
|
2569
|
-
class DiscountEnd < Stripe::RequestParams
|
2570
|
-
class Duration < Stripe::RequestParams
|
2571
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2572
|
-
attr_accessor :interval
|
2573
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2574
|
-
attr_accessor :interval_count
|
2575
|
-
|
2576
|
-
def initialize(interval: nil, interval_count: nil)
|
2577
|
-
@interval = interval
|
2578
|
-
@interval_count = interval_count
|
2579
|
-
end
|
2580
|
-
end
|
2581
|
-
# Time span for the redeemed discount.
|
2582
|
-
attr_accessor :duration
|
2583
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2584
|
-
attr_accessor :timestamp
|
2585
|
-
# The type of calculation made to determine when the discount ends.
|
2586
|
-
attr_accessor :type
|
2587
|
-
|
2588
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2589
|
-
@duration = duration
|
2590
|
-
@timestamp = timestamp
|
2591
|
-
@type = type
|
2592
|
-
end
|
2593
|
-
end
|
2594
|
-
# ID of the coupon to create a new discount for.
|
2595
|
-
attr_accessor :coupon
|
2596
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2597
|
-
attr_accessor :discount
|
2598
|
-
# Details to determine how long the discount should be applied for.
|
2599
|
-
attr_accessor :discount_end
|
2600
|
-
# ID of the promotion code to create a new discount for.
|
2601
|
-
attr_accessor :promotion_code
|
2602
|
-
|
2603
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2604
|
-
@coupon = coupon
|
2605
|
-
@discount = discount
|
2606
|
-
@discount_end = discount_end
|
2607
|
-
@promotion_code = promotion_code
|
2608
|
-
end
|
2609
|
-
end
|
2610
|
-
|
2611
|
-
class Trial < Stripe::RequestParams
|
2612
|
-
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
2613
|
-
attr_accessor :converts_to
|
2614
|
-
# Determines the type of trial for this item.
|
2615
|
-
attr_accessor :type
|
2616
|
-
|
2617
|
-
def initialize(converts_to: nil, type: nil)
|
2618
|
-
@converts_to = converts_to
|
2619
|
-
@type = type
|
2620
|
-
end
|
2621
|
-
end
|
2622
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2623
|
-
attr_accessor :discounts
|
2624
|
-
# 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`.
|
2625
|
-
attr_accessor :metadata
|
2626
|
-
# The ID of the price object.
|
2627
|
-
attr_accessor :price
|
2628
|
-
# Quantity for this item.
|
2629
|
-
attr_accessor :quantity
|
2630
|
-
# The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
2631
|
-
attr_accessor :tax_rates
|
2632
|
-
# Options that configure the trial on the subscription item.
|
2633
|
-
attr_accessor :trial
|
2634
|
-
|
2635
|
-
def initialize(
|
2636
|
-
discounts: nil,
|
2637
|
-
metadata: nil,
|
2638
|
-
price: nil,
|
2639
|
-
quantity: nil,
|
2640
|
-
tax_rates: nil,
|
2641
|
-
trial: nil
|
2642
|
-
)
|
2643
|
-
@discounts = discounts
|
2644
|
-
@metadata = metadata
|
2645
|
-
@price = price
|
2646
|
-
@quantity = quantity
|
2647
|
-
@tax_rates = tax_rates
|
2648
|
-
@trial = trial
|
2649
|
-
end
|
2650
|
-
end
|
2651
|
-
|
2652
|
-
class Remove < Stripe::RequestParams
|
2653
|
-
# ID of a price to remove.
|
2654
|
-
attr_accessor :price
|
2655
|
-
|
2656
|
-
def initialize(price: nil)
|
2657
|
-
@price = price
|
2658
|
-
end
|
2659
|
-
end
|
2660
|
-
|
2661
|
-
class Set < Stripe::RequestParams
|
2662
|
-
class Discount < Stripe::RequestParams
|
2663
|
-
class DiscountEnd < Stripe::RequestParams
|
2664
|
-
class Duration < Stripe::RequestParams
|
2665
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2666
|
-
attr_accessor :interval
|
2667
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2668
|
-
attr_accessor :interval_count
|
2669
|
-
|
2670
|
-
def initialize(interval: nil, interval_count: nil)
|
2671
|
-
@interval = interval
|
2672
|
-
@interval_count = interval_count
|
2673
|
-
end
|
2674
|
-
end
|
2675
|
-
# Time span for the redeemed discount.
|
2676
|
-
attr_accessor :duration
|
2677
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2678
|
-
attr_accessor :timestamp
|
2679
|
-
# The type of calculation made to determine when the discount ends.
|
2680
|
-
attr_accessor :type
|
2681
|
-
|
2682
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2683
|
-
@duration = duration
|
2684
|
-
@timestamp = timestamp
|
2685
|
-
@type = type
|
2686
|
-
end
|
2687
|
-
end
|
2688
|
-
# ID of the coupon to create a new discount for.
|
2689
|
-
attr_accessor :coupon
|
2690
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2691
|
-
attr_accessor :discount
|
2692
|
-
# Details to determine how long the discount should be applied for.
|
2693
|
-
attr_accessor :discount_end
|
2694
|
-
# ID of the promotion code to create a new discount for.
|
2695
|
-
attr_accessor :promotion_code
|
2696
|
-
|
2697
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2698
|
-
@coupon = coupon
|
2699
|
-
@discount = discount
|
2700
|
-
@discount_end = discount_end
|
2701
|
-
@promotion_code = promotion_code
|
2702
|
-
end
|
2703
|
-
end
|
2704
|
-
|
2705
|
-
class Trial < Stripe::RequestParams
|
2706
|
-
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
2707
|
-
attr_accessor :converts_to
|
2708
|
-
# Determines the type of trial for this item.
|
2709
|
-
attr_accessor :type
|
2710
|
-
|
2711
|
-
def initialize(converts_to: nil, type: nil)
|
2712
|
-
@converts_to = converts_to
|
2713
|
-
@type = type
|
2714
|
-
end
|
2715
|
-
end
|
2716
|
-
# If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
|
2717
|
-
attr_accessor :discounts
|
2718
|
-
# If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
|
2719
|
-
attr_accessor :metadata
|
2720
|
-
# The ID of the price object.
|
2721
|
-
attr_accessor :price
|
2722
|
-
# If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
|
2723
|
-
attr_accessor :quantity
|
2724
|
-
# If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
|
2725
|
-
attr_accessor :tax_rates
|
2726
|
-
# If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
|
2727
|
-
attr_accessor :trial
|
2728
|
-
|
2729
|
-
def initialize(
|
2730
|
-
discounts: nil,
|
2731
|
-
metadata: nil,
|
2732
|
-
price: nil,
|
2733
|
-
quantity: nil,
|
2734
|
-
tax_rates: nil,
|
2735
|
-
trial: nil
|
2736
|
-
)
|
2737
|
-
@discounts = discounts
|
2738
|
-
@metadata = metadata
|
2739
|
-
@price = price
|
2740
|
-
@quantity = quantity
|
2741
|
-
@tax_rates = tax_rates
|
2742
|
-
@trial = trial
|
2743
|
-
end
|
2744
|
-
end
|
2745
|
-
# Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
|
2746
|
-
attr_accessor :add
|
2747
|
-
# Details of the subscription item to remove.
|
2748
|
-
attr_accessor :remove
|
2749
|
-
# Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
|
2750
|
-
attr_accessor :set
|
2751
|
-
# Determines the type of item action.
|
2752
|
-
attr_accessor :type
|
2753
|
-
|
2754
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2755
|
-
@add = add
|
2756
|
-
@remove = remove
|
2757
|
-
@set = set
|
2758
|
-
@type = type
|
2759
|
-
end
|
2760
|
-
end
|
2761
|
-
|
2762
|
-
class MetadataAction < Stripe::RequestParams
|
2763
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2764
|
-
attr_accessor :add
|
2765
|
-
# Keys to remove from schedule phase metadata.
|
2766
|
-
attr_accessor :remove
|
2767
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2768
|
-
attr_accessor :set
|
2769
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2770
|
-
attr_accessor :type
|
2771
|
-
|
2772
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2773
|
-
@add = add
|
2774
|
-
@remove = remove
|
2775
|
-
@set = set
|
2776
|
-
@type = type
|
2777
|
-
end
|
2778
|
-
end
|
2779
|
-
|
2780
|
-
class SetPauseCollection < Stripe::RequestParams
|
2781
|
-
class Set < Stripe::RequestParams
|
2782
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2783
|
-
attr_accessor :behavior
|
2784
|
-
|
2785
|
-
def initialize(behavior: nil)
|
2786
|
-
@behavior = behavior
|
2787
|
-
end
|
2788
|
-
end
|
2789
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2790
|
-
attr_accessor :set
|
2791
|
-
# Determines the type of the pause_collection amendment.
|
2792
|
-
attr_accessor :type
|
2793
|
-
|
2794
|
-
def initialize(set: nil, type: nil)
|
2795
|
-
@set = set
|
2796
|
-
@type = type
|
2797
|
-
end
|
2798
|
-
end
|
2799
|
-
|
2800
|
-
class TrialSettings < Stripe::RequestParams
|
2801
|
-
class EndBehavior < Stripe::RequestParams
|
2802
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2803
|
-
attr_accessor :prorate_up_front
|
2804
|
-
|
2805
|
-
def initialize(prorate_up_front: nil)
|
2806
|
-
@prorate_up_front = prorate_up_front
|
2807
|
-
end
|
2808
|
-
end
|
2809
|
-
# Defines how the subscription should behave when a trial ends.
|
2810
|
-
attr_accessor :end_behavior
|
2811
|
-
|
2812
|
-
def initialize(end_behavior: nil)
|
2813
|
-
@end_behavior = end_behavior
|
2814
|
-
end
|
2815
|
-
end
|
2816
|
-
# Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
|
2817
|
-
attr_accessor :amendment_end
|
2818
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2819
|
-
attr_accessor :amendment_start
|
2820
|
-
# For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
|
2821
|
-
attr_accessor :billing_cycle_anchor
|
2822
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2823
|
-
attr_accessor :discount_actions
|
2824
|
-
# Changes to the subscription items during the amendment time span.
|
2825
|
-
attr_accessor :item_actions
|
2826
|
-
# Instructions for how to modify phase metadata
|
2827
|
-
attr_accessor :metadata_actions
|
2828
|
-
# Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
|
2829
|
-
attr_accessor :proration_behavior
|
2830
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2831
|
-
attr_accessor :set_pause_collection
|
2832
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2833
|
-
attr_accessor :set_schedule_end
|
2834
|
-
# Settings related to subscription trials.
|
2835
|
-
attr_accessor :trial_settings
|
2836
|
-
|
2837
|
-
def initialize(
|
2838
|
-
amendment_end: nil,
|
2839
|
-
amendment_start: nil,
|
2840
|
-
billing_cycle_anchor: nil,
|
2841
|
-
discount_actions: nil,
|
2842
|
-
item_actions: nil,
|
2843
|
-
metadata_actions: nil,
|
2844
|
-
proration_behavior: nil,
|
2845
|
-
set_pause_collection: nil,
|
2846
|
-
set_schedule_end: nil,
|
2847
|
-
trial_settings: nil
|
2848
|
-
)
|
2849
|
-
@amendment_end = amendment_end
|
2850
|
-
@amendment_start = amendment_start
|
2851
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2852
|
-
@discount_actions = discount_actions
|
2853
|
-
@item_actions = item_actions
|
2854
|
-
@metadata_actions = metadata_actions
|
2855
|
-
@proration_behavior = proration_behavior
|
2856
|
-
@set_pause_collection = set_pause_collection
|
2857
|
-
@set_schedule_end = set_schedule_end
|
2858
|
-
@trial_settings = trial_settings
|
2859
|
-
end
|
2860
|
-
end
|
2861
|
-
|
2862
2113
|
class BillingMode < Stripe::RequestParams
|
2863
|
-
#
|
2114
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
2864
2115
|
attr_accessor :type
|
2865
2116
|
|
2866
2117
|
def initialize(type: nil)
|
@@ -2871,44 +2122,16 @@ module Stripe
|
|
2871
2122
|
class Phase < Stripe::RequestParams
|
2872
2123
|
class AddInvoiceItem < Stripe::RequestParams
|
2873
2124
|
class Discount < Stripe::RequestParams
|
2874
|
-
class DiscountEnd < Stripe::RequestParams
|
2875
|
-
class Duration < Stripe::RequestParams
|
2876
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2877
|
-
attr_accessor :interval
|
2878
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2879
|
-
attr_accessor :interval_count
|
2880
|
-
|
2881
|
-
def initialize(interval: nil, interval_count: nil)
|
2882
|
-
@interval = interval
|
2883
|
-
@interval_count = interval_count
|
2884
|
-
end
|
2885
|
-
end
|
2886
|
-
# Time span for the redeemed discount.
|
2887
|
-
attr_accessor :duration
|
2888
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2889
|
-
attr_accessor :timestamp
|
2890
|
-
# The type of calculation made to determine when the discount ends.
|
2891
|
-
attr_accessor :type
|
2892
|
-
|
2893
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2894
|
-
@duration = duration
|
2895
|
-
@timestamp = timestamp
|
2896
|
-
@type = type
|
2897
|
-
end
|
2898
|
-
end
|
2899
2125
|
# ID of the coupon to create a new discount for.
|
2900
2126
|
attr_accessor :coupon
|
2901
2127
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2902
2128
|
attr_accessor :discount
|
2903
|
-
# Details to determine how long the discount should be applied for.
|
2904
|
-
attr_accessor :discount_end
|
2905
2129
|
# ID of the promotion code to create a new discount for.
|
2906
2130
|
attr_accessor :promotion_code
|
2907
2131
|
|
2908
|
-
def initialize(coupon: nil, discount: nil,
|
2132
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2909
2133
|
@coupon = coupon
|
2910
2134
|
@discount = discount
|
2911
|
-
@discount_end = discount_end
|
2912
2135
|
@promotion_code = promotion_code
|
2913
2136
|
end
|
2914
2137
|
end
|
@@ -3001,48 +2224,32 @@ module Stripe
|
|
3001
2224
|
end
|
3002
2225
|
|
3003
2226
|
class Discount < Stripe::RequestParams
|
3004
|
-
class DiscountEnd < Stripe::RequestParams
|
3005
|
-
class Duration < Stripe::RequestParams
|
3006
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3007
|
-
attr_accessor :interval
|
3008
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3009
|
-
attr_accessor :interval_count
|
3010
|
-
|
3011
|
-
def initialize(interval: nil, interval_count: nil)
|
3012
|
-
@interval = interval
|
3013
|
-
@interval_count = interval_count
|
3014
|
-
end
|
3015
|
-
end
|
3016
|
-
# Time span for the redeemed discount.
|
3017
|
-
attr_accessor :duration
|
3018
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3019
|
-
attr_accessor :timestamp
|
3020
|
-
# The type of calculation made to determine when the discount ends.
|
3021
|
-
attr_accessor :type
|
3022
|
-
|
3023
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3024
|
-
@duration = duration
|
3025
|
-
@timestamp = timestamp
|
3026
|
-
@type = type
|
3027
|
-
end
|
3028
|
-
end
|
3029
2227
|
# ID of the coupon to create a new discount for.
|
3030
2228
|
attr_accessor :coupon
|
3031
2229
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3032
2230
|
attr_accessor :discount
|
3033
|
-
# Details to determine how long the discount should be applied for.
|
3034
|
-
attr_accessor :discount_end
|
3035
2231
|
# ID of the promotion code to create a new discount for.
|
3036
2232
|
attr_accessor :promotion_code
|
3037
2233
|
|
3038
|
-
def initialize(coupon: nil, discount: nil,
|
2234
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3039
2235
|
@coupon = coupon
|
3040
2236
|
@discount = discount
|
3041
|
-
@discount_end = discount_end
|
3042
2237
|
@promotion_code = promotion_code
|
3043
2238
|
end
|
3044
2239
|
end
|
3045
2240
|
|
2241
|
+
class Duration < Stripe::RequestParams
|
2242
|
+
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
2243
|
+
attr_accessor :interval
|
2244
|
+
# The multiplier applied to the interval.
|
2245
|
+
attr_accessor :interval_count
|
2246
|
+
|
2247
|
+
def initialize(interval: nil, interval_count: nil)
|
2248
|
+
@interval = interval
|
2249
|
+
@interval_count = interval_count
|
2250
|
+
end
|
2251
|
+
end
|
2252
|
+
|
3046
2253
|
class InvoiceSettings < Stripe::RequestParams
|
3047
2254
|
class Issuer < Stripe::RequestParams
|
3048
2255
|
# The connected account being referenced when `type` is `account`.
|
@@ -3080,44 +2287,16 @@ module Stripe
|
|
3080
2287
|
end
|
3081
2288
|
|
3082
2289
|
class Discount < Stripe::RequestParams
|
3083
|
-
class DiscountEnd < Stripe::RequestParams
|
3084
|
-
class Duration < Stripe::RequestParams
|
3085
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3086
|
-
attr_accessor :interval
|
3087
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3088
|
-
attr_accessor :interval_count
|
3089
|
-
|
3090
|
-
def initialize(interval: nil, interval_count: nil)
|
3091
|
-
@interval = interval
|
3092
|
-
@interval_count = interval_count
|
3093
|
-
end
|
3094
|
-
end
|
3095
|
-
# Time span for the redeemed discount.
|
3096
|
-
attr_accessor :duration
|
3097
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3098
|
-
attr_accessor :timestamp
|
3099
|
-
# The type of calculation made to determine when the discount ends.
|
3100
|
-
attr_accessor :type
|
3101
|
-
|
3102
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3103
|
-
@duration = duration
|
3104
|
-
@timestamp = timestamp
|
3105
|
-
@type = type
|
3106
|
-
end
|
3107
|
-
end
|
3108
2290
|
# ID of the coupon to create a new discount for.
|
3109
2291
|
attr_accessor :coupon
|
3110
2292
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3111
2293
|
attr_accessor :discount
|
3112
|
-
# Details to determine how long the discount should be applied for.
|
3113
|
-
attr_accessor :discount_end
|
3114
2294
|
# ID of the promotion code to create a new discount for.
|
3115
2295
|
attr_accessor :promotion_code
|
3116
2296
|
|
3117
|
-
def initialize(coupon: nil, discount: nil,
|
2297
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3118
2298
|
@coupon = coupon
|
3119
2299
|
@discount = discount
|
3120
|
-
@discount_end = discount_end
|
3121
2300
|
@promotion_code = promotion_code
|
3122
2301
|
end
|
3123
2302
|
end
|
@@ -3163,18 +2342,6 @@ module Stripe
|
|
3163
2342
|
@unit_amount_decimal = unit_amount_decimal
|
3164
2343
|
end
|
3165
2344
|
end
|
3166
|
-
|
3167
|
-
class Trial < Stripe::RequestParams
|
3168
|
-
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
3169
|
-
attr_accessor :converts_to
|
3170
|
-
# Determines the type of trial for this item.
|
3171
|
-
attr_accessor :type
|
3172
|
-
|
3173
|
-
def initialize(converts_to: nil, type: nil)
|
3174
|
-
@converts_to = converts_to
|
3175
|
-
@type = type
|
3176
|
-
end
|
3177
|
-
end
|
3178
2345
|
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
3179
2346
|
attr_accessor :billing_thresholds
|
3180
2347
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -3191,8 +2358,6 @@ module Stripe
|
|
3191
2358
|
attr_accessor :quantity
|
3192
2359
|
# 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.
|
3193
2360
|
attr_accessor :tax_rates
|
3194
|
-
# Options that configure the trial on the subscription item.
|
3195
|
-
attr_accessor :trial
|
3196
2361
|
|
3197
2362
|
def initialize(
|
3198
2363
|
billing_thresholds: nil,
|
@@ -3202,8 +2367,7 @@ module Stripe
|
|
3202
2367
|
price: nil,
|
3203
2368
|
price_data: nil,
|
3204
2369
|
quantity: nil,
|
3205
|
-
tax_rates: nil
|
3206
|
-
trial: nil
|
2370
|
+
tax_rates: nil
|
3207
2371
|
)
|
3208
2372
|
@billing_thresholds = billing_thresholds
|
3209
2373
|
@discounts = discounts
|
@@ -3213,16 +2377,6 @@ module Stripe
|
|
3213
2377
|
@price_data = price_data
|
3214
2378
|
@quantity = quantity
|
3215
2379
|
@tax_rates = tax_rates
|
3216
|
-
@trial = trial
|
3217
|
-
end
|
3218
|
-
end
|
3219
|
-
|
3220
|
-
class PauseCollection < Stripe::RequestParams
|
3221
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3222
|
-
attr_accessor :behavior
|
3223
|
-
|
3224
|
-
def initialize(behavior: nil)
|
3225
|
-
@behavior = behavior
|
3226
2380
|
end
|
3227
2381
|
end
|
3228
2382
|
|
@@ -3237,23 +2391,6 @@ module Stripe
|
|
3237
2391
|
@destination = destination
|
3238
2392
|
end
|
3239
2393
|
end
|
3240
|
-
|
3241
|
-
class TrialSettings < Stripe::RequestParams
|
3242
|
-
class EndBehavior < Stripe::RequestParams
|
3243
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3244
|
-
attr_accessor :prorate_up_front
|
3245
|
-
|
3246
|
-
def initialize(prorate_up_front: nil)
|
3247
|
-
@prorate_up_front = prorate_up_front
|
3248
|
-
end
|
3249
|
-
end
|
3250
|
-
# Defines how the subscription should behave when a trial ends.
|
3251
|
-
attr_accessor :end_behavior
|
3252
|
-
|
3253
|
-
def initialize(end_behavior: nil)
|
3254
|
-
@end_behavior = end_behavior
|
3255
|
-
end
|
3256
|
-
end
|
3257
2394
|
# 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.
|
3258
2395
|
attr_accessor :add_invoice_items
|
3259
2396
|
# 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).
|
@@ -3276,20 +2413,20 @@ module Stripe
|
|
3276
2413
|
attr_accessor :description
|
3277
2414
|
# 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.
|
3278
2415
|
attr_accessor :discounts
|
2416
|
+
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
2417
|
+
attr_accessor :duration
|
3279
2418
|
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
3280
2419
|
attr_accessor :end_date
|
3281
2420
|
# All invoices will be billed using the specified settings.
|
3282
2421
|
attr_accessor :invoice_settings
|
3283
2422
|
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
3284
2423
|
attr_accessor :items
|
3285
|
-
# 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.
|
2424
|
+
# 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. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
3286
2425
|
attr_accessor :iterations
|
3287
2426
|
# 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`.
|
3288
2427
|
attr_accessor :metadata
|
3289
2428
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3290
2429
|
attr_accessor :on_behalf_of
|
3291
|
-
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
3292
|
-
attr_accessor :pause_collection
|
3293
2430
|
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. 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 (item price, quantity, etc.) of the current phase.
|
3294
2431
|
attr_accessor :proration_behavior
|
3295
2432
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -3298,12 +2435,8 @@ module Stripe
|
|
3298
2435
|
attr_accessor :transfer_data
|
3299
2436
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
3300
2437
|
attr_accessor :trial
|
3301
|
-
# Specify trial behavior when crossing phase boundaries
|
3302
|
-
attr_accessor :trial_continuation
|
3303
2438
|
# 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`
|
3304
2439
|
attr_accessor :trial_end
|
3305
|
-
# Settings related to subscription trials.
|
3306
|
-
attr_accessor :trial_settings
|
3307
2440
|
|
3308
2441
|
def initialize(
|
3309
2442
|
add_invoice_items: nil,
|
@@ -3317,20 +2450,18 @@ module Stripe
|
|
3317
2450
|
default_tax_rates: nil,
|
3318
2451
|
description: nil,
|
3319
2452
|
discounts: nil,
|
2453
|
+
duration: nil,
|
3320
2454
|
end_date: nil,
|
3321
2455
|
invoice_settings: nil,
|
3322
2456
|
items: nil,
|
3323
2457
|
iterations: nil,
|
3324
2458
|
metadata: nil,
|
3325
2459
|
on_behalf_of: nil,
|
3326
|
-
pause_collection: nil,
|
3327
2460
|
proration_behavior: nil,
|
3328
2461
|
start_date: nil,
|
3329
2462
|
transfer_data: nil,
|
3330
2463
|
trial: nil,
|
3331
|
-
|
3332
|
-
trial_end: nil,
|
3333
|
-
trial_settings: nil
|
2464
|
+
trial_end: nil
|
3334
2465
|
)
|
3335
2466
|
@add_invoice_items = add_invoice_items
|
3336
2467
|
@application_fee_percent = application_fee_percent
|
@@ -3343,108 +2474,40 @@ module Stripe
|
|
3343
2474
|
@default_tax_rates = default_tax_rates
|
3344
2475
|
@description = description
|
3345
2476
|
@discounts = discounts
|
2477
|
+
@duration = duration
|
3346
2478
|
@end_date = end_date
|
3347
2479
|
@invoice_settings = invoice_settings
|
3348
2480
|
@items = items
|
3349
2481
|
@iterations = iterations
|
3350
2482
|
@metadata = metadata
|
3351
2483
|
@on_behalf_of = on_behalf_of
|
3352
|
-
@pause_collection = pause_collection
|
3353
2484
|
@proration_behavior = proration_behavior
|
3354
2485
|
@start_date = start_date
|
3355
2486
|
@transfer_data = transfer_data
|
3356
2487
|
@trial = trial
|
3357
|
-
@trial_continuation = trial_continuation
|
3358
2488
|
@trial_end = trial_end
|
3359
|
-
@trial_settings = trial_settings
|
3360
|
-
end
|
3361
|
-
end
|
3362
|
-
|
3363
|
-
class Prebilling < Stripe::RequestParams
|
3364
|
-
class BillUntil < Stripe::RequestParams
|
3365
|
-
class AmendmentEnd < Stripe::RequestParams
|
3366
|
-
# The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
|
3367
|
-
attr_accessor :index
|
3368
|
-
|
3369
|
-
def initialize(index: nil)
|
3370
|
-
@index = index
|
3371
|
-
end
|
3372
|
-
end
|
3373
|
-
|
3374
|
-
class Duration < Stripe::RequestParams
|
3375
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3376
|
-
attr_accessor :interval
|
3377
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3378
|
-
attr_accessor :interval_count
|
3379
|
-
|
3380
|
-
def initialize(interval: nil, interval_count: nil)
|
3381
|
-
@interval = interval
|
3382
|
-
@interval_count = interval_count
|
3383
|
-
end
|
3384
|
-
end
|
3385
|
-
# End the prebilled period when a specified amendment ends.
|
3386
|
-
attr_accessor :amendment_end
|
3387
|
-
# Time span for prebilling, starting from `bill_from`.
|
3388
|
-
attr_accessor :duration
|
3389
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3390
|
-
attr_accessor :timestamp
|
3391
|
-
# Select one of several ways to pass the `bill_until` value.
|
3392
|
-
attr_accessor :type
|
3393
|
-
|
3394
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3395
|
-
@amendment_end = amendment_end
|
3396
|
-
@duration = duration
|
3397
|
-
@timestamp = timestamp
|
3398
|
-
@type = type
|
3399
|
-
end
|
3400
|
-
end
|
3401
|
-
# The end of the prebilled time period.
|
3402
|
-
attr_accessor :bill_until
|
3403
|
-
# This is used to determine the number of billing cycles to prebill.
|
3404
|
-
attr_accessor :iterations
|
3405
|
-
|
3406
|
-
def initialize(bill_until: nil, iterations: nil)
|
3407
|
-
@bill_until = bill_until
|
3408
|
-
@iterations = iterations
|
3409
2489
|
end
|
3410
2490
|
end
|
3411
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3412
|
-
attr_accessor :amendments
|
3413
|
-
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
3414
|
-
attr_accessor :billing_behavior
|
3415
2491
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
3416
2492
|
attr_accessor :billing_mode
|
3417
2493
|
# 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.
|
3418
2494
|
attr_accessor :end_behavior
|
3419
2495
|
# 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.
|
3420
2496
|
attr_accessor :phases
|
3421
|
-
# Provide any time periods to bill in advance.
|
3422
|
-
attr_accessor :prebilling
|
3423
2497
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
3424
2498
|
attr_accessor :proration_behavior
|
3425
2499
|
|
3426
|
-
def initialize(
|
3427
|
-
amendments: nil,
|
3428
|
-
billing_behavior: nil,
|
3429
|
-
billing_mode: nil,
|
3430
|
-
end_behavior: nil,
|
3431
|
-
phases: nil,
|
3432
|
-
prebilling: nil,
|
3433
|
-
proration_behavior: nil
|
3434
|
-
)
|
3435
|
-
@amendments = amendments
|
3436
|
-
@billing_behavior = billing_behavior
|
2500
|
+
def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil)
|
3437
2501
|
@billing_mode = billing_mode
|
3438
2502
|
@end_behavior = end_behavior
|
3439
2503
|
@phases = phases
|
3440
|
-
@prebilling = prebilling
|
3441
2504
|
@proration_behavior = proration_behavior
|
3442
2505
|
end
|
3443
2506
|
end
|
3444
2507
|
|
3445
2508
|
class SubscriptionDetails < Stripe::RequestParams
|
3446
2509
|
class BillingMode < Stripe::RequestParams
|
3447
|
-
#
|
2510
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
3448
2511
|
attr_accessor :type
|
3449
2512
|
|
3450
2513
|
def initialize(type: nil)
|
@@ -3463,44 +2526,16 @@ module Stripe
|
|
3463
2526
|
end
|
3464
2527
|
|
3465
2528
|
class Discount < Stripe::RequestParams
|
3466
|
-
class DiscountEnd < Stripe::RequestParams
|
3467
|
-
class Duration < Stripe::RequestParams
|
3468
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3469
|
-
attr_accessor :interval
|
3470
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3471
|
-
attr_accessor :interval_count
|
3472
|
-
|
3473
|
-
def initialize(interval: nil, interval_count: nil)
|
3474
|
-
@interval = interval
|
3475
|
-
@interval_count = interval_count
|
3476
|
-
end
|
3477
|
-
end
|
3478
|
-
# Time span for the redeemed discount.
|
3479
|
-
attr_accessor :duration
|
3480
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3481
|
-
attr_accessor :timestamp
|
3482
|
-
# The type of calculation made to determine when the discount ends.
|
3483
|
-
attr_accessor :type
|
3484
|
-
|
3485
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3486
|
-
@duration = duration
|
3487
|
-
@timestamp = timestamp
|
3488
|
-
@type = type
|
3489
|
-
end
|
3490
|
-
end
|
3491
2529
|
# ID of the coupon to create a new discount for.
|
3492
2530
|
attr_accessor :coupon
|
3493
2531
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3494
2532
|
attr_accessor :discount
|
3495
|
-
# Details to determine how long the discount should be applied for.
|
3496
|
-
attr_accessor :discount_end
|
3497
2533
|
# ID of the promotion code to create a new discount for.
|
3498
2534
|
attr_accessor :promotion_code
|
3499
2535
|
|
3500
|
-
def initialize(coupon: nil, discount: nil,
|
2536
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3501
2537
|
@coupon = coupon
|
3502
2538
|
@discount = discount
|
3503
|
-
@discount_end = discount_end
|
3504
2539
|
@promotion_code = promotion_code
|
3505
2540
|
end
|
3506
2541
|
end
|
@@ -3595,15 +2630,6 @@ module Stripe
|
|
3595
2630
|
@tax_rates = tax_rates
|
3596
2631
|
end
|
3597
2632
|
end
|
3598
|
-
|
3599
|
-
class Prebilling < Stripe::RequestParams
|
3600
|
-
# This is used to determine the number of billing cycles to prebill.
|
3601
|
-
attr_accessor :iterations
|
3602
|
-
|
3603
|
-
def initialize(iterations: nil)
|
3604
|
-
@iterations = iterations
|
3605
|
-
end
|
3606
|
-
end
|
3607
2633
|
# 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`.
|
3608
2634
|
attr_accessor :billing_cycle_anchor
|
3609
2635
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
@@ -3618,8 +2644,6 @@ module Stripe
|
|
3618
2644
|
attr_accessor :default_tax_rates
|
3619
2645
|
# A list of up to 20 subscription items, each with an attached price.
|
3620
2646
|
attr_accessor :items
|
3621
|
-
# The pre-billing to apply to the subscription as a preview.
|
3622
|
-
attr_accessor :prebilling
|
3623
2647
|
# 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`.
|
3624
2648
|
attr_accessor :proration_behavior
|
3625
2649
|
# 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'.
|
@@ -3639,7 +2663,6 @@ module Stripe
|
|
3639
2663
|
cancel_now: nil,
|
3640
2664
|
default_tax_rates: nil,
|
3641
2665
|
items: nil,
|
3642
|
-
prebilling: nil,
|
3643
2666
|
proration_behavior: nil,
|
3644
2667
|
proration_date: nil,
|
3645
2668
|
resume_at: nil,
|
@@ -3653,7 +2676,6 @@ module Stripe
|
|
3653
2676
|
@cancel_now = cancel_now
|
3654
2677
|
@default_tax_rates = default_tax_rates
|
3655
2678
|
@items = items
|
3656
|
-
@prebilling = prebilling
|
3657
2679
|
@proration_behavior = proration_behavior
|
3658
2680
|
@proration_date = proration_date
|
3659
2681
|
@resume_at = resume_at
|
@@ -3667,8 +2689,6 @@ module Stripe
|
|
3667
2689
|
attr_accessor :currency
|
3668
2690
|
# 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.
|
3669
2691
|
attr_accessor :customer
|
3670
|
-
# The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
|
3671
|
-
attr_accessor :customer_account
|
3672
2692
|
# 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.
|
3673
2693
|
attr_accessor :customer_details
|
3674
2694
|
# 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.
|
@@ -3696,7 +2716,6 @@ module Stripe
|
|
3696
2716
|
automatic_tax: nil,
|
3697
2717
|
currency: nil,
|
3698
2718
|
customer: nil,
|
3699
|
-
customer_account: nil,
|
3700
2719
|
customer_details: nil,
|
3701
2720
|
discounts: nil,
|
3702
2721
|
expand: nil,
|
@@ -3712,7 +2731,6 @@ module Stripe
|
|
3712
2731
|
@automatic_tax = automatic_tax
|
3713
2732
|
@currency = currency
|
3714
2733
|
@customer = customer
|
3715
|
-
@customer_account = customer_account
|
3716
2734
|
@customer_details = customer_details
|
3717
2735
|
@discounts = discounts
|
3718
2736
|
@expand = expand
|