stripe 13.6.0.pre.beta.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +699 -1457
- data/OPENAPI_VERSION +1 -1
- data/README.md +29 -0
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +2 -0
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +0 -7
- data/lib/stripe/object_types.rb +0 -26
- data/lib/stripe/resources/account.rb +83 -614
- data/lib/stripe/resources/account_session.rb +1 -247
- data/lib/stripe/resources/apple_pay_domain.rb +0 -9
- data/lib/stripe/resources/application_fee.rb +1 -10
- data/lib/stripe/resources/balance.rb +0 -9
- data/lib/stripe/resources/balance_transaction.rb +2 -11
- data/lib/stripe/resources/bank_account.rb +1 -1
- data/lib/stripe/resources/billing/alert.rb +0 -9
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -48
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -9
- data/lib/stripe/resources/billing/credit_grant.rb +4 -13
- data/lib/stripe/resources/billing/meter.rb +1 -10
- data/lib/stripe/resources/billing_portal/configuration.rb +0 -9
- data/lib/stripe/resources/card.rb +2 -4
- data/lib/stripe/resources/charge.rb +35 -1457
- data/lib/stripe/resources/checkout/session.rb +100 -293
- data/lib/stripe/resources/climate/order.rb +0 -9
- data/lib/stripe/resources/climate/product.rb +0 -9
- data/lib/stripe/resources/climate/supplier.rb +0 -9
- data/lib/stripe/resources/confirmation_token.rb +74 -156
- data/lib/stripe/resources/country_spec.rb +0 -9
- data/lib/stripe/resources/coupon.rb +0 -9
- data/lib/stripe/resources/credit_note.rb +14 -35
- data/lib/stripe/resources/credit_note_line_item.rb +14 -12
- data/lib/stripe/resources/customer.rb +12 -28
- data/lib/stripe/resources/customer_balance_transaction.rb +3 -1
- data/lib/stripe/resources/dispute.rb +0 -9
- data/lib/stripe/resources/entitlements/active_entitlement.rb +0 -9
- data/lib/stripe/resources/entitlements/feature.rb +0 -9
- data/lib/stripe/resources/event.rb +0 -40
- data/lib/stripe/resources/exchange_rate.rb +0 -9
- data/lib/stripe/resources/file.rb +0 -9
- data/lib/stripe/resources/file_link.rb +0 -9
- data/lib/stripe/resources/financial_connections/account.rb +0 -23
- data/lib/stripe/resources/financial_connections/session.rb +1 -65
- data/lib/stripe/resources/financial_connections/transaction.rb +0 -9
- data/lib/stripe/resources/forwarding/request.rb +0 -9
- data/lib/stripe/resources/identity/verification_report.rb +0 -9
- data/lib/stripe/resources/identity/verification_session.rb +0 -9
- data/lib/stripe/resources/invoice.rb +225 -5120
- data/lib/stripe/resources/invoice_item.rb +65 -110
- data/lib/stripe/resources/invoice_line_item.rb +106 -89
- data/lib/stripe/resources/invoice_payment.rb +53 -4
- data/lib/stripe/resources/invoice_rendering_template.rb +0 -12
- data/lib/stripe/resources/issuing/authorization.rb +0 -9
- data/lib/stripe/resources/issuing/card.rb +0 -9
- data/lib/stripe/resources/issuing/cardholder.rb +1 -11
- data/lib/stripe/resources/issuing/dispute.rb +0 -9
- data/lib/stripe/resources/issuing/personalization_design.rb +0 -9
- data/lib/stripe/resources/issuing/physical_bundle.rb +0 -9
- data/lib/stripe/resources/issuing/token.rb +0 -9
- data/lib/stripe/resources/issuing/transaction.rb +0 -15
- data/lib/stripe/resources/line_item.rb +0 -28
- data/lib/stripe/resources/mandate.rb +6 -33
- data/lib/stripe/resources/payment_intent.rb +642 -4975
- data/lib/stripe/resources/payment_link.rb +84 -15
- data/lib/stripe/resources/payment_method.rb +74 -187
- data/lib/stripe/resources/payment_method_configuration.rb +87 -214
- data/lib/stripe/resources/payment_method_domain.rb +9 -18
- data/lib/stripe/resources/payout.rb +0 -9
- data/lib/stripe/resources/person.rb +9 -9
- data/lib/stripe/resources/plan.rb +0 -15
- data/lib/stripe/resources/price.rb +2 -47
- data/lib/stripe/resources/product.rb +0 -68
- data/lib/stripe/resources/promotion_code.rb +0 -9
- data/lib/stripe/resources/quote.rb +8 -2037
- data/lib/stripe/resources/radar/early_fraud_warning.rb +0 -9
- data/lib/stripe/resources/radar/value_list.rb +0 -9
- data/lib/stripe/resources/radar/value_list_item.rb +0 -9
- data/lib/stripe/resources/refund.rb +13 -18
- data/lib/stripe/resources/reporting/report_run.rb +0 -9
- data/lib/stripe/resources/reporting/report_type.rb +0 -9
- data/lib/stripe/resources/review.rb +2 -11
- data/lib/stripe/resources/setup_attempt.rb +11 -16
- data/lib/stripe/resources/setup_intent.rb +158 -540
- data/lib/stripe/resources/shipping_rate.rb +0 -9
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +0 -9
- data/lib/stripe/resources/source.rb +0 -41
- data/lib/stripe/resources/subscription.rb +14 -385
- data/lib/stripe/resources/subscription_item.rb +9 -134
- data/lib/stripe/resources/subscription_schedule.rb +14 -1135
- data/lib/stripe/resources/tax/calculation.rb +0 -9
- data/lib/stripe/resources/tax/registration.rb +1 -10
- data/lib/stripe/resources/tax/settings.rb +0 -9
- data/lib/stripe/resources/tax/transaction.rb +0 -9
- data/lib/stripe/resources/tax_code.rb +0 -9
- data/lib/stripe/resources/tax_id.rb +0 -9
- data/lib/stripe/resources/tax_rate.rb +0 -9
- data/lib/stripe/resources/terminal/configuration.rb +214 -14
- data/lib/stripe/resources/terminal/location.rb +0 -9
- data/lib/stripe/resources/terminal/reader.rb +0 -408
- data/lib/stripe/resources/test_helpers/test_clock.rb +0 -9
- data/lib/stripe/resources/token.rb +1 -10
- data/lib/stripe/resources/topup.rb +0 -9
- data/lib/stripe/resources/transfer.rb +0 -9
- data/lib/stripe/resources/treasury/credit_reversal.rb +0 -9
- data/lib/stripe/resources/treasury/debit_reversal.rb +0 -9
- data/lib/stripe/resources/treasury/financial_account.rb +4 -32
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/inbound_transfer.rb +0 -9
- data/lib/stripe/resources/treasury/outbound_payment.rb +0 -9
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -46
- data/lib/stripe/resources/treasury/received_credit.rb +1 -47
- data/lib/stripe/resources/treasury/received_debit.rb +1 -49
- data/lib/stripe/resources/treasury/transaction.rb +0 -9
- data/lib/stripe/resources/treasury/transaction_entry.rb +0 -9
- data/lib/stripe/resources/v2/event.rb +1 -0
- data/lib/stripe/resources/v2/event_destination.rb +1 -0
- data/lib/stripe/resources/webhook_endpoint.rb +0 -9
- data/lib/stripe/resources.rb +0 -25
- data/lib/stripe/services/account_external_account_service.rb +1 -1
- data/lib/stripe/services/account_service.rb +68 -509
- data/lib/stripe/services/account_session_service.rb +1 -217
- data/lib/stripe/services/balance_transaction_service.rb +1 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +2 -2
- data/lib/stripe/services/billing/credit_grant_service.rb +2 -2
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +1 -1335
- data/lib/stripe/services/checkout/session_service.rb +60 -168
- data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -4
- data/lib/stripe/services/credit_note_service.rb +0 -8
- data/lib/stripe/services/customer_service.rb +0 -16
- data/lib/stripe/services/financial_connections/account_service.rb +1 -3
- data/lib/stripe/services/financial_connections/session_service.rb +1 -30
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/invoice_item_service.rb +34 -88
- data/lib/stripe/services/invoice_line_item_service.rb +25 -41
- data/lib/stripe/services/invoice_payment_service.rb +33 -5
- data/lib/stripe/services/invoice_service.rb +210 -3147
- 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 +568 -4513
- data/lib/stripe/services/payment_link_service.rb +59 -6
- data/lib/stripe/services/payment_method_configuration_service.rb +62 -146
- data/lib/stripe/services/payment_method_domain_service.rb +6 -6
- data/lib/stripe/services/payment_method_service.rb +49 -119
- data/lib/stripe/services/plan_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +2 -25
- data/lib/stripe/services/product_service.rb +0 -38
- data/lib/stripe/services/quote_service.rb +9 -1716
- data/lib/stripe/services/setup_intent_service.rb +158 -492
- data/lib/stripe/services/subscription_item_service.rb +5 -111
- data/lib/stripe/services/subscription_schedule_service.rb +14 -1005
- data/lib/stripe/services/subscription_service.rb +13 -323
- data/lib/stripe/services/tax/registration_service.rb +1 -1
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +170 -4
- data/lib/stripe/services/terminal/reader_service.rb +0 -177
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +49 -87
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +3 -17
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -8
- data/lib/stripe/services/v2/core/event_destination_service.rb +1 -4
- data/lib/stripe/services/v2/core/event_service.rb +1 -4
- data/lib/stripe/services.rb +0 -27
- data/lib/stripe/stripe_client.rb +1 -0
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -45
- data/rbi/stripe/resources/account.rbi +1131 -1479
- data/rbi/stripe/resources/account_link.rbi +9 -9
- data/rbi/stripe/resources/account_session.rbi +118 -367
- data/rbi/stripe/resources/apple_pay_domain.rbi +8 -15
- data/rbi/stripe/resources/application_fee.rbi +15 -20
- data/rbi/stripe/resources/apps/secret.rbi +20 -20
- data/rbi/stripe/resources/balance.rbi +0 -7
- data/rbi/stripe/resources/balance_transaction.rbi +19 -24
- data/rbi/stripe/resources/bank_account.rbi +1 -1
- data/rbi/stripe/resources/billing/alert.rbi +23 -28
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -53
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +6 -13
- data/rbi/stripe/resources/billing/credit_grant.rbi +30 -37
- data/rbi/stripe/resources/billing/meter.rbi +19 -26
- data/rbi/stripe/resources/billing/meter_event.rbi +4 -4
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +5 -5
- data/rbi/stripe/resources/billing_portal/configuration.rbi +86 -81
- data/rbi/stripe/resources/billing_portal/session.rbi +31 -27
- data/rbi/stripe/resources/card.rbi +2 -5
- data/rbi/stripe/resources/charge.rbi +136 -1576
- data/rbi/stripe/resources/checkout/session.rbi +631 -748
- data/rbi/stripe/resources/climate/order.rbi +20 -25
- data/rbi/stripe/resources/climate/product.rbi +5 -12
- data/rbi/stripe/resources/climate/supplier.rbi +5 -12
- data/rbi/stripe/resources/confirmation_token.rbi +274 -268
- data/rbi/stripe/resources/country_spec.rbi +5 -12
- data/rbi/stripe/resources/coupon.rbi +34 -39
- data/rbi/stripe/resources/credit_note.rbi +134 -146
- data/rbi/stripe/resources/credit_note_line_item.rbi +20 -18
- data/rbi/stripe/resources/customer.rbi +172 -164
- data/rbi/stripe/resources/customer_balance_transaction.rbi +4 -1
- data/rbi/stripe/resources/customer_session.rbi +19 -15
- data/rbi/stripe/resources/dispute.rbi +92 -95
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +5 -12
- data/rbi/stripe/resources/entitlements/feature.rbi +15 -22
- data/rbi/stripe/resources/ephemeral_key.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +16 -60
- data/rbi/stripe/resources/exchange_rate.rbi +5 -12
- data/rbi/stripe/resources/file.rbi +20 -25
- data/rbi/stripe/resources/file_link.rbi +23 -28
- data/rbi/stripe/resources/financial_connections/account.rbi +25 -44
- data/rbi/stripe/resources/financial_connections/session.rbi +12 -75
- data/rbi/stripe/resources/financial_connections/transaction.rbi +16 -19
- data/rbi/stripe/resources/forwarding/request.rbi +21 -24
- data/rbi/stripe/resources/identity/verification_report.rbi +18 -21
- data/rbi/stripe/resources/identity/verification_session.rbi +60 -61
- data/rbi/stripe/resources/invoice.rbi +723 -5918
- data/rbi/stripe/resources/invoice_item.rbi +138 -177
- data/rbi/stripe/resources/invoice_line_item.rbi +199 -264
- data/rbi/stripe/resources/invoice_payment.rbi +51 -7
- data/rbi/stripe/resources/invoice_rendering_template.rbi +10 -20
- data/rbi/stripe/resources/issuing/authorization.rbi +216 -199
- data/rbi/stripe/resources/issuing/card.rbi +104 -101
- data/rbi/stripe/resources/issuing/cardholder.rbi +120 -108
- data/rbi/stripe/resources/issuing/dispute.rbi +164 -151
- data/rbi/stripe/resources/issuing/personalization_design.rbi +61 -56
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +7 -14
- data/rbi/stripe/resources/issuing/token.rbi +16 -21
- data/rbi/stripe/resources/issuing/transaction.rbi +180 -176
- data/rbi/stripe/resources/line_item.rbi +0 -36
- data/rbi/stripe/resources/mandate.rbi +8 -40
- data/rbi/stripe/resources/payment_intent.rbi +2252 -6482
- data/rbi/stripe/resources/payment_link.rbi +346 -211
- data/rbi/stripe/resources/payment_method.rbi +226 -330
- data/rbi/stripe/resources/payment_method_configuration.rbi +602 -685
- data/rbi/stripe/resources/payment_method_domain.rbi +26 -31
- data/rbi/stripe/resources/payout.rbi +43 -42
- data/rbi/stripe/resources/person.rbi +9 -9
- data/rbi/stripe/resources/plan.rbi +51 -63
- data/rbi/stripe/resources/price.rbi +114 -151
- data/rbi/stripe/resources/product.rbi +90 -152
- data/rbi/stripe/resources/promotion_code.rbi +42 -47
- data/rbi/stripe/resources/quote.rbi +168 -2231
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +17 -20
- data/rbi/stripe/resources/radar/value_list.rbi +24 -29
- data/rbi/stripe/resources/radar/value_list_item.rbi +18 -21
- data/rbi/stripe/resources/refund.rbi +52 -51
- data/rbi/stripe/resources/reporting/report_run.rbi +27 -30
- data/rbi/stripe/resources/reporting/report_type.rbi +2 -9
- data/rbi/stripe/resources/review.rbi +17 -22
- data/rbi/stripe/resources/setup_attempt.rbi +25 -32
- data/rbi/stripe/resources/setup_intent.rbi +900 -1102
- data/rbi/stripe/resources/shipping_rate.rbi +41 -46
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +5 -12
- data/rbi/stripe/resources/source.rbi +132 -179
- data/rbi/stripe/resources/subscription.rbi +363 -707
- data/rbi/stripe/resources/subscription_item.rbi +69 -177
- data/rbi/stripe/resources/subscription_schedule.rbi +289 -1447
- data/rbi/stripe/resources/tax/calculation.rbi +43 -48
- data/rbi/stripe/resources/tax/registration.rbi +217 -170
- data/rbi/stripe/resources/tax/settings.rbi +14 -21
- data/rbi/stripe/resources/tax/transaction.rbi +20 -25
- data/rbi/stripe/resources/tax_code.rbi +5 -12
- data/rbi/stripe/resources/tax_id.rbi +15 -22
- data/rbi/stripe/resources/tax_rate.rbi +34 -39
- data/rbi/stripe/resources/terminal/configuration.rbi +457 -212
- data/rbi/stripe/resources/terminal/connection_token.rbi +3 -3
- data/rbi/stripe/resources/terminal/location.rbi +28 -35
- data/rbi/stripe/resources/terminal/reader.rbi +71 -441
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +12 -17
- data/rbi/stripe/resources/token.rbi +288 -263
- data/rbi/stripe/resources/topup.rbi +35 -38
- data/rbi/stripe/resources/transfer.rbi +27 -32
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +10 -17
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +11 -18
- data/rbi/stripe/resources/treasury/financial_account.rbi +125 -130
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -3
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +22 -29
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +82 -79
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +44 -86
- data/rbi/stripe/resources/treasury/received_credit.rbi +18 -64
- data/rbi/stripe/resources/treasury/received_debit.rbi +17 -66
- data/rbi/stripe/resources/treasury/transaction.rbi +27 -28
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +25 -26
- data/rbi/stripe/resources/v2/amount.rbi +1 -1
- data/rbi/stripe/resources/v2/event.rbi +1 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +1 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +18 -25
- data/rbi/stripe/services/account_capability_service.rbi +7 -7
- data/rbi/stripe/services/account_external_account_service.rbi +52 -52
- data/rbi/stripe/services/account_link_service.rbi +9 -9
- data/rbi/stripe/services/account_login_link_service.rbi +2 -2
- data/rbi/stripe/services/account_person_service.rbi +221 -201
- data/rbi/stripe/services/account_service.rbi +1221 -1345
- data/rbi/stripe/services/account_session_service.rbi +115 -346
- data/rbi/stripe/services/apple_pay_domain_service.rbi +10 -10
- data/rbi/stripe/services/application_fee_refund_service.rbi +16 -14
- data/rbi/stripe/services/application_fee_service.rbi +18 -14
- data/rbi/stripe/services/apps/secret_service.rbi +20 -20
- data/rbi/stripe/services/balance_service.rbi +2 -2
- data/rbi/stripe/services/balance_transaction_service.rbi +22 -18
- data/rbi/stripe/services/billing/alert_service.rbi +23 -23
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +10 -10
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +8 -8
- data/rbi/stripe/services/billing/credit_grant_service.rbi +32 -30
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +7 -5
- data/rbi/stripe/services/billing/meter_event_service.rbi +4 -4
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +6 -6
- data/rbi/stripe/services/billing/meter_service.rbi +21 -21
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +90 -76
- data/rbi/stripe/services/billing_portal/session_service.rbi +29 -27
- data/rbi/stripe/services/charge_service.rbi +96 -1464
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +5 -5
- data/rbi/stripe/services/checkout/session_service.rbi +555 -591
- data/rbi/stripe/services/climate/order_service.rbi +22 -20
- data/rbi/stripe/services/climate/product_service.rbi +7 -7
- data/rbi/stripe/services/climate/supplier_service.rbi +7 -7
- data/rbi/stripe/services/confirmation_token_service.rbi +2 -2
- data/rbi/stripe/services/country_spec_service.rbi +7 -7
- data/rbi/stripe/services/coupon_service.rbi +40 -34
- data/rbi/stripe/services/credit_note_line_item_service.rbi +5 -5
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +35 -35
- data/rbi/stripe/services/credit_note_service.rbi +81 -85
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +15 -15
- data/rbi/stripe/services/customer_cash_balance_service.rbi +7 -7
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +7 -7
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +5 -5
- data/rbi/stripe/services/customer_payment_method_service.rbi +9 -9
- data/rbi/stripe/services/customer_payment_source_service.rbi +48 -44
- data/rbi/stripe/services/customer_service.rbi +143 -139
- data/rbi/stripe/services/customer_session_service.rbi +21 -15
- data/rbi/stripe/services/customer_tax_id_service.rbi +9 -9
- data/rbi/stripe/services/dispute_service.rbi +92 -90
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +7 -7
- data/rbi/stripe/services/entitlements/feature_service.rbi +17 -17
- data/rbi/stripe/services/ephemeral_key_service.rbi +8 -8
- data/rbi/stripe/services/event_service.rbi +18 -16
- data/rbi/stripe/services/exchange_rate_service.rbi +7 -7
- data/rbi/stripe/services/file_link_service.rbi +25 -23
- data/rbi/stripe/services/file_service.rbi +22 -20
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +5 -5
- data/rbi/stripe/services/financial_connections/account_service.rbi +22 -21
- data/rbi/stripe/services/financial_connections/session_service.rbi +16 -39
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +16 -14
- data/rbi/stripe/services/financial_connections_service.rbi +0 -1
- data/rbi/stripe/services/forwarding/request_service.rbi +21 -19
- data/rbi/stripe/services/identity/verification_report_service.rbi +18 -16
- data/rbi/stripe/services/identity/verification_session_service.rbi +62 -56
- data/rbi/stripe/services/invoice_item_service.rbi +99 -155
- data/rbi/stripe/services/invoice_line_item_service.rbi +71 -82
- data/rbi/stripe/services/invoice_payment_service.rbi +39 -12
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +13 -13
- data/rbi/stripe/services/invoice_service.rbi +679 -3799
- data/rbi/stripe/services/issuing/authorization_service.rbi +32 -26
- data/rbi/stripe/services/issuing/card_service.rbi +102 -86
- data/rbi/stripe/services/issuing/cardholder_service.rbi +122 -103
- data/rbi/stripe/services/issuing/dispute_service.rbi +152 -146
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +52 -42
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +9 -9
- data/rbi/stripe/services/issuing/token_service.rbi +20 -16
- data/rbi/stripe/services/issuing/transaction_service.rbi +25 -23
- data/rbi/stripe/services/issuing_service.rbi +0 -3
- data/rbi/stripe/services/mandate_service.rbi +2 -2
- data/rbi/stripe/services/payment_intent_service.rbi +2312 -6081
- data/rbi/stripe/services/payment_link_line_item_service.rbi +5 -5
- data/rbi/stripe/services/payment_link_service.rbi +303 -201
- data/rbi/stripe/services/payment_method_configuration_service.rbi +616 -620
- data/rbi/stripe/services/payment_method_domain_service.rbi +25 -23
- data/rbi/stripe/services/payment_method_service.rbi +192 -249
- data/rbi/stripe/services/payout_service.rbi +45 -37
- data/rbi/stripe/services/plan_service.rbi +53 -55
- data/rbi/stripe/services/price_service.rbi +124 -129
- data/rbi/stripe/services/product_feature_service.rbi +9 -9
- data/rbi/stripe/services/product_service.rbi +94 -122
- data/rbi/stripe/services/promotion_code_service.rbi +46 -42
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +5 -5
- data/rbi/stripe/services/quote_line_item_service.rbi +5 -5
- data/rbi/stripe/services/quote_service.rbi +159 -1863
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +17 -15
- data/rbi/stripe/services/radar/value_list_item_service.rbi +20 -16
- data/rbi/stripe/services/radar/value_list_service.rbi +28 -24
- data/rbi/stripe/services/refund_service.rbi +37 -33
- data/rbi/stripe/services/reporting/report_run_service.rbi +29 -25
- data/rbi/stripe/services/reporting/report_type_service.rbi +4 -4
- data/rbi/stripe/services/review_service.rbi +17 -15
- data/rbi/stripe/services/setup_attempt_service.rbi +13 -11
- data/rbi/stripe/services/setup_intent_service.rbi +1028 -1062
- data/rbi/stripe/services/shipping_rate_service.rbi +47 -41
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +7 -7
- data/rbi/stripe/services/source_service.rbi +149 -133
- data/rbi/stripe/services/source_transaction_service.rbi +5 -5
- data/rbi/stripe/services/subscription_item_service.rbi +61 -159
- data/rbi/stripe/services/subscription_schedule_service.rbi +289 -1305
- data/rbi/stripe/services/subscription_service.rbi +366 -640
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +5 -5
- data/rbi/stripe/services/tax/calculation_service.rbi +40 -38
- data/rbi/stripe/services/tax/registration_service.rbi +337 -165
- data/rbi/stripe/services/tax/settings_service.rbi +16 -16
- data/rbi/stripe/services/tax/transaction_line_item_service.rbi +5 -5
- data/rbi/stripe/services/tax/transaction_service.rbi +19 -15
- data/rbi/stripe/services/tax_code_service.rbi +7 -7
- data/rbi/stripe/services/tax_id_service.rbi +17 -17
- data/rbi/stripe/services/tax_rate_service.rbi +36 -34
- data/rbi/stripe/services/tax_service.rbi +0 -2
- data/rbi/stripe/services/terminal/configuration_service.rbi +464 -204
- data/rbi/stripe/services/terminal/connection_token_service.rbi +3 -3
- data/rbi/stripe/services/terminal/location_service.rbi +30 -30
- data/rbi/stripe/services/terminal/reader_service.rbi +57 -226
- data/rbi/stripe/services/terminal_service.rbi +0 -1
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +157 -198
- data/rbi/stripe/services/test_helpers/customer_service.rbi +3 -3
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +180 -168
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +10 -10
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +11 -9
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +151 -145
- data/rbi/stripe/services/test_helpers/refund_service.rbi +2 -2
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +10 -39
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +14 -12
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +9 -9
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +20 -18
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +20 -18
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +11 -38
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +11 -38
- data/rbi/stripe/services/token_service.rbi +292 -258
- data/rbi/stripe/services/topup_service.rbi +37 -33
- data/rbi/stripe/services/transfer_reversal_service.rbi +18 -16
- data/rbi/stripe/services/transfer_service.rbi +29 -27
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +12 -12
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +13 -13
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +23 -26
- data/rbi/stripe/services/treasury/financial_account_service.rbi +92 -96
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +15 -15
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +60 -56
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +24 -49
- data/rbi/stripe/services/treasury/received_credit_service.rbi +11 -9
- data/rbi/stripe/services/treasury/received_debit_service.rbi +8 -8
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +25 -21
- data/rbi/stripe/services/treasury/transaction_service.rbi +31 -23
- data/rbi/stripe/services/v1_services.rbi +1 -7
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +3 -3
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +3 -3
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +21 -24
- data/rbi/stripe/services/v2/core/event_service.rbi +3 -6
- data/rbi/stripe/services/webhook_endpoint_service.rbi +20 -20
- metadata +4 -109
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -132
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- data/lib/stripe/resources/capital/financing_offer.rb +0 -188
- data/lib/stripe/resources/capital/financing_summary.rb +0 -64
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -123
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -99
- data/lib/stripe/resources/gift_cards/card.rb +0 -217
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -281
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -611
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -84
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -95
- data/lib/stripe/resources/issuing/settlement.rb +0 -49
- data/lib/stripe/resources/margin.rb +0 -124
- data/lib/stripe/resources/order.rb +0 -2868
- data/lib/stripe/resources/payment_attempt_record.rb +0 -184
- data/lib/stripe/resources/payment_record.rb +0 -715
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -652
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -362
- data/lib/stripe/resources/tax/association.rb +0 -89
- data/lib/stripe/resources/tax/form.rb +0 -220
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -40
- data/lib/stripe/resources/usage_record.rb +0 -30
- data/lib/stripe/resources/usage_record_summary.rb +0 -33
- data/lib/stripe/services/account_notice_service.rb +0 -101
- 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/financial_connections/account_inferred_balance_service.rb +0 -37
- data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
- data/lib/stripe/services/gift_cards/card_service.rb +0 -170
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
- data/lib/stripe/services/gift_cards_service.rb +0 -14
- data/lib/stripe/services/invoice_upcoming_lines_service.rb +0 -1881
- 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_line_item_service.rb +0 -35
- data/lib/stripe/services/order_service.rb +0 -2268
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/quote_line_service.rb +0 -35
- data/lib/stripe/services/quote_preview_invoice_service.rb +0 -35
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/subscription_item_usage_record_service.rb +0 -41
- data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +0 -37
- 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/rbi/stripe/resources/account_notice.rbi +0 -139
- data/rbi/stripe/resources/billing/meter_error_report.rbi +0 -71
- data/rbi/stripe/resources/capital/financing_offer.rbi +0 -190
- data/rbi/stripe/resources/capital/financing_summary.rbi +0 -74
- data/rbi/stripe/resources/capital/financing_transaction.rbi +0 -130
- data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +0 -27
- data/rbi/stripe/resources/financial_connections/institution.rbi +0 -99
- data/rbi/stripe/resources/gift_cards/card.rbi +0 -206
- data/rbi/stripe/resources/gift_cards/transaction.rbi +0 -257
- data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +0 -622
- data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +0 -83
- data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +0 -90
- data/rbi/stripe/resources/issuing/settlement.rbi +0 -62
- data/rbi/stripe/resources/margin.rbi +0 -127
- data/rbi/stripe/resources/order.rbi +0 -3036
- data/rbi/stripe/resources/payment_attempt_record.rbi +0 -215
- data/rbi/stripe/resources/payment_record.rbi +0 -722
- data/rbi/stripe/resources/quote_line.rbi +0 -350
- data/rbi/stripe/resources/quote_preview_invoice.rbi +0 -850
- data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +0 -474
- data/rbi/stripe/resources/tax/association.rbi +0 -94
- data/rbi/stripe/resources/tax/form.rbi +0 -224
- data/rbi/stripe/resources/terminal/reader_collected_data.rbi +0 -41
- data/rbi/stripe/resources/usage_record.rbi +0 -32
- data/rbi/stripe/resources/usage_record_summary.rbi +0 -38
- data/rbi/stripe/services/account_notice_service.rbi +0 -90
- data/rbi/stripe/services/capital/financing_offer_service.rbi +0 -95
- data/rbi/stripe/services/capital/financing_summary_service.rbi +0 -22
- data/rbi/stripe/services/capital/financing_transaction_service.rbi +0 -68
- data/rbi/stripe/services/capital_service.rbi +0 -11
- data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +0 -33
- data/rbi/stripe/services/financial_connections/institution_service.rbi +0 -46
- data/rbi/stripe/services/gift_cards/card_service.rbi +0 -142
- data/rbi/stripe/services/gift_cards/transaction_service.rbi +0 -174
- data/rbi/stripe/services/gift_cards_service.rbi +0 -10
- data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +0 -2023
- data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +0 -498
- data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +0 -55
- data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +0 -73
- data/rbi/stripe/services/margin_service.rbi +0 -104
- data/rbi/stripe/services/order_line_item_service.rbi +0 -31
- data/rbi/stripe/services/order_service.rbi +0 -2320
- data/rbi/stripe/services/payment_attempt_record_service.rbi +0 -36
- data/rbi/stripe/services/payment_record_service.rbi +0 -521
- data/rbi/stripe/services/quote_line_service.rbi +0 -31
- data/rbi/stripe/services/quote_preview_invoice_service.rbi +0 -31
- data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +0 -31
- data/rbi/stripe/services/subscription_item_usage_record_service.rbi +0 -37
- data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +0 -33
- data/rbi/stripe/services/tax/association_service.rbi +0 -25
- data/rbi/stripe/services/tax/form_service.rbi +0 -85
- data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +0 -22
@@ -38,13 +38,6 @@ module Stripe
|
|
38
38
|
attr_reader :liability
|
39
39
|
end
|
40
40
|
|
41
|
-
class BillingThresholds < Stripe::StripeObject
|
42
|
-
# Monetary threshold that triggers the subscription to create an invoice
|
43
|
-
attr_reader :amount_gte
|
44
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
45
|
-
attr_reader :reset_billing_cycle_anchor
|
46
|
-
end
|
47
|
-
|
48
41
|
class InvoiceSettings < Stripe::StripeObject
|
49
42
|
class Issuer < Stripe::StripeObject
|
50
43
|
# The connected account being referenced when `type` is `account`.
|
@@ -72,8 +65,6 @@ module Stripe
|
|
72
65
|
attr_reader :automatic_tax
|
73
66
|
# Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
74
67
|
attr_reader :billing_cycle_anchor
|
75
|
-
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
76
|
-
attr_reader :billing_thresholds
|
77
68
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
78
69
|
attr_reader :collection_method
|
79
70
|
# ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -88,36 +79,13 @@ module Stripe
|
|
88
79
|
attr_reader :transfer_data
|
89
80
|
end
|
90
81
|
|
91
|
-
class LastPriceMigrationError < Stripe::StripeObject
|
92
|
-
class FailedTransition < Stripe::StripeObject
|
93
|
-
# The original price to be migrated.
|
94
|
-
attr_reader :source_price
|
95
|
-
# The intended resulting price of the migration.
|
96
|
-
attr_reader :target_price
|
97
|
-
end
|
98
|
-
# The time at which the price migration encountered an error.
|
99
|
-
attr_reader :errored_at
|
100
|
-
# The involved price pairs in each failed transition.
|
101
|
-
attr_reader :failed_transitions
|
102
|
-
# The type of error encountered by the price migration.
|
103
|
-
attr_reader :type
|
104
|
-
end
|
105
|
-
|
106
82
|
class Phase < Stripe::StripeObject
|
107
83
|
class AddInvoiceItem < Stripe::StripeObject
|
108
84
|
class Discount < Stripe::StripeObject
|
109
|
-
class DiscountEnd < Stripe::StripeObject
|
110
|
-
# The discount end timestamp.
|
111
|
-
attr_reader :timestamp
|
112
|
-
# The discount end type.
|
113
|
-
attr_reader :type
|
114
|
-
end
|
115
85
|
# ID of the coupon to create a new discount for.
|
116
86
|
attr_reader :coupon
|
117
87
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
118
88
|
attr_reader :discount
|
119
|
-
# Details to determine how long the discount should be applied for.
|
120
|
-
attr_reader :discount_end
|
121
89
|
# ID of the promotion code to create a new discount for.
|
122
90
|
attr_reader :promotion_code
|
123
91
|
end
|
@@ -146,26 +114,11 @@ module Stripe
|
|
146
114
|
attr_reader :liability
|
147
115
|
end
|
148
116
|
|
149
|
-
class BillingThresholds < Stripe::StripeObject
|
150
|
-
# Monetary threshold that triggers the subscription to create an invoice
|
151
|
-
attr_reader :amount_gte
|
152
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
153
|
-
attr_reader :reset_billing_cycle_anchor
|
154
|
-
end
|
155
|
-
|
156
117
|
class Discount < Stripe::StripeObject
|
157
|
-
class DiscountEnd < Stripe::StripeObject
|
158
|
-
# The discount end timestamp.
|
159
|
-
attr_reader :timestamp
|
160
|
-
# The discount end type.
|
161
|
-
attr_reader :type
|
162
|
-
end
|
163
118
|
# ID of the coupon to create a new discount for.
|
164
119
|
attr_reader :coupon
|
165
120
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
166
121
|
attr_reader :discount
|
167
|
-
# Details to determine how long the discount should be applied for.
|
168
|
-
attr_reader :discount_end
|
169
122
|
# ID of the promotion code to create a new discount for.
|
170
123
|
attr_reader :promotion_code
|
171
124
|
end
|
@@ -186,36 +139,14 @@ module Stripe
|
|
186
139
|
end
|
187
140
|
|
188
141
|
class Item < Stripe::StripeObject
|
189
|
-
class BillingThresholds < Stripe::StripeObject
|
190
|
-
# Usage threshold that triggers the subscription to create an invoice
|
191
|
-
attr_reader :usage_gte
|
192
|
-
end
|
193
|
-
|
194
142
|
class Discount < Stripe::StripeObject
|
195
|
-
class DiscountEnd < Stripe::StripeObject
|
196
|
-
# The discount end timestamp.
|
197
|
-
attr_reader :timestamp
|
198
|
-
# The discount end type.
|
199
|
-
attr_reader :type
|
200
|
-
end
|
201
143
|
# ID of the coupon to create a new discount for.
|
202
144
|
attr_reader :coupon
|
203
145
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
204
146
|
attr_reader :discount
|
205
|
-
# Details to determine how long the discount should be applied for.
|
206
|
-
attr_reader :discount_end
|
207
147
|
# ID of the promotion code to create a new discount for.
|
208
148
|
attr_reader :promotion_code
|
209
149
|
end
|
210
|
-
|
211
|
-
class Trial < Stripe::StripeObject
|
212
|
-
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
213
|
-
attr_reader :converts_to
|
214
|
-
# Determines the type of trial for this item.
|
215
|
-
attr_reader :type
|
216
|
-
end
|
217
|
-
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
218
|
-
attr_reader :billing_thresholds
|
219
150
|
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
220
151
|
attr_reader :discounts
|
221
152
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
|
@@ -228,13 +159,6 @@ module Stripe
|
|
228
159
|
attr_reader :quantity
|
229
160
|
# The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
|
230
161
|
attr_reader :tax_rates
|
231
|
-
# Options that configure the trial on the subscription item.
|
232
|
-
attr_reader :trial
|
233
|
-
end
|
234
|
-
|
235
|
-
class PauseCollection < Stripe::StripeObject
|
236
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
237
|
-
attr_reader :behavior
|
238
162
|
end
|
239
163
|
|
240
164
|
class TransferData < Stripe::StripeObject
|
@@ -243,15 +167,6 @@ module Stripe
|
|
243
167
|
# The account where funds from the payment will be transferred to upon payment success.
|
244
168
|
attr_reader :destination
|
245
169
|
end
|
246
|
-
|
247
|
-
class TrialSettings < Stripe::StripeObject
|
248
|
-
class EndBehavior < Stripe::StripeObject
|
249
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
250
|
-
attr_reader :prorate_up_front
|
251
|
-
end
|
252
|
-
# Defines how the subscription should behave when a trial ends.
|
253
|
-
attr_reader :end_behavior
|
254
|
-
end
|
255
170
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
|
256
171
|
attr_reader :add_invoice_items
|
257
172
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule.
|
@@ -260,12 +175,8 @@ module Stripe
|
|
260
175
|
attr_reader :automatic_tax
|
261
176
|
# Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
262
177
|
attr_reader :billing_cycle_anchor
|
263
|
-
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
264
|
-
attr_reader :billing_thresholds
|
265
178
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
266
179
|
attr_reader :collection_method
|
267
|
-
# ID of the coupon to use during this phase of the subscription schedule.
|
268
|
-
attr_reader :coupon
|
269
180
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
270
181
|
attr_reader :currency
|
271
182
|
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -286,31 +197,14 @@ module Stripe
|
|
286
197
|
attr_reader :metadata
|
287
198
|
# The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
|
288
199
|
attr_reader :on_behalf_of
|
289
|
-
# 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).
|
290
|
-
attr_reader :pause_collection
|
291
200
|
# If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
|
292
201
|
attr_reader :proration_behavior
|
293
202
|
# The start of this phase of the subscription schedule.
|
294
203
|
attr_reader :start_date
|
295
204
|
# The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
296
205
|
attr_reader :transfer_data
|
297
|
-
# Specify behavior of the trial when crossing schedule phase boundaries
|
298
|
-
attr_reader :trial_continuation
|
299
206
|
# When the trial ends within the phase.
|
300
207
|
attr_reader :trial_end
|
301
|
-
# Settings related to any trials on the subscription during this phase.
|
302
|
-
attr_reader :trial_settings
|
303
|
-
end
|
304
|
-
|
305
|
-
class Prebilling < Stripe::StripeObject
|
306
|
-
# ID of the prebilling invoice.
|
307
|
-
attr_reader :invoice
|
308
|
-
# The end of the last period for which the invoice pre-bills.
|
309
|
-
attr_reader :period_end
|
310
|
-
# The start of the first period for which the invoice pre-bills.
|
311
|
-
attr_reader :period_start
|
312
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
313
|
-
attr_reader :update_behavior
|
314
208
|
end
|
315
209
|
|
316
210
|
class ListParams < Stripe::RequestParams
|
@@ -456,18 +350,6 @@ module Stripe
|
|
456
350
|
end
|
457
351
|
end
|
458
352
|
|
459
|
-
class BillingThresholds < Stripe::RequestParams
|
460
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
461
|
-
attr_accessor :amount_gte
|
462
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
463
|
-
attr_accessor :reset_billing_cycle_anchor
|
464
|
-
|
465
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
466
|
-
@amount_gte = amount_gte
|
467
|
-
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
468
|
-
end
|
469
|
-
end
|
470
|
-
|
471
353
|
class InvoiceSettings < Stripe::RequestParams
|
472
354
|
class Issuer < Stripe::RequestParams
|
473
355
|
# The connected account being referenced when `type` is `account`.
|
@@ -511,8 +393,6 @@ module Stripe
|
|
511
393
|
attr_accessor :automatic_tax
|
512
394
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
513
395
|
attr_accessor :billing_cycle_anchor
|
514
|
-
# 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.
|
515
|
-
attr_accessor :billing_thresholds
|
516
396
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
517
397
|
attr_accessor :collection_method
|
518
398
|
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -530,7 +410,6 @@ module Stripe
|
|
530
410
|
application_fee_percent: nil,
|
531
411
|
automatic_tax: nil,
|
532
412
|
billing_cycle_anchor: nil,
|
533
|
-
billing_thresholds: nil,
|
534
413
|
collection_method: nil,
|
535
414
|
default_payment_method: nil,
|
536
415
|
description: nil,
|
@@ -541,7 +420,6 @@ module Stripe
|
|
541
420
|
@application_fee_percent = application_fee_percent
|
542
421
|
@automatic_tax = automatic_tax
|
543
422
|
@billing_cycle_anchor = billing_cycle_anchor
|
544
|
-
@billing_thresholds = billing_thresholds
|
545
423
|
@collection_method = collection_method
|
546
424
|
@default_payment_method = default_payment_method
|
547
425
|
@description = description
|
@@ -554,44 +432,16 @@ module Stripe
|
|
554
432
|
class Phase < Stripe::RequestParams
|
555
433
|
class AddInvoiceItem < Stripe::RequestParams
|
556
434
|
class Discount < Stripe::RequestParams
|
557
|
-
class DiscountEnd < Stripe::RequestParams
|
558
|
-
class Duration < Stripe::RequestParams
|
559
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
560
|
-
attr_accessor :interval
|
561
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
562
|
-
attr_accessor :interval_count
|
563
|
-
|
564
|
-
def initialize(interval: nil, interval_count: nil)
|
565
|
-
@interval = interval
|
566
|
-
@interval_count = interval_count
|
567
|
-
end
|
568
|
-
end
|
569
|
-
# Time span for the redeemed discount.
|
570
|
-
attr_accessor :duration
|
571
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
572
|
-
attr_accessor :timestamp
|
573
|
-
# The type of calculation made to determine when the discount ends.
|
574
|
-
attr_accessor :type
|
575
|
-
|
576
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
577
|
-
@duration = duration
|
578
|
-
@timestamp = timestamp
|
579
|
-
@type = type
|
580
|
-
end
|
581
|
-
end
|
582
435
|
# ID of the coupon to create a new discount for.
|
583
436
|
attr_accessor :coupon
|
584
437
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
585
438
|
attr_accessor :discount
|
586
|
-
# Details to determine how long the discount should be applied for.
|
587
|
-
attr_accessor :discount_end
|
588
439
|
# ID of the promotion code to create a new discount for.
|
589
440
|
attr_accessor :promotion_code
|
590
441
|
|
591
|
-
def initialize(coupon: nil, discount: nil,
|
442
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
592
443
|
@coupon = coupon
|
593
444
|
@discount = discount
|
594
|
-
@discount_end = discount_end
|
595
445
|
@promotion_code = promotion_code
|
596
446
|
end
|
597
447
|
end
|
@@ -599,7 +449,7 @@ module Stripe
|
|
599
449
|
class PriceData < Stripe::RequestParams
|
600
450
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
601
451
|
attr_accessor :currency
|
602
|
-
# The ID of the
|
452
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
603
453
|
attr_accessor :product
|
604
454
|
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
605
455
|
attr_accessor :tax_behavior
|
@@ -665,57 +515,17 @@ module Stripe
|
|
665
515
|
end
|
666
516
|
end
|
667
517
|
|
668
|
-
class BillingThresholds < Stripe::RequestParams
|
669
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
670
|
-
attr_accessor :amount_gte
|
671
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
672
|
-
attr_accessor :reset_billing_cycle_anchor
|
673
|
-
|
674
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
675
|
-
@amount_gte = amount_gte
|
676
|
-
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
677
|
-
end
|
678
|
-
end
|
679
|
-
|
680
518
|
class Discount < Stripe::RequestParams
|
681
|
-
class DiscountEnd < Stripe::RequestParams
|
682
|
-
class Duration < Stripe::RequestParams
|
683
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
684
|
-
attr_accessor :interval
|
685
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
686
|
-
attr_accessor :interval_count
|
687
|
-
|
688
|
-
def initialize(interval: nil, interval_count: nil)
|
689
|
-
@interval = interval
|
690
|
-
@interval_count = interval_count
|
691
|
-
end
|
692
|
-
end
|
693
|
-
# Time span for the redeemed discount.
|
694
|
-
attr_accessor :duration
|
695
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
696
|
-
attr_accessor :timestamp
|
697
|
-
# The type of calculation made to determine when the discount ends.
|
698
|
-
attr_accessor :type
|
699
|
-
|
700
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
701
|
-
@duration = duration
|
702
|
-
@timestamp = timestamp
|
703
|
-
@type = type
|
704
|
-
end
|
705
|
-
end
|
706
519
|
# ID of the coupon to create a new discount for.
|
707
520
|
attr_accessor :coupon
|
708
521
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
709
522
|
attr_accessor :discount
|
710
|
-
# Details to determine how long the discount should be applied for.
|
711
|
-
attr_accessor :discount_end
|
712
523
|
# ID of the promotion code to create a new discount for.
|
713
524
|
attr_accessor :promotion_code
|
714
525
|
|
715
|
-
def initialize(coupon: nil, discount: nil,
|
526
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
716
527
|
@coupon = coupon
|
717
528
|
@discount = discount
|
718
|
-
@discount_end = discount_end
|
719
529
|
@promotion_code = promotion_code
|
720
530
|
end
|
721
531
|
end
|
@@ -747,54 +557,17 @@ module Stripe
|
|
747
557
|
end
|
748
558
|
|
749
559
|
class Item < Stripe::RequestParams
|
750
|
-
class BillingThresholds < Stripe::RequestParams
|
751
|
-
# 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))
|
752
|
-
attr_accessor :usage_gte
|
753
|
-
|
754
|
-
def initialize(usage_gte: nil)
|
755
|
-
@usage_gte = usage_gte
|
756
|
-
end
|
757
|
-
end
|
758
|
-
|
759
560
|
class Discount < Stripe::RequestParams
|
760
|
-
class DiscountEnd < Stripe::RequestParams
|
761
|
-
class Duration < Stripe::RequestParams
|
762
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
763
|
-
attr_accessor :interval
|
764
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
765
|
-
attr_accessor :interval_count
|
766
|
-
|
767
|
-
def initialize(interval: nil, interval_count: nil)
|
768
|
-
@interval = interval
|
769
|
-
@interval_count = interval_count
|
770
|
-
end
|
771
|
-
end
|
772
|
-
# Time span for the redeemed discount.
|
773
|
-
attr_accessor :duration
|
774
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
775
|
-
attr_accessor :timestamp
|
776
|
-
# The type of calculation made to determine when the discount ends.
|
777
|
-
attr_accessor :type
|
778
|
-
|
779
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
780
|
-
@duration = duration
|
781
|
-
@timestamp = timestamp
|
782
|
-
@type = type
|
783
|
-
end
|
784
|
-
end
|
785
561
|
# ID of the coupon to create a new discount for.
|
786
562
|
attr_accessor :coupon
|
787
563
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
788
564
|
attr_accessor :discount
|
789
|
-
# Details to determine how long the discount should be applied for.
|
790
|
-
attr_accessor :discount_end
|
791
565
|
# ID of the promotion code to create a new discount for.
|
792
566
|
attr_accessor :promotion_code
|
793
567
|
|
794
|
-
def initialize(coupon: nil, discount: nil,
|
568
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
795
569
|
@coupon = coupon
|
796
570
|
@discount = discount
|
797
|
-
@discount_end = discount_end
|
798
571
|
@promotion_code = promotion_code
|
799
572
|
end
|
800
573
|
end
|
@@ -813,7 +586,7 @@ module Stripe
|
|
813
586
|
end
|
814
587
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
815
588
|
attr_accessor :currency
|
816
|
-
# The ID of the
|
589
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
817
590
|
attr_accessor :product
|
818
591
|
# The recurring components of a price such as `interval` and `interval_count`.
|
819
592
|
attr_accessor :recurring
|
@@ -840,20 +613,6 @@ module Stripe
|
|
840
613
|
@unit_amount_decimal = unit_amount_decimal
|
841
614
|
end
|
842
615
|
end
|
843
|
-
|
844
|
-
class Trial < Stripe::RequestParams
|
845
|
-
# 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.
|
846
|
-
attr_accessor :converts_to
|
847
|
-
# Determines the type of trial for this item.
|
848
|
-
attr_accessor :type
|
849
|
-
|
850
|
-
def initialize(converts_to: nil, type: nil)
|
851
|
-
@converts_to = converts_to
|
852
|
-
@type = type
|
853
|
-
end
|
854
|
-
end
|
855
|
-
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
|
856
|
-
attr_accessor :billing_thresholds
|
857
616
|
# The coupons to redeem into discounts for the subscription item.
|
858
617
|
attr_accessor :discounts
|
859
618
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
@@ -868,21 +627,16 @@ module Stripe
|
|
868
627
|
attr_accessor :quantity
|
869
628
|
# 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.
|
870
629
|
attr_accessor :tax_rates
|
871
|
-
# Options that configure the trial on the subscription item.
|
872
|
-
attr_accessor :trial
|
873
630
|
|
874
631
|
def initialize(
|
875
|
-
billing_thresholds: nil,
|
876
632
|
discounts: nil,
|
877
633
|
metadata: nil,
|
878
634
|
plan: nil,
|
879
635
|
price: nil,
|
880
636
|
price_data: nil,
|
881
637
|
quantity: nil,
|
882
|
-
tax_rates: nil
|
883
|
-
trial: nil
|
638
|
+
tax_rates: nil
|
884
639
|
)
|
885
|
-
@billing_thresholds = billing_thresholds
|
886
640
|
@discounts = discounts
|
887
641
|
@metadata = metadata
|
888
642
|
@plan = plan
|
@@ -890,16 +644,6 @@ module Stripe
|
|
890
644
|
@price_data = price_data
|
891
645
|
@quantity = quantity
|
892
646
|
@tax_rates = tax_rates
|
893
|
-
@trial = trial
|
894
|
-
end
|
895
|
-
end
|
896
|
-
|
897
|
-
class PauseCollection < Stripe::RequestParams
|
898
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
899
|
-
attr_accessor :behavior
|
900
|
-
|
901
|
-
def initialize(behavior: nil)
|
902
|
-
@behavior = behavior
|
903
647
|
end
|
904
648
|
end
|
905
649
|
|
@@ -914,23 +658,6 @@ module Stripe
|
|
914
658
|
@destination = destination
|
915
659
|
end
|
916
660
|
end
|
917
|
-
|
918
|
-
class TrialSettings < Stripe::RequestParams
|
919
|
-
class EndBehavior < Stripe::RequestParams
|
920
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
921
|
-
attr_accessor :prorate_up_front
|
922
|
-
|
923
|
-
def initialize(prorate_up_front: nil)
|
924
|
-
@prorate_up_front = prorate_up_front
|
925
|
-
end
|
926
|
-
end
|
927
|
-
# Defines how the subscription should behave when a trial ends.
|
928
|
-
attr_accessor :end_behavior
|
929
|
-
|
930
|
-
def initialize(end_behavior: nil)
|
931
|
-
@end_behavior = end_behavior
|
932
|
-
end
|
933
|
-
end
|
934
661
|
# 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.
|
935
662
|
attr_accessor :add_invoice_items
|
936
663
|
# 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).
|
@@ -939,12 +666,8 @@ module Stripe
|
|
939
666
|
attr_accessor :automatic_tax
|
940
667
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
941
668
|
attr_accessor :billing_cycle_anchor
|
942
|
-
# 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.
|
943
|
-
attr_accessor :billing_thresholds
|
944
669
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
945
670
|
attr_accessor :collection_method
|
946
|
-
# The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
947
|
-
attr_accessor :coupon
|
948
671
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
949
672
|
attr_accessor :currency
|
950
673
|
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -967,29 +690,21 @@ module Stripe
|
|
967
690
|
attr_accessor :metadata
|
968
691
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
969
692
|
attr_accessor :on_behalf_of
|
970
|
-
# 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).
|
971
|
-
attr_accessor :pause_collection
|
972
693
|
# Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
|
973
694
|
attr_accessor :proration_behavior
|
974
695
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
975
696
|
attr_accessor :transfer_data
|
976
697
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
977
698
|
attr_accessor :trial
|
978
|
-
# Specify trial behavior when crossing phase boundaries
|
979
|
-
attr_accessor :trial_continuation
|
980
699
|
# 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`
|
981
700
|
attr_accessor :trial_end
|
982
|
-
# Settings related to subscription trials.
|
983
|
-
attr_accessor :trial_settings
|
984
701
|
|
985
702
|
def initialize(
|
986
703
|
add_invoice_items: nil,
|
987
704
|
application_fee_percent: nil,
|
988
705
|
automatic_tax: nil,
|
989
706
|
billing_cycle_anchor: nil,
|
990
|
-
billing_thresholds: nil,
|
991
707
|
collection_method: nil,
|
992
|
-
coupon: nil,
|
993
708
|
currency: nil,
|
994
709
|
default_payment_method: nil,
|
995
710
|
default_tax_rates: nil,
|
@@ -1001,21 +716,16 @@ module Stripe
|
|
1001
716
|
iterations: nil,
|
1002
717
|
metadata: nil,
|
1003
718
|
on_behalf_of: nil,
|
1004
|
-
pause_collection: nil,
|
1005
719
|
proration_behavior: nil,
|
1006
720
|
transfer_data: nil,
|
1007
721
|
trial: nil,
|
1008
|
-
|
1009
|
-
trial_end: nil,
|
1010
|
-
trial_settings: nil
|
722
|
+
trial_end: nil
|
1011
723
|
)
|
1012
724
|
@add_invoice_items = add_invoice_items
|
1013
725
|
@application_fee_percent = application_fee_percent
|
1014
726
|
@automatic_tax = automatic_tax
|
1015
727
|
@billing_cycle_anchor = billing_cycle_anchor
|
1016
|
-
@billing_thresholds = billing_thresholds
|
1017
728
|
@collection_method = collection_method
|
1018
|
-
@coupon = coupon
|
1019
729
|
@currency = currency
|
1020
730
|
@default_payment_method = default_payment_method
|
1021
731
|
@default_tax_rates = default_tax_rates
|
@@ -1027,29 +737,12 @@ module Stripe
|
|
1027
737
|
@iterations = iterations
|
1028
738
|
@metadata = metadata
|
1029
739
|
@on_behalf_of = on_behalf_of
|
1030
|
-
@pause_collection = pause_collection
|
1031
740
|
@proration_behavior = proration_behavior
|
1032
741
|
@transfer_data = transfer_data
|
1033
742
|
@trial = trial
|
1034
|
-
@trial_continuation = trial_continuation
|
1035
743
|
@trial_end = trial_end
|
1036
|
-
@trial_settings = trial_settings
|
1037
|
-
end
|
1038
|
-
end
|
1039
|
-
|
1040
|
-
class Prebilling < Stripe::RequestParams
|
1041
|
-
# This is used to determine the number of billing cycles to prebill.
|
1042
|
-
attr_accessor :iterations
|
1043
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1044
|
-
attr_accessor :update_behavior
|
1045
|
-
|
1046
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1047
|
-
@iterations = iterations
|
1048
|
-
@update_behavior = update_behavior
|
1049
744
|
end
|
1050
745
|
end
|
1051
|
-
# 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.
|
1052
|
-
attr_accessor :billing_behavior
|
1053
746
|
# The identifier of the customer to create the subscription schedule for.
|
1054
747
|
attr_accessor :customer
|
1055
748
|
# Object representing the subscription schedule's default settings.
|
@@ -1064,13 +757,10 @@ module Stripe
|
|
1064
757
|
attr_accessor :metadata
|
1065
758
|
# 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.
|
1066
759
|
attr_accessor :phases
|
1067
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1068
|
-
attr_accessor :prebilling
|
1069
760
|
# When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
|
1070
761
|
attr_accessor :start_date
|
1071
762
|
|
1072
763
|
def initialize(
|
1073
|
-
billing_behavior: nil,
|
1074
764
|
customer: nil,
|
1075
765
|
default_settings: nil,
|
1076
766
|
end_behavior: nil,
|
@@ -1078,10 +768,8 @@ module Stripe
|
|
1078
768
|
from_subscription: nil,
|
1079
769
|
metadata: nil,
|
1080
770
|
phases: nil,
|
1081
|
-
prebilling: nil,
|
1082
771
|
start_date: nil
|
1083
772
|
)
|
1084
|
-
@billing_behavior = billing_behavior
|
1085
773
|
@customer = customer
|
1086
774
|
@default_settings = default_settings
|
1087
775
|
@end_behavior = end_behavior
|
@@ -1089,20 +777,10 @@ module Stripe
|
|
1089
777
|
@from_subscription = from_subscription
|
1090
778
|
@metadata = metadata
|
1091
779
|
@phases = phases
|
1092
|
-
@prebilling = prebilling
|
1093
780
|
@start_date = start_date
|
1094
781
|
end
|
1095
782
|
end
|
1096
783
|
|
1097
|
-
class RetrieveParams < Stripe::RequestParams
|
1098
|
-
# Specifies which fields in the response should be expanded.
|
1099
|
-
attr_accessor :expand
|
1100
|
-
|
1101
|
-
def initialize(expand: nil)
|
1102
|
-
@expand = expand
|
1103
|
-
end
|
1104
|
-
end
|
1105
|
-
|
1106
784
|
class UpdateParams < Stripe::RequestParams
|
1107
785
|
class DefaultSettings < Stripe::RequestParams
|
1108
786
|
class AutomaticTax < Stripe::RequestParams
|
@@ -1128,18 +806,6 @@ module Stripe
|
|
1128
806
|
end
|
1129
807
|
end
|
1130
808
|
|
1131
|
-
class BillingThresholds < Stripe::RequestParams
|
1132
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1133
|
-
attr_accessor :amount_gte
|
1134
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
1135
|
-
attr_accessor :reset_billing_cycle_anchor
|
1136
|
-
|
1137
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
1138
|
-
@amount_gte = amount_gte
|
1139
|
-
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
1140
|
-
end
|
1141
|
-
end
|
1142
|
-
|
1143
809
|
class InvoiceSettings < Stripe::RequestParams
|
1144
810
|
class Issuer < Stripe::RequestParams
|
1145
811
|
# The connected account being referenced when `type` is `account`.
|
@@ -1183,8 +849,6 @@ module Stripe
|
|
1183
849
|
attr_accessor :automatic_tax
|
1184
850
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
1185
851
|
attr_accessor :billing_cycle_anchor
|
1186
|
-
# 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.
|
1187
|
-
attr_accessor :billing_thresholds
|
1188
852
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
1189
853
|
attr_accessor :collection_method
|
1190
854
|
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -1202,7 +866,6 @@ module Stripe
|
|
1202
866
|
application_fee_percent: nil,
|
1203
867
|
automatic_tax: nil,
|
1204
868
|
billing_cycle_anchor: nil,
|
1205
|
-
billing_thresholds: nil,
|
1206
869
|
collection_method: nil,
|
1207
870
|
default_payment_method: nil,
|
1208
871
|
description: nil,
|
@@ -1213,7 +876,6 @@ module Stripe
|
|
1213
876
|
@application_fee_percent = application_fee_percent
|
1214
877
|
@automatic_tax = automatic_tax
|
1215
878
|
@billing_cycle_anchor = billing_cycle_anchor
|
1216
|
-
@billing_thresholds = billing_thresholds
|
1217
879
|
@collection_method = collection_method
|
1218
880
|
@default_payment_method = default_payment_method
|
1219
881
|
@description = description
|
@@ -1226,44 +888,16 @@ module Stripe
|
|
1226
888
|
class Phase < Stripe::RequestParams
|
1227
889
|
class AddInvoiceItem < Stripe::RequestParams
|
1228
890
|
class Discount < Stripe::RequestParams
|
1229
|
-
class DiscountEnd < Stripe::RequestParams
|
1230
|
-
class Duration < Stripe::RequestParams
|
1231
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1232
|
-
attr_accessor :interval
|
1233
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1234
|
-
attr_accessor :interval_count
|
1235
|
-
|
1236
|
-
def initialize(interval: nil, interval_count: nil)
|
1237
|
-
@interval = interval
|
1238
|
-
@interval_count = interval_count
|
1239
|
-
end
|
1240
|
-
end
|
1241
|
-
# Time span for the redeemed discount.
|
1242
|
-
attr_accessor :duration
|
1243
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1244
|
-
attr_accessor :timestamp
|
1245
|
-
# The type of calculation made to determine when the discount ends.
|
1246
|
-
attr_accessor :type
|
1247
|
-
|
1248
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1249
|
-
@duration = duration
|
1250
|
-
@timestamp = timestamp
|
1251
|
-
@type = type
|
1252
|
-
end
|
1253
|
-
end
|
1254
891
|
# ID of the coupon to create a new discount for.
|
1255
892
|
attr_accessor :coupon
|
1256
893
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1257
894
|
attr_accessor :discount
|
1258
|
-
# Details to determine how long the discount should be applied for.
|
1259
|
-
attr_accessor :discount_end
|
1260
895
|
# ID of the promotion code to create a new discount for.
|
1261
896
|
attr_accessor :promotion_code
|
1262
897
|
|
1263
|
-
def initialize(coupon: nil, discount: nil,
|
898
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1264
899
|
@coupon = coupon
|
1265
900
|
@discount = discount
|
1266
|
-
@discount_end = discount_end
|
1267
901
|
@promotion_code = promotion_code
|
1268
902
|
end
|
1269
903
|
end
|
@@ -1271,7 +905,7 @@ module Stripe
|
|
1271
905
|
class PriceData < Stripe::RequestParams
|
1272
906
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1273
907
|
attr_accessor :currency
|
1274
|
-
# The ID of the
|
908
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1275
909
|
attr_accessor :product
|
1276
910
|
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
1277
911
|
attr_accessor :tax_behavior
|
@@ -1337,57 +971,17 @@ module Stripe
|
|
1337
971
|
end
|
1338
972
|
end
|
1339
973
|
|
1340
|
-
class BillingThresholds < Stripe::RequestParams
|
1341
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1342
|
-
attr_accessor :amount_gte
|
1343
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
1344
|
-
attr_accessor :reset_billing_cycle_anchor
|
1345
|
-
|
1346
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
1347
|
-
@amount_gte = amount_gte
|
1348
|
-
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
1349
|
-
end
|
1350
|
-
end
|
1351
|
-
|
1352
974
|
class Discount < Stripe::RequestParams
|
1353
|
-
class DiscountEnd < Stripe::RequestParams
|
1354
|
-
class Duration < Stripe::RequestParams
|
1355
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1356
|
-
attr_accessor :interval
|
1357
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1358
|
-
attr_accessor :interval_count
|
1359
|
-
|
1360
|
-
def initialize(interval: nil, interval_count: nil)
|
1361
|
-
@interval = interval
|
1362
|
-
@interval_count = interval_count
|
1363
|
-
end
|
1364
|
-
end
|
1365
|
-
# Time span for the redeemed discount.
|
1366
|
-
attr_accessor :duration
|
1367
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1368
|
-
attr_accessor :timestamp
|
1369
|
-
# The type of calculation made to determine when the discount ends.
|
1370
|
-
attr_accessor :type
|
1371
|
-
|
1372
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1373
|
-
@duration = duration
|
1374
|
-
@timestamp = timestamp
|
1375
|
-
@type = type
|
1376
|
-
end
|
1377
|
-
end
|
1378
975
|
# ID of the coupon to create a new discount for.
|
1379
976
|
attr_accessor :coupon
|
1380
977
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1381
978
|
attr_accessor :discount
|
1382
|
-
# Details to determine how long the discount should be applied for.
|
1383
|
-
attr_accessor :discount_end
|
1384
979
|
# ID of the promotion code to create a new discount for.
|
1385
980
|
attr_accessor :promotion_code
|
1386
981
|
|
1387
|
-
def initialize(coupon: nil, discount: nil,
|
982
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1388
983
|
@coupon = coupon
|
1389
984
|
@discount = discount
|
1390
|
-
@discount_end = discount_end
|
1391
985
|
@promotion_code = promotion_code
|
1392
986
|
end
|
1393
987
|
end
|
@@ -1419,54 +1013,17 @@ module Stripe
|
|
1419
1013
|
end
|
1420
1014
|
|
1421
1015
|
class Item < Stripe::RequestParams
|
1422
|
-
class BillingThresholds < Stripe::RequestParams
|
1423
|
-
# 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))
|
1424
|
-
attr_accessor :usage_gte
|
1425
|
-
|
1426
|
-
def initialize(usage_gte: nil)
|
1427
|
-
@usage_gte = usage_gte
|
1428
|
-
end
|
1429
|
-
end
|
1430
|
-
|
1431
1016
|
class Discount < Stripe::RequestParams
|
1432
|
-
class DiscountEnd < Stripe::RequestParams
|
1433
|
-
class Duration < Stripe::RequestParams
|
1434
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1435
|
-
attr_accessor :interval
|
1436
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1437
|
-
attr_accessor :interval_count
|
1438
|
-
|
1439
|
-
def initialize(interval: nil, interval_count: nil)
|
1440
|
-
@interval = interval
|
1441
|
-
@interval_count = interval_count
|
1442
|
-
end
|
1443
|
-
end
|
1444
|
-
# Time span for the redeemed discount.
|
1445
|
-
attr_accessor :duration
|
1446
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1447
|
-
attr_accessor :timestamp
|
1448
|
-
# The type of calculation made to determine when the discount ends.
|
1449
|
-
attr_accessor :type
|
1450
|
-
|
1451
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1452
|
-
@duration = duration
|
1453
|
-
@timestamp = timestamp
|
1454
|
-
@type = type
|
1455
|
-
end
|
1456
|
-
end
|
1457
1017
|
# ID of the coupon to create a new discount for.
|
1458
1018
|
attr_accessor :coupon
|
1459
1019
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1460
1020
|
attr_accessor :discount
|
1461
|
-
# Details to determine how long the discount should be applied for.
|
1462
|
-
attr_accessor :discount_end
|
1463
1021
|
# ID of the promotion code to create a new discount for.
|
1464
1022
|
attr_accessor :promotion_code
|
1465
1023
|
|
1466
|
-
def initialize(coupon: nil, discount: nil,
|
1024
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1467
1025
|
@coupon = coupon
|
1468
1026
|
@discount = discount
|
1469
|
-
@discount_end = discount_end
|
1470
1027
|
@promotion_code = promotion_code
|
1471
1028
|
end
|
1472
1029
|
end
|
@@ -1485,7 +1042,7 @@ module Stripe
|
|
1485
1042
|
end
|
1486
1043
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1487
1044
|
attr_accessor :currency
|
1488
|
-
# The ID of the
|
1045
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1489
1046
|
attr_accessor :product
|
1490
1047
|
# The recurring components of a price such as `interval` and `interval_count`.
|
1491
1048
|
attr_accessor :recurring
|
@@ -1512,20 +1069,6 @@ module Stripe
|
|
1512
1069
|
@unit_amount_decimal = unit_amount_decimal
|
1513
1070
|
end
|
1514
1071
|
end
|
1515
|
-
|
1516
|
-
class Trial < Stripe::RequestParams
|
1517
|
-
# 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.
|
1518
|
-
attr_accessor :converts_to
|
1519
|
-
# Determines the type of trial for this item.
|
1520
|
-
attr_accessor :type
|
1521
|
-
|
1522
|
-
def initialize(converts_to: nil, type: nil)
|
1523
|
-
@converts_to = converts_to
|
1524
|
-
@type = type
|
1525
|
-
end
|
1526
|
-
end
|
1527
|
-
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
|
1528
|
-
attr_accessor :billing_thresholds
|
1529
1072
|
# The coupons to redeem into discounts for the subscription item.
|
1530
1073
|
attr_accessor :discounts
|
1531
1074
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
@@ -1540,21 +1083,16 @@ module Stripe
|
|
1540
1083
|
attr_accessor :quantity
|
1541
1084
|
# 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.
|
1542
1085
|
attr_accessor :tax_rates
|
1543
|
-
# Options that configure the trial on the subscription item.
|
1544
|
-
attr_accessor :trial
|
1545
1086
|
|
1546
1087
|
def initialize(
|
1547
|
-
billing_thresholds: nil,
|
1548
1088
|
discounts: nil,
|
1549
1089
|
metadata: nil,
|
1550
1090
|
plan: nil,
|
1551
1091
|
price: nil,
|
1552
1092
|
price_data: nil,
|
1553
1093
|
quantity: nil,
|
1554
|
-
tax_rates: nil
|
1555
|
-
trial: nil
|
1094
|
+
tax_rates: nil
|
1556
1095
|
)
|
1557
|
-
@billing_thresholds = billing_thresholds
|
1558
1096
|
@discounts = discounts
|
1559
1097
|
@metadata = metadata
|
1560
1098
|
@plan = plan
|
@@ -1562,16 +1100,6 @@ module Stripe
|
|
1562
1100
|
@price_data = price_data
|
1563
1101
|
@quantity = quantity
|
1564
1102
|
@tax_rates = tax_rates
|
1565
|
-
@trial = trial
|
1566
|
-
end
|
1567
|
-
end
|
1568
|
-
|
1569
|
-
class PauseCollection < Stripe::RequestParams
|
1570
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1571
|
-
attr_accessor :behavior
|
1572
|
-
|
1573
|
-
def initialize(behavior: nil)
|
1574
|
-
@behavior = behavior
|
1575
1103
|
end
|
1576
1104
|
end
|
1577
1105
|
|
@@ -1586,23 +1114,6 @@ module Stripe
|
|
1586
1114
|
@destination = destination
|
1587
1115
|
end
|
1588
1116
|
end
|
1589
|
-
|
1590
|
-
class TrialSettings < Stripe::RequestParams
|
1591
|
-
class EndBehavior < Stripe::RequestParams
|
1592
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1593
|
-
attr_accessor :prorate_up_front
|
1594
|
-
|
1595
|
-
def initialize(prorate_up_front: nil)
|
1596
|
-
@prorate_up_front = prorate_up_front
|
1597
|
-
end
|
1598
|
-
end
|
1599
|
-
# Defines how the subscription should behave when a trial ends.
|
1600
|
-
attr_accessor :end_behavior
|
1601
|
-
|
1602
|
-
def initialize(end_behavior: nil)
|
1603
|
-
@end_behavior = end_behavior
|
1604
|
-
end
|
1605
|
-
end
|
1606
1117
|
# 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.
|
1607
1118
|
attr_accessor :add_invoice_items
|
1608
1119
|
# 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).
|
@@ -1611,12 +1122,8 @@ module Stripe
|
|
1611
1122
|
attr_accessor :automatic_tax
|
1612
1123
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
1613
1124
|
attr_accessor :billing_cycle_anchor
|
1614
|
-
# 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.
|
1615
|
-
attr_accessor :billing_thresholds
|
1616
1125
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
1617
1126
|
attr_accessor :collection_method
|
1618
|
-
# The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
1619
|
-
attr_accessor :coupon
|
1620
1127
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1621
1128
|
attr_accessor :currency
|
1622
1129
|
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -1639,8 +1146,6 @@ module Stripe
|
|
1639
1146
|
attr_accessor :metadata
|
1640
1147
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1641
1148
|
attr_accessor :on_behalf_of
|
1642
|
-
# 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).
|
1643
|
-
attr_accessor :pause_collection
|
1644
1149
|
# Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
|
1645
1150
|
attr_accessor :proration_behavior
|
1646
1151
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1649,21 +1154,15 @@ module Stripe
|
|
1649
1154
|
attr_accessor :transfer_data
|
1650
1155
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1651
1156
|
attr_accessor :trial
|
1652
|
-
# Specify trial behavior when crossing phase boundaries
|
1653
|
-
attr_accessor :trial_continuation
|
1654
1157
|
# 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`
|
1655
1158
|
attr_accessor :trial_end
|
1656
|
-
# Settings related to subscription trials.
|
1657
|
-
attr_accessor :trial_settings
|
1658
1159
|
|
1659
1160
|
def initialize(
|
1660
1161
|
add_invoice_items: nil,
|
1661
1162
|
application_fee_percent: nil,
|
1662
1163
|
automatic_tax: nil,
|
1663
1164
|
billing_cycle_anchor: nil,
|
1664
|
-
billing_thresholds: nil,
|
1665
1165
|
collection_method: nil,
|
1666
|
-
coupon: nil,
|
1667
1166
|
currency: nil,
|
1668
1167
|
default_payment_method: nil,
|
1669
1168
|
default_tax_rates: nil,
|
@@ -1675,22 +1174,17 @@ module Stripe
|
|
1675
1174
|
iterations: nil,
|
1676
1175
|
metadata: nil,
|
1677
1176
|
on_behalf_of: nil,
|
1678
|
-
pause_collection: nil,
|
1679
1177
|
proration_behavior: nil,
|
1680
1178
|
start_date: nil,
|
1681
1179
|
transfer_data: nil,
|
1682
1180
|
trial: nil,
|
1683
|
-
|
1684
|
-
trial_end: nil,
|
1685
|
-
trial_settings: nil
|
1181
|
+
trial_end: nil
|
1686
1182
|
)
|
1687
1183
|
@add_invoice_items = add_invoice_items
|
1688
1184
|
@application_fee_percent = application_fee_percent
|
1689
1185
|
@automatic_tax = automatic_tax
|
1690
1186
|
@billing_cycle_anchor = billing_cycle_anchor
|
1691
|
-
@billing_thresholds = billing_thresholds
|
1692
1187
|
@collection_method = collection_method
|
1693
|
-
@coupon = coupon
|
1694
1188
|
@currency = currency
|
1695
1189
|
@default_payment_method = default_payment_method
|
1696
1190
|
@default_tax_rates = default_tax_rates
|
@@ -1702,30 +1196,13 @@ module Stripe
|
|
1702
1196
|
@iterations = iterations
|
1703
1197
|
@metadata = metadata
|
1704
1198
|
@on_behalf_of = on_behalf_of
|
1705
|
-
@pause_collection = pause_collection
|
1706
1199
|
@proration_behavior = proration_behavior
|
1707
1200
|
@start_date = start_date
|
1708
1201
|
@transfer_data = transfer_data
|
1709
1202
|
@trial = trial
|
1710
|
-
@trial_continuation = trial_continuation
|
1711
1203
|
@trial_end = trial_end
|
1712
|
-
@trial_settings = trial_settings
|
1713
1204
|
end
|
1714
1205
|
end
|
1715
|
-
|
1716
|
-
class Prebilling < Stripe::RequestParams
|
1717
|
-
# This is used to determine the number of billing cycles to prebill.
|
1718
|
-
attr_accessor :iterations
|
1719
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1720
|
-
attr_accessor :update_behavior
|
1721
|
-
|
1722
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1723
|
-
@iterations = iterations
|
1724
|
-
@update_behavior = update_behavior
|
1725
|
-
end
|
1726
|
-
end
|
1727
|
-
# 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.
|
1728
|
-
attr_accessor :billing_behavior
|
1729
1206
|
# Object representing the subscription schedule's default settings.
|
1730
1207
|
attr_accessor :default_settings
|
1731
1208
|
# 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.
|
@@ -1736,598 +1213,26 @@ module Stripe
|
|
1736
1213
|
attr_accessor :metadata
|
1737
1214
|
# 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. Note that past phases can be omitted.
|
1738
1215
|
attr_accessor :phases
|
1739
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1740
|
-
attr_accessor :prebilling
|
1741
1216
|
# If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
|
1742
1217
|
attr_accessor :proration_behavior
|
1743
1218
|
|
1744
1219
|
def initialize(
|
1745
|
-
billing_behavior: nil,
|
1746
1220
|
default_settings: nil,
|
1747
1221
|
end_behavior: nil,
|
1748
1222
|
expand: nil,
|
1749
1223
|
metadata: nil,
|
1750
1224
|
phases: nil,
|
1751
|
-
prebilling: nil,
|
1752
1225
|
proration_behavior: nil
|
1753
1226
|
)
|
1754
|
-
@billing_behavior = billing_behavior
|
1755
1227
|
@default_settings = default_settings
|
1756
1228
|
@end_behavior = end_behavior
|
1757
1229
|
@expand = expand
|
1758
1230
|
@metadata = metadata
|
1759
1231
|
@phases = phases
|
1760
|
-
@prebilling = prebilling
|
1761
1232
|
@proration_behavior = proration_behavior
|
1762
1233
|
end
|
1763
1234
|
end
|
1764
1235
|
|
1765
|
-
class AmendParams < Stripe::RequestParams
|
1766
|
-
class Amendment < Stripe::RequestParams
|
1767
|
-
class AmendmentEnd < Stripe::RequestParams
|
1768
|
-
class DiscountEnd < Stripe::RequestParams
|
1769
|
-
# The ID of a specific discount.
|
1770
|
-
attr_accessor :discount
|
1771
|
-
|
1772
|
-
def initialize(discount: nil)
|
1773
|
-
@discount = discount
|
1774
|
-
end
|
1775
|
-
end
|
1776
|
-
|
1777
|
-
class Duration < Stripe::RequestParams
|
1778
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1779
|
-
attr_accessor :interval
|
1780
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1781
|
-
attr_accessor :interval_count
|
1782
|
-
|
1783
|
-
def initialize(interval: nil, interval_count: nil)
|
1784
|
-
@interval = interval
|
1785
|
-
@interval_count = interval_count
|
1786
|
-
end
|
1787
|
-
end
|
1788
|
-
# Use the `end` time of a given discount.
|
1789
|
-
attr_accessor :discount_end
|
1790
|
-
# Time span for the amendment starting from the `amendment_start`.
|
1791
|
-
attr_accessor :duration
|
1792
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1793
|
-
attr_accessor :timestamp
|
1794
|
-
# Select one of three ways to pass the `amendment_end`.
|
1795
|
-
attr_accessor :type
|
1796
|
-
|
1797
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1798
|
-
@discount_end = discount_end
|
1799
|
-
@duration = duration
|
1800
|
-
@timestamp = timestamp
|
1801
|
-
@type = type
|
1802
|
-
end
|
1803
|
-
end
|
1804
|
-
|
1805
|
-
class AmendmentStart < Stripe::RequestParams
|
1806
|
-
class AmendmentEnd < Stripe::RequestParams
|
1807
|
-
# 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.
|
1808
|
-
attr_accessor :index
|
1809
|
-
|
1810
|
-
def initialize(index: nil)
|
1811
|
-
@index = index
|
1812
|
-
end
|
1813
|
-
end
|
1814
|
-
|
1815
|
-
class DiscountEnd < Stripe::RequestParams
|
1816
|
-
# The ID of a specific discount.
|
1817
|
-
attr_accessor :discount
|
1818
|
-
|
1819
|
-
def initialize(discount: nil)
|
1820
|
-
@discount = discount
|
1821
|
-
end
|
1822
|
-
end
|
1823
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1824
|
-
attr_accessor :amendment_end
|
1825
|
-
# Use the `end` time of a given discount.
|
1826
|
-
attr_accessor :discount_end
|
1827
|
-
# A precise Unix timestamp for the amendment to start.
|
1828
|
-
attr_accessor :timestamp
|
1829
|
-
# Select one of three ways to pass the `amendment_start`.
|
1830
|
-
attr_accessor :type
|
1831
|
-
|
1832
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1833
|
-
@amendment_end = amendment_end
|
1834
|
-
@discount_end = discount_end
|
1835
|
-
@timestamp = timestamp
|
1836
|
-
@type = type
|
1837
|
-
end
|
1838
|
-
end
|
1839
|
-
|
1840
|
-
class DiscountAction < Stripe::RequestParams
|
1841
|
-
class Add < Stripe::RequestParams
|
1842
|
-
class DiscountEnd < Stripe::RequestParams
|
1843
|
-
# The type of calculation made to determine when the discount ends.
|
1844
|
-
attr_accessor :type
|
1845
|
-
|
1846
|
-
def initialize(type: nil)
|
1847
|
-
@type = type
|
1848
|
-
end
|
1849
|
-
end
|
1850
|
-
# The coupon code to redeem.
|
1851
|
-
attr_accessor :coupon
|
1852
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1853
|
-
attr_accessor :discount
|
1854
|
-
# Details to determine how long the discount should be applied for.
|
1855
|
-
attr_accessor :discount_end
|
1856
|
-
# 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.
|
1857
|
-
attr_accessor :index
|
1858
|
-
# The promotion code to redeem.
|
1859
|
-
attr_accessor :promotion_code
|
1860
|
-
|
1861
|
-
def initialize(
|
1862
|
-
coupon: nil,
|
1863
|
-
discount: nil,
|
1864
|
-
discount_end: nil,
|
1865
|
-
index: nil,
|
1866
|
-
promotion_code: nil
|
1867
|
-
)
|
1868
|
-
@coupon = coupon
|
1869
|
-
@discount = discount
|
1870
|
-
@discount_end = discount_end
|
1871
|
-
@index = index
|
1872
|
-
@promotion_code = promotion_code
|
1873
|
-
end
|
1874
|
-
end
|
1875
|
-
|
1876
|
-
class Remove < Stripe::RequestParams
|
1877
|
-
# The coupon code to remove from the `discounts` array.
|
1878
|
-
attr_accessor :coupon
|
1879
|
-
# The ID of a discount to remove from the `discounts` array.
|
1880
|
-
attr_accessor :discount
|
1881
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1882
|
-
attr_accessor :promotion_code
|
1883
|
-
|
1884
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1885
|
-
@coupon = coupon
|
1886
|
-
@discount = discount
|
1887
|
-
@promotion_code = promotion_code
|
1888
|
-
end
|
1889
|
-
end
|
1890
|
-
|
1891
|
-
class Set < Stripe::RequestParams
|
1892
|
-
# The coupon code to replace the `discounts` array with.
|
1893
|
-
attr_accessor :coupon
|
1894
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1895
|
-
attr_accessor :discount
|
1896
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1897
|
-
attr_accessor :promotion_code
|
1898
|
-
|
1899
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1900
|
-
@coupon = coupon
|
1901
|
-
@discount = discount
|
1902
|
-
@promotion_code = promotion_code
|
1903
|
-
end
|
1904
|
-
end
|
1905
|
-
# Details of the discount to add.
|
1906
|
-
attr_accessor :add
|
1907
|
-
# Details of the discount to remove.
|
1908
|
-
attr_accessor :remove
|
1909
|
-
# Details of the discount to replace the existing discounts with.
|
1910
|
-
attr_accessor :set
|
1911
|
-
# Determines the type of discount action.
|
1912
|
-
attr_accessor :type
|
1913
|
-
|
1914
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1915
|
-
@add = add
|
1916
|
-
@remove = remove
|
1917
|
-
@set = set
|
1918
|
-
@type = type
|
1919
|
-
end
|
1920
|
-
end
|
1921
|
-
|
1922
|
-
class ItemAction < Stripe::RequestParams
|
1923
|
-
class Add < Stripe::RequestParams
|
1924
|
-
class Discount < Stripe::RequestParams
|
1925
|
-
class DiscountEnd < Stripe::RequestParams
|
1926
|
-
class Duration < Stripe::RequestParams
|
1927
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1928
|
-
attr_accessor :interval
|
1929
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1930
|
-
attr_accessor :interval_count
|
1931
|
-
|
1932
|
-
def initialize(interval: nil, interval_count: nil)
|
1933
|
-
@interval = interval
|
1934
|
-
@interval_count = interval_count
|
1935
|
-
end
|
1936
|
-
end
|
1937
|
-
# Time span for the redeemed discount.
|
1938
|
-
attr_accessor :duration
|
1939
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1940
|
-
attr_accessor :timestamp
|
1941
|
-
# The type of calculation made to determine when the discount ends.
|
1942
|
-
attr_accessor :type
|
1943
|
-
|
1944
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1945
|
-
@duration = duration
|
1946
|
-
@timestamp = timestamp
|
1947
|
-
@type = type
|
1948
|
-
end
|
1949
|
-
end
|
1950
|
-
# ID of the coupon to create a new discount for.
|
1951
|
-
attr_accessor :coupon
|
1952
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1953
|
-
attr_accessor :discount
|
1954
|
-
# Details to determine how long the discount should be applied for.
|
1955
|
-
attr_accessor :discount_end
|
1956
|
-
# ID of the promotion code to create a new discount for.
|
1957
|
-
attr_accessor :promotion_code
|
1958
|
-
|
1959
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1960
|
-
@coupon = coupon
|
1961
|
-
@discount = discount
|
1962
|
-
@discount_end = discount_end
|
1963
|
-
@promotion_code = promotion_code
|
1964
|
-
end
|
1965
|
-
end
|
1966
|
-
|
1967
|
-
class Trial < Stripe::RequestParams
|
1968
|
-
# 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.
|
1969
|
-
attr_accessor :converts_to
|
1970
|
-
# Determines the type of trial for this item.
|
1971
|
-
attr_accessor :type
|
1972
|
-
|
1973
|
-
def initialize(converts_to: nil, type: nil)
|
1974
|
-
@converts_to = converts_to
|
1975
|
-
@type = type
|
1976
|
-
end
|
1977
|
-
end
|
1978
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1979
|
-
attr_accessor :discounts
|
1980
|
-
# 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`.
|
1981
|
-
attr_accessor :metadata
|
1982
|
-
# The ID of the price object.
|
1983
|
-
attr_accessor :price
|
1984
|
-
# Quantity for this item.
|
1985
|
-
attr_accessor :quantity
|
1986
|
-
# 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`.
|
1987
|
-
attr_accessor :tax_rates
|
1988
|
-
# Options that configure the trial on the subscription item.
|
1989
|
-
attr_accessor :trial
|
1990
|
-
|
1991
|
-
def initialize(
|
1992
|
-
discounts: nil,
|
1993
|
-
metadata: nil,
|
1994
|
-
price: nil,
|
1995
|
-
quantity: nil,
|
1996
|
-
tax_rates: nil,
|
1997
|
-
trial: nil
|
1998
|
-
)
|
1999
|
-
@discounts = discounts
|
2000
|
-
@metadata = metadata
|
2001
|
-
@price = price
|
2002
|
-
@quantity = quantity
|
2003
|
-
@tax_rates = tax_rates
|
2004
|
-
@trial = trial
|
2005
|
-
end
|
2006
|
-
end
|
2007
|
-
|
2008
|
-
class Remove < Stripe::RequestParams
|
2009
|
-
# ID of a price to remove.
|
2010
|
-
attr_accessor :price
|
2011
|
-
|
2012
|
-
def initialize(price: nil)
|
2013
|
-
@price = price
|
2014
|
-
end
|
2015
|
-
end
|
2016
|
-
|
2017
|
-
class Set < Stripe::RequestParams
|
2018
|
-
class Discount < Stripe::RequestParams
|
2019
|
-
class DiscountEnd < Stripe::RequestParams
|
2020
|
-
class Duration < Stripe::RequestParams
|
2021
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2022
|
-
attr_accessor :interval
|
2023
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2024
|
-
attr_accessor :interval_count
|
2025
|
-
|
2026
|
-
def initialize(interval: nil, interval_count: nil)
|
2027
|
-
@interval = interval
|
2028
|
-
@interval_count = interval_count
|
2029
|
-
end
|
2030
|
-
end
|
2031
|
-
# Time span for the redeemed discount.
|
2032
|
-
attr_accessor :duration
|
2033
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2034
|
-
attr_accessor :timestamp
|
2035
|
-
# The type of calculation made to determine when the discount ends.
|
2036
|
-
attr_accessor :type
|
2037
|
-
|
2038
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2039
|
-
@duration = duration
|
2040
|
-
@timestamp = timestamp
|
2041
|
-
@type = type
|
2042
|
-
end
|
2043
|
-
end
|
2044
|
-
# ID of the coupon to create a new discount for.
|
2045
|
-
attr_accessor :coupon
|
2046
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2047
|
-
attr_accessor :discount
|
2048
|
-
# Details to determine how long the discount should be applied for.
|
2049
|
-
attr_accessor :discount_end
|
2050
|
-
# ID of the promotion code to create a new discount for.
|
2051
|
-
attr_accessor :promotion_code
|
2052
|
-
|
2053
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2054
|
-
@coupon = coupon
|
2055
|
-
@discount = discount
|
2056
|
-
@discount_end = discount_end
|
2057
|
-
@promotion_code = promotion_code
|
2058
|
-
end
|
2059
|
-
end
|
2060
|
-
|
2061
|
-
class Trial < Stripe::RequestParams
|
2062
|
-
# 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.
|
2063
|
-
attr_accessor :converts_to
|
2064
|
-
# Determines the type of trial for this item.
|
2065
|
-
attr_accessor :type
|
2066
|
-
|
2067
|
-
def initialize(converts_to: nil, type: nil)
|
2068
|
-
@converts_to = converts_to
|
2069
|
-
@type = type
|
2070
|
-
end
|
2071
|
-
end
|
2072
|
-
# 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`.
|
2073
|
-
attr_accessor :discounts
|
2074
|
-
# 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`.
|
2075
|
-
attr_accessor :metadata
|
2076
|
-
# The ID of the price object.
|
2077
|
-
attr_accessor :price
|
2078
|
-
# 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`.
|
2079
|
-
attr_accessor :quantity
|
2080
|
-
# 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`.
|
2081
|
-
attr_accessor :tax_rates
|
2082
|
-
# 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`.
|
2083
|
-
attr_accessor :trial
|
2084
|
-
|
2085
|
-
def initialize(
|
2086
|
-
discounts: nil,
|
2087
|
-
metadata: nil,
|
2088
|
-
price: nil,
|
2089
|
-
quantity: nil,
|
2090
|
-
tax_rates: nil,
|
2091
|
-
trial: nil
|
2092
|
-
)
|
2093
|
-
@discounts = discounts
|
2094
|
-
@metadata = metadata
|
2095
|
-
@price = price
|
2096
|
-
@quantity = quantity
|
2097
|
-
@tax_rates = tax_rates
|
2098
|
-
@trial = trial
|
2099
|
-
end
|
2100
|
-
end
|
2101
|
-
# 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.
|
2102
|
-
attr_accessor :add
|
2103
|
-
# Details of the subscription item to remove.
|
2104
|
-
attr_accessor :remove
|
2105
|
-
# 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.
|
2106
|
-
attr_accessor :set
|
2107
|
-
# Determines the type of item action.
|
2108
|
-
attr_accessor :type
|
2109
|
-
|
2110
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2111
|
-
@add = add
|
2112
|
-
@remove = remove
|
2113
|
-
@set = set
|
2114
|
-
@type = type
|
2115
|
-
end
|
2116
|
-
end
|
2117
|
-
|
2118
|
-
class MetadataAction < Stripe::RequestParams
|
2119
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2120
|
-
attr_accessor :add
|
2121
|
-
# Keys to remove from schedule phase metadata.
|
2122
|
-
attr_accessor :remove
|
2123
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2124
|
-
attr_accessor :set
|
2125
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2126
|
-
attr_accessor :type
|
2127
|
-
|
2128
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2129
|
-
@add = add
|
2130
|
-
@remove = remove
|
2131
|
-
@set = set
|
2132
|
-
@type = type
|
2133
|
-
end
|
2134
|
-
end
|
2135
|
-
|
2136
|
-
class SetPauseCollection < Stripe::RequestParams
|
2137
|
-
class Set < Stripe::RequestParams
|
2138
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2139
|
-
attr_accessor :behavior
|
2140
|
-
|
2141
|
-
def initialize(behavior: nil)
|
2142
|
-
@behavior = behavior
|
2143
|
-
end
|
2144
|
-
end
|
2145
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2146
|
-
attr_accessor :set
|
2147
|
-
# Determines the type of the pause_collection amendment.
|
2148
|
-
attr_accessor :type
|
2149
|
-
|
2150
|
-
def initialize(set: nil, type: nil)
|
2151
|
-
@set = set
|
2152
|
-
@type = type
|
2153
|
-
end
|
2154
|
-
end
|
2155
|
-
|
2156
|
-
class TrialSettings < Stripe::RequestParams
|
2157
|
-
class EndBehavior < Stripe::RequestParams
|
2158
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2159
|
-
attr_accessor :prorate_up_front
|
2160
|
-
|
2161
|
-
def initialize(prorate_up_front: nil)
|
2162
|
-
@prorate_up_front = prorate_up_front
|
2163
|
-
end
|
2164
|
-
end
|
2165
|
-
# Defines how the subscription should behave when a trial ends.
|
2166
|
-
attr_accessor :end_behavior
|
2167
|
-
|
2168
|
-
def initialize(end_behavior: nil)
|
2169
|
-
@end_behavior = end_behavior
|
2170
|
-
end
|
2171
|
-
end
|
2172
|
-
# 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.
|
2173
|
-
attr_accessor :amendment_end
|
2174
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2175
|
-
attr_accessor :amendment_start
|
2176
|
-
# 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.
|
2177
|
-
attr_accessor :billing_cycle_anchor
|
2178
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2179
|
-
attr_accessor :discount_actions
|
2180
|
-
# Changes to the subscription items during the amendment time span.
|
2181
|
-
attr_accessor :item_actions
|
2182
|
-
# Instructions for how to modify phase metadata
|
2183
|
-
attr_accessor :metadata_actions
|
2184
|
-
# 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`.
|
2185
|
-
attr_accessor :proration_behavior
|
2186
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2187
|
-
attr_accessor :set_pause_collection
|
2188
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2189
|
-
attr_accessor :set_schedule_end
|
2190
|
-
# Settings related to subscription trials.
|
2191
|
-
attr_accessor :trial_settings
|
2192
|
-
|
2193
|
-
def initialize(
|
2194
|
-
amendment_end: nil,
|
2195
|
-
amendment_start: nil,
|
2196
|
-
billing_cycle_anchor: nil,
|
2197
|
-
discount_actions: nil,
|
2198
|
-
item_actions: nil,
|
2199
|
-
metadata_actions: nil,
|
2200
|
-
proration_behavior: nil,
|
2201
|
-
set_pause_collection: nil,
|
2202
|
-
set_schedule_end: nil,
|
2203
|
-
trial_settings: nil
|
2204
|
-
)
|
2205
|
-
@amendment_end = amendment_end
|
2206
|
-
@amendment_start = amendment_start
|
2207
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2208
|
-
@discount_actions = discount_actions
|
2209
|
-
@item_actions = item_actions
|
2210
|
-
@metadata_actions = metadata_actions
|
2211
|
-
@proration_behavior = proration_behavior
|
2212
|
-
@set_pause_collection = set_pause_collection
|
2213
|
-
@set_schedule_end = set_schedule_end
|
2214
|
-
@trial_settings = trial_settings
|
2215
|
-
end
|
2216
|
-
end
|
2217
|
-
|
2218
|
-
class Prebilling < Stripe::RequestParams
|
2219
|
-
class BillFrom < Stripe::RequestParams
|
2220
|
-
class AmendmentStart < Stripe::RequestParams
|
2221
|
-
# The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
|
2222
|
-
attr_accessor :index
|
2223
|
-
|
2224
|
-
def initialize(index: nil)
|
2225
|
-
@index = index
|
2226
|
-
end
|
2227
|
-
end
|
2228
|
-
# Start the prebilled period when a specified amendment begins.
|
2229
|
-
attr_accessor :amendment_start
|
2230
|
-
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2231
|
-
attr_accessor :timestamp
|
2232
|
-
# Select one of several ways to pass the `bill_from` value.
|
2233
|
-
attr_accessor :type
|
2234
|
-
|
2235
|
-
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
2236
|
-
@amendment_start = amendment_start
|
2237
|
-
@timestamp = timestamp
|
2238
|
-
@type = type
|
2239
|
-
end
|
2240
|
-
end
|
2241
|
-
|
2242
|
-
class BillUntil < Stripe::RequestParams
|
2243
|
-
class AmendmentEnd < Stripe::RequestParams
|
2244
|
-
# 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.
|
2245
|
-
attr_accessor :index
|
2246
|
-
|
2247
|
-
def initialize(index: nil)
|
2248
|
-
@index = index
|
2249
|
-
end
|
2250
|
-
end
|
2251
|
-
|
2252
|
-
class Duration < Stripe::RequestParams
|
2253
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2254
|
-
attr_accessor :interval
|
2255
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2256
|
-
attr_accessor :interval_count
|
2257
|
-
|
2258
|
-
def initialize(interval: nil, interval_count: nil)
|
2259
|
-
@interval = interval
|
2260
|
-
@interval_count = interval_count
|
2261
|
-
end
|
2262
|
-
end
|
2263
|
-
# End the prebilled period when a specified amendment ends.
|
2264
|
-
attr_accessor :amendment_end
|
2265
|
-
# Time span for prebilling, starting from `bill_from`.
|
2266
|
-
attr_accessor :duration
|
2267
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2268
|
-
attr_accessor :timestamp
|
2269
|
-
# Select one of several ways to pass the `bill_until` value.
|
2270
|
-
attr_accessor :type
|
2271
|
-
|
2272
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2273
|
-
@amendment_end = amendment_end
|
2274
|
-
@duration = duration
|
2275
|
-
@timestamp = timestamp
|
2276
|
-
@type = type
|
2277
|
-
end
|
2278
|
-
end
|
2279
|
-
# The beginning of the prebilled time period. The default value is `now`.
|
2280
|
-
attr_accessor :bill_from
|
2281
|
-
# The end of the prebilled time period.
|
2282
|
-
attr_accessor :bill_until
|
2283
|
-
# When the prebilling invoice should be created. The default value is `now`.
|
2284
|
-
attr_accessor :invoice_at
|
2285
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2286
|
-
attr_accessor :update_behavior
|
2287
|
-
|
2288
|
-
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2289
|
-
@bill_from = bill_from
|
2290
|
-
@bill_until = bill_until
|
2291
|
-
@invoice_at = invoice_at
|
2292
|
-
@update_behavior = update_behavior
|
2293
|
-
end
|
2294
|
-
end
|
2295
|
-
|
2296
|
-
class ScheduleSettings < Stripe::RequestParams
|
2297
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2298
|
-
attr_accessor :end_behavior
|
2299
|
-
|
2300
|
-
def initialize(end_behavior: nil)
|
2301
|
-
@end_behavior = end_behavior
|
2302
|
-
end
|
2303
|
-
end
|
2304
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2305
|
-
attr_accessor :amendments
|
2306
|
-
# Specifies which fields in the response should be expanded.
|
2307
|
-
attr_accessor :expand
|
2308
|
-
# Provide any time periods to bill in advance.
|
2309
|
-
attr_accessor :prebilling
|
2310
|
-
# In cases where the amendment changes the currently active phase,
|
2311
|
-
# specifies if and how to prorate at the time of the request.
|
2312
|
-
attr_accessor :proration_behavior
|
2313
|
-
# Changes to apply to the subscription schedule.
|
2314
|
-
attr_accessor :schedule_settings
|
2315
|
-
|
2316
|
-
def initialize(
|
2317
|
-
amendments: nil,
|
2318
|
-
expand: nil,
|
2319
|
-
prebilling: nil,
|
2320
|
-
proration_behavior: nil,
|
2321
|
-
schedule_settings: nil
|
2322
|
-
)
|
2323
|
-
@amendments = amendments
|
2324
|
-
@expand = expand
|
2325
|
-
@prebilling = prebilling
|
2326
|
-
@proration_behavior = proration_behavior
|
2327
|
-
@schedule_settings = schedule_settings
|
2328
|
-
end
|
2329
|
-
end
|
2330
|
-
|
2331
1236
|
class CancelParams < Stripe::RequestParams
|
2332
1237
|
# Specifies which fields in the response should be expanded.
|
2333
1238
|
attr_accessor :expand
|
@@ -2356,8 +1261,6 @@ module Stripe
|
|
2356
1261
|
end
|
2357
1262
|
# ID of the Connect Application that created the schedule.
|
2358
1263
|
attr_reader :application
|
2359
|
-
# 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.
|
2360
|
-
attr_reader :billing_behavior
|
2361
1264
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
2362
1265
|
attr_reader :canceled_at
|
2363
1266
|
# Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
|
@@ -2374,8 +1277,6 @@ module Stripe
|
|
2374
1277
|
attr_reader :end_behavior
|
2375
1278
|
# Unique identifier for the object.
|
2376
1279
|
attr_reader :id
|
2377
|
-
# Details of the most recent price migration that failed for the subscription schedule.
|
2378
|
-
attr_reader :last_price_migration_error
|
2379
1280
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
2380
1281
|
attr_reader :livemode
|
2381
1282
|
# 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.
|
@@ -2384,8 +1285,6 @@ module Stripe
|
|
2384
1285
|
attr_reader :object
|
2385
1286
|
# Configuration for the subscription schedule's phases.
|
2386
1287
|
attr_reader :phases
|
2387
|
-
# Time period and invoice for a Subscription billed in advance.
|
2388
|
-
attr_reader :prebilling
|
2389
1288
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
2390
1289
|
attr_reader :released_at
|
2391
1290
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
@@ -2397,26 +1296,6 @@ module Stripe
|
|
2397
1296
|
# ID of the test clock this subscription schedule belongs to.
|
2398
1297
|
attr_reader :test_clock
|
2399
1298
|
|
2400
|
-
# Amends an existing subscription schedule.
|
2401
|
-
def amend(params = {}, opts = {})
|
2402
|
-
request_stripe_object(
|
2403
|
-
method: :post,
|
2404
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
2405
|
-
params: params,
|
2406
|
-
opts: opts
|
2407
|
-
)
|
2408
|
-
end
|
2409
|
-
|
2410
|
-
# Amends an existing subscription schedule.
|
2411
|
-
def self.amend(schedule, params = {}, opts = {})
|
2412
|
-
request_stripe_object(
|
2413
|
-
method: :post,
|
2414
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2415
|
-
params: params,
|
2416
|
-
opts: opts
|
2417
|
-
)
|
2418
|
-
end
|
2419
|
-
|
2420
1299
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
2421
1300
|
def cancel(params = {}, opts = {})
|
2422
1301
|
request_stripe_object(
|