stripe 15.3.0.pre.beta.2 → 15.3.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 -0
- data/CHANGELOG.md +683 -1584
- data/OPENAPI_VERSION +1 -1
- data/README.md +14 -50
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -28
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -54
- data/lib/stripe/event_types.rb +0 -98
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
- data/lib/stripe/object_types.rb +0 -50
- data/lib/stripe/resources/account.rb +82 -650
- data/lib/stripe/resources/account_session.rb +80 -335
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +0 -10
- data/lib/stripe/resources/billing_portal/session.rb +2 -8
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +28 -1553
- data/lib/stripe/resources/checkout/session.rb +55 -333
- data/lib/stripe/resources/confirmation_token.rb +19 -181
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +9 -15
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +0 -2
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +3 -8
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/event.rb +1 -32
- 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 +34 -10
- data/lib/stripe/resources/invoice.rb +33 -1062
- data/lib/stripe/resources/invoice_item.rb +3 -82
- 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 +3 -24
- data/lib/stripe/resources/payment_intent.rb +875 -5512
- data/lib/stripe/resources/payment_method.rb +18 -201
- 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 +16 -2033
- data/lib/stripe/resources/refund.rb +0 -9
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +294 -581
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +36 -298
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +27 -1008
- data/lib/stripe/resources/tax/registration.rb +20 -0
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +1 -0
- data/lib/stripe/resources/terminal/reader.rb +10 -18
- data/lib/stripe/resources/token.rb +1 -1
- data/lib/stripe/resources/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +8 -23
- 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 -104
- data/lib/stripe/services/account_service.rb +76 -559
- data/lib/stripe/services/account_session_service.rb +49 -274
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
- data/lib/stripe/services/billing_portal/session_service.rb +1 -5
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +55 -250
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +6 -10
- data/lib/stripe/services/customer_session_service.rb +2 -5
- 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 +16 -8
- data/lib/stripe/services/invoice_item_service.rb +2 -74
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +83 -0
- data/lib/stripe/services/invoice_service.rb +33 -1013
- 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 +650 -4832
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +6 -120
- 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 +13 -1719
- data/lib/stripe/services/setup_intent_service.rb +284 -540
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +19 -911
- data/lib/stripe/services/subscription_service.rb +30 -253
- data/lib/stripe/services/tax/registration_service.rb +13 -0
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/reader_service.rb +4 -4
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -98
- 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/token_service.rb +1 -1
- 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 +7 -17
- 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/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +2 -5
- 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/webhook.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4995 -0
- data/rbi/stripe/resources/account_link.rbi +74 -0
- data/rbi/stripe/resources/account_session.rbi +1013 -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 +645 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2086 -0
- data/rbi/stripe/resources/checkout/session.rbi +4060 -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 +149 -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 +3842 -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 +9987 -0
- data/rbi/stripe/resources/payment_link.rbi +1801 -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 +1645 -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 +2732 -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 +1387 -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 +58 -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 +646 -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 +511 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2670 -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 +3011 -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 +7989 -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 +1352 -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 +1301 -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 +1858 -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 +1118 -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 +326 -162
- 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_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 -2806
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1086
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1615
- 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 -364
- 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 -1746
- 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 -58
- 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 -116
- 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 -2236
- 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 -4138
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1046
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -131
- 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 -43
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -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 -200
- 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 -91
- 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 -138
- 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 -191636
@@ -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
|
@@ -169,7 +123,7 @@ module Stripe
|
|
169
123
|
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
170
124
|
# One of `month`.
|
171
125
|
attr_accessor :interval
|
172
|
-
# Type of installment plan, one of `fixed_count`.
|
126
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
173
127
|
attr_accessor :type
|
174
128
|
|
175
129
|
def initialize(count: nil, interval: nil, type: nil)
|
@@ -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,8 +462,6 @@ 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.
|
@@ -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
|
@@ -882,7 +770,7 @@ module Stripe
|
|
882
770
|
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
883
771
|
# One of `month`.
|
884
772
|
attr_accessor :interval
|
885
|
-
# Type of installment plan, one of `fixed_count`.
|
773
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
886
774
|
attr_accessor :type
|
887
775
|
|
888
776
|
def initialize(count: nil, interval: nil, type: nil)
|
@@ -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,8 +1109,6 @@ 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
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.
|
@@ -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,499 +2110,28 @@ module Stripe
|
|
2407
2110
|
end
|
2408
2111
|
|
2409
2112
|
class ScheduleDetails < Stripe::RequestParams
|
2410
|
-
class
|
2411
|
-
|
2412
|
-
|
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
|
2113
|
+
class BillingMode < Stripe::RequestParams
|
2114
|
+
# Attribute for param field type
|
2115
|
+
attr_accessor :type
|
2836
2116
|
|
2837
|
-
def initialize(
|
2838
|
-
|
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
|
2117
|
+
def initialize(type: nil)
|
2118
|
+
@type = type
|
2859
2119
|
end
|
2860
2120
|
end
|
2861
2121
|
|
2862
2122
|
class Phase < Stripe::RequestParams
|
2863
2123
|
class AddInvoiceItem < Stripe::RequestParams
|
2864
2124
|
class Discount < Stripe::RequestParams
|
2865
|
-
class DiscountEnd < Stripe::RequestParams
|
2866
|
-
class Duration < Stripe::RequestParams
|
2867
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2868
|
-
attr_accessor :interval
|
2869
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2870
|
-
attr_accessor :interval_count
|
2871
|
-
|
2872
|
-
def initialize(interval: nil, interval_count: nil)
|
2873
|
-
@interval = interval
|
2874
|
-
@interval_count = interval_count
|
2875
|
-
end
|
2876
|
-
end
|
2877
|
-
# Time span for the redeemed discount.
|
2878
|
-
attr_accessor :duration
|
2879
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2880
|
-
attr_accessor :timestamp
|
2881
|
-
# The type of calculation made to determine when the discount ends.
|
2882
|
-
attr_accessor :type
|
2883
|
-
|
2884
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2885
|
-
@duration = duration
|
2886
|
-
@timestamp = timestamp
|
2887
|
-
@type = type
|
2888
|
-
end
|
2889
|
-
end
|
2890
2125
|
# ID of the coupon to create a new discount for.
|
2891
2126
|
attr_accessor :coupon
|
2892
2127
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2893
2128
|
attr_accessor :discount
|
2894
|
-
# Details to determine how long the discount should be applied for.
|
2895
|
-
attr_accessor :discount_end
|
2896
2129
|
# ID of the promotion code to create a new discount for.
|
2897
2130
|
attr_accessor :promotion_code
|
2898
2131
|
|
2899
|
-
def initialize(coupon: nil, discount: nil,
|
2132
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2900
2133
|
@coupon = coupon
|
2901
2134
|
@discount = discount
|
2902
|
-
@discount_end = discount_end
|
2903
2135
|
@promotion_code = promotion_code
|
2904
2136
|
end
|
2905
2137
|
end
|
@@ -2992,44 +2224,16 @@ module Stripe
|
|
2992
2224
|
end
|
2993
2225
|
|
2994
2226
|
class Discount < Stripe::RequestParams
|
2995
|
-
class DiscountEnd < Stripe::RequestParams
|
2996
|
-
class Duration < Stripe::RequestParams
|
2997
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2998
|
-
attr_accessor :interval
|
2999
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3000
|
-
attr_accessor :interval_count
|
3001
|
-
|
3002
|
-
def initialize(interval: nil, interval_count: nil)
|
3003
|
-
@interval = interval
|
3004
|
-
@interval_count = interval_count
|
3005
|
-
end
|
3006
|
-
end
|
3007
|
-
# Time span for the redeemed discount.
|
3008
|
-
attr_accessor :duration
|
3009
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3010
|
-
attr_accessor :timestamp
|
3011
|
-
# The type of calculation made to determine when the discount ends.
|
3012
|
-
attr_accessor :type
|
3013
|
-
|
3014
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3015
|
-
@duration = duration
|
3016
|
-
@timestamp = timestamp
|
3017
|
-
@type = type
|
3018
|
-
end
|
3019
|
-
end
|
3020
2227
|
# ID of the coupon to create a new discount for.
|
3021
2228
|
attr_accessor :coupon
|
3022
2229
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3023
2230
|
attr_accessor :discount
|
3024
|
-
# Details to determine how long the discount should be applied for.
|
3025
|
-
attr_accessor :discount_end
|
3026
2231
|
# ID of the promotion code to create a new discount for.
|
3027
2232
|
attr_accessor :promotion_code
|
3028
2233
|
|
3029
|
-
def initialize(coupon: nil, discount: nil,
|
2234
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3030
2235
|
@coupon = coupon
|
3031
2236
|
@discount = discount
|
3032
|
-
@discount_end = discount_end
|
3033
2237
|
@promotion_code = promotion_code
|
3034
2238
|
end
|
3035
2239
|
end
|
@@ -3071,44 +2275,16 @@ module Stripe
|
|
3071
2275
|
end
|
3072
2276
|
|
3073
2277
|
class Discount < Stripe::RequestParams
|
3074
|
-
class DiscountEnd < Stripe::RequestParams
|
3075
|
-
class Duration < Stripe::RequestParams
|
3076
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3077
|
-
attr_accessor :interval
|
3078
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3079
|
-
attr_accessor :interval_count
|
3080
|
-
|
3081
|
-
def initialize(interval: nil, interval_count: nil)
|
3082
|
-
@interval = interval
|
3083
|
-
@interval_count = interval_count
|
3084
|
-
end
|
3085
|
-
end
|
3086
|
-
# Time span for the redeemed discount.
|
3087
|
-
attr_accessor :duration
|
3088
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3089
|
-
attr_accessor :timestamp
|
3090
|
-
# The type of calculation made to determine when the discount ends.
|
3091
|
-
attr_accessor :type
|
3092
|
-
|
3093
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3094
|
-
@duration = duration
|
3095
|
-
@timestamp = timestamp
|
3096
|
-
@type = type
|
3097
|
-
end
|
3098
|
-
end
|
3099
2278
|
# ID of the coupon to create a new discount for.
|
3100
2279
|
attr_accessor :coupon
|
3101
2280
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3102
2281
|
attr_accessor :discount
|
3103
|
-
# Details to determine how long the discount should be applied for.
|
3104
|
-
attr_accessor :discount_end
|
3105
2282
|
# ID of the promotion code to create a new discount for.
|
3106
2283
|
attr_accessor :promotion_code
|
3107
2284
|
|
3108
|
-
def initialize(coupon: nil, discount: nil,
|
2285
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3109
2286
|
@coupon = coupon
|
3110
2287
|
@discount = discount
|
3111
|
-
@discount_end = discount_end
|
3112
2288
|
@promotion_code = promotion_code
|
3113
2289
|
end
|
3114
2290
|
end
|
@@ -3154,18 +2330,6 @@ module Stripe
|
|
3154
2330
|
@unit_amount_decimal = unit_amount_decimal
|
3155
2331
|
end
|
3156
2332
|
end
|
3157
|
-
|
3158
|
-
class Trial < Stripe::RequestParams
|
3159
|
-
# 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.
|
3160
|
-
attr_accessor :converts_to
|
3161
|
-
# Determines the type of trial for this item.
|
3162
|
-
attr_accessor :type
|
3163
|
-
|
3164
|
-
def initialize(converts_to: nil, type: nil)
|
3165
|
-
@converts_to = converts_to
|
3166
|
-
@type = type
|
3167
|
-
end
|
3168
|
-
end
|
3169
2333
|
# 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.
|
3170
2334
|
attr_accessor :billing_thresholds
|
3171
2335
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -3182,8 +2346,6 @@ module Stripe
|
|
3182
2346
|
attr_accessor :quantity
|
3183
2347
|
# 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.
|
3184
2348
|
attr_accessor :tax_rates
|
3185
|
-
# Options that configure the trial on the subscription item.
|
3186
|
-
attr_accessor :trial
|
3187
2349
|
|
3188
2350
|
def initialize(
|
3189
2351
|
billing_thresholds: nil,
|
@@ -3193,8 +2355,7 @@ module Stripe
|
|
3193
2355
|
price: nil,
|
3194
2356
|
price_data: nil,
|
3195
2357
|
quantity: nil,
|
3196
|
-
tax_rates: nil
|
3197
|
-
trial: nil
|
2358
|
+
tax_rates: nil
|
3198
2359
|
)
|
3199
2360
|
@billing_thresholds = billing_thresholds
|
3200
2361
|
@discounts = discounts
|
@@ -3204,16 +2365,6 @@ module Stripe
|
|
3204
2365
|
@price_data = price_data
|
3205
2366
|
@quantity = quantity
|
3206
2367
|
@tax_rates = tax_rates
|
3207
|
-
@trial = trial
|
3208
|
-
end
|
3209
|
-
end
|
3210
|
-
|
3211
|
-
class PauseCollection < Stripe::RequestParams
|
3212
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3213
|
-
attr_accessor :behavior
|
3214
|
-
|
3215
|
-
def initialize(behavior: nil)
|
3216
|
-
@behavior = behavior
|
3217
2368
|
end
|
3218
2369
|
end
|
3219
2370
|
|
@@ -3228,23 +2379,6 @@ module Stripe
|
|
3228
2379
|
@destination = destination
|
3229
2380
|
end
|
3230
2381
|
end
|
3231
|
-
|
3232
|
-
class TrialSettings < Stripe::RequestParams
|
3233
|
-
class EndBehavior < Stripe::RequestParams
|
3234
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3235
|
-
attr_accessor :prorate_up_front
|
3236
|
-
|
3237
|
-
def initialize(prorate_up_front: nil)
|
3238
|
-
@prorate_up_front = prorate_up_front
|
3239
|
-
end
|
3240
|
-
end
|
3241
|
-
# Defines how the subscription should behave when a trial ends.
|
3242
|
-
attr_accessor :end_behavior
|
3243
|
-
|
3244
|
-
def initialize(end_behavior: nil)
|
3245
|
-
@end_behavior = end_behavior
|
3246
|
-
end
|
3247
|
-
end
|
3248
2382
|
# 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.
|
3249
2383
|
attr_accessor :add_invoice_items
|
3250
2384
|
# 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).
|
@@ -3279,8 +2413,6 @@ module Stripe
|
|
3279
2413
|
attr_accessor :metadata
|
3280
2414
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3281
2415
|
attr_accessor :on_behalf_of
|
3282
|
-
# 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).
|
3283
|
-
attr_accessor :pause_collection
|
3284
2416
|
# 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.
|
3285
2417
|
attr_accessor :proration_behavior
|
3286
2418
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -3289,12 +2421,8 @@ module Stripe
|
|
3289
2421
|
attr_accessor :transfer_data
|
3290
2422
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
3291
2423
|
attr_accessor :trial
|
3292
|
-
# Specify trial behavior when crossing phase boundaries
|
3293
|
-
attr_accessor :trial_continuation
|
3294
2424
|
# 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`
|
3295
2425
|
attr_accessor :trial_end
|
3296
|
-
# Settings related to subscription trials.
|
3297
|
-
attr_accessor :trial_settings
|
3298
2426
|
|
3299
2427
|
def initialize(
|
3300
2428
|
add_invoice_items: nil,
|
@@ -3314,14 +2442,11 @@ module Stripe
|
|
3314
2442
|
iterations: nil,
|
3315
2443
|
metadata: nil,
|
3316
2444
|
on_behalf_of: nil,
|
3317
|
-
pause_collection: nil,
|
3318
2445
|
proration_behavior: nil,
|
3319
2446
|
start_date: nil,
|
3320
2447
|
transfer_data: nil,
|
3321
2448
|
trial: nil,
|
3322
|
-
|
3323
|
-
trial_end: nil,
|
3324
|
-
trial_settings: nil
|
2449
|
+
trial_end: nil
|
3325
2450
|
)
|
3326
2451
|
@add_invoice_items = add_invoice_items
|
3327
2452
|
@application_fee_percent = application_fee_percent
|
@@ -3340,100 +2465,40 @@ module Stripe
|
|
3340
2465
|
@iterations = iterations
|
3341
2466
|
@metadata = metadata
|
3342
2467
|
@on_behalf_of = on_behalf_of
|
3343
|
-
@pause_collection = pause_collection
|
3344
2468
|
@proration_behavior = proration_behavior
|
3345
2469
|
@start_date = start_date
|
3346
2470
|
@transfer_data = transfer_data
|
3347
2471
|
@trial = trial
|
3348
|
-
@trial_continuation = trial_continuation
|
3349
2472
|
@trial_end = trial_end
|
3350
|
-
@trial_settings = trial_settings
|
3351
2473
|
end
|
3352
2474
|
end
|
3353
|
-
|
3354
|
-
class Prebilling < Stripe::RequestParams
|
3355
|
-
class BillUntil < Stripe::RequestParams
|
3356
|
-
class AmendmentEnd < Stripe::RequestParams
|
3357
|
-
# 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.
|
3358
|
-
attr_accessor :index
|
3359
|
-
|
3360
|
-
def initialize(index: nil)
|
3361
|
-
@index = index
|
3362
|
-
end
|
3363
|
-
end
|
3364
|
-
|
3365
|
-
class Duration < Stripe::RequestParams
|
3366
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3367
|
-
attr_accessor :interval
|
3368
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3369
|
-
attr_accessor :interval_count
|
3370
|
-
|
3371
|
-
def initialize(interval: nil, interval_count: nil)
|
3372
|
-
@interval = interval
|
3373
|
-
@interval_count = interval_count
|
3374
|
-
end
|
3375
|
-
end
|
3376
|
-
# End the prebilled period when a specified amendment ends.
|
3377
|
-
attr_accessor :amendment_end
|
3378
|
-
# Time span for prebilling, starting from `bill_from`.
|
3379
|
-
attr_accessor :duration
|
3380
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3381
|
-
attr_accessor :timestamp
|
3382
|
-
# Select one of several ways to pass the `bill_until` value.
|
3383
|
-
attr_accessor :type
|
3384
|
-
|
3385
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3386
|
-
@amendment_end = amendment_end
|
3387
|
-
@duration = duration
|
3388
|
-
@timestamp = timestamp
|
3389
|
-
@type = type
|
3390
|
-
end
|
3391
|
-
end
|
3392
|
-
# The end of the prebilled time period.
|
3393
|
-
attr_accessor :bill_until
|
3394
|
-
# This is used to determine the number of billing cycles to prebill.
|
3395
|
-
attr_accessor :iterations
|
3396
|
-
|
3397
|
-
def initialize(bill_until: nil, iterations: nil)
|
3398
|
-
@bill_until = bill_until
|
3399
|
-
@iterations = iterations
|
3400
|
-
end
|
3401
|
-
end
|
3402
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3403
|
-
attr_accessor :amendments
|
3404
|
-
# 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.
|
3405
|
-
attr_accessor :billing_behavior
|
3406
2475
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
3407
2476
|
attr_accessor :billing_mode
|
3408
2477
|
# 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.
|
3409
2478
|
attr_accessor :end_behavior
|
3410
2479
|
# 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.
|
3411
2480
|
attr_accessor :phases
|
3412
|
-
# Provide any time periods to bill in advance.
|
3413
|
-
attr_accessor :prebilling
|
3414
2481
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
3415
2482
|
attr_accessor :proration_behavior
|
3416
2483
|
|
3417
|
-
def initialize(
|
3418
|
-
amendments: nil,
|
3419
|
-
billing_behavior: nil,
|
3420
|
-
billing_mode: nil,
|
3421
|
-
end_behavior: nil,
|
3422
|
-
phases: nil,
|
3423
|
-
prebilling: nil,
|
3424
|
-
proration_behavior: nil
|
3425
|
-
)
|
3426
|
-
@amendments = amendments
|
3427
|
-
@billing_behavior = billing_behavior
|
2484
|
+
def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil)
|
3428
2485
|
@billing_mode = billing_mode
|
3429
2486
|
@end_behavior = end_behavior
|
3430
2487
|
@phases = phases
|
3431
|
-
@prebilling = prebilling
|
3432
2488
|
@proration_behavior = proration_behavior
|
3433
2489
|
end
|
3434
2490
|
end
|
3435
2491
|
|
3436
2492
|
class SubscriptionDetails < Stripe::RequestParams
|
2493
|
+
class BillingMode < Stripe::RequestParams
|
2494
|
+
# Attribute for param field type
|
2495
|
+
attr_accessor :type
|
2496
|
+
|
2497
|
+
def initialize(type: nil)
|
2498
|
+
@type = type
|
2499
|
+
end
|
2500
|
+
end
|
2501
|
+
|
3437
2502
|
class Item < Stripe::RequestParams
|
3438
2503
|
class BillingThresholds < Stripe::RequestParams
|
3439
2504
|
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
@@ -3445,44 +2510,16 @@ module Stripe
|
|
3445
2510
|
end
|
3446
2511
|
|
3447
2512
|
class Discount < Stripe::RequestParams
|
3448
|
-
class DiscountEnd < Stripe::RequestParams
|
3449
|
-
class Duration < Stripe::RequestParams
|
3450
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3451
|
-
attr_accessor :interval
|
3452
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3453
|
-
attr_accessor :interval_count
|
3454
|
-
|
3455
|
-
def initialize(interval: nil, interval_count: nil)
|
3456
|
-
@interval = interval
|
3457
|
-
@interval_count = interval_count
|
3458
|
-
end
|
3459
|
-
end
|
3460
|
-
# Time span for the redeemed discount.
|
3461
|
-
attr_accessor :duration
|
3462
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3463
|
-
attr_accessor :timestamp
|
3464
|
-
# The type of calculation made to determine when the discount ends.
|
3465
|
-
attr_accessor :type
|
3466
|
-
|
3467
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3468
|
-
@duration = duration
|
3469
|
-
@timestamp = timestamp
|
3470
|
-
@type = type
|
3471
|
-
end
|
3472
|
-
end
|
3473
2513
|
# ID of the coupon to create a new discount for.
|
3474
2514
|
attr_accessor :coupon
|
3475
2515
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3476
2516
|
attr_accessor :discount
|
3477
|
-
# Details to determine how long the discount should be applied for.
|
3478
|
-
attr_accessor :discount_end
|
3479
2517
|
# ID of the promotion code to create a new discount for.
|
3480
2518
|
attr_accessor :promotion_code
|
3481
2519
|
|
3482
|
-
def initialize(coupon: nil, discount: nil,
|
2520
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3483
2521
|
@coupon = coupon
|
3484
2522
|
@discount = discount
|
3485
|
-
@discount_end = discount_end
|
3486
2523
|
@promotion_code = promotion_code
|
3487
2524
|
end
|
3488
2525
|
end
|
@@ -3577,22 +2614,13 @@ module Stripe
|
|
3577
2614
|
@tax_rates = tax_rates
|
3578
2615
|
end
|
3579
2616
|
end
|
3580
|
-
|
3581
|
-
class Prebilling < Stripe::RequestParams
|
3582
|
-
# This is used to determine the number of billing cycles to prebill.
|
3583
|
-
attr_accessor :iterations
|
3584
|
-
|
3585
|
-
def initialize(iterations: nil)
|
3586
|
-
@iterations = iterations
|
3587
|
-
end
|
3588
|
-
end
|
3589
2617
|
# 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`.
|
3590
2618
|
attr_accessor :billing_cycle_anchor
|
3591
2619
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
3592
2620
|
attr_accessor :billing_mode
|
3593
2621
|
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
3594
2622
|
attr_accessor :cancel_at
|
3595
|
-
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
2623
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
3596
2624
|
attr_accessor :cancel_at_period_end
|
3597
2625
|
# This simulates the subscription being canceled or expired immediately.
|
3598
2626
|
attr_accessor :cancel_now
|
@@ -3600,8 +2628,6 @@ module Stripe
|
|
3600
2628
|
attr_accessor :default_tax_rates
|
3601
2629
|
# A list of up to 20 subscription items, each with an attached price.
|
3602
2630
|
attr_accessor :items
|
3603
|
-
# The pre-billing to apply to the subscription as a preview.
|
3604
|
-
attr_accessor :prebilling
|
3605
2631
|
# 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`.
|
3606
2632
|
attr_accessor :proration_behavior
|
3607
2633
|
# 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'.
|
@@ -3621,7 +2647,6 @@ module Stripe
|
|
3621
2647
|
cancel_now: nil,
|
3622
2648
|
default_tax_rates: nil,
|
3623
2649
|
items: nil,
|
3624
|
-
prebilling: nil,
|
3625
2650
|
proration_behavior: nil,
|
3626
2651
|
proration_date: nil,
|
3627
2652
|
resume_at: nil,
|
@@ -3635,7 +2660,6 @@ module Stripe
|
|
3635
2660
|
@cancel_now = cancel_now
|
3636
2661
|
@default_tax_rates = default_tax_rates
|
3637
2662
|
@items = items
|
3638
|
-
@prebilling = prebilling
|
3639
2663
|
@proration_behavior = proration_behavior
|
3640
2664
|
@proration_date = proration_date
|
3641
2665
|
@resume_at = resume_at
|
@@ -3649,8 +2673,6 @@ module Stripe
|
|
3649
2673
|
attr_accessor :currency
|
3650
2674
|
# 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.
|
3651
2675
|
attr_accessor :customer
|
3652
|
-
# 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.
|
3653
|
-
attr_accessor :customer_account
|
3654
2676
|
# 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.
|
3655
2677
|
attr_accessor :customer_details
|
3656
2678
|
# 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.
|
@@ -3678,7 +2700,6 @@ module Stripe
|
|
3678
2700
|
automatic_tax: nil,
|
3679
2701
|
currency: nil,
|
3680
2702
|
customer: nil,
|
3681
|
-
customer_account: nil,
|
3682
2703
|
customer_details: nil,
|
3683
2704
|
discounts: nil,
|
3684
2705
|
expand: nil,
|
@@ -3694,7 +2715,6 @@ module Stripe
|
|
3694
2715
|
@automatic_tax = automatic_tax
|
3695
2716
|
@currency = currency
|
3696
2717
|
@customer = customer
|
3697
|
-
@customer_account = customer_account
|
3698
2718
|
@customer_details = customer_details
|
3699
2719
|
@discounts = discounts
|
3700
2720
|
@expand = expand
|