stripe 15.5.0 → 15.6.0.pre.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +1670 -659
- data/README.md +4 -6
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +32 -0
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +60 -0
- data/lib/stripe/event_types.rb +102 -0
- data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_link_returned_event.rb +13 -0
- data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +22 -0
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
- data/lib/stripe/object_types.rb +53 -0
- data/lib/stripe/resources/account.rb +653 -1
- data/lib/stripe/resources/account_notice.rb +123 -0
- data/lib/stripe/resources/account_session.rb +256 -1
- data/lib/stripe/resources/balance_settings.rb +112 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +4 -0
- data/lib/stripe/resources/billing/credit_grant.rb +10 -0
- data/lib/stripe/resources/billing/meter_usage.rb +23 -0
- data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
- data/lib/stripe/resources/billing_portal/session.rb +6 -0
- data/lib/stripe/resources/capital/financing_offer.rb +179 -0
- data/lib/stripe/resources/capital/financing_summary.rb +55 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
- data/lib/stripe/resources/card.rb +2 -0
- data/lib/stripe/resources/cash_balance.rb +2 -0
- data/lib/stripe/resources/charge.rb +1540 -0
- data/lib/stripe/resources/checkout/session.rb +495 -4
- data/lib/stripe/resources/confirmation_token.rb +170 -0
- data/lib/stripe/resources/coupon.rb +30 -1
- data/lib/stripe/resources/credit_note.rb +6 -0
- data/lib/stripe/resources/credit_note_line_item.rb +9 -0
- data/lib/stripe/resources/customer.rb +2 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_session.rb +6 -1
- data/lib/stripe/resources/discount.rb +2 -0
- data/lib/stripe/resources/dispute.rb +11 -0
- data/lib/stripe/resources/event.rb +31 -0
- data/lib/stripe/resources/financial_connections/account.rb +22 -1
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
- data/lib/stripe/resources/financial_connections/institution.rb +92 -0
- data/lib/stripe/resources/financial_connections/session.rb +62 -2
- data/lib/stripe/resources/fx_quote.rb +186 -0
- data/lib/stripe/resources/identity/verification_session.rb +10 -0
- data/lib/stripe/resources/invoice.rb +1140 -16
- data/lib/stripe/resources/invoice_item.rb +78 -2
- data/lib/stripe/resources/invoice_line_item.rb +55 -1
- data/lib/stripe/resources/invoice_payment.rb +6 -1
- data/lib/stripe/resources/issuing/cardholder.rb +2 -1
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
- data/lib/stripe/resources/issuing/settlement.rb +53 -0
- data/lib/stripe/resources/issuing/transaction.rb +6 -0
- data/lib/stripe/resources/line_item.rb +37 -0
- data/lib/stripe/resources/mandate.rb +89 -1
- data/lib/stripe/resources/margin.rb +115 -0
- data/lib/stripe/resources/order.rb +2958 -0
- data/lib/stripe/resources/payment_attempt_record.rb +1181 -0
- data/lib/stripe/resources/payment_intent.rb +6448 -545
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +72 -0
- data/lib/stripe/resources/payment_method.rb +194 -1
- data/lib/stripe/resources/payment_method_configuration.rb +295 -0
- data/lib/stripe/resources/payment_record.rb +1727 -0
- data/lib/stripe/resources/price.rb +30 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +298 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +33 -0
- data/lib/stripe/resources/promotion_code.rb +10 -0
- data/lib/stripe/resources/quote.rb +2038 -7
- data/lib/stripe/resources/quote_line.rb +274 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +680 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +395 -0
- data/lib/stripe/resources/refund.rb +9 -0
- data/lib/stripe/resources/setup_attempt.rb +24 -0
- data/lib/stripe/resources/setup_intent.rb +771 -9
- data/lib/stripe/resources/source.rb +29 -0
- data/lib/stripe/resources/subscription.rb +365 -9
- data/lib/stripe/resources/subscription_item.rb +84 -3
- data/lib/stripe/resources/subscription_schedule.rb +1007 -10
- data/lib/stripe/resources/tax/association.rb +66 -0
- data/lib/stripe/resources/tax/form.rb +211 -0
- data/lib/stripe/resources/tax_id.rb +12 -2
- data/lib/stripe/resources/terminal/configuration.rb +33 -0
- data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
- data/lib/stripe/resources/terminal/reader.rb +8 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
- data/lib/stripe/resources/transfer.rb +6 -0
- data/lib/stripe/resources/treasury/financial_account.rb +22 -3
- data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
- data/lib/stripe/resources/treasury/received_credit.rb +38 -1
- data/lib/stripe/resources/treasury/received_debit.rb +40 -1
- data/lib/stripe/resources/v2/core/account.rb +1938 -0
- data/lib/stripe/resources/v2/core/account_link.rb +72 -0
- data/lib/stripe/resources/v2/core/person.rb +276 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +74 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +39 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +20 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +22 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +51 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +79 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +68 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +94 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +129 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +82 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +45 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +117 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +77 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +49 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +122 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +84 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +80 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +70 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +89 -0
- data/lib/stripe/resources.rb +109 -0
- data/lib/stripe/services/account_notice_service.rb +101 -0
- data/lib/stripe/services/account_service.rb +562 -1
- data/lib/stripe/services/account_session_service.rb +226 -1
- data/lib/stripe/services/balance_settings_service.rb +99 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +4 -1
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +8 -0
- data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
- data/lib/stripe/services/billing_portal/session_service.rb +4 -0
- data/lib/stripe/services/billing_service.rb +2 -1
- data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/charge_service.rb +1418 -0
- data/lib/stripe/services/checkout/session_service.rb +392 -4
- data/lib/stripe/services/coupon_service.rb +17 -1
- data/lib/stripe/services/credit_note_service.rb +4 -0
- data/lib/stripe/services/customer_session_service.rb +4 -1
- data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
- data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
- data/lib/stripe/services/financial_connections/account_service.rb +7 -2
- data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
- data/lib/stripe/services/financial_connections/session_service.rb +34 -2
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/fx_quote_service.rb +123 -0
- data/lib/stripe/services/identity/verification_session_service.rb +8 -0
- data/lib/stripe/services/invoice_item_service.rb +74 -2
- data/lib/stripe/services/invoice_line_item_service.rb +33 -1
- data/lib/stripe/services/invoice_payment_service.rb +4 -1
- data/lib/stripe/services/invoice_service.rb +1074 -16
- data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
- data/lib/stripe/services/issuing/transaction_service.rb +4 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/mandate_service.rb +40 -0
- data/lib/stripe/services/margin_service.rb +119 -0
- data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
- data/lib/stripe/services/order_service.rb +2388 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +52 -0
- data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
- data/lib/stripe/services/payment_intent_service.rb +7630 -2215
- data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
- data/lib/stripe/services/payment_method_service.rb +120 -1
- data/lib/stripe/services/payment_record_service.rb +562 -0
- data/lib/stripe/services/price_service.rb +19 -0
- data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
- data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
- data/lib/stripe/services/privacy_service.rb +13 -0
- data/lib/stripe/services/promotion_code_service.rb +8 -0
- data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
- data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
- data/lib/stripe/services/quote_service.rb +1723 -8
- data/lib/stripe/services/setup_intent_service.rb +691 -9
- data/lib/stripe/services/subscription_item_service.rb +75 -3
- data/lib/stripe/services/subscription_schedule_service.rb +911 -10
- data/lib/stripe/services/subscription_service.rb +309 -9
- data/lib/stripe/services/tax/association_service.rb +31 -0
- data/lib/stripe/services/tax/form_service.rb +100 -0
- data/lib/stripe/services/tax_id_service.rb +8 -2
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/configuration_service.rb +26 -0
- data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
- data/lib/stripe/services/terminal_service.rb +3 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
- data/lib/stripe/services/transfer_service.rb +4 -0
- data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
- data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
- data/lib/stripe/services/v1_services.rb +11 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +114 -0
- data/lib/stripe/services/v2/core/account_service.rb +4536 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +4 -1
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +119 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
- data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
- data/lib/stripe/services/v2/money_management_service.rb +31 -0
- data/lib/stripe/services/v2/payment_service.rb +15 -0
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +152 -0
- data/lib/stripe/services/v2/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +53 -0
- data/lib/stripe/services/v2_services.rb +4 -1
- data/lib/stripe/services.rb +55 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +53 -0
- data/rbi/stripe.rbi +201354 -0
- data/stripe.gemspec +4 -1
- metadata +168 -323
- data/rbi/stripe/resources/account.rbi +0 -4991
- data/rbi/stripe/resources/account_link.rbi +0 -76
- data/rbi/stripe/resources/account_session.rbi +0 -1173
- data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
- data/rbi/stripe/resources/application.rbi +0 -20
- data/rbi/stripe/resources/application_fee.rbi +0 -118
- data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
- data/rbi/stripe/resources/apps/secret.rbi +0 -195
- data/rbi/stripe/resources/balance.rbi +0 -230
- data/rbi/stripe/resources/balance_transaction.rbi +0 -147
- data/rbi/stripe/resources/bank_account.rbi +0 -127
- data/rbi/stripe/resources/billing/alert.rbi +0 -201
- data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
- data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
- data/rbi/stripe/resources/billing/meter.rbi +0 -226
- data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
- data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -712
- data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
- data/rbi/stripe/resources/capability.rbi +0 -125
- data/rbi/stripe/resources/card.rbi +0 -125
- data/rbi/stripe/resources/cash_balance.rbi +0 -32
- data/rbi/stripe/resources/charge.rbi +0 -2136
- data/rbi/stripe/resources/checkout/session.rbi +0 -4105
- data/rbi/stripe/resources/climate/order.rbi +0 -245
- data/rbi/stripe/resources/climate/product.rbi +0 -75
- data/rbi/stripe/resources/climate/supplier.rbi +0 -72
- data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
- data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
- data/rbi/stripe/resources/country_spec.rbi +0 -85
- data/rbi/stripe/resources/coupon.rbi +0 -250
- data/rbi/stripe/resources/credit_note.rbi +0 -752
- data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
- data/rbi/stripe/resources/customer.rbi +0 -993
- data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
- data/rbi/stripe/resources/customer_session.rbi +0 -200
- data/rbi/stripe/resources/discount.rbi +0 -53
- data/rbi/stripe/resources/dispute.rbi +0 -761
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
- data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
- data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
- data/rbi/stripe/resources/event.rbi +0 -137
- data/rbi/stripe/resources/exchange_rate.rbi +0 -66
- data/rbi/stripe/resources/file.rbi +0 -143
- data/rbi/stripe/resources/file_link.rbi +0 -141
- data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
- data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
- data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
- data/rbi/stripe/resources/forwarding/request.rbi +0 -216
- data/rbi/stripe/resources/funding_instructions.rbi +0 -437
- data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
- data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
- data/rbi/stripe/resources/invoice.rbi +0 -3894
- data/rbi/stripe/resources/invoice_item.rbi +0 -470
- data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
- data/rbi/stripe/resources/invoice_payment.rbi +0 -121
- data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
- data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
- data/rbi/stripe/resources/issuing/card.rbi +0 -749
- data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
- data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
- data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
- data/rbi/stripe/resources/issuing/token.rbi +0 -226
- data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
- data/rbi/stripe/resources/line_item.rbi +0 -72
- data/rbi/stripe/resources/login_link.rbi +0 -19
- data/rbi/stripe/resources/mandate.rbi +0 -191
- data/rbi/stripe/resources/payment_intent.rbi +0 -10011
- data/rbi/stripe/resources/payment_link.rbi +0 -1891
- data/rbi/stripe/resources/payment_method.rbi +0 -1770
- data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
- data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
- data/rbi/stripe/resources/payout.rbi +0 -307
- data/rbi/stripe/resources/person.rbi +0 -401
- data/rbi/stripe/resources/plan.rbi +0 -371
- data/rbi/stripe/resources/price.rbi +0 -694
- data/rbi/stripe/resources/product.rbi +0 -553
- data/rbi/stripe/resources/product_feature.rbi +0 -26
- data/rbi/stripe/resources/promotion_code.rbi +0 -264
- data/rbi/stripe/resources/quote.rbi +0 -1137
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
- data/rbi/stripe/resources/radar/value_list.rbi +0 -168
- data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
- data/rbi/stripe/resources/refund.rbi +0 -523
- data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
- data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
- data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
- data/rbi/stripe/resources/reversal.rbi +0 -51
- data/rbi/stripe/resources/review.rbi +0 -154
- data/rbi/stripe/resources/setup_attempt.rbi +0 -477
- data/rbi/stripe/resources/setup_intent.rbi +0 -3974
- data/rbi/stripe/resources/shipping_rate.rbi +0 -305
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
- data/rbi/stripe/resources/source.rbi +0 -1496
- data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
- data/rbi/stripe/resources/source_transaction.rbi +0 -127
- data/rbi/stripe/resources/subscription.rbi +0 -2154
- data/rbi/stripe/resources/subscription_item.rbi +0 -404
- data/rbi/stripe/resources/subscription_schedule.rbi +0 -1795
- data/rbi/stripe/resources/tax/calculation.rbi +0 -478
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
- data/rbi/stripe/resources/tax/registration.rbi +0 -3216
- data/rbi/stripe/resources/tax/settings.rbi +0 -141
- data/rbi/stripe/resources/tax/transaction.rbi +0 -351
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
- data/rbi/stripe/resources/tax_code.rbi +0 -44
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
- data/rbi/stripe/resources/tax_id.rbi +0 -165
- data/rbi/stripe/resources/tax_rate.rbi +0 -239
- data/rbi/stripe/resources/terminal/configuration.rbi +0 -1647
- data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
- data/rbi/stripe/resources/terminal/location.rbi +0 -222
- data/rbi/stripe/resources/terminal/reader.rbi +0 -1016
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
- data/rbi/stripe/resources/token.rbi +0 -1281
- data/rbi/stripe/resources/topup.rbi +0 -222
- data/rbi/stripe/resources/transfer.rbi +0 -199
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
- data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
- data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
- data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
- data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
- data/rbi/stripe/resources/v2/amount.rbi +0 -14
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
- data/rbi/stripe/resources/v2/event.rbi +0 -48
- data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
- data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
- data/rbi/stripe/services/account_capability_service.rbi +0 -51
- data/rbi/stripe/services/account_link_service.rbi +0 -60
- data/rbi/stripe/services/account_login_link_service.rbi +0 -22
- data/rbi/stripe/services/account_person_service.rbi +0 -1007
- data/rbi/stripe/services/account_service.rbi +0 -4281
- data/rbi/stripe/services/account_session_service.rbi +0 -748
- data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
- data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
- data/rbi/stripe/services/application_fee_service.rbi +0 -78
- data/rbi/stripe/services/apps/secret_service.rbi +0 -151
- data/rbi/stripe/services/apps_service.rbi +0 -9
- data/rbi/stripe/services/balance_service.rbi +0 -21
- data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
- data/rbi/stripe/services/billing/alert_service.rbi +0 -152
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
- data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
- data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
- data/rbi/stripe/services/billing/meter_service.rbi +0 -163
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -561
- data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
- data/rbi/stripe/services/billing_portal_service.rbi +0 -10
- data/rbi/stripe/services/billing_service.rbi +0 -15
- data/rbi/stripe/services/charge_service.rbi +0 -448
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
- data/rbi/stripe/services/checkout/session_service.rbi +0 -2697
- data/rbi/stripe/services/checkout_service.rbi +0 -9
- data/rbi/stripe/services/climate/order_service.rbi +0 -142
- data/rbi/stripe/services/climate/product_service.rbi +0 -46
- data/rbi/stripe/services/climate_service.rbi +0 -11
- data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
- data/rbi/stripe/services/country_spec_service.rbi +0 -44
- data/rbi/stripe/services/coupon_service.rbi +0 -194
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
- data/rbi/stripe/services/credit_note_service.rbi +0 -415
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
- data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
- data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
- data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
- data/rbi/stripe/services/customer_service.rbi +0 -635
- data/rbi/stripe/services/customer_session_service.rbi +0 -116
- data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
- data/rbi/stripe/services/dispute_service.rbi +0 -424
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
- data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
- data/rbi/stripe/services/entitlements_service.rbi +0 -10
- data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
- data/rbi/stripe/services/event_service.rbi +0 -83
- data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
- data/rbi/stripe/services/file_link_service.rbi +0 -124
- data/rbi/stripe/services/file_service.rbi +0 -116
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
- data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
- data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
- data/rbi/stripe/services/financial_connections_service.rbi +0 -11
- data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
- data/rbi/stripe/services/forwarding_service.rbi +0 -9
- data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
- data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
- data/rbi/stripe/services/identity_service.rbi +0 -10
- data/rbi/stripe/services/invoice_item_service.rbi +0 -366
- data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
- data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
- data/rbi/stripe/services/invoice_service.rbi +0 -3073
- data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
- data/rbi/stripe/services/issuing/card_service.rbi +0 -503
- data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
- data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
- data/rbi/stripe/services/issuing/token_service.rbi +0 -99
- data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
- data/rbi/stripe/services/issuing_service.rbi +0 -16
- data/rbi/stripe/services/mandate_service.rbi +0 -20
- data/rbi/stripe/services/payment_intent_service.rbi +0 -8010
- data/rbi/stripe/services/payment_link_service.rbi +0 -1441
- data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
- data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
- data/rbi/stripe/services/payment_method_service.rbi +0 -781
- data/rbi/stripe/services/payout_service.rbi +0 -209
- data/rbi/stripe/services/plan_service.rbi +0 -282
- data/rbi/stripe/services/price_service.rbi +0 -546
- data/rbi/stripe/services/product_feature_service.rbi +0 -67
- data/rbi/stripe/services/product_service.rbi +0 -477
- data/rbi/stripe/services/promotion_code_service.rbi +0 -214
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
- data/rbi/stripe/services/quote_service.rbi +0 -695
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
- data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
- data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
- data/rbi/stripe/services/radar_service.rbi +0 -11
- data/rbi/stripe/services/refund_service.rbi +0 -185
- data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
- data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
- data/rbi/stripe/services/reporting_service.rbi +0 -10
- data/rbi/stripe/services/review_service.rbi +0 -84
- data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
- data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
- data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
- data/rbi/stripe/services/sigma_service.rbi +0 -9
- data/rbi/stripe/services/source_service.rbi +0 -663
- data/rbi/stripe/services/subscription_item_service.rbi +0 -350
- data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1425
- data/rbi/stripe/services/subscription_service.rbi +0 -1768
- data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
- data/rbi/stripe/services/tax/registration_service.rbi +0 -2278
- data/rbi/stripe/services/tax/settings_service.rbi +0 -93
- data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
- data/rbi/stripe/services/tax_code_service.rbi +0 -44
- data/rbi/stripe/services/tax_id_service.rbi +0 -110
- data/rbi/stripe/services/tax_rate_service.rbi +0 -185
- data/rbi/stripe/services/tax_service.rbi +0 -12
- data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1328
- data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
- data/rbi/stripe/services/terminal/location_service.rbi +0 -182
- data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
- data/rbi/stripe/services/terminal_service.rbi +0 -12
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
- data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
- data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -117
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
- data/rbi/stripe/services/test_helpers_service.rbi +0 -15
- data/rbi/stripe/services/token_service.rbi +0 -1255
- data/rbi/stripe/services/topup_service.rbi +0 -176
- data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
- data/rbi/stripe/services/transfer_service.rbi +0 -152
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
- data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
- data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
- data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
- data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
- data/rbi/stripe/services/treasury_service.rbi +0 -18
- data/rbi/stripe/services/v1_services.rbi +0 -77
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
- data/rbi/stripe/services/v2/billing_service.rbi +0 -14
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
- data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
- data/rbi/stripe/services/v2/core_service.rbi +0 -12
- data/rbi/stripe/services/v2_services.rbi +0 -10
- data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -22,6 +22,24 @@ module Stripe
|
|
22
22
|
end
|
23
23
|
|
24
24
|
class UpdateParams < Stripe::RequestParams
|
25
|
+
class AmountsDue < Stripe::RequestParams
|
26
|
+
# The amount in cents (or local equivalent).
|
27
|
+
attr_accessor :amount
|
28
|
+
# Number of days from when invoice is finalized until the payment is due.
|
29
|
+
attr_accessor :days_until_due
|
30
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
31
|
+
attr_accessor :description
|
32
|
+
# Date on which a payment plan’s payment is due.
|
33
|
+
attr_accessor :due_date
|
34
|
+
|
35
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
36
|
+
@amount = amount
|
37
|
+
@days_until_due = days_until_due
|
38
|
+
@description = description
|
39
|
+
@due_date = due_date
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
25
43
|
class AutomaticTax < Stripe::RequestParams
|
26
44
|
class Liability < Stripe::RequestParams
|
27
45
|
# The connected account being referenced when `type` is `account`.
|
@@ -58,16 +76,44 @@ module Stripe
|
|
58
76
|
end
|
59
77
|
|
60
78
|
class Discount < Stripe::RequestParams
|
79
|
+
class DiscountEnd < Stripe::RequestParams
|
80
|
+
class Duration < Stripe::RequestParams
|
81
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
82
|
+
attr_accessor :interval
|
83
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
84
|
+
attr_accessor :interval_count
|
85
|
+
|
86
|
+
def initialize(interval: nil, interval_count: nil)
|
87
|
+
@interval = interval
|
88
|
+
@interval_count = interval_count
|
89
|
+
end
|
90
|
+
end
|
91
|
+
# Time span for the redeemed discount.
|
92
|
+
attr_accessor :duration
|
93
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
94
|
+
attr_accessor :timestamp
|
95
|
+
# The type of calculation made to determine when the discount ends.
|
96
|
+
attr_accessor :type
|
97
|
+
|
98
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
99
|
+
@duration = duration
|
100
|
+
@timestamp = timestamp
|
101
|
+
@type = type
|
102
|
+
end
|
103
|
+
end
|
61
104
|
# ID of the coupon to create a new discount for.
|
62
105
|
attr_accessor :coupon
|
63
106
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
64
107
|
attr_accessor :discount
|
108
|
+
# Details to determine how long the discount should be applied for.
|
109
|
+
attr_accessor :discount_end
|
65
110
|
# ID of the promotion code to create a new discount for.
|
66
111
|
attr_accessor :promotion_code
|
67
112
|
|
68
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
113
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
69
114
|
@coupon = coupon
|
70
115
|
@discount = discount
|
116
|
+
@discount_end = discount_end
|
71
117
|
@promotion_code = promotion_code
|
72
118
|
end
|
73
119
|
end
|
@@ -187,17 +233,47 @@ module Stripe
|
|
187
233
|
end
|
188
234
|
end
|
189
235
|
|
236
|
+
class IdBankTransfer < Stripe::RequestParams; end
|
190
237
|
class Konbini < Stripe::RequestParams; end
|
191
238
|
class SepaDebit < Stripe::RequestParams; end
|
192
239
|
|
240
|
+
class Upi < Stripe::RequestParams
|
241
|
+
class MandateOptions < Stripe::RequestParams
|
242
|
+
# Amount to be charged for future payments.
|
243
|
+
attr_accessor :amount
|
244
|
+
# One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
245
|
+
attr_accessor :amount_type
|
246
|
+
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
247
|
+
attr_accessor :description
|
248
|
+
# End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
249
|
+
attr_accessor :end_date
|
250
|
+
|
251
|
+
def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
|
252
|
+
@amount = amount
|
253
|
+
@amount_type = amount_type
|
254
|
+
@description = description
|
255
|
+
@end_date = end_date
|
256
|
+
end
|
257
|
+
end
|
258
|
+
# Configuration options for setting up an eMandate
|
259
|
+
attr_accessor :mandate_options
|
260
|
+
|
261
|
+
def initialize(mandate_options: nil)
|
262
|
+
@mandate_options = mandate_options
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
193
266
|
class UsBankAccount < Stripe::RequestParams
|
194
267
|
class FinancialConnections < Stripe::RequestParams
|
195
268
|
class Filters < Stripe::RequestParams
|
196
269
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
197
270
|
attr_accessor :account_subcategories
|
271
|
+
# ID of the institution to use to filter for selectable accounts.
|
272
|
+
attr_accessor :institution
|
198
273
|
|
199
|
-
def initialize(account_subcategories: nil)
|
274
|
+
def initialize(account_subcategories: nil, institution: nil)
|
200
275
|
@account_subcategories = account_subcategories
|
276
|
+
@institution = institution
|
201
277
|
end
|
202
278
|
end
|
203
279
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -231,10 +307,14 @@ module Stripe
|
|
231
307
|
attr_accessor :card
|
232
308
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
233
309
|
attr_accessor :customer_balance
|
310
|
+
# If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
311
|
+
attr_accessor :id_bank_transfer
|
234
312
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
235
313
|
attr_accessor :konbini
|
236
314
|
# If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
237
315
|
attr_accessor :sepa_debit
|
316
|
+
# If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
|
317
|
+
attr_accessor :upi
|
238
318
|
# If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
239
319
|
attr_accessor :us_bank_account
|
240
320
|
|
@@ -243,16 +323,20 @@ module Stripe
|
|
243
323
|
bancontact: nil,
|
244
324
|
card: nil,
|
245
325
|
customer_balance: nil,
|
326
|
+
id_bank_transfer: nil,
|
246
327
|
konbini: nil,
|
247
328
|
sepa_debit: nil,
|
329
|
+
upi: nil,
|
248
330
|
us_bank_account: nil
|
249
331
|
)
|
250
332
|
@acss_debit = acss_debit
|
251
333
|
@bancontact = bancontact
|
252
334
|
@card = card
|
253
335
|
@customer_balance = customer_balance
|
336
|
+
@id_bank_transfer = id_bank_transfer
|
254
337
|
@konbini = konbini
|
255
338
|
@sepa_debit = sepa_debit
|
339
|
+
@upi = upi
|
256
340
|
@us_bank_account = us_bank_account
|
257
341
|
end
|
258
342
|
end
|
@@ -462,6 +546,8 @@ module Stripe
|
|
462
546
|
end
|
463
547
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
464
548
|
attr_accessor :account_tax_ids
|
549
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
550
|
+
attr_accessor :amounts_due
|
465
551
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
466
552
|
attr_accessor :application_fee_amount
|
467
553
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -476,6 +562,8 @@ module Stripe
|
|
476
562
|
attr_accessor :custom_fields
|
477
563
|
# The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
|
478
564
|
attr_accessor :days_until_due
|
565
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
566
|
+
attr_accessor :default_margins
|
479
567
|
# ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
480
568
|
attr_accessor :default_payment_method
|
481
569
|
# ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
@@ -517,6 +605,7 @@ module Stripe
|
|
517
605
|
|
518
606
|
def initialize(
|
519
607
|
account_tax_ids: nil,
|
608
|
+
amounts_due: nil,
|
520
609
|
application_fee_amount: nil,
|
521
610
|
auto_advance: nil,
|
522
611
|
automatic_tax: nil,
|
@@ -524,6 +613,7 @@ module Stripe
|
|
524
613
|
collection_method: nil,
|
525
614
|
custom_fields: nil,
|
526
615
|
days_until_due: nil,
|
616
|
+
default_margins: nil,
|
527
617
|
default_payment_method: nil,
|
528
618
|
default_source: nil,
|
529
619
|
default_tax_rates: nil,
|
@@ -545,6 +635,7 @@ module Stripe
|
|
545
635
|
transfer_data: nil
|
546
636
|
)
|
547
637
|
@account_tax_ids = account_tax_ids
|
638
|
+
@amounts_due = amounts_due
|
548
639
|
@application_fee_amount = application_fee_amount
|
549
640
|
@auto_advance = auto_advance
|
550
641
|
@automatic_tax = automatic_tax
|
@@ -552,6 +643,7 @@ module Stripe
|
|
552
643
|
@collection_method = collection_method
|
553
644
|
@custom_fields = custom_fields
|
554
645
|
@days_until_due = days_until_due
|
646
|
+
@default_margins = default_margins
|
555
647
|
@default_payment_method = default_payment_method
|
556
648
|
@default_source = default_source
|
557
649
|
@default_tax_rates = default_tax_rates
|
@@ -616,6 +708,8 @@ module Stripe
|
|
616
708
|
attr_accessor :created
|
617
709
|
# Only return invoices for the customer specified by this customer ID.
|
618
710
|
attr_accessor :customer
|
711
|
+
# Only return invoices for the account specified by this account ID.
|
712
|
+
attr_accessor :customer_account
|
619
713
|
# Attribute for param field due_date
|
620
714
|
attr_accessor :due_date
|
621
715
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
@@ -635,6 +729,7 @@ module Stripe
|
|
635
729
|
collection_method: nil,
|
636
730
|
created: nil,
|
637
731
|
customer: nil,
|
732
|
+
customer_account: nil,
|
638
733
|
due_date: nil,
|
639
734
|
ending_before: nil,
|
640
735
|
expand: nil,
|
@@ -646,6 +741,7 @@ module Stripe
|
|
646
741
|
@collection_method = collection_method
|
647
742
|
@created = created
|
648
743
|
@customer = customer
|
744
|
+
@customer_account = customer_account
|
649
745
|
@due_date = due_date
|
650
746
|
@ending_before = ending_before
|
651
747
|
@expand = expand
|
@@ -657,6 +753,24 @@ module Stripe
|
|
657
753
|
end
|
658
754
|
|
659
755
|
class CreateParams < Stripe::RequestParams
|
756
|
+
class AmountsDue < Stripe::RequestParams
|
757
|
+
# The amount in cents (or local equivalent).
|
758
|
+
attr_accessor :amount
|
759
|
+
# Number of days from when invoice is finalized until the payment is due.
|
760
|
+
attr_accessor :days_until_due
|
761
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
762
|
+
attr_accessor :description
|
763
|
+
# Date on which a payment plan’s payment is due.
|
764
|
+
attr_accessor :due_date
|
765
|
+
|
766
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
767
|
+
@amount = amount
|
768
|
+
@days_until_due = days_until_due
|
769
|
+
@description = description
|
770
|
+
@due_date = due_date
|
771
|
+
end
|
772
|
+
end
|
773
|
+
|
660
774
|
class AutomaticTax < Stripe::RequestParams
|
661
775
|
class Liability < Stripe::RequestParams
|
662
776
|
# The connected account being referenced when `type` is `account`.
|
@@ -693,16 +807,44 @@ module Stripe
|
|
693
807
|
end
|
694
808
|
|
695
809
|
class Discount < Stripe::RequestParams
|
810
|
+
class DiscountEnd < Stripe::RequestParams
|
811
|
+
class Duration < Stripe::RequestParams
|
812
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
813
|
+
attr_accessor :interval
|
814
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
815
|
+
attr_accessor :interval_count
|
816
|
+
|
817
|
+
def initialize(interval: nil, interval_count: nil)
|
818
|
+
@interval = interval
|
819
|
+
@interval_count = interval_count
|
820
|
+
end
|
821
|
+
end
|
822
|
+
# Time span for the redeemed discount.
|
823
|
+
attr_accessor :duration
|
824
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
825
|
+
attr_accessor :timestamp
|
826
|
+
# The type of calculation made to determine when the discount ends.
|
827
|
+
attr_accessor :type
|
828
|
+
|
829
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
830
|
+
@duration = duration
|
831
|
+
@timestamp = timestamp
|
832
|
+
@type = type
|
833
|
+
end
|
834
|
+
end
|
696
835
|
# ID of the coupon to create a new discount for.
|
697
836
|
attr_accessor :coupon
|
698
837
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
699
838
|
attr_accessor :discount
|
839
|
+
# Details to determine how long the discount should be applied for.
|
840
|
+
attr_accessor :discount_end
|
700
841
|
# ID of the promotion code to create a new discount for.
|
701
842
|
attr_accessor :promotion_code
|
702
843
|
|
703
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
844
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
704
845
|
@coupon = coupon
|
705
846
|
@discount = discount
|
847
|
+
@discount_end = discount_end
|
706
848
|
@promotion_code = promotion_code
|
707
849
|
end
|
708
850
|
end
|
@@ -834,17 +976,47 @@ module Stripe
|
|
834
976
|
end
|
835
977
|
end
|
836
978
|
|
979
|
+
class IdBankTransfer < Stripe::RequestParams; end
|
837
980
|
class Konbini < Stripe::RequestParams; end
|
838
981
|
class SepaDebit < Stripe::RequestParams; end
|
839
982
|
|
983
|
+
class Upi < Stripe::RequestParams
|
984
|
+
class MandateOptions < Stripe::RequestParams
|
985
|
+
# Amount to be charged for future payments.
|
986
|
+
attr_accessor :amount
|
987
|
+
# One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
988
|
+
attr_accessor :amount_type
|
989
|
+
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
990
|
+
attr_accessor :description
|
991
|
+
# End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
992
|
+
attr_accessor :end_date
|
993
|
+
|
994
|
+
def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
|
995
|
+
@amount = amount
|
996
|
+
@amount_type = amount_type
|
997
|
+
@description = description
|
998
|
+
@end_date = end_date
|
999
|
+
end
|
1000
|
+
end
|
1001
|
+
# Configuration options for setting up an eMandate
|
1002
|
+
attr_accessor :mandate_options
|
1003
|
+
|
1004
|
+
def initialize(mandate_options: nil)
|
1005
|
+
@mandate_options = mandate_options
|
1006
|
+
end
|
1007
|
+
end
|
1008
|
+
|
840
1009
|
class UsBankAccount < Stripe::RequestParams
|
841
1010
|
class FinancialConnections < Stripe::RequestParams
|
842
1011
|
class Filters < Stripe::RequestParams
|
843
1012
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
844
1013
|
attr_accessor :account_subcategories
|
1014
|
+
# ID of the institution to use to filter for selectable accounts.
|
1015
|
+
attr_accessor :institution
|
845
1016
|
|
846
|
-
def initialize(account_subcategories: nil)
|
1017
|
+
def initialize(account_subcategories: nil, institution: nil)
|
847
1018
|
@account_subcategories = account_subcategories
|
1019
|
+
@institution = institution
|
848
1020
|
end
|
849
1021
|
end
|
850
1022
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -878,10 +1050,14 @@ module Stripe
|
|
878
1050
|
attr_accessor :card
|
879
1051
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
880
1052
|
attr_accessor :customer_balance
|
1053
|
+
# If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1054
|
+
attr_accessor :id_bank_transfer
|
881
1055
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
882
1056
|
attr_accessor :konbini
|
883
1057
|
# If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
884
1058
|
attr_accessor :sepa_debit
|
1059
|
+
# If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
|
1060
|
+
attr_accessor :upi
|
885
1061
|
# If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
886
1062
|
attr_accessor :us_bank_account
|
887
1063
|
|
@@ -890,16 +1066,20 @@ module Stripe
|
|
890
1066
|
bancontact: nil,
|
891
1067
|
card: nil,
|
892
1068
|
customer_balance: nil,
|
1069
|
+
id_bank_transfer: nil,
|
893
1070
|
konbini: nil,
|
894
1071
|
sepa_debit: nil,
|
1072
|
+
upi: nil,
|
895
1073
|
us_bank_account: nil
|
896
1074
|
)
|
897
1075
|
@acss_debit = acss_debit
|
898
1076
|
@bancontact = bancontact
|
899
1077
|
@card = card
|
900
1078
|
@customer_balance = customer_balance
|
1079
|
+
@id_bank_transfer = id_bank_transfer
|
901
1080
|
@konbini = konbini
|
902
1081
|
@sepa_debit = sepa_debit
|
1082
|
+
@upi = upi
|
903
1083
|
@us_bank_account = us_bank_account
|
904
1084
|
end
|
905
1085
|
end
|
@@ -1109,6 +1289,8 @@ module Stripe
|
|
1109
1289
|
end
|
1110
1290
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1111
1291
|
attr_accessor :account_tax_ids
|
1292
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1293
|
+
attr_accessor :amounts_due
|
1112
1294
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
1113
1295
|
attr_accessor :application_fee_amount
|
1114
1296
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false.
|
@@ -1125,8 +1307,12 @@ module Stripe
|
|
1125
1307
|
attr_accessor :custom_fields
|
1126
1308
|
# The ID of the customer who will be billed.
|
1127
1309
|
attr_accessor :customer
|
1310
|
+
# The ID of the account who will be billed.
|
1311
|
+
attr_accessor :customer_account
|
1128
1312
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1129
1313
|
attr_accessor :days_until_due
|
1314
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1315
|
+
attr_accessor :default_margins
|
1130
1316
|
# ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
1131
1317
|
attr_accessor :default_payment_method
|
1132
1318
|
# ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
@@ -1174,6 +1360,7 @@ module Stripe
|
|
1174
1360
|
|
1175
1361
|
def initialize(
|
1176
1362
|
account_tax_ids: nil,
|
1363
|
+
amounts_due: nil,
|
1177
1364
|
application_fee_amount: nil,
|
1178
1365
|
auto_advance: nil,
|
1179
1366
|
automatic_tax: nil,
|
@@ -1182,7 +1369,9 @@ module Stripe
|
|
1182
1369
|
currency: nil,
|
1183
1370
|
custom_fields: nil,
|
1184
1371
|
customer: nil,
|
1372
|
+
customer_account: nil,
|
1185
1373
|
days_until_due: nil,
|
1374
|
+
default_margins: nil,
|
1186
1375
|
default_payment_method: nil,
|
1187
1376
|
default_source: nil,
|
1188
1377
|
default_tax_rates: nil,
|
@@ -1207,6 +1396,7 @@ module Stripe
|
|
1207
1396
|
transfer_data: nil
|
1208
1397
|
)
|
1209
1398
|
@account_tax_ids = account_tax_ids
|
1399
|
+
@amounts_due = amounts_due
|
1210
1400
|
@application_fee_amount = application_fee_amount
|
1211
1401
|
@auto_advance = auto_advance
|
1212
1402
|
@automatic_tax = automatic_tax
|
@@ -1215,7 +1405,9 @@ module Stripe
|
|
1215
1405
|
@currency = currency
|
1216
1406
|
@custom_fields = custom_fields
|
1217
1407
|
@customer = customer
|
1408
|
+
@customer_account = customer_account
|
1218
1409
|
@days_until_due = days_until_due
|
1410
|
+
@default_margins = default_margins
|
1219
1411
|
@default_payment_method = default_payment_method
|
1220
1412
|
@default_source = default_source
|
1221
1413
|
@default_tax_rates = default_tax_rates
|
@@ -1262,16 +1454,44 @@ module Stripe
|
|
1262
1454
|
class AddLinesParams < Stripe::RequestParams
|
1263
1455
|
class Line < Stripe::RequestParams
|
1264
1456
|
class Discount < Stripe::RequestParams
|
1457
|
+
class DiscountEnd < Stripe::RequestParams
|
1458
|
+
class Duration < Stripe::RequestParams
|
1459
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1460
|
+
attr_accessor :interval
|
1461
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1462
|
+
attr_accessor :interval_count
|
1463
|
+
|
1464
|
+
def initialize(interval: nil, interval_count: nil)
|
1465
|
+
@interval = interval
|
1466
|
+
@interval_count = interval_count
|
1467
|
+
end
|
1468
|
+
end
|
1469
|
+
# Time span for the redeemed discount.
|
1470
|
+
attr_accessor :duration
|
1471
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1472
|
+
attr_accessor :timestamp
|
1473
|
+
# The type of calculation made to determine when the discount ends.
|
1474
|
+
attr_accessor :type
|
1475
|
+
|
1476
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1477
|
+
@duration = duration
|
1478
|
+
@timestamp = timestamp
|
1479
|
+
@type = type
|
1480
|
+
end
|
1481
|
+
end
|
1265
1482
|
# ID of the coupon to create a new discount for.
|
1266
1483
|
attr_accessor :coupon
|
1267
1484
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1268
1485
|
attr_accessor :discount
|
1486
|
+
# Details to determine how long the discount should be applied for.
|
1487
|
+
attr_accessor :discount_end
|
1269
1488
|
# ID of the promotion code to create a new discount for.
|
1270
1489
|
attr_accessor :promotion_code
|
1271
1490
|
|
1272
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1491
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1273
1492
|
@coupon = coupon
|
1274
1493
|
@discount = discount
|
1494
|
+
@discount_end = discount_end
|
1275
1495
|
@promotion_code = promotion_code
|
1276
1496
|
end
|
1277
1497
|
end
|
@@ -1424,6 +1644,8 @@ module Stripe
|
|
1424
1644
|
attr_accessor :discounts
|
1425
1645
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1426
1646
|
attr_accessor :invoice_item
|
1647
|
+
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
1648
|
+
attr_accessor :margins
|
1427
1649
|
# 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`.
|
1428
1650
|
attr_accessor :metadata
|
1429
1651
|
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
@@ -1445,6 +1667,7 @@ module Stripe
|
|
1445
1667
|
discountable: nil,
|
1446
1668
|
discounts: nil,
|
1447
1669
|
invoice_item: nil,
|
1670
|
+
margins: nil,
|
1448
1671
|
metadata: nil,
|
1449
1672
|
period: nil,
|
1450
1673
|
price_data: nil,
|
@@ -1458,6 +1681,7 @@ module Stripe
|
|
1458
1681
|
@discountable = discountable
|
1459
1682
|
@discounts = discounts
|
1460
1683
|
@invoice_item = invoice_item
|
1684
|
+
@margins = margins
|
1461
1685
|
@metadata = metadata
|
1462
1686
|
@period = period
|
1463
1687
|
@price_data = price_data
|
@@ -1482,14 +1706,59 @@ module Stripe
|
|
1482
1706
|
end
|
1483
1707
|
|
1484
1708
|
class AttachPaymentParams < Stripe::RequestParams
|
1709
|
+
class PaymentRecordData < Stripe::RequestParams
|
1710
|
+
# The amount that was paid out of band.
|
1711
|
+
attr_accessor :amount
|
1712
|
+
# The currency that was paid out of band.
|
1713
|
+
attr_accessor :currency
|
1714
|
+
# 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`.
|
1715
|
+
attr_accessor :metadata
|
1716
|
+
# The type of money movement for this out of band payment record.
|
1717
|
+
attr_accessor :money_movement_type
|
1718
|
+
# The timestamp when this out of band payment was paid.
|
1719
|
+
attr_accessor :paid_at
|
1720
|
+
# The reference for this out of band payment record.
|
1721
|
+
attr_accessor :payment_reference
|
1722
|
+
|
1723
|
+
def initialize(
|
1724
|
+
amount: nil,
|
1725
|
+
currency: nil,
|
1726
|
+
metadata: nil,
|
1727
|
+
money_movement_type: nil,
|
1728
|
+
paid_at: nil,
|
1729
|
+
payment_reference: nil
|
1730
|
+
)
|
1731
|
+
@amount = amount
|
1732
|
+
@currency = currency
|
1733
|
+
@metadata = metadata
|
1734
|
+
@money_movement_type = money_movement_type
|
1735
|
+
@paid_at = paid_at
|
1736
|
+
@payment_reference = payment_reference
|
1737
|
+
end
|
1738
|
+
end
|
1739
|
+
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
1740
|
+
attr_accessor :amount_requested
|
1485
1741
|
# Specifies which fields in the response should be expanded.
|
1486
1742
|
attr_accessor :expand
|
1487
1743
|
# The ID of the PaymentIntent to attach to the invoice.
|
1488
1744
|
attr_accessor :payment_intent
|
1745
|
+
# The ID of the PaymentRecord to attach to the invoice.
|
1746
|
+
attr_accessor :payment_record
|
1747
|
+
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
1748
|
+
attr_accessor :payment_record_data
|
1489
1749
|
|
1490
|
-
def initialize(
|
1750
|
+
def initialize(
|
1751
|
+
amount_requested: nil,
|
1752
|
+
expand: nil,
|
1753
|
+
payment_intent: nil,
|
1754
|
+
payment_record: nil,
|
1755
|
+
payment_record_data: nil
|
1756
|
+
)
|
1757
|
+
@amount_requested = amount_requested
|
1491
1758
|
@expand = expand
|
1492
1759
|
@payment_intent = payment_intent
|
1760
|
+
@payment_record = payment_record
|
1761
|
+
@payment_record_data = payment_record_data
|
1493
1762
|
end
|
1494
1763
|
end
|
1495
1764
|
|
@@ -1589,16 +1858,44 @@ module Stripe
|
|
1589
1858
|
class UpdateLinesParams < Stripe::RequestParams
|
1590
1859
|
class Line < Stripe::RequestParams
|
1591
1860
|
class Discount < Stripe::RequestParams
|
1861
|
+
class DiscountEnd < Stripe::RequestParams
|
1862
|
+
class Duration < Stripe::RequestParams
|
1863
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1864
|
+
attr_accessor :interval
|
1865
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1866
|
+
attr_accessor :interval_count
|
1867
|
+
|
1868
|
+
def initialize(interval: nil, interval_count: nil)
|
1869
|
+
@interval = interval
|
1870
|
+
@interval_count = interval_count
|
1871
|
+
end
|
1872
|
+
end
|
1873
|
+
# Time span for the redeemed discount.
|
1874
|
+
attr_accessor :duration
|
1875
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1876
|
+
attr_accessor :timestamp
|
1877
|
+
# The type of calculation made to determine when the discount ends.
|
1878
|
+
attr_accessor :type
|
1879
|
+
|
1880
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1881
|
+
@duration = duration
|
1882
|
+
@timestamp = timestamp
|
1883
|
+
@type = type
|
1884
|
+
end
|
1885
|
+
end
|
1592
1886
|
# ID of the coupon to create a new discount for.
|
1593
1887
|
attr_accessor :coupon
|
1594
1888
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1595
1889
|
attr_accessor :discount
|
1890
|
+
# Details to determine how long the discount should be applied for.
|
1891
|
+
attr_accessor :discount_end
|
1596
1892
|
# ID of the promotion code to create a new discount for.
|
1597
1893
|
attr_accessor :promotion_code
|
1598
1894
|
|
1599
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1895
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1600
1896
|
@coupon = coupon
|
1601
1897
|
@discount = discount
|
1898
|
+
@discount_end = discount_end
|
1602
1899
|
@promotion_code = promotion_code
|
1603
1900
|
end
|
1604
1901
|
end
|
@@ -1751,6 +2048,8 @@ module Stripe
|
|
1751
2048
|
attr_accessor :discounts
|
1752
2049
|
# ID of an existing line item on the invoice.
|
1753
2050
|
attr_accessor :id
|
2051
|
+
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
2052
|
+
attr_accessor :margins
|
1754
2053
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
1755
2054
|
attr_accessor :metadata
|
1756
2055
|
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
@@ -1772,6 +2071,7 @@ module Stripe
|
|
1772
2071
|
discountable: nil,
|
1773
2072
|
discounts: nil,
|
1774
2073
|
id: nil,
|
2074
|
+
margins: nil,
|
1775
2075
|
metadata: nil,
|
1776
2076
|
period: nil,
|
1777
2077
|
price_data: nil,
|
@@ -1785,6 +2085,7 @@ module Stripe
|
|
1785
2085
|
@discountable = discountable
|
1786
2086
|
@discounts = discounts
|
1787
2087
|
@id = id
|
2088
|
+
@margins = margins
|
1788
2089
|
@metadata = metadata
|
1789
2090
|
@period = period
|
1790
2091
|
@price_data = price_data
|
@@ -1959,32 +2260,88 @@ module Stripe
|
|
1959
2260
|
end
|
1960
2261
|
|
1961
2262
|
class Discount < Stripe::RequestParams
|
2263
|
+
class DiscountEnd < Stripe::RequestParams
|
2264
|
+
class Duration < Stripe::RequestParams
|
2265
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2266
|
+
attr_accessor :interval
|
2267
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2268
|
+
attr_accessor :interval_count
|
2269
|
+
|
2270
|
+
def initialize(interval: nil, interval_count: nil)
|
2271
|
+
@interval = interval
|
2272
|
+
@interval_count = interval_count
|
2273
|
+
end
|
2274
|
+
end
|
2275
|
+
# Time span for the redeemed discount.
|
2276
|
+
attr_accessor :duration
|
2277
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2278
|
+
attr_accessor :timestamp
|
2279
|
+
# The type of calculation made to determine when the discount ends.
|
2280
|
+
attr_accessor :type
|
2281
|
+
|
2282
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2283
|
+
@duration = duration
|
2284
|
+
@timestamp = timestamp
|
2285
|
+
@type = type
|
2286
|
+
end
|
2287
|
+
end
|
1962
2288
|
# ID of the coupon to create a new discount for.
|
1963
2289
|
attr_accessor :coupon
|
1964
2290
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1965
2291
|
attr_accessor :discount
|
2292
|
+
# Details to determine how long the discount should be applied for.
|
2293
|
+
attr_accessor :discount_end
|
1966
2294
|
# ID of the promotion code to create a new discount for.
|
1967
2295
|
attr_accessor :promotion_code
|
1968
2296
|
|
1969
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2297
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1970
2298
|
@coupon = coupon
|
1971
2299
|
@discount = discount
|
2300
|
+
@discount_end = discount_end
|
1972
2301
|
@promotion_code = promotion_code
|
1973
2302
|
end
|
1974
2303
|
end
|
1975
2304
|
|
1976
2305
|
class InvoiceItem < Stripe::RequestParams
|
1977
2306
|
class Discount < Stripe::RequestParams
|
2307
|
+
class DiscountEnd < Stripe::RequestParams
|
2308
|
+
class Duration < Stripe::RequestParams
|
2309
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2310
|
+
attr_accessor :interval
|
2311
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2312
|
+
attr_accessor :interval_count
|
2313
|
+
|
2314
|
+
def initialize(interval: nil, interval_count: nil)
|
2315
|
+
@interval = interval
|
2316
|
+
@interval_count = interval_count
|
2317
|
+
end
|
2318
|
+
end
|
2319
|
+
# Time span for the redeemed discount.
|
2320
|
+
attr_accessor :duration
|
2321
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2322
|
+
attr_accessor :timestamp
|
2323
|
+
# The type of calculation made to determine when the discount ends.
|
2324
|
+
attr_accessor :type
|
2325
|
+
|
2326
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2327
|
+
@duration = duration
|
2328
|
+
@timestamp = timestamp
|
2329
|
+
@type = type
|
2330
|
+
end
|
2331
|
+
end
|
1978
2332
|
# ID of the coupon to create a new discount for.
|
1979
2333
|
attr_accessor :coupon
|
1980
2334
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1981
2335
|
attr_accessor :discount
|
2336
|
+
# Details to determine how long the discount should be applied for.
|
2337
|
+
attr_accessor :discount_end
|
1982
2338
|
# ID of the promotion code to create a new discount for.
|
1983
2339
|
attr_accessor :promotion_code
|
1984
2340
|
|
1985
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2341
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1986
2342
|
@coupon = coupon
|
1987
2343
|
@discount = discount
|
2344
|
+
@discount_end = discount_end
|
1988
2345
|
@promotion_code = promotion_code
|
1989
2346
|
end
|
1990
2347
|
end
|
@@ -2110,6 +2467,458 @@ module Stripe
|
|
2110
2467
|
end
|
2111
2468
|
|
2112
2469
|
class ScheduleDetails < Stripe::RequestParams
|
2470
|
+
class Amendment < Stripe::RequestParams
|
2471
|
+
class AmendmentEnd < Stripe::RequestParams
|
2472
|
+
class DiscountEnd < Stripe::RequestParams
|
2473
|
+
# The ID of a specific discount.
|
2474
|
+
attr_accessor :discount
|
2475
|
+
|
2476
|
+
def initialize(discount: nil)
|
2477
|
+
@discount = discount
|
2478
|
+
end
|
2479
|
+
end
|
2480
|
+
|
2481
|
+
class Duration < Stripe::RequestParams
|
2482
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2483
|
+
attr_accessor :interval
|
2484
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2485
|
+
attr_accessor :interval_count
|
2486
|
+
|
2487
|
+
def initialize(interval: nil, interval_count: nil)
|
2488
|
+
@interval = interval
|
2489
|
+
@interval_count = interval_count
|
2490
|
+
end
|
2491
|
+
end
|
2492
|
+
# Use the `end` time of a given discount.
|
2493
|
+
attr_accessor :discount_end
|
2494
|
+
# Time span for the amendment starting from the `amendment_start`.
|
2495
|
+
attr_accessor :duration
|
2496
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2497
|
+
attr_accessor :timestamp
|
2498
|
+
# Select one of three ways to pass the `amendment_end`.
|
2499
|
+
attr_accessor :type
|
2500
|
+
|
2501
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2502
|
+
@discount_end = discount_end
|
2503
|
+
@duration = duration
|
2504
|
+
@timestamp = timestamp
|
2505
|
+
@type = type
|
2506
|
+
end
|
2507
|
+
end
|
2508
|
+
|
2509
|
+
class AmendmentStart < Stripe::RequestParams
|
2510
|
+
class AmendmentEnd < Stripe::RequestParams
|
2511
|
+
# 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.
|
2512
|
+
attr_accessor :index
|
2513
|
+
|
2514
|
+
def initialize(index: nil)
|
2515
|
+
@index = index
|
2516
|
+
end
|
2517
|
+
end
|
2518
|
+
|
2519
|
+
class DiscountEnd < Stripe::RequestParams
|
2520
|
+
# The ID of a specific discount.
|
2521
|
+
attr_accessor :discount
|
2522
|
+
|
2523
|
+
def initialize(discount: nil)
|
2524
|
+
@discount = discount
|
2525
|
+
end
|
2526
|
+
end
|
2527
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2528
|
+
attr_accessor :amendment_end
|
2529
|
+
# Use the `end` time of a given discount.
|
2530
|
+
attr_accessor :discount_end
|
2531
|
+
# A precise Unix timestamp for the amendment to start.
|
2532
|
+
attr_accessor :timestamp
|
2533
|
+
# Select one of three ways to pass the `amendment_start`.
|
2534
|
+
attr_accessor :type
|
2535
|
+
|
2536
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2537
|
+
@amendment_end = amendment_end
|
2538
|
+
@discount_end = discount_end
|
2539
|
+
@timestamp = timestamp
|
2540
|
+
@type = type
|
2541
|
+
end
|
2542
|
+
end
|
2543
|
+
|
2544
|
+
class DiscountAction < Stripe::RequestParams
|
2545
|
+
class Add < Stripe::RequestParams
|
2546
|
+
class DiscountEnd < Stripe::RequestParams
|
2547
|
+
# The type of calculation made to determine when the discount ends.
|
2548
|
+
attr_accessor :type
|
2549
|
+
|
2550
|
+
def initialize(type: nil)
|
2551
|
+
@type = type
|
2552
|
+
end
|
2553
|
+
end
|
2554
|
+
# The coupon code to redeem.
|
2555
|
+
attr_accessor :coupon
|
2556
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
2557
|
+
attr_accessor :discount
|
2558
|
+
# Details to determine how long the discount should be applied for.
|
2559
|
+
attr_accessor :discount_end
|
2560
|
+
# 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.
|
2561
|
+
attr_accessor :index
|
2562
|
+
# The promotion code to redeem.
|
2563
|
+
attr_accessor :promotion_code
|
2564
|
+
|
2565
|
+
def initialize(
|
2566
|
+
coupon: nil,
|
2567
|
+
discount: nil,
|
2568
|
+
discount_end: nil,
|
2569
|
+
index: nil,
|
2570
|
+
promotion_code: nil
|
2571
|
+
)
|
2572
|
+
@coupon = coupon
|
2573
|
+
@discount = discount
|
2574
|
+
@discount_end = discount_end
|
2575
|
+
@index = index
|
2576
|
+
@promotion_code = promotion_code
|
2577
|
+
end
|
2578
|
+
end
|
2579
|
+
|
2580
|
+
class Remove < Stripe::RequestParams
|
2581
|
+
# The coupon code to remove from the `discounts` array.
|
2582
|
+
attr_accessor :coupon
|
2583
|
+
# The ID of a discount to remove from the `discounts` array.
|
2584
|
+
attr_accessor :discount
|
2585
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
2586
|
+
attr_accessor :promotion_code
|
2587
|
+
|
2588
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2589
|
+
@coupon = coupon
|
2590
|
+
@discount = discount
|
2591
|
+
@promotion_code = promotion_code
|
2592
|
+
end
|
2593
|
+
end
|
2594
|
+
|
2595
|
+
class Set < Stripe::RequestParams
|
2596
|
+
# The coupon code to replace the `discounts` array with.
|
2597
|
+
attr_accessor :coupon
|
2598
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
2599
|
+
attr_accessor :discount
|
2600
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
2601
|
+
attr_accessor :promotion_code
|
2602
|
+
|
2603
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2604
|
+
@coupon = coupon
|
2605
|
+
@discount = discount
|
2606
|
+
@promotion_code = promotion_code
|
2607
|
+
end
|
2608
|
+
end
|
2609
|
+
# Details of the discount to add.
|
2610
|
+
attr_accessor :add
|
2611
|
+
# Details of the discount to remove.
|
2612
|
+
attr_accessor :remove
|
2613
|
+
# Details of the discount to replace the existing discounts with.
|
2614
|
+
attr_accessor :set
|
2615
|
+
# Determines the type of discount action.
|
2616
|
+
attr_accessor :type
|
2617
|
+
|
2618
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2619
|
+
@add = add
|
2620
|
+
@remove = remove
|
2621
|
+
@set = set
|
2622
|
+
@type = type
|
2623
|
+
end
|
2624
|
+
end
|
2625
|
+
|
2626
|
+
class ItemAction < Stripe::RequestParams
|
2627
|
+
class Add < Stripe::RequestParams
|
2628
|
+
class Discount < Stripe::RequestParams
|
2629
|
+
class DiscountEnd < Stripe::RequestParams
|
2630
|
+
class Duration < Stripe::RequestParams
|
2631
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2632
|
+
attr_accessor :interval
|
2633
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2634
|
+
attr_accessor :interval_count
|
2635
|
+
|
2636
|
+
def initialize(interval: nil, interval_count: nil)
|
2637
|
+
@interval = interval
|
2638
|
+
@interval_count = interval_count
|
2639
|
+
end
|
2640
|
+
end
|
2641
|
+
# Time span for the redeemed discount.
|
2642
|
+
attr_accessor :duration
|
2643
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2644
|
+
attr_accessor :timestamp
|
2645
|
+
# The type of calculation made to determine when the discount ends.
|
2646
|
+
attr_accessor :type
|
2647
|
+
|
2648
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2649
|
+
@duration = duration
|
2650
|
+
@timestamp = timestamp
|
2651
|
+
@type = type
|
2652
|
+
end
|
2653
|
+
end
|
2654
|
+
# ID of the coupon to create a new discount for.
|
2655
|
+
attr_accessor :coupon
|
2656
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2657
|
+
attr_accessor :discount
|
2658
|
+
# Details to determine how long the discount should be applied for.
|
2659
|
+
attr_accessor :discount_end
|
2660
|
+
# ID of the promotion code to create a new discount for.
|
2661
|
+
attr_accessor :promotion_code
|
2662
|
+
|
2663
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2664
|
+
@coupon = coupon
|
2665
|
+
@discount = discount
|
2666
|
+
@discount_end = discount_end
|
2667
|
+
@promotion_code = promotion_code
|
2668
|
+
end
|
2669
|
+
end
|
2670
|
+
|
2671
|
+
class Trial < Stripe::RequestParams
|
2672
|
+
# 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.
|
2673
|
+
attr_accessor :converts_to
|
2674
|
+
# Determines the type of trial for this item.
|
2675
|
+
attr_accessor :type
|
2676
|
+
|
2677
|
+
def initialize(converts_to: nil, type: nil)
|
2678
|
+
@converts_to = converts_to
|
2679
|
+
@type = type
|
2680
|
+
end
|
2681
|
+
end
|
2682
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2683
|
+
attr_accessor :discounts
|
2684
|
+
# 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`.
|
2685
|
+
attr_accessor :metadata
|
2686
|
+
# The ID of the price object.
|
2687
|
+
attr_accessor :price
|
2688
|
+
# Quantity for this item.
|
2689
|
+
attr_accessor :quantity
|
2690
|
+
# 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`.
|
2691
|
+
attr_accessor :tax_rates
|
2692
|
+
# Options that configure the trial on the subscription item.
|
2693
|
+
attr_accessor :trial
|
2694
|
+
|
2695
|
+
def initialize(
|
2696
|
+
discounts: nil,
|
2697
|
+
metadata: nil,
|
2698
|
+
price: nil,
|
2699
|
+
quantity: nil,
|
2700
|
+
tax_rates: nil,
|
2701
|
+
trial: nil
|
2702
|
+
)
|
2703
|
+
@discounts = discounts
|
2704
|
+
@metadata = metadata
|
2705
|
+
@price = price
|
2706
|
+
@quantity = quantity
|
2707
|
+
@tax_rates = tax_rates
|
2708
|
+
@trial = trial
|
2709
|
+
end
|
2710
|
+
end
|
2711
|
+
|
2712
|
+
class Remove < Stripe::RequestParams
|
2713
|
+
# ID of a price to remove.
|
2714
|
+
attr_accessor :price
|
2715
|
+
|
2716
|
+
def initialize(price: nil)
|
2717
|
+
@price = price
|
2718
|
+
end
|
2719
|
+
end
|
2720
|
+
|
2721
|
+
class Set < Stripe::RequestParams
|
2722
|
+
class Discount < Stripe::RequestParams
|
2723
|
+
class DiscountEnd < Stripe::RequestParams
|
2724
|
+
class Duration < Stripe::RequestParams
|
2725
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2726
|
+
attr_accessor :interval
|
2727
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2728
|
+
attr_accessor :interval_count
|
2729
|
+
|
2730
|
+
def initialize(interval: nil, interval_count: nil)
|
2731
|
+
@interval = interval
|
2732
|
+
@interval_count = interval_count
|
2733
|
+
end
|
2734
|
+
end
|
2735
|
+
# Time span for the redeemed discount.
|
2736
|
+
attr_accessor :duration
|
2737
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2738
|
+
attr_accessor :timestamp
|
2739
|
+
# The type of calculation made to determine when the discount ends.
|
2740
|
+
attr_accessor :type
|
2741
|
+
|
2742
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2743
|
+
@duration = duration
|
2744
|
+
@timestamp = timestamp
|
2745
|
+
@type = type
|
2746
|
+
end
|
2747
|
+
end
|
2748
|
+
# ID of the coupon to create a new discount for.
|
2749
|
+
attr_accessor :coupon
|
2750
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2751
|
+
attr_accessor :discount
|
2752
|
+
# Details to determine how long the discount should be applied for.
|
2753
|
+
attr_accessor :discount_end
|
2754
|
+
# ID of the promotion code to create a new discount for.
|
2755
|
+
attr_accessor :promotion_code
|
2756
|
+
|
2757
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2758
|
+
@coupon = coupon
|
2759
|
+
@discount = discount
|
2760
|
+
@discount_end = discount_end
|
2761
|
+
@promotion_code = promotion_code
|
2762
|
+
end
|
2763
|
+
end
|
2764
|
+
|
2765
|
+
class Trial < Stripe::RequestParams
|
2766
|
+
# 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.
|
2767
|
+
attr_accessor :converts_to
|
2768
|
+
# Determines the type of trial for this item.
|
2769
|
+
attr_accessor :type
|
2770
|
+
|
2771
|
+
def initialize(converts_to: nil, type: nil)
|
2772
|
+
@converts_to = converts_to
|
2773
|
+
@type = type
|
2774
|
+
end
|
2775
|
+
end
|
2776
|
+
# 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`.
|
2777
|
+
attr_accessor :discounts
|
2778
|
+
# 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`.
|
2779
|
+
attr_accessor :metadata
|
2780
|
+
# The ID of the price object.
|
2781
|
+
attr_accessor :price
|
2782
|
+
# 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`.
|
2783
|
+
attr_accessor :quantity
|
2784
|
+
# 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`.
|
2785
|
+
attr_accessor :tax_rates
|
2786
|
+
# 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`.
|
2787
|
+
attr_accessor :trial
|
2788
|
+
|
2789
|
+
def initialize(
|
2790
|
+
discounts: nil,
|
2791
|
+
metadata: nil,
|
2792
|
+
price: nil,
|
2793
|
+
quantity: nil,
|
2794
|
+
tax_rates: nil,
|
2795
|
+
trial: nil
|
2796
|
+
)
|
2797
|
+
@discounts = discounts
|
2798
|
+
@metadata = metadata
|
2799
|
+
@price = price
|
2800
|
+
@quantity = quantity
|
2801
|
+
@tax_rates = tax_rates
|
2802
|
+
@trial = trial
|
2803
|
+
end
|
2804
|
+
end
|
2805
|
+
# 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.
|
2806
|
+
attr_accessor :add
|
2807
|
+
# Details of the subscription item to remove.
|
2808
|
+
attr_accessor :remove
|
2809
|
+
# 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.
|
2810
|
+
attr_accessor :set
|
2811
|
+
# Determines the type of item action.
|
2812
|
+
attr_accessor :type
|
2813
|
+
|
2814
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2815
|
+
@add = add
|
2816
|
+
@remove = remove
|
2817
|
+
@set = set
|
2818
|
+
@type = type
|
2819
|
+
end
|
2820
|
+
end
|
2821
|
+
|
2822
|
+
class MetadataAction < Stripe::RequestParams
|
2823
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2824
|
+
attr_accessor :add
|
2825
|
+
# Keys to remove from schedule phase metadata.
|
2826
|
+
attr_accessor :remove
|
2827
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2828
|
+
attr_accessor :set
|
2829
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2830
|
+
attr_accessor :type
|
2831
|
+
|
2832
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2833
|
+
@add = add
|
2834
|
+
@remove = remove
|
2835
|
+
@set = set
|
2836
|
+
@type = type
|
2837
|
+
end
|
2838
|
+
end
|
2839
|
+
|
2840
|
+
class SetPauseCollection < Stripe::RequestParams
|
2841
|
+
class Set < Stripe::RequestParams
|
2842
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2843
|
+
attr_accessor :behavior
|
2844
|
+
|
2845
|
+
def initialize(behavior: nil)
|
2846
|
+
@behavior = behavior
|
2847
|
+
end
|
2848
|
+
end
|
2849
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
2850
|
+
attr_accessor :set
|
2851
|
+
# Determines the type of the pause_collection amendment.
|
2852
|
+
attr_accessor :type
|
2853
|
+
|
2854
|
+
def initialize(set: nil, type: nil)
|
2855
|
+
@set = set
|
2856
|
+
@type = type
|
2857
|
+
end
|
2858
|
+
end
|
2859
|
+
|
2860
|
+
class TrialSettings < Stripe::RequestParams
|
2861
|
+
class EndBehavior < Stripe::RequestParams
|
2862
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2863
|
+
attr_accessor :prorate_up_front
|
2864
|
+
|
2865
|
+
def initialize(prorate_up_front: nil)
|
2866
|
+
@prorate_up_front = prorate_up_front
|
2867
|
+
end
|
2868
|
+
end
|
2869
|
+
# Defines how the subscription should behave when a trial ends.
|
2870
|
+
attr_accessor :end_behavior
|
2871
|
+
|
2872
|
+
def initialize(end_behavior: nil)
|
2873
|
+
@end_behavior = end_behavior
|
2874
|
+
end
|
2875
|
+
end
|
2876
|
+
# 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.
|
2877
|
+
attr_accessor :amendment_end
|
2878
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2879
|
+
attr_accessor :amendment_start
|
2880
|
+
# 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.
|
2881
|
+
attr_accessor :billing_cycle_anchor
|
2882
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2883
|
+
attr_accessor :discount_actions
|
2884
|
+
# Changes to the subscription items during the amendment time span.
|
2885
|
+
attr_accessor :item_actions
|
2886
|
+
# Instructions for how to modify phase metadata
|
2887
|
+
attr_accessor :metadata_actions
|
2888
|
+
# 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`.
|
2889
|
+
attr_accessor :proration_behavior
|
2890
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2891
|
+
attr_accessor :set_pause_collection
|
2892
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2893
|
+
attr_accessor :set_schedule_end
|
2894
|
+
# Settings related to subscription trials.
|
2895
|
+
attr_accessor :trial_settings
|
2896
|
+
|
2897
|
+
def initialize(
|
2898
|
+
amendment_end: nil,
|
2899
|
+
amendment_start: nil,
|
2900
|
+
billing_cycle_anchor: nil,
|
2901
|
+
discount_actions: nil,
|
2902
|
+
item_actions: nil,
|
2903
|
+
metadata_actions: nil,
|
2904
|
+
proration_behavior: nil,
|
2905
|
+
set_pause_collection: nil,
|
2906
|
+
set_schedule_end: nil,
|
2907
|
+
trial_settings: nil
|
2908
|
+
)
|
2909
|
+
@amendment_end = amendment_end
|
2910
|
+
@amendment_start = amendment_start
|
2911
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
2912
|
+
@discount_actions = discount_actions
|
2913
|
+
@item_actions = item_actions
|
2914
|
+
@metadata_actions = metadata_actions
|
2915
|
+
@proration_behavior = proration_behavior
|
2916
|
+
@set_pause_collection = set_pause_collection
|
2917
|
+
@set_schedule_end = set_schedule_end
|
2918
|
+
@trial_settings = trial_settings
|
2919
|
+
end
|
2920
|
+
end
|
2921
|
+
|
2113
2922
|
class BillingMode < Stripe::RequestParams
|
2114
2923
|
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
2115
2924
|
attr_accessor :type
|
@@ -2122,16 +2931,44 @@ module Stripe
|
|
2122
2931
|
class Phase < Stripe::RequestParams
|
2123
2932
|
class AddInvoiceItem < Stripe::RequestParams
|
2124
2933
|
class Discount < Stripe::RequestParams
|
2934
|
+
class DiscountEnd < Stripe::RequestParams
|
2935
|
+
class Duration < Stripe::RequestParams
|
2936
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2937
|
+
attr_accessor :interval
|
2938
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2939
|
+
attr_accessor :interval_count
|
2940
|
+
|
2941
|
+
def initialize(interval: nil, interval_count: nil)
|
2942
|
+
@interval = interval
|
2943
|
+
@interval_count = interval_count
|
2944
|
+
end
|
2945
|
+
end
|
2946
|
+
# Time span for the redeemed discount.
|
2947
|
+
attr_accessor :duration
|
2948
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2949
|
+
attr_accessor :timestamp
|
2950
|
+
# The type of calculation made to determine when the discount ends.
|
2951
|
+
attr_accessor :type
|
2952
|
+
|
2953
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2954
|
+
@duration = duration
|
2955
|
+
@timestamp = timestamp
|
2956
|
+
@type = type
|
2957
|
+
end
|
2958
|
+
end
|
2125
2959
|
# ID of the coupon to create a new discount for.
|
2126
2960
|
attr_accessor :coupon
|
2127
2961
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2128
2962
|
attr_accessor :discount
|
2963
|
+
# Details to determine how long the discount should be applied for.
|
2964
|
+
attr_accessor :discount_end
|
2129
2965
|
# ID of the promotion code to create a new discount for.
|
2130
2966
|
attr_accessor :promotion_code
|
2131
2967
|
|
2132
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2968
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2133
2969
|
@coupon = coupon
|
2134
2970
|
@discount = discount
|
2971
|
+
@discount_end = discount_end
|
2135
2972
|
@promotion_code = promotion_code
|
2136
2973
|
end
|
2137
2974
|
end
|
@@ -2267,16 +3104,44 @@ module Stripe
|
|
2267
3104
|
end
|
2268
3105
|
|
2269
3106
|
class Discount < Stripe::RequestParams
|
3107
|
+
class DiscountEnd < Stripe::RequestParams
|
3108
|
+
class Duration < Stripe::RequestParams
|
3109
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3110
|
+
attr_accessor :interval
|
3111
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3112
|
+
attr_accessor :interval_count
|
3113
|
+
|
3114
|
+
def initialize(interval: nil, interval_count: nil)
|
3115
|
+
@interval = interval
|
3116
|
+
@interval_count = interval_count
|
3117
|
+
end
|
3118
|
+
end
|
3119
|
+
# Time span for the redeemed discount.
|
3120
|
+
attr_accessor :duration
|
3121
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3122
|
+
attr_accessor :timestamp
|
3123
|
+
# The type of calculation made to determine when the discount ends.
|
3124
|
+
attr_accessor :type
|
3125
|
+
|
3126
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3127
|
+
@duration = duration
|
3128
|
+
@timestamp = timestamp
|
3129
|
+
@type = type
|
3130
|
+
end
|
3131
|
+
end
|
2270
3132
|
# ID of the coupon to create a new discount for.
|
2271
3133
|
attr_accessor :coupon
|
2272
3134
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2273
3135
|
attr_accessor :discount
|
3136
|
+
# Details to determine how long the discount should be applied for.
|
3137
|
+
attr_accessor :discount_end
|
2274
3138
|
# ID of the promotion code to create a new discount for.
|
2275
3139
|
attr_accessor :promotion_code
|
2276
3140
|
|
2277
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3141
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2278
3142
|
@coupon = coupon
|
2279
3143
|
@discount = discount
|
3144
|
+
@discount_end = discount_end
|
2280
3145
|
@promotion_code = promotion_code
|
2281
3146
|
end
|
2282
3147
|
end
|
@@ -2330,16 +3195,44 @@ module Stripe
|
|
2330
3195
|
end
|
2331
3196
|
|
2332
3197
|
class Discount < Stripe::RequestParams
|
3198
|
+
class DiscountEnd < Stripe::RequestParams
|
3199
|
+
class Duration < Stripe::RequestParams
|
3200
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3201
|
+
attr_accessor :interval
|
3202
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3203
|
+
attr_accessor :interval_count
|
3204
|
+
|
3205
|
+
def initialize(interval: nil, interval_count: nil)
|
3206
|
+
@interval = interval
|
3207
|
+
@interval_count = interval_count
|
3208
|
+
end
|
3209
|
+
end
|
3210
|
+
# Time span for the redeemed discount.
|
3211
|
+
attr_accessor :duration
|
3212
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3213
|
+
attr_accessor :timestamp
|
3214
|
+
# The type of calculation made to determine when the discount ends.
|
3215
|
+
attr_accessor :type
|
3216
|
+
|
3217
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3218
|
+
@duration = duration
|
3219
|
+
@timestamp = timestamp
|
3220
|
+
@type = type
|
3221
|
+
end
|
3222
|
+
end
|
2333
3223
|
# ID of the coupon to create a new discount for.
|
2334
3224
|
attr_accessor :coupon
|
2335
3225
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2336
3226
|
attr_accessor :discount
|
3227
|
+
# Details to determine how long the discount should be applied for.
|
3228
|
+
attr_accessor :discount_end
|
2337
3229
|
# ID of the promotion code to create a new discount for.
|
2338
3230
|
attr_accessor :promotion_code
|
2339
3231
|
|
2340
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3232
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2341
3233
|
@coupon = coupon
|
2342
3234
|
@discount = discount
|
3235
|
+
@discount_end = discount_end
|
2343
3236
|
@promotion_code = promotion_code
|
2344
3237
|
end
|
2345
3238
|
end
|
@@ -2385,6 +3278,18 @@ module Stripe
|
|
2385
3278
|
@unit_amount_decimal = unit_amount_decimal
|
2386
3279
|
end
|
2387
3280
|
end
|
3281
|
+
|
3282
|
+
class Trial < Stripe::RequestParams
|
3283
|
+
# 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.
|
3284
|
+
attr_accessor :converts_to
|
3285
|
+
# Determines the type of trial for this item.
|
3286
|
+
attr_accessor :type
|
3287
|
+
|
3288
|
+
def initialize(converts_to: nil, type: nil)
|
3289
|
+
@converts_to = converts_to
|
3290
|
+
@type = type
|
3291
|
+
end
|
3292
|
+
end
|
2388
3293
|
# 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.
|
2389
3294
|
attr_accessor :billing_thresholds
|
2390
3295
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -2401,6 +3306,8 @@ module Stripe
|
|
2401
3306
|
attr_accessor :quantity
|
2402
3307
|
# 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.
|
2403
3308
|
attr_accessor :tax_rates
|
3309
|
+
# Options that configure the trial on the subscription item.
|
3310
|
+
attr_accessor :trial
|
2404
3311
|
|
2405
3312
|
def initialize(
|
2406
3313
|
billing_thresholds: nil,
|
@@ -2410,7 +3317,8 @@ module Stripe
|
|
2410
3317
|
price: nil,
|
2411
3318
|
price_data: nil,
|
2412
3319
|
quantity: nil,
|
2413
|
-
tax_rates: nil
|
3320
|
+
tax_rates: nil,
|
3321
|
+
trial: nil
|
2414
3322
|
)
|
2415
3323
|
@billing_thresholds = billing_thresholds
|
2416
3324
|
@discounts = discounts
|
@@ -2420,6 +3328,16 @@ module Stripe
|
|
2420
3328
|
@price_data = price_data
|
2421
3329
|
@quantity = quantity
|
2422
3330
|
@tax_rates = tax_rates
|
3331
|
+
@trial = trial
|
3332
|
+
end
|
3333
|
+
end
|
3334
|
+
|
3335
|
+
class PauseCollection < Stripe::RequestParams
|
3336
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3337
|
+
attr_accessor :behavior
|
3338
|
+
|
3339
|
+
def initialize(behavior: nil)
|
3340
|
+
@behavior = behavior
|
2423
3341
|
end
|
2424
3342
|
end
|
2425
3343
|
|
@@ -2434,6 +3352,23 @@ module Stripe
|
|
2434
3352
|
@destination = destination
|
2435
3353
|
end
|
2436
3354
|
end
|
3355
|
+
|
3356
|
+
class TrialSettings < Stripe::RequestParams
|
3357
|
+
class EndBehavior < Stripe::RequestParams
|
3358
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3359
|
+
attr_accessor :prorate_up_front
|
3360
|
+
|
3361
|
+
def initialize(prorate_up_front: nil)
|
3362
|
+
@prorate_up_front = prorate_up_front
|
3363
|
+
end
|
3364
|
+
end
|
3365
|
+
# Defines how the subscription should behave when a trial ends.
|
3366
|
+
attr_accessor :end_behavior
|
3367
|
+
|
3368
|
+
def initialize(end_behavior: nil)
|
3369
|
+
@end_behavior = end_behavior
|
3370
|
+
end
|
3371
|
+
end
|
2437
3372
|
# 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.
|
2438
3373
|
attr_accessor :add_invoice_items
|
2439
3374
|
# 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).
|
@@ -2470,6 +3405,8 @@ module Stripe
|
|
2470
3405
|
attr_accessor :metadata
|
2471
3406
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
2472
3407
|
attr_accessor :on_behalf_of
|
3408
|
+
# 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).
|
3409
|
+
attr_accessor :pause_collection
|
2473
3410
|
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
2474
3411
|
attr_accessor :proration_behavior
|
2475
3412
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -2478,8 +3415,12 @@ module Stripe
|
|
2478
3415
|
attr_accessor :transfer_data
|
2479
3416
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
2480
3417
|
attr_accessor :trial
|
3418
|
+
# Specify trial behavior when crossing phase boundaries
|
3419
|
+
attr_accessor :trial_continuation
|
2481
3420
|
# 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`
|
2482
3421
|
attr_accessor :trial_end
|
3422
|
+
# Settings related to subscription trials.
|
3423
|
+
attr_accessor :trial_settings
|
2483
3424
|
|
2484
3425
|
def initialize(
|
2485
3426
|
add_invoice_items: nil,
|
@@ -2500,11 +3441,14 @@ module Stripe
|
|
2500
3441
|
iterations: nil,
|
2501
3442
|
metadata: nil,
|
2502
3443
|
on_behalf_of: nil,
|
3444
|
+
pause_collection: nil,
|
2503
3445
|
proration_behavior: nil,
|
2504
3446
|
start_date: nil,
|
2505
3447
|
transfer_data: nil,
|
2506
3448
|
trial: nil,
|
2507
|
-
|
3449
|
+
trial_continuation: nil,
|
3450
|
+
trial_end: nil,
|
3451
|
+
trial_settings: nil
|
2508
3452
|
)
|
2509
3453
|
@add_invoice_items = add_invoice_items
|
2510
3454
|
@application_fee_percent = application_fee_percent
|
@@ -2524,26 +3468,95 @@ module Stripe
|
|
2524
3468
|
@iterations = iterations
|
2525
3469
|
@metadata = metadata
|
2526
3470
|
@on_behalf_of = on_behalf_of
|
3471
|
+
@pause_collection = pause_collection
|
2527
3472
|
@proration_behavior = proration_behavior
|
2528
3473
|
@start_date = start_date
|
2529
3474
|
@transfer_data = transfer_data
|
2530
3475
|
@trial = trial
|
3476
|
+
@trial_continuation = trial_continuation
|
2531
3477
|
@trial_end = trial_end
|
3478
|
+
@trial_settings = trial_settings
|
3479
|
+
end
|
3480
|
+
end
|
3481
|
+
|
3482
|
+
class Prebilling < Stripe::RequestParams
|
3483
|
+
class BillUntil < Stripe::RequestParams
|
3484
|
+
class AmendmentEnd < Stripe::RequestParams
|
3485
|
+
# 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.
|
3486
|
+
attr_accessor :index
|
3487
|
+
|
3488
|
+
def initialize(index: nil)
|
3489
|
+
@index = index
|
3490
|
+
end
|
3491
|
+
end
|
3492
|
+
|
3493
|
+
class Duration < Stripe::RequestParams
|
3494
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3495
|
+
attr_accessor :interval
|
3496
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3497
|
+
attr_accessor :interval_count
|
3498
|
+
|
3499
|
+
def initialize(interval: nil, interval_count: nil)
|
3500
|
+
@interval = interval
|
3501
|
+
@interval_count = interval_count
|
3502
|
+
end
|
3503
|
+
end
|
3504
|
+
# End the prebilled period when a specified amendment ends.
|
3505
|
+
attr_accessor :amendment_end
|
3506
|
+
# Time span for prebilling, starting from `bill_from`.
|
3507
|
+
attr_accessor :duration
|
3508
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3509
|
+
attr_accessor :timestamp
|
3510
|
+
# Select one of several ways to pass the `bill_until` value.
|
3511
|
+
attr_accessor :type
|
3512
|
+
|
3513
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3514
|
+
@amendment_end = amendment_end
|
3515
|
+
@duration = duration
|
3516
|
+
@timestamp = timestamp
|
3517
|
+
@type = type
|
3518
|
+
end
|
3519
|
+
end
|
3520
|
+
# The end of the prebilled time period.
|
3521
|
+
attr_accessor :bill_until
|
3522
|
+
# This is used to determine the number of billing cycles to prebill.
|
3523
|
+
attr_accessor :iterations
|
3524
|
+
|
3525
|
+
def initialize(bill_until: nil, iterations: nil)
|
3526
|
+
@bill_until = bill_until
|
3527
|
+
@iterations = iterations
|
2532
3528
|
end
|
2533
3529
|
end
|
3530
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3531
|
+
attr_accessor :amendments
|
3532
|
+
# 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.
|
3533
|
+
attr_accessor :billing_behavior
|
2534
3534
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2535
3535
|
attr_accessor :billing_mode
|
2536
3536
|
# 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.
|
2537
3537
|
attr_accessor :end_behavior
|
2538
3538
|
# 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.
|
2539
3539
|
attr_accessor :phases
|
3540
|
+
# Provide any time periods to bill in advance.
|
3541
|
+
attr_accessor :prebilling
|
2540
3542
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
2541
3543
|
attr_accessor :proration_behavior
|
2542
3544
|
|
2543
|
-
def initialize(
|
3545
|
+
def initialize(
|
3546
|
+
amendments: nil,
|
3547
|
+
billing_behavior: nil,
|
3548
|
+
billing_mode: nil,
|
3549
|
+
end_behavior: nil,
|
3550
|
+
phases: nil,
|
3551
|
+
prebilling: nil,
|
3552
|
+
proration_behavior: nil
|
3553
|
+
)
|
3554
|
+
@amendments = amendments
|
3555
|
+
@billing_behavior = billing_behavior
|
2544
3556
|
@billing_mode = billing_mode
|
2545
3557
|
@end_behavior = end_behavior
|
2546
3558
|
@phases = phases
|
3559
|
+
@prebilling = prebilling
|
2547
3560
|
@proration_behavior = proration_behavior
|
2548
3561
|
end
|
2549
3562
|
end
|
@@ -2569,16 +3582,44 @@ module Stripe
|
|
2569
3582
|
end
|
2570
3583
|
|
2571
3584
|
class Discount < Stripe::RequestParams
|
3585
|
+
class DiscountEnd < Stripe::RequestParams
|
3586
|
+
class Duration < Stripe::RequestParams
|
3587
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3588
|
+
attr_accessor :interval
|
3589
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3590
|
+
attr_accessor :interval_count
|
3591
|
+
|
3592
|
+
def initialize(interval: nil, interval_count: nil)
|
3593
|
+
@interval = interval
|
3594
|
+
@interval_count = interval_count
|
3595
|
+
end
|
3596
|
+
end
|
3597
|
+
# Time span for the redeemed discount.
|
3598
|
+
attr_accessor :duration
|
3599
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3600
|
+
attr_accessor :timestamp
|
3601
|
+
# The type of calculation made to determine when the discount ends.
|
3602
|
+
attr_accessor :type
|
3603
|
+
|
3604
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3605
|
+
@duration = duration
|
3606
|
+
@timestamp = timestamp
|
3607
|
+
@type = type
|
3608
|
+
end
|
3609
|
+
end
|
2572
3610
|
# ID of the coupon to create a new discount for.
|
2573
3611
|
attr_accessor :coupon
|
2574
3612
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2575
3613
|
attr_accessor :discount
|
3614
|
+
# Details to determine how long the discount should be applied for.
|
3615
|
+
attr_accessor :discount_end
|
2576
3616
|
# ID of the promotion code to create a new discount for.
|
2577
3617
|
attr_accessor :promotion_code
|
2578
3618
|
|
2579
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3619
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2580
3620
|
@coupon = coupon
|
2581
3621
|
@discount = discount
|
3622
|
+
@discount_end = discount_end
|
2582
3623
|
@promotion_code = promotion_code
|
2583
3624
|
end
|
2584
3625
|
end
|
@@ -2673,6 +3714,15 @@ module Stripe
|
|
2673
3714
|
@tax_rates = tax_rates
|
2674
3715
|
end
|
2675
3716
|
end
|
3717
|
+
|
3718
|
+
class Prebilling < Stripe::RequestParams
|
3719
|
+
# This is used to determine the number of billing cycles to prebill.
|
3720
|
+
attr_accessor :iterations
|
3721
|
+
|
3722
|
+
def initialize(iterations: nil)
|
3723
|
+
@iterations = iterations
|
3724
|
+
end
|
3725
|
+
end
|
2676
3726
|
# For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
2677
3727
|
attr_accessor :billing_cycle_anchor
|
2678
3728
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
@@ -2687,6 +3737,8 @@ module Stripe
|
|
2687
3737
|
attr_accessor :default_tax_rates
|
2688
3738
|
# A list of up to 20 subscription items, each with an attached price.
|
2689
3739
|
attr_accessor :items
|
3740
|
+
# The pre-billing to apply to the subscription as a preview.
|
3741
|
+
attr_accessor :prebilling
|
2690
3742
|
# Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
2691
3743
|
attr_accessor :proration_behavior
|
2692
3744
|
# If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
|
@@ -2706,6 +3758,7 @@ module Stripe
|
|
2706
3758
|
cancel_now: nil,
|
2707
3759
|
default_tax_rates: nil,
|
2708
3760
|
items: nil,
|
3761
|
+
prebilling: nil,
|
2709
3762
|
proration_behavior: nil,
|
2710
3763
|
proration_date: nil,
|
2711
3764
|
resume_at: nil,
|
@@ -2719,6 +3772,7 @@ module Stripe
|
|
2719
3772
|
@cancel_now = cancel_now
|
2720
3773
|
@default_tax_rates = default_tax_rates
|
2721
3774
|
@items = items
|
3775
|
+
@prebilling = prebilling
|
2722
3776
|
@proration_behavior = proration_behavior
|
2723
3777
|
@proration_date = proration_date
|
2724
3778
|
@resume_at = resume_at
|
@@ -2732,6 +3786,8 @@ module Stripe
|
|
2732
3786
|
attr_accessor :currency
|
2733
3787
|
# The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
2734
3788
|
attr_accessor :customer
|
3789
|
+
# The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
|
3790
|
+
attr_accessor :customer_account
|
2735
3791
|
# Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
2736
3792
|
attr_accessor :customer_details
|
2737
3793
|
# The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
|
@@ -2759,6 +3815,7 @@ module Stripe
|
|
2759
3815
|
automatic_tax: nil,
|
2760
3816
|
currency: nil,
|
2761
3817
|
customer: nil,
|
3818
|
+
customer_account: nil,
|
2762
3819
|
customer_details: nil,
|
2763
3820
|
discounts: nil,
|
2764
3821
|
expand: nil,
|
@@ -2774,6 +3831,7 @@ module Stripe
|
|
2774
3831
|
@automatic_tax = automatic_tax
|
2775
3832
|
@currency = currency
|
2776
3833
|
@customer = customer
|
3834
|
+
@customer_account = customer_account
|
2777
3835
|
@customer_details = customer_details
|
2778
3836
|
@discounts = discounts
|
2779
3837
|
@expand = expand
|