stripe 15.2.0 → 15.3.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/CHANGELOG.md +1600 -670
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +28 -0
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +54 -0
- data/lib/stripe/event_types.rb +98 -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_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_completed_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_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_off_session_payment_requires_capture_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 +21 -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 +50 -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 +105 -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_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 +1538 -0
- data/lib/stripe/resources/checkout/session.rb +330 -2
- 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/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 +184 -0
- data/lib/stripe/resources/identity/verification_session.rb +10 -0
- data/lib/stripe/resources/invoice.rb +1070 -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 +2 -53
- 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 +24 -0
- data/lib/stripe/resources/margin.rb +115 -0
- data/lib/stripe/resources/order.rb +2806 -0
- data/lib/stripe/resources/payment_attempt_record.rb +1086 -0
- data/lib/stripe/resources/payment_intent.rb +7694 -2738
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +72 -0
- data/lib/stripe/resources/payment_method.rb +192 -1
- data/lib/stripe/resources/payment_method_configuration.rb +295 -0
- data/lib/stripe/resources/payment_record.rb +1615 -0
- data/lib/stripe/resources/payout.rb +6 -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 +2046 -6
- data/lib/stripe/resources/quote_line.rb +274 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +663 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +364 -0
- data/lib/stripe/resources/refund.rb +9 -0
- data/lib/stripe/resources/setup_attempt.rb +21 -0
- data/lib/stripe/resources/setup_intent.rb +578 -9
- data/lib/stripe/resources/source.rb +29 -0
- data/lib/stripe/resources/subscription.rb +333 -9
- data/lib/stripe/resources/subscription_item.rb +84 -3
- data/lib/stripe/resources/subscription_schedule.rb +1013 -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/reader.rb +156 -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 +1746 -0
- data/lib/stripe/resources/v2/core/account_link.rb +56 -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 +58 -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 +75 -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 +116 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +84 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +78 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +68 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +74 -0
- data/lib/stripe/resources.rb +104 -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 +96 -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_portal/session_service.rb +4 -0
- 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 +247 -2
- 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_service.rb +1021 -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/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 +2236 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +49 -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 +4733 -245
- 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 +542 -0
- data/lib/stripe/services/payout_service.rb +4 -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 +1730 -7
- data/lib/stripe/services/setup_intent_service.rb +538 -9
- data/lib/stripe/services/subscription_item_service.rb +75 -3
- data/lib/stripe/services/subscription_schedule_service.rb +915 -10
- data/lib/stripe/services/subscription_service.rb +276 -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/reader_collected_data_service.rb +28 -0
- data/lib/stripe/services/terminal/reader_service.rb +90 -0
- data/lib/stripe/services/terminal_service.rb +2 -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 -2
- data/lib/stripe/services/v2/core/account_link_service.rb +76 -0
- data/lib/stripe/services/v2/core/account_service.rb +4138 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +1046 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +131 -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 +43 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +81 -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 +200 -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 +91 -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 +138 -0
- data/lib/stripe/services/v2/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +49 -0
- data/lib/stripe/services/v2_services.rb +5 -2
- data/lib/stripe/services.rb +53 -1
- 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 +191639 -0
- data/stripe.gemspec +4 -1
- metadata +161 -324
- data/lib/stripe/services/invoice_payment_service.rb +0 -83
- data/rbi/stripe/resources/account.rbi +0 -4926
- data/rbi/stripe/resources/account_link.rbi +0 -74
- data/rbi/stripe/resources/account_session.rbi +0 -1013
- 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 -235
- 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 -645
- 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 -2069
- data/rbi/stripe/resources/checkout/session.rbi +0 -4004
- 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 -1807
- 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 -1005
- 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 -149
- 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 -526
- data/rbi/stripe/resources/invoice.rbi +0 -3812
- data/rbi/stripe/resources/invoice_item.rbi +0 -473
- 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 -741
- 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 -187
- data/rbi/stripe/resources/payment_intent.rbi +0 -9647
- data/rbi/stripe/resources/payment_link.rbi +0 -1801
- data/rbi/stripe/resources/payment_method.rbi +0 -1761
- 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 -300
- 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 -555
- data/rbi/stripe/resources/product_feature.rbi +0 -26
- data/rbi/stripe/resources/promotion_code.rbi +0 -261
- data/rbi/stripe/resources/quote.rbi +0 -1126
- 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 -3655
- 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 -2027
- data/rbi/stripe/resources/subscription_item.rbi +0 -404
- data/rbi/stripe/resources/subscription_schedule.rbi +0 -1623
- 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 -2713
- 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 -1386
- 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 -847
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
- data/rbi/stripe/resources/token.rbi +0 -1283
- 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 -865
- 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 -58
- data/rbi/stripe/services/account_login_link_service.rbi +0 -22
- data/rbi/stripe/services/account_person_service.rbi +0 -1011
- data/rbi/stripe/services/account_service.rbi +0 -4213
- data/rbi/stripe/services/account_session_service.rbi +0 -646
- 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 -511
- 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 -2614
- 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 -647
- 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 -323
- 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 -2981
- data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
- data/rbi/stripe/services/issuing/card_service.rbi +0 -495
- 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 -7659
- data/rbi/stripe/services/payment_link_service.rbi +0 -1352
- 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 -776
- data/rbi/stripe/services/payout_service.rbi +0 -205
- 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 -686
- 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 -3391
- 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 -1290
- data/rbi/stripe/services/subscription_service.rbi +0 -1648
- data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
- data/rbi/stripe/services/tax/registration_service.rbi +0 -1845
- 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 -1118
- 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 -455
- data/rbi/stripe/services/terminal_service.rbi +0 -12
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -739
- 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 -93
- 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 -1257
- 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 -562
- 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,6 +233,7 @@ 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
|
|
@@ -195,9 +242,12 @@ module Stripe
|
|
195
242
|
class Filters < Stripe::RequestParams
|
196
243
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
197
244
|
attr_accessor :account_subcategories
|
245
|
+
# ID of the institution to use to filter for selectable accounts.
|
246
|
+
attr_accessor :institution
|
198
247
|
|
199
|
-
def initialize(account_subcategories: nil)
|
248
|
+
def initialize(account_subcategories: nil, institution: nil)
|
200
249
|
@account_subcategories = account_subcategories
|
250
|
+
@institution = institution
|
201
251
|
end
|
202
252
|
end
|
203
253
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -231,6 +281,8 @@ module Stripe
|
|
231
281
|
attr_accessor :card
|
232
282
|
# 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
283
|
attr_accessor :customer_balance
|
284
|
+
# If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
285
|
+
attr_accessor :id_bank_transfer
|
234
286
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
235
287
|
attr_accessor :konbini
|
236
288
|
# 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.
|
@@ -243,6 +295,7 @@ module Stripe
|
|
243
295
|
bancontact: nil,
|
244
296
|
card: nil,
|
245
297
|
customer_balance: nil,
|
298
|
+
id_bank_transfer: nil,
|
246
299
|
konbini: nil,
|
247
300
|
sepa_debit: nil,
|
248
301
|
us_bank_account: nil
|
@@ -251,6 +304,7 @@ module Stripe
|
|
251
304
|
@bancontact = bancontact
|
252
305
|
@card = card
|
253
306
|
@customer_balance = customer_balance
|
307
|
+
@id_bank_transfer = id_bank_transfer
|
254
308
|
@konbini = konbini
|
255
309
|
@sepa_debit = sepa_debit
|
256
310
|
@us_bank_account = us_bank_account
|
@@ -462,6 +516,8 @@ module Stripe
|
|
462
516
|
end
|
463
517
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
464
518
|
attr_accessor :account_tax_ids
|
519
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
520
|
+
attr_accessor :amounts_due
|
465
521
|
# 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
522
|
attr_accessor :application_fee_amount
|
467
523
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -476,6 +532,8 @@ module Stripe
|
|
476
532
|
attr_accessor :custom_fields
|
477
533
|
# 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
534
|
attr_accessor :days_until_due
|
535
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
536
|
+
attr_accessor :default_margins
|
479
537
|
# 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
538
|
attr_accessor :default_payment_method
|
481
539
|
# 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 +575,7 @@ module Stripe
|
|
517
575
|
|
518
576
|
def initialize(
|
519
577
|
account_tax_ids: nil,
|
578
|
+
amounts_due: nil,
|
520
579
|
application_fee_amount: nil,
|
521
580
|
auto_advance: nil,
|
522
581
|
automatic_tax: nil,
|
@@ -524,6 +583,7 @@ module Stripe
|
|
524
583
|
collection_method: nil,
|
525
584
|
custom_fields: nil,
|
526
585
|
days_until_due: nil,
|
586
|
+
default_margins: nil,
|
527
587
|
default_payment_method: nil,
|
528
588
|
default_source: nil,
|
529
589
|
default_tax_rates: nil,
|
@@ -545,6 +605,7 @@ module Stripe
|
|
545
605
|
transfer_data: nil
|
546
606
|
)
|
547
607
|
@account_tax_ids = account_tax_ids
|
608
|
+
@amounts_due = amounts_due
|
548
609
|
@application_fee_amount = application_fee_amount
|
549
610
|
@auto_advance = auto_advance
|
550
611
|
@automatic_tax = automatic_tax
|
@@ -552,6 +613,7 @@ module Stripe
|
|
552
613
|
@collection_method = collection_method
|
553
614
|
@custom_fields = custom_fields
|
554
615
|
@days_until_due = days_until_due
|
616
|
+
@default_margins = default_margins
|
555
617
|
@default_payment_method = default_payment_method
|
556
618
|
@default_source = default_source
|
557
619
|
@default_tax_rates = default_tax_rates
|
@@ -616,6 +678,8 @@ module Stripe
|
|
616
678
|
attr_accessor :created
|
617
679
|
# Only return invoices for the customer specified by this customer ID.
|
618
680
|
attr_accessor :customer
|
681
|
+
# Only return invoices for the account specified by this account ID.
|
682
|
+
attr_accessor :customer_account
|
619
683
|
# Attribute for param field due_date
|
620
684
|
attr_accessor :due_date
|
621
685
|
# 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 +699,7 @@ module Stripe
|
|
635
699
|
collection_method: nil,
|
636
700
|
created: nil,
|
637
701
|
customer: nil,
|
702
|
+
customer_account: nil,
|
638
703
|
due_date: nil,
|
639
704
|
ending_before: nil,
|
640
705
|
expand: nil,
|
@@ -646,6 +711,7 @@ module Stripe
|
|
646
711
|
@collection_method = collection_method
|
647
712
|
@created = created
|
648
713
|
@customer = customer
|
714
|
+
@customer_account = customer_account
|
649
715
|
@due_date = due_date
|
650
716
|
@ending_before = ending_before
|
651
717
|
@expand = expand
|
@@ -657,6 +723,24 @@ module Stripe
|
|
657
723
|
end
|
658
724
|
|
659
725
|
class CreateParams < Stripe::RequestParams
|
726
|
+
class AmountsDue < Stripe::RequestParams
|
727
|
+
# The amount in cents (or local equivalent).
|
728
|
+
attr_accessor :amount
|
729
|
+
# Number of days from when invoice is finalized until the payment is due.
|
730
|
+
attr_accessor :days_until_due
|
731
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
732
|
+
attr_accessor :description
|
733
|
+
# Date on which a payment plan’s payment is due.
|
734
|
+
attr_accessor :due_date
|
735
|
+
|
736
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
737
|
+
@amount = amount
|
738
|
+
@days_until_due = days_until_due
|
739
|
+
@description = description
|
740
|
+
@due_date = due_date
|
741
|
+
end
|
742
|
+
end
|
743
|
+
|
660
744
|
class AutomaticTax < Stripe::RequestParams
|
661
745
|
class Liability < Stripe::RequestParams
|
662
746
|
# The connected account being referenced when `type` is `account`.
|
@@ -693,16 +777,44 @@ module Stripe
|
|
693
777
|
end
|
694
778
|
|
695
779
|
class Discount < Stripe::RequestParams
|
780
|
+
class DiscountEnd < Stripe::RequestParams
|
781
|
+
class Duration < Stripe::RequestParams
|
782
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
783
|
+
attr_accessor :interval
|
784
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
785
|
+
attr_accessor :interval_count
|
786
|
+
|
787
|
+
def initialize(interval: nil, interval_count: nil)
|
788
|
+
@interval = interval
|
789
|
+
@interval_count = interval_count
|
790
|
+
end
|
791
|
+
end
|
792
|
+
# Time span for the redeemed discount.
|
793
|
+
attr_accessor :duration
|
794
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
795
|
+
attr_accessor :timestamp
|
796
|
+
# The type of calculation made to determine when the discount ends.
|
797
|
+
attr_accessor :type
|
798
|
+
|
799
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
800
|
+
@duration = duration
|
801
|
+
@timestamp = timestamp
|
802
|
+
@type = type
|
803
|
+
end
|
804
|
+
end
|
696
805
|
# ID of the coupon to create a new discount for.
|
697
806
|
attr_accessor :coupon
|
698
807
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
699
808
|
attr_accessor :discount
|
809
|
+
# Details to determine how long the discount should be applied for.
|
810
|
+
attr_accessor :discount_end
|
700
811
|
# ID of the promotion code to create a new discount for.
|
701
812
|
attr_accessor :promotion_code
|
702
813
|
|
703
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
814
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
704
815
|
@coupon = coupon
|
705
816
|
@discount = discount
|
817
|
+
@discount_end = discount_end
|
706
818
|
@promotion_code = promotion_code
|
707
819
|
end
|
708
820
|
end
|
@@ -834,6 +946,7 @@ module Stripe
|
|
834
946
|
end
|
835
947
|
end
|
836
948
|
|
949
|
+
class IdBankTransfer < Stripe::RequestParams; end
|
837
950
|
class Konbini < Stripe::RequestParams; end
|
838
951
|
class SepaDebit < Stripe::RequestParams; end
|
839
952
|
|
@@ -842,9 +955,12 @@ module Stripe
|
|
842
955
|
class Filters < Stripe::RequestParams
|
843
956
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
844
957
|
attr_accessor :account_subcategories
|
958
|
+
# ID of the institution to use to filter for selectable accounts.
|
959
|
+
attr_accessor :institution
|
845
960
|
|
846
|
-
def initialize(account_subcategories: nil)
|
961
|
+
def initialize(account_subcategories: nil, institution: nil)
|
847
962
|
@account_subcategories = account_subcategories
|
963
|
+
@institution = institution
|
848
964
|
end
|
849
965
|
end
|
850
966
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -878,6 +994,8 @@ module Stripe
|
|
878
994
|
attr_accessor :card
|
879
995
|
# 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
996
|
attr_accessor :customer_balance
|
997
|
+
# If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
998
|
+
attr_accessor :id_bank_transfer
|
881
999
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
882
1000
|
attr_accessor :konbini
|
883
1001
|
# 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.
|
@@ -890,6 +1008,7 @@ module Stripe
|
|
890
1008
|
bancontact: nil,
|
891
1009
|
card: nil,
|
892
1010
|
customer_balance: nil,
|
1011
|
+
id_bank_transfer: nil,
|
893
1012
|
konbini: nil,
|
894
1013
|
sepa_debit: nil,
|
895
1014
|
us_bank_account: nil
|
@@ -898,6 +1017,7 @@ module Stripe
|
|
898
1017
|
@bancontact = bancontact
|
899
1018
|
@card = card
|
900
1019
|
@customer_balance = customer_balance
|
1020
|
+
@id_bank_transfer = id_bank_transfer
|
901
1021
|
@konbini = konbini
|
902
1022
|
@sepa_debit = sepa_debit
|
903
1023
|
@us_bank_account = us_bank_account
|
@@ -1109,6 +1229,8 @@ module Stripe
|
|
1109
1229
|
end
|
1110
1230
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1111
1231
|
attr_accessor :account_tax_ids
|
1232
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1233
|
+
attr_accessor :amounts_due
|
1112
1234
|
# 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
1235
|
attr_accessor :application_fee_amount
|
1114
1236
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
@@ -1125,8 +1247,12 @@ module Stripe
|
|
1125
1247
|
attr_accessor :custom_fields
|
1126
1248
|
# The ID of the customer who will be billed.
|
1127
1249
|
attr_accessor :customer
|
1250
|
+
# The ID of the account who will be billed.
|
1251
|
+
attr_accessor :customer_account
|
1128
1252
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1129
1253
|
attr_accessor :days_until_due
|
1254
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1255
|
+
attr_accessor :default_margins
|
1130
1256
|
# 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
1257
|
attr_accessor :default_payment_method
|
1132
1258
|
# 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 +1300,7 @@ module Stripe
|
|
1174
1300
|
|
1175
1301
|
def initialize(
|
1176
1302
|
account_tax_ids: nil,
|
1303
|
+
amounts_due: nil,
|
1177
1304
|
application_fee_amount: nil,
|
1178
1305
|
auto_advance: nil,
|
1179
1306
|
automatic_tax: nil,
|
@@ -1182,7 +1309,9 @@ module Stripe
|
|
1182
1309
|
currency: nil,
|
1183
1310
|
custom_fields: nil,
|
1184
1311
|
customer: nil,
|
1312
|
+
customer_account: nil,
|
1185
1313
|
days_until_due: nil,
|
1314
|
+
default_margins: nil,
|
1186
1315
|
default_payment_method: nil,
|
1187
1316
|
default_source: nil,
|
1188
1317
|
default_tax_rates: nil,
|
@@ -1207,6 +1336,7 @@ module Stripe
|
|
1207
1336
|
transfer_data: nil
|
1208
1337
|
)
|
1209
1338
|
@account_tax_ids = account_tax_ids
|
1339
|
+
@amounts_due = amounts_due
|
1210
1340
|
@application_fee_amount = application_fee_amount
|
1211
1341
|
@auto_advance = auto_advance
|
1212
1342
|
@automatic_tax = automatic_tax
|
@@ -1215,7 +1345,9 @@ module Stripe
|
|
1215
1345
|
@currency = currency
|
1216
1346
|
@custom_fields = custom_fields
|
1217
1347
|
@customer = customer
|
1348
|
+
@customer_account = customer_account
|
1218
1349
|
@days_until_due = days_until_due
|
1350
|
+
@default_margins = default_margins
|
1219
1351
|
@default_payment_method = default_payment_method
|
1220
1352
|
@default_source = default_source
|
1221
1353
|
@default_tax_rates = default_tax_rates
|
@@ -1262,16 +1394,44 @@ module Stripe
|
|
1262
1394
|
class AddLinesParams < Stripe::RequestParams
|
1263
1395
|
class Line < Stripe::RequestParams
|
1264
1396
|
class Discount < Stripe::RequestParams
|
1397
|
+
class DiscountEnd < Stripe::RequestParams
|
1398
|
+
class Duration < Stripe::RequestParams
|
1399
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1400
|
+
attr_accessor :interval
|
1401
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1402
|
+
attr_accessor :interval_count
|
1403
|
+
|
1404
|
+
def initialize(interval: nil, interval_count: nil)
|
1405
|
+
@interval = interval
|
1406
|
+
@interval_count = interval_count
|
1407
|
+
end
|
1408
|
+
end
|
1409
|
+
# Time span for the redeemed discount.
|
1410
|
+
attr_accessor :duration
|
1411
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1412
|
+
attr_accessor :timestamp
|
1413
|
+
# The type of calculation made to determine when the discount ends.
|
1414
|
+
attr_accessor :type
|
1415
|
+
|
1416
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1417
|
+
@duration = duration
|
1418
|
+
@timestamp = timestamp
|
1419
|
+
@type = type
|
1420
|
+
end
|
1421
|
+
end
|
1265
1422
|
# ID of the coupon to create a new discount for.
|
1266
1423
|
attr_accessor :coupon
|
1267
1424
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1268
1425
|
attr_accessor :discount
|
1426
|
+
# Details to determine how long the discount should be applied for.
|
1427
|
+
attr_accessor :discount_end
|
1269
1428
|
# ID of the promotion code to create a new discount for.
|
1270
1429
|
attr_accessor :promotion_code
|
1271
1430
|
|
1272
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1431
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1273
1432
|
@coupon = coupon
|
1274
1433
|
@discount = discount
|
1434
|
+
@discount_end = discount_end
|
1275
1435
|
@promotion_code = promotion_code
|
1276
1436
|
end
|
1277
1437
|
end
|
@@ -1424,6 +1584,8 @@ module Stripe
|
|
1424
1584
|
attr_accessor :discounts
|
1425
1585
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1426
1586
|
attr_accessor :invoice_item
|
1587
|
+
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
1588
|
+
attr_accessor :margins
|
1427
1589
|
# 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
1590
|
attr_accessor :metadata
|
1429
1591
|
# 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 +1607,7 @@ module Stripe
|
|
1445
1607
|
discountable: nil,
|
1446
1608
|
discounts: nil,
|
1447
1609
|
invoice_item: nil,
|
1610
|
+
margins: nil,
|
1448
1611
|
metadata: nil,
|
1449
1612
|
period: nil,
|
1450
1613
|
price_data: nil,
|
@@ -1458,6 +1621,7 @@ module Stripe
|
|
1458
1621
|
@discountable = discountable
|
1459
1622
|
@discounts = discounts
|
1460
1623
|
@invoice_item = invoice_item
|
1624
|
+
@margins = margins
|
1461
1625
|
@metadata = metadata
|
1462
1626
|
@period = period
|
1463
1627
|
@price_data = price_data
|
@@ -1482,14 +1646,59 @@ module Stripe
|
|
1482
1646
|
end
|
1483
1647
|
|
1484
1648
|
class AttachPaymentParams < Stripe::RequestParams
|
1649
|
+
class PaymentRecordData < Stripe::RequestParams
|
1650
|
+
# The amount that was paid out of band.
|
1651
|
+
attr_accessor :amount
|
1652
|
+
# The currency that was paid out of band.
|
1653
|
+
attr_accessor :currency
|
1654
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1655
|
+
attr_accessor :metadata
|
1656
|
+
# The type of money movement for this out of band payment record.
|
1657
|
+
attr_accessor :money_movement_type
|
1658
|
+
# The timestamp when this out of band payment was paid.
|
1659
|
+
attr_accessor :paid_at
|
1660
|
+
# The reference for this out of band payment record.
|
1661
|
+
attr_accessor :payment_reference
|
1662
|
+
|
1663
|
+
def initialize(
|
1664
|
+
amount: nil,
|
1665
|
+
currency: nil,
|
1666
|
+
metadata: nil,
|
1667
|
+
money_movement_type: nil,
|
1668
|
+
paid_at: nil,
|
1669
|
+
payment_reference: nil
|
1670
|
+
)
|
1671
|
+
@amount = amount
|
1672
|
+
@currency = currency
|
1673
|
+
@metadata = metadata
|
1674
|
+
@money_movement_type = money_movement_type
|
1675
|
+
@paid_at = paid_at
|
1676
|
+
@payment_reference = payment_reference
|
1677
|
+
end
|
1678
|
+
end
|
1679
|
+
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
1680
|
+
attr_accessor :amount_requested
|
1485
1681
|
# Specifies which fields in the response should be expanded.
|
1486
1682
|
attr_accessor :expand
|
1487
1683
|
# The ID of the PaymentIntent to attach to the invoice.
|
1488
1684
|
attr_accessor :payment_intent
|
1685
|
+
# The ID of the PaymentRecord to attach to the invoice.
|
1686
|
+
attr_accessor :payment_record
|
1687
|
+
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
1688
|
+
attr_accessor :payment_record_data
|
1489
1689
|
|
1490
|
-
def initialize(
|
1690
|
+
def initialize(
|
1691
|
+
amount_requested: nil,
|
1692
|
+
expand: nil,
|
1693
|
+
payment_intent: nil,
|
1694
|
+
payment_record: nil,
|
1695
|
+
payment_record_data: nil
|
1696
|
+
)
|
1697
|
+
@amount_requested = amount_requested
|
1491
1698
|
@expand = expand
|
1492
1699
|
@payment_intent = payment_intent
|
1700
|
+
@payment_record = payment_record
|
1701
|
+
@payment_record_data = payment_record_data
|
1493
1702
|
end
|
1494
1703
|
end
|
1495
1704
|
|
@@ -1589,16 +1798,44 @@ module Stripe
|
|
1589
1798
|
class UpdateLinesParams < Stripe::RequestParams
|
1590
1799
|
class Line < Stripe::RequestParams
|
1591
1800
|
class Discount < Stripe::RequestParams
|
1801
|
+
class DiscountEnd < Stripe::RequestParams
|
1802
|
+
class Duration < Stripe::RequestParams
|
1803
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1804
|
+
attr_accessor :interval
|
1805
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1806
|
+
attr_accessor :interval_count
|
1807
|
+
|
1808
|
+
def initialize(interval: nil, interval_count: nil)
|
1809
|
+
@interval = interval
|
1810
|
+
@interval_count = interval_count
|
1811
|
+
end
|
1812
|
+
end
|
1813
|
+
# Time span for the redeemed discount.
|
1814
|
+
attr_accessor :duration
|
1815
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1816
|
+
attr_accessor :timestamp
|
1817
|
+
# The type of calculation made to determine when the discount ends.
|
1818
|
+
attr_accessor :type
|
1819
|
+
|
1820
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1821
|
+
@duration = duration
|
1822
|
+
@timestamp = timestamp
|
1823
|
+
@type = type
|
1824
|
+
end
|
1825
|
+
end
|
1592
1826
|
# ID of the coupon to create a new discount for.
|
1593
1827
|
attr_accessor :coupon
|
1594
1828
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1595
1829
|
attr_accessor :discount
|
1830
|
+
# Details to determine how long the discount should be applied for.
|
1831
|
+
attr_accessor :discount_end
|
1596
1832
|
# ID of the promotion code to create a new discount for.
|
1597
1833
|
attr_accessor :promotion_code
|
1598
1834
|
|
1599
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1835
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1600
1836
|
@coupon = coupon
|
1601
1837
|
@discount = discount
|
1838
|
+
@discount_end = discount_end
|
1602
1839
|
@promotion_code = promotion_code
|
1603
1840
|
end
|
1604
1841
|
end
|
@@ -1751,6 +1988,8 @@ module Stripe
|
|
1751
1988
|
attr_accessor :discounts
|
1752
1989
|
# ID of an existing line item on the invoice.
|
1753
1990
|
attr_accessor :id
|
1991
|
+
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
1992
|
+
attr_accessor :margins
|
1754
1993
|
# 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
1994
|
attr_accessor :metadata
|
1756
1995
|
# 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 +2011,7 @@ module Stripe
|
|
1772
2011
|
discountable: nil,
|
1773
2012
|
discounts: nil,
|
1774
2013
|
id: nil,
|
2014
|
+
margins: nil,
|
1775
2015
|
metadata: nil,
|
1776
2016
|
period: nil,
|
1777
2017
|
price_data: nil,
|
@@ -1785,6 +2025,7 @@ module Stripe
|
|
1785
2025
|
@discountable = discountable
|
1786
2026
|
@discounts = discounts
|
1787
2027
|
@id = id
|
2028
|
+
@margins = margins
|
1788
2029
|
@metadata = metadata
|
1789
2030
|
@period = period
|
1790
2031
|
@price_data = price_data
|
@@ -1959,32 +2200,88 @@ module Stripe
|
|
1959
2200
|
end
|
1960
2201
|
|
1961
2202
|
class Discount < Stripe::RequestParams
|
2203
|
+
class DiscountEnd < Stripe::RequestParams
|
2204
|
+
class Duration < Stripe::RequestParams
|
2205
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2206
|
+
attr_accessor :interval
|
2207
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2208
|
+
attr_accessor :interval_count
|
2209
|
+
|
2210
|
+
def initialize(interval: nil, interval_count: nil)
|
2211
|
+
@interval = interval
|
2212
|
+
@interval_count = interval_count
|
2213
|
+
end
|
2214
|
+
end
|
2215
|
+
# Time span for the redeemed discount.
|
2216
|
+
attr_accessor :duration
|
2217
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2218
|
+
attr_accessor :timestamp
|
2219
|
+
# The type of calculation made to determine when the discount ends.
|
2220
|
+
attr_accessor :type
|
2221
|
+
|
2222
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2223
|
+
@duration = duration
|
2224
|
+
@timestamp = timestamp
|
2225
|
+
@type = type
|
2226
|
+
end
|
2227
|
+
end
|
1962
2228
|
# ID of the coupon to create a new discount for.
|
1963
2229
|
attr_accessor :coupon
|
1964
2230
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1965
2231
|
attr_accessor :discount
|
2232
|
+
# Details to determine how long the discount should be applied for.
|
2233
|
+
attr_accessor :discount_end
|
1966
2234
|
# ID of the promotion code to create a new discount for.
|
1967
2235
|
attr_accessor :promotion_code
|
1968
2236
|
|
1969
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2237
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1970
2238
|
@coupon = coupon
|
1971
2239
|
@discount = discount
|
2240
|
+
@discount_end = discount_end
|
1972
2241
|
@promotion_code = promotion_code
|
1973
2242
|
end
|
1974
2243
|
end
|
1975
2244
|
|
1976
2245
|
class InvoiceItem < Stripe::RequestParams
|
1977
2246
|
class Discount < Stripe::RequestParams
|
2247
|
+
class DiscountEnd < Stripe::RequestParams
|
2248
|
+
class Duration < Stripe::RequestParams
|
2249
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2250
|
+
attr_accessor :interval
|
2251
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2252
|
+
attr_accessor :interval_count
|
2253
|
+
|
2254
|
+
def initialize(interval: nil, interval_count: nil)
|
2255
|
+
@interval = interval
|
2256
|
+
@interval_count = interval_count
|
2257
|
+
end
|
2258
|
+
end
|
2259
|
+
# Time span for the redeemed discount.
|
2260
|
+
attr_accessor :duration
|
2261
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2262
|
+
attr_accessor :timestamp
|
2263
|
+
# The type of calculation made to determine when the discount ends.
|
2264
|
+
attr_accessor :type
|
2265
|
+
|
2266
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2267
|
+
@duration = duration
|
2268
|
+
@timestamp = timestamp
|
2269
|
+
@type = type
|
2270
|
+
end
|
2271
|
+
end
|
1978
2272
|
# ID of the coupon to create a new discount for.
|
1979
2273
|
attr_accessor :coupon
|
1980
2274
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1981
2275
|
attr_accessor :discount
|
2276
|
+
# Details to determine how long the discount should be applied for.
|
2277
|
+
attr_accessor :discount_end
|
1982
2278
|
# ID of the promotion code to create a new discount for.
|
1983
2279
|
attr_accessor :promotion_code
|
1984
2280
|
|
1985
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2281
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1986
2282
|
@coupon = coupon
|
1987
2283
|
@discount = discount
|
2284
|
+
@discount_end = discount_end
|
1988
2285
|
@promotion_code = promotion_code
|
1989
2286
|
end
|
1990
2287
|
end
|
@@ -2110,19 +2407,499 @@ module Stripe
|
|
2110
2407
|
end
|
2111
2408
|
|
2112
2409
|
class ScheduleDetails < Stripe::RequestParams
|
2410
|
+
class Amendment < Stripe::RequestParams
|
2411
|
+
class AmendmentEnd < Stripe::RequestParams
|
2412
|
+
class DiscountEnd < Stripe::RequestParams
|
2413
|
+
# The ID of a specific discount.
|
2414
|
+
attr_accessor :discount
|
2415
|
+
|
2416
|
+
def initialize(discount: nil)
|
2417
|
+
@discount = discount
|
2418
|
+
end
|
2419
|
+
end
|
2420
|
+
|
2421
|
+
class Duration < Stripe::RequestParams
|
2422
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2423
|
+
attr_accessor :interval
|
2424
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2425
|
+
attr_accessor :interval_count
|
2426
|
+
|
2427
|
+
def initialize(interval: nil, interval_count: nil)
|
2428
|
+
@interval = interval
|
2429
|
+
@interval_count = interval_count
|
2430
|
+
end
|
2431
|
+
end
|
2432
|
+
# Use the `end` time of a given discount.
|
2433
|
+
attr_accessor :discount_end
|
2434
|
+
# Time span for the amendment starting from the `amendment_start`.
|
2435
|
+
attr_accessor :duration
|
2436
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2437
|
+
attr_accessor :timestamp
|
2438
|
+
# Select one of three ways to pass the `amendment_end`.
|
2439
|
+
attr_accessor :type
|
2440
|
+
|
2441
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2442
|
+
@discount_end = discount_end
|
2443
|
+
@duration = duration
|
2444
|
+
@timestamp = timestamp
|
2445
|
+
@type = type
|
2446
|
+
end
|
2447
|
+
end
|
2448
|
+
|
2449
|
+
class AmendmentStart < Stripe::RequestParams
|
2450
|
+
class AmendmentEnd < Stripe::RequestParams
|
2451
|
+
# The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
|
2452
|
+
attr_accessor :index
|
2453
|
+
|
2454
|
+
def initialize(index: nil)
|
2455
|
+
@index = index
|
2456
|
+
end
|
2457
|
+
end
|
2458
|
+
|
2459
|
+
class DiscountEnd < Stripe::RequestParams
|
2460
|
+
# The ID of a specific discount.
|
2461
|
+
attr_accessor :discount
|
2462
|
+
|
2463
|
+
def initialize(discount: nil)
|
2464
|
+
@discount = discount
|
2465
|
+
end
|
2466
|
+
end
|
2467
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2468
|
+
attr_accessor :amendment_end
|
2469
|
+
# Use the `end` time of a given discount.
|
2470
|
+
attr_accessor :discount_end
|
2471
|
+
# A precise Unix timestamp for the amendment to start.
|
2472
|
+
attr_accessor :timestamp
|
2473
|
+
# Select one of three ways to pass the `amendment_start`.
|
2474
|
+
attr_accessor :type
|
2475
|
+
|
2476
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2477
|
+
@amendment_end = amendment_end
|
2478
|
+
@discount_end = discount_end
|
2479
|
+
@timestamp = timestamp
|
2480
|
+
@type = type
|
2481
|
+
end
|
2482
|
+
end
|
2483
|
+
|
2484
|
+
class DiscountAction < Stripe::RequestParams
|
2485
|
+
class Add < Stripe::RequestParams
|
2486
|
+
class DiscountEnd < Stripe::RequestParams
|
2487
|
+
# The type of calculation made to determine when the discount ends.
|
2488
|
+
attr_accessor :type
|
2489
|
+
|
2490
|
+
def initialize(type: nil)
|
2491
|
+
@type = type
|
2492
|
+
end
|
2493
|
+
end
|
2494
|
+
# The coupon code to redeem.
|
2495
|
+
attr_accessor :coupon
|
2496
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
2497
|
+
attr_accessor :discount
|
2498
|
+
# Details to determine how long the discount should be applied for.
|
2499
|
+
attr_accessor :discount_end
|
2500
|
+
# The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
|
2501
|
+
attr_accessor :index
|
2502
|
+
# The promotion code to redeem.
|
2503
|
+
attr_accessor :promotion_code
|
2504
|
+
|
2505
|
+
def initialize(
|
2506
|
+
coupon: nil,
|
2507
|
+
discount: nil,
|
2508
|
+
discount_end: nil,
|
2509
|
+
index: nil,
|
2510
|
+
promotion_code: nil
|
2511
|
+
)
|
2512
|
+
@coupon = coupon
|
2513
|
+
@discount = discount
|
2514
|
+
@discount_end = discount_end
|
2515
|
+
@index = index
|
2516
|
+
@promotion_code = promotion_code
|
2517
|
+
end
|
2518
|
+
end
|
2519
|
+
|
2520
|
+
class Remove < Stripe::RequestParams
|
2521
|
+
# The coupon code to remove from the `discounts` array.
|
2522
|
+
attr_accessor :coupon
|
2523
|
+
# The ID of a discount to remove from the `discounts` array.
|
2524
|
+
attr_accessor :discount
|
2525
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
2526
|
+
attr_accessor :promotion_code
|
2527
|
+
|
2528
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2529
|
+
@coupon = coupon
|
2530
|
+
@discount = discount
|
2531
|
+
@promotion_code = promotion_code
|
2532
|
+
end
|
2533
|
+
end
|
2534
|
+
|
2535
|
+
class Set < Stripe::RequestParams
|
2536
|
+
# The coupon code to replace the `discounts` array with.
|
2537
|
+
attr_accessor :coupon
|
2538
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
2539
|
+
attr_accessor :discount
|
2540
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
2541
|
+
attr_accessor :promotion_code
|
2542
|
+
|
2543
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2544
|
+
@coupon = coupon
|
2545
|
+
@discount = discount
|
2546
|
+
@promotion_code = promotion_code
|
2547
|
+
end
|
2548
|
+
end
|
2549
|
+
# Details of the discount to add.
|
2550
|
+
attr_accessor :add
|
2551
|
+
# Details of the discount to remove.
|
2552
|
+
attr_accessor :remove
|
2553
|
+
# Details of the discount to replace the existing discounts with.
|
2554
|
+
attr_accessor :set
|
2555
|
+
# Determines the type of discount action.
|
2556
|
+
attr_accessor :type
|
2557
|
+
|
2558
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2559
|
+
@add = add
|
2560
|
+
@remove = remove
|
2561
|
+
@set = set
|
2562
|
+
@type = type
|
2563
|
+
end
|
2564
|
+
end
|
2565
|
+
|
2566
|
+
class ItemAction < Stripe::RequestParams
|
2567
|
+
class Add < Stripe::RequestParams
|
2568
|
+
class Discount < Stripe::RequestParams
|
2569
|
+
class DiscountEnd < Stripe::RequestParams
|
2570
|
+
class Duration < Stripe::RequestParams
|
2571
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2572
|
+
attr_accessor :interval
|
2573
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2574
|
+
attr_accessor :interval_count
|
2575
|
+
|
2576
|
+
def initialize(interval: nil, interval_count: nil)
|
2577
|
+
@interval = interval
|
2578
|
+
@interval_count = interval_count
|
2579
|
+
end
|
2580
|
+
end
|
2581
|
+
# Time span for the redeemed discount.
|
2582
|
+
attr_accessor :duration
|
2583
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2584
|
+
attr_accessor :timestamp
|
2585
|
+
# The type of calculation made to determine when the discount ends.
|
2586
|
+
attr_accessor :type
|
2587
|
+
|
2588
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2589
|
+
@duration = duration
|
2590
|
+
@timestamp = timestamp
|
2591
|
+
@type = type
|
2592
|
+
end
|
2593
|
+
end
|
2594
|
+
# ID of the coupon to create a new discount for.
|
2595
|
+
attr_accessor :coupon
|
2596
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2597
|
+
attr_accessor :discount
|
2598
|
+
# Details to determine how long the discount should be applied for.
|
2599
|
+
attr_accessor :discount_end
|
2600
|
+
# ID of the promotion code to create a new discount for.
|
2601
|
+
attr_accessor :promotion_code
|
2602
|
+
|
2603
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2604
|
+
@coupon = coupon
|
2605
|
+
@discount = discount
|
2606
|
+
@discount_end = discount_end
|
2607
|
+
@promotion_code = promotion_code
|
2608
|
+
end
|
2609
|
+
end
|
2610
|
+
|
2611
|
+
class Trial < Stripe::RequestParams
|
2612
|
+
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
2613
|
+
attr_accessor :converts_to
|
2614
|
+
# Determines the type of trial for this item.
|
2615
|
+
attr_accessor :type
|
2616
|
+
|
2617
|
+
def initialize(converts_to: nil, type: nil)
|
2618
|
+
@converts_to = converts_to
|
2619
|
+
@type = type
|
2620
|
+
end
|
2621
|
+
end
|
2622
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2623
|
+
attr_accessor :discounts
|
2624
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2625
|
+
attr_accessor :metadata
|
2626
|
+
# The ID of the price object.
|
2627
|
+
attr_accessor :price
|
2628
|
+
# Quantity for this item.
|
2629
|
+
attr_accessor :quantity
|
2630
|
+
# The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
2631
|
+
attr_accessor :tax_rates
|
2632
|
+
# Options that configure the trial on the subscription item.
|
2633
|
+
attr_accessor :trial
|
2634
|
+
|
2635
|
+
def initialize(
|
2636
|
+
discounts: nil,
|
2637
|
+
metadata: nil,
|
2638
|
+
price: nil,
|
2639
|
+
quantity: nil,
|
2640
|
+
tax_rates: nil,
|
2641
|
+
trial: nil
|
2642
|
+
)
|
2643
|
+
@discounts = discounts
|
2644
|
+
@metadata = metadata
|
2645
|
+
@price = price
|
2646
|
+
@quantity = quantity
|
2647
|
+
@tax_rates = tax_rates
|
2648
|
+
@trial = trial
|
2649
|
+
end
|
2650
|
+
end
|
2651
|
+
|
2652
|
+
class Remove < Stripe::RequestParams
|
2653
|
+
# ID of a price to remove.
|
2654
|
+
attr_accessor :price
|
2655
|
+
|
2656
|
+
def initialize(price: nil)
|
2657
|
+
@price = price
|
2658
|
+
end
|
2659
|
+
end
|
2660
|
+
|
2661
|
+
class Set < Stripe::RequestParams
|
2662
|
+
class Discount < Stripe::RequestParams
|
2663
|
+
class DiscountEnd < Stripe::RequestParams
|
2664
|
+
class Duration < Stripe::RequestParams
|
2665
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2666
|
+
attr_accessor :interval
|
2667
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2668
|
+
attr_accessor :interval_count
|
2669
|
+
|
2670
|
+
def initialize(interval: nil, interval_count: nil)
|
2671
|
+
@interval = interval
|
2672
|
+
@interval_count = interval_count
|
2673
|
+
end
|
2674
|
+
end
|
2675
|
+
# Time span for the redeemed discount.
|
2676
|
+
attr_accessor :duration
|
2677
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2678
|
+
attr_accessor :timestamp
|
2679
|
+
# The type of calculation made to determine when the discount ends.
|
2680
|
+
attr_accessor :type
|
2681
|
+
|
2682
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2683
|
+
@duration = duration
|
2684
|
+
@timestamp = timestamp
|
2685
|
+
@type = type
|
2686
|
+
end
|
2687
|
+
end
|
2688
|
+
# ID of the coupon to create a new discount for.
|
2689
|
+
attr_accessor :coupon
|
2690
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2691
|
+
attr_accessor :discount
|
2692
|
+
# Details to determine how long the discount should be applied for.
|
2693
|
+
attr_accessor :discount_end
|
2694
|
+
# ID of the promotion code to create a new discount for.
|
2695
|
+
attr_accessor :promotion_code
|
2696
|
+
|
2697
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2698
|
+
@coupon = coupon
|
2699
|
+
@discount = discount
|
2700
|
+
@discount_end = discount_end
|
2701
|
+
@promotion_code = promotion_code
|
2702
|
+
end
|
2703
|
+
end
|
2704
|
+
|
2705
|
+
class Trial < Stripe::RequestParams
|
2706
|
+
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
2707
|
+
attr_accessor :converts_to
|
2708
|
+
# Determines the type of trial for this item.
|
2709
|
+
attr_accessor :type
|
2710
|
+
|
2711
|
+
def initialize(converts_to: nil, type: nil)
|
2712
|
+
@converts_to = converts_to
|
2713
|
+
@type = type
|
2714
|
+
end
|
2715
|
+
end
|
2716
|
+
# If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
|
2717
|
+
attr_accessor :discounts
|
2718
|
+
# If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
|
2719
|
+
attr_accessor :metadata
|
2720
|
+
# The ID of the price object.
|
2721
|
+
attr_accessor :price
|
2722
|
+
# If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
|
2723
|
+
attr_accessor :quantity
|
2724
|
+
# If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
|
2725
|
+
attr_accessor :tax_rates
|
2726
|
+
# If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
|
2727
|
+
attr_accessor :trial
|
2728
|
+
|
2729
|
+
def initialize(
|
2730
|
+
discounts: nil,
|
2731
|
+
metadata: nil,
|
2732
|
+
price: nil,
|
2733
|
+
quantity: nil,
|
2734
|
+
tax_rates: nil,
|
2735
|
+
trial: nil
|
2736
|
+
)
|
2737
|
+
@discounts = discounts
|
2738
|
+
@metadata = metadata
|
2739
|
+
@price = price
|
2740
|
+
@quantity = quantity
|
2741
|
+
@tax_rates = tax_rates
|
2742
|
+
@trial = trial
|
2743
|
+
end
|
2744
|
+
end
|
2745
|
+
# Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
|
2746
|
+
attr_accessor :add
|
2747
|
+
# Details of the subscription item to remove.
|
2748
|
+
attr_accessor :remove
|
2749
|
+
# Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
|
2750
|
+
attr_accessor :set
|
2751
|
+
# Determines the type of item action.
|
2752
|
+
attr_accessor :type
|
2753
|
+
|
2754
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2755
|
+
@add = add
|
2756
|
+
@remove = remove
|
2757
|
+
@set = set
|
2758
|
+
@type = type
|
2759
|
+
end
|
2760
|
+
end
|
2761
|
+
|
2762
|
+
class MetadataAction < Stripe::RequestParams
|
2763
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2764
|
+
attr_accessor :add
|
2765
|
+
# Keys to remove from schedule phase metadata.
|
2766
|
+
attr_accessor :remove
|
2767
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2768
|
+
attr_accessor :set
|
2769
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2770
|
+
attr_accessor :type
|
2771
|
+
|
2772
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2773
|
+
@add = add
|
2774
|
+
@remove = remove
|
2775
|
+
@set = set
|
2776
|
+
@type = type
|
2777
|
+
end
|
2778
|
+
end
|
2779
|
+
|
2780
|
+
class SetPauseCollection < Stripe::RequestParams
|
2781
|
+
class Set < Stripe::RequestParams
|
2782
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2783
|
+
attr_accessor :behavior
|
2784
|
+
|
2785
|
+
def initialize(behavior: nil)
|
2786
|
+
@behavior = behavior
|
2787
|
+
end
|
2788
|
+
end
|
2789
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
2790
|
+
attr_accessor :set
|
2791
|
+
# Determines the type of the pause_collection amendment.
|
2792
|
+
attr_accessor :type
|
2793
|
+
|
2794
|
+
def initialize(set: nil, type: nil)
|
2795
|
+
@set = set
|
2796
|
+
@type = type
|
2797
|
+
end
|
2798
|
+
end
|
2799
|
+
|
2800
|
+
class TrialSettings < Stripe::RequestParams
|
2801
|
+
class EndBehavior < Stripe::RequestParams
|
2802
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2803
|
+
attr_accessor :prorate_up_front
|
2804
|
+
|
2805
|
+
def initialize(prorate_up_front: nil)
|
2806
|
+
@prorate_up_front = prorate_up_front
|
2807
|
+
end
|
2808
|
+
end
|
2809
|
+
# Defines how the subscription should behave when a trial ends.
|
2810
|
+
attr_accessor :end_behavior
|
2811
|
+
|
2812
|
+
def initialize(end_behavior: nil)
|
2813
|
+
@end_behavior = end_behavior
|
2814
|
+
end
|
2815
|
+
end
|
2816
|
+
# Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
|
2817
|
+
attr_accessor :amendment_end
|
2818
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2819
|
+
attr_accessor :amendment_start
|
2820
|
+
# For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
|
2821
|
+
attr_accessor :billing_cycle_anchor
|
2822
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2823
|
+
attr_accessor :discount_actions
|
2824
|
+
# Changes to the subscription items during the amendment time span.
|
2825
|
+
attr_accessor :item_actions
|
2826
|
+
# Instructions for how to modify phase metadata
|
2827
|
+
attr_accessor :metadata_actions
|
2828
|
+
# Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
|
2829
|
+
attr_accessor :proration_behavior
|
2830
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2831
|
+
attr_accessor :set_pause_collection
|
2832
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2833
|
+
attr_accessor :set_schedule_end
|
2834
|
+
# Settings related to subscription trials.
|
2835
|
+
attr_accessor :trial_settings
|
2836
|
+
|
2837
|
+
def initialize(
|
2838
|
+
amendment_end: nil,
|
2839
|
+
amendment_start: nil,
|
2840
|
+
billing_cycle_anchor: nil,
|
2841
|
+
discount_actions: nil,
|
2842
|
+
item_actions: nil,
|
2843
|
+
metadata_actions: nil,
|
2844
|
+
proration_behavior: nil,
|
2845
|
+
set_pause_collection: nil,
|
2846
|
+
set_schedule_end: nil,
|
2847
|
+
trial_settings: nil
|
2848
|
+
)
|
2849
|
+
@amendment_end = amendment_end
|
2850
|
+
@amendment_start = amendment_start
|
2851
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
2852
|
+
@discount_actions = discount_actions
|
2853
|
+
@item_actions = item_actions
|
2854
|
+
@metadata_actions = metadata_actions
|
2855
|
+
@proration_behavior = proration_behavior
|
2856
|
+
@set_pause_collection = set_pause_collection
|
2857
|
+
@set_schedule_end = set_schedule_end
|
2858
|
+
@trial_settings = trial_settings
|
2859
|
+
end
|
2860
|
+
end
|
2861
|
+
|
2113
2862
|
class Phase < Stripe::RequestParams
|
2114
2863
|
class AddInvoiceItem < Stripe::RequestParams
|
2115
2864
|
class Discount < Stripe::RequestParams
|
2865
|
+
class DiscountEnd < Stripe::RequestParams
|
2866
|
+
class Duration < Stripe::RequestParams
|
2867
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2868
|
+
attr_accessor :interval
|
2869
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2870
|
+
attr_accessor :interval_count
|
2871
|
+
|
2872
|
+
def initialize(interval: nil, interval_count: nil)
|
2873
|
+
@interval = interval
|
2874
|
+
@interval_count = interval_count
|
2875
|
+
end
|
2876
|
+
end
|
2877
|
+
# Time span for the redeemed discount.
|
2878
|
+
attr_accessor :duration
|
2879
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2880
|
+
attr_accessor :timestamp
|
2881
|
+
# The type of calculation made to determine when the discount ends.
|
2882
|
+
attr_accessor :type
|
2883
|
+
|
2884
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2885
|
+
@duration = duration
|
2886
|
+
@timestamp = timestamp
|
2887
|
+
@type = type
|
2888
|
+
end
|
2889
|
+
end
|
2116
2890
|
# ID of the coupon to create a new discount for.
|
2117
2891
|
attr_accessor :coupon
|
2118
2892
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2119
2893
|
attr_accessor :discount
|
2894
|
+
# Details to determine how long the discount should be applied for.
|
2895
|
+
attr_accessor :discount_end
|
2120
2896
|
# ID of the promotion code to create a new discount for.
|
2121
2897
|
attr_accessor :promotion_code
|
2122
2898
|
|
2123
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2899
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2124
2900
|
@coupon = coupon
|
2125
2901
|
@discount = discount
|
2902
|
+
@discount_end = discount_end
|
2126
2903
|
@promotion_code = promotion_code
|
2127
2904
|
end
|
2128
2905
|
end
|
@@ -2215,16 +2992,44 @@ module Stripe
|
|
2215
2992
|
end
|
2216
2993
|
|
2217
2994
|
class Discount < Stripe::RequestParams
|
2995
|
+
class DiscountEnd < Stripe::RequestParams
|
2996
|
+
class Duration < Stripe::RequestParams
|
2997
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2998
|
+
attr_accessor :interval
|
2999
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3000
|
+
attr_accessor :interval_count
|
3001
|
+
|
3002
|
+
def initialize(interval: nil, interval_count: nil)
|
3003
|
+
@interval = interval
|
3004
|
+
@interval_count = interval_count
|
3005
|
+
end
|
3006
|
+
end
|
3007
|
+
# Time span for the redeemed discount.
|
3008
|
+
attr_accessor :duration
|
3009
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3010
|
+
attr_accessor :timestamp
|
3011
|
+
# The type of calculation made to determine when the discount ends.
|
3012
|
+
attr_accessor :type
|
3013
|
+
|
3014
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3015
|
+
@duration = duration
|
3016
|
+
@timestamp = timestamp
|
3017
|
+
@type = type
|
3018
|
+
end
|
3019
|
+
end
|
2218
3020
|
# ID of the coupon to create a new discount for.
|
2219
3021
|
attr_accessor :coupon
|
2220
3022
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2221
3023
|
attr_accessor :discount
|
3024
|
+
# Details to determine how long the discount should be applied for.
|
3025
|
+
attr_accessor :discount_end
|
2222
3026
|
# ID of the promotion code to create a new discount for.
|
2223
3027
|
attr_accessor :promotion_code
|
2224
3028
|
|
2225
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3029
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2226
3030
|
@coupon = coupon
|
2227
3031
|
@discount = discount
|
3032
|
+
@discount_end = discount_end
|
2228
3033
|
@promotion_code = promotion_code
|
2229
3034
|
end
|
2230
3035
|
end
|
@@ -2266,16 +3071,44 @@ module Stripe
|
|
2266
3071
|
end
|
2267
3072
|
|
2268
3073
|
class Discount < Stripe::RequestParams
|
3074
|
+
class DiscountEnd < Stripe::RequestParams
|
3075
|
+
class Duration < Stripe::RequestParams
|
3076
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3077
|
+
attr_accessor :interval
|
3078
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3079
|
+
attr_accessor :interval_count
|
3080
|
+
|
3081
|
+
def initialize(interval: nil, interval_count: nil)
|
3082
|
+
@interval = interval
|
3083
|
+
@interval_count = interval_count
|
3084
|
+
end
|
3085
|
+
end
|
3086
|
+
# Time span for the redeemed discount.
|
3087
|
+
attr_accessor :duration
|
3088
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3089
|
+
attr_accessor :timestamp
|
3090
|
+
# The type of calculation made to determine when the discount ends.
|
3091
|
+
attr_accessor :type
|
3092
|
+
|
3093
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3094
|
+
@duration = duration
|
3095
|
+
@timestamp = timestamp
|
3096
|
+
@type = type
|
3097
|
+
end
|
3098
|
+
end
|
2269
3099
|
# ID of the coupon to create a new discount for.
|
2270
3100
|
attr_accessor :coupon
|
2271
3101
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2272
3102
|
attr_accessor :discount
|
3103
|
+
# Details to determine how long the discount should be applied for.
|
3104
|
+
attr_accessor :discount_end
|
2273
3105
|
# ID of the promotion code to create a new discount for.
|
2274
3106
|
attr_accessor :promotion_code
|
2275
3107
|
|
2276
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3108
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2277
3109
|
@coupon = coupon
|
2278
3110
|
@discount = discount
|
3111
|
+
@discount_end = discount_end
|
2279
3112
|
@promotion_code = promotion_code
|
2280
3113
|
end
|
2281
3114
|
end
|
@@ -2321,6 +3154,18 @@ module Stripe
|
|
2321
3154
|
@unit_amount_decimal = unit_amount_decimal
|
2322
3155
|
end
|
2323
3156
|
end
|
3157
|
+
|
3158
|
+
class Trial < Stripe::RequestParams
|
3159
|
+
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
3160
|
+
attr_accessor :converts_to
|
3161
|
+
# Determines the type of trial for this item.
|
3162
|
+
attr_accessor :type
|
3163
|
+
|
3164
|
+
def initialize(converts_to: nil, type: nil)
|
3165
|
+
@converts_to = converts_to
|
3166
|
+
@type = type
|
3167
|
+
end
|
3168
|
+
end
|
2324
3169
|
# 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.
|
2325
3170
|
attr_accessor :billing_thresholds
|
2326
3171
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -2337,6 +3182,8 @@ module Stripe
|
|
2337
3182
|
attr_accessor :quantity
|
2338
3183
|
# 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.
|
2339
3184
|
attr_accessor :tax_rates
|
3185
|
+
# Options that configure the trial on the subscription item.
|
3186
|
+
attr_accessor :trial
|
2340
3187
|
|
2341
3188
|
def initialize(
|
2342
3189
|
billing_thresholds: nil,
|
@@ -2346,7 +3193,8 @@ module Stripe
|
|
2346
3193
|
price: nil,
|
2347
3194
|
price_data: nil,
|
2348
3195
|
quantity: nil,
|
2349
|
-
tax_rates: nil
|
3196
|
+
tax_rates: nil,
|
3197
|
+
trial: nil
|
2350
3198
|
)
|
2351
3199
|
@billing_thresholds = billing_thresholds
|
2352
3200
|
@discounts = discounts
|
@@ -2356,6 +3204,16 @@ module Stripe
|
|
2356
3204
|
@price_data = price_data
|
2357
3205
|
@quantity = quantity
|
2358
3206
|
@tax_rates = tax_rates
|
3207
|
+
@trial = trial
|
3208
|
+
end
|
3209
|
+
end
|
3210
|
+
|
3211
|
+
class PauseCollection < Stripe::RequestParams
|
3212
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3213
|
+
attr_accessor :behavior
|
3214
|
+
|
3215
|
+
def initialize(behavior: nil)
|
3216
|
+
@behavior = behavior
|
2359
3217
|
end
|
2360
3218
|
end
|
2361
3219
|
|
@@ -2370,6 +3228,23 @@ module Stripe
|
|
2370
3228
|
@destination = destination
|
2371
3229
|
end
|
2372
3230
|
end
|
3231
|
+
|
3232
|
+
class TrialSettings < Stripe::RequestParams
|
3233
|
+
class EndBehavior < Stripe::RequestParams
|
3234
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3235
|
+
attr_accessor :prorate_up_front
|
3236
|
+
|
3237
|
+
def initialize(prorate_up_front: nil)
|
3238
|
+
@prorate_up_front = prorate_up_front
|
3239
|
+
end
|
3240
|
+
end
|
3241
|
+
# Defines how the subscription should behave when a trial ends.
|
3242
|
+
attr_accessor :end_behavior
|
3243
|
+
|
3244
|
+
def initialize(end_behavior: nil)
|
3245
|
+
@end_behavior = end_behavior
|
3246
|
+
end
|
3247
|
+
end
|
2373
3248
|
# 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.
|
2374
3249
|
attr_accessor :add_invoice_items
|
2375
3250
|
# 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).
|
@@ -2404,6 +3279,8 @@ module Stripe
|
|
2404
3279
|
attr_accessor :metadata
|
2405
3280
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
2406
3281
|
attr_accessor :on_behalf_of
|
3282
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
3283
|
+
attr_accessor :pause_collection
|
2407
3284
|
# 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.
|
2408
3285
|
attr_accessor :proration_behavior
|
2409
3286
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -2412,8 +3289,12 @@ module Stripe
|
|
2412
3289
|
attr_accessor :transfer_data
|
2413
3290
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
2414
3291
|
attr_accessor :trial
|
3292
|
+
# Specify trial behavior when crossing phase boundaries
|
3293
|
+
attr_accessor :trial_continuation
|
2415
3294
|
# 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`
|
2416
3295
|
attr_accessor :trial_end
|
3296
|
+
# Settings related to subscription trials.
|
3297
|
+
attr_accessor :trial_settings
|
2417
3298
|
|
2418
3299
|
def initialize(
|
2419
3300
|
add_invoice_items: nil,
|
@@ -2433,11 +3314,14 @@ module Stripe
|
|
2433
3314
|
iterations: nil,
|
2434
3315
|
metadata: nil,
|
2435
3316
|
on_behalf_of: nil,
|
3317
|
+
pause_collection: nil,
|
2436
3318
|
proration_behavior: nil,
|
2437
3319
|
start_date: nil,
|
2438
3320
|
transfer_data: nil,
|
2439
3321
|
trial: nil,
|
2440
|
-
|
3322
|
+
trial_continuation: nil,
|
3323
|
+
trial_end: nil,
|
3324
|
+
trial_settings: nil
|
2441
3325
|
)
|
2442
3326
|
@add_invoice_items = add_invoice_items
|
2443
3327
|
@application_fee_percent = application_fee_percent
|
@@ -2456,23 +3340,95 @@ module Stripe
|
|
2456
3340
|
@iterations = iterations
|
2457
3341
|
@metadata = metadata
|
2458
3342
|
@on_behalf_of = on_behalf_of
|
3343
|
+
@pause_collection = pause_collection
|
2459
3344
|
@proration_behavior = proration_behavior
|
2460
3345
|
@start_date = start_date
|
2461
3346
|
@transfer_data = transfer_data
|
2462
3347
|
@trial = trial
|
3348
|
+
@trial_continuation = trial_continuation
|
2463
3349
|
@trial_end = trial_end
|
3350
|
+
@trial_settings = trial_settings
|
3351
|
+
end
|
3352
|
+
end
|
3353
|
+
|
3354
|
+
class Prebilling < Stripe::RequestParams
|
3355
|
+
class BillUntil < Stripe::RequestParams
|
3356
|
+
class AmendmentEnd < Stripe::RequestParams
|
3357
|
+
# The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
|
3358
|
+
attr_accessor :index
|
3359
|
+
|
3360
|
+
def initialize(index: nil)
|
3361
|
+
@index = index
|
3362
|
+
end
|
3363
|
+
end
|
3364
|
+
|
3365
|
+
class Duration < Stripe::RequestParams
|
3366
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3367
|
+
attr_accessor :interval
|
3368
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3369
|
+
attr_accessor :interval_count
|
3370
|
+
|
3371
|
+
def initialize(interval: nil, interval_count: nil)
|
3372
|
+
@interval = interval
|
3373
|
+
@interval_count = interval_count
|
3374
|
+
end
|
3375
|
+
end
|
3376
|
+
# End the prebilled period when a specified amendment ends.
|
3377
|
+
attr_accessor :amendment_end
|
3378
|
+
# Time span for prebilling, starting from `bill_from`.
|
3379
|
+
attr_accessor :duration
|
3380
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3381
|
+
attr_accessor :timestamp
|
3382
|
+
# Select one of several ways to pass the `bill_until` value.
|
3383
|
+
attr_accessor :type
|
3384
|
+
|
3385
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3386
|
+
@amendment_end = amendment_end
|
3387
|
+
@duration = duration
|
3388
|
+
@timestamp = timestamp
|
3389
|
+
@type = type
|
3390
|
+
end
|
3391
|
+
end
|
3392
|
+
# The end of the prebilled time period.
|
3393
|
+
attr_accessor :bill_until
|
3394
|
+
# This is used to determine the number of billing cycles to prebill.
|
3395
|
+
attr_accessor :iterations
|
3396
|
+
|
3397
|
+
def initialize(bill_until: nil, iterations: nil)
|
3398
|
+
@bill_until = bill_until
|
3399
|
+
@iterations = iterations
|
2464
3400
|
end
|
2465
3401
|
end
|
3402
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3403
|
+
attr_accessor :amendments
|
3404
|
+
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
3405
|
+
attr_accessor :billing_behavior
|
3406
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
3407
|
+
attr_accessor :billing_mode
|
2466
3408
|
# 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.
|
2467
3409
|
attr_accessor :end_behavior
|
2468
3410
|
# 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.
|
2469
3411
|
attr_accessor :phases
|
3412
|
+
# Provide any time periods to bill in advance.
|
3413
|
+
attr_accessor :prebilling
|
2470
3414
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
2471
3415
|
attr_accessor :proration_behavior
|
2472
3416
|
|
2473
|
-
def initialize(
|
3417
|
+
def initialize(
|
3418
|
+
amendments: nil,
|
3419
|
+
billing_behavior: nil,
|
3420
|
+
billing_mode: nil,
|
3421
|
+
end_behavior: nil,
|
3422
|
+
phases: nil,
|
3423
|
+
prebilling: nil,
|
3424
|
+
proration_behavior: nil
|
3425
|
+
)
|
3426
|
+
@amendments = amendments
|
3427
|
+
@billing_behavior = billing_behavior
|
3428
|
+
@billing_mode = billing_mode
|
2474
3429
|
@end_behavior = end_behavior
|
2475
3430
|
@phases = phases
|
3431
|
+
@prebilling = prebilling
|
2476
3432
|
@proration_behavior = proration_behavior
|
2477
3433
|
end
|
2478
3434
|
end
|
@@ -2489,16 +3445,44 @@ module Stripe
|
|
2489
3445
|
end
|
2490
3446
|
|
2491
3447
|
class Discount < Stripe::RequestParams
|
3448
|
+
class DiscountEnd < Stripe::RequestParams
|
3449
|
+
class Duration < Stripe::RequestParams
|
3450
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3451
|
+
attr_accessor :interval
|
3452
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3453
|
+
attr_accessor :interval_count
|
3454
|
+
|
3455
|
+
def initialize(interval: nil, interval_count: nil)
|
3456
|
+
@interval = interval
|
3457
|
+
@interval_count = interval_count
|
3458
|
+
end
|
3459
|
+
end
|
3460
|
+
# Time span for the redeemed discount.
|
3461
|
+
attr_accessor :duration
|
3462
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3463
|
+
attr_accessor :timestamp
|
3464
|
+
# The type of calculation made to determine when the discount ends.
|
3465
|
+
attr_accessor :type
|
3466
|
+
|
3467
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3468
|
+
@duration = duration
|
3469
|
+
@timestamp = timestamp
|
3470
|
+
@type = type
|
3471
|
+
end
|
3472
|
+
end
|
2492
3473
|
# ID of the coupon to create a new discount for.
|
2493
3474
|
attr_accessor :coupon
|
2494
3475
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2495
3476
|
attr_accessor :discount
|
3477
|
+
# Details to determine how long the discount should be applied for.
|
3478
|
+
attr_accessor :discount_end
|
2496
3479
|
# ID of the promotion code to create a new discount for.
|
2497
3480
|
attr_accessor :promotion_code
|
2498
3481
|
|
2499
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3482
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2500
3483
|
@coupon = coupon
|
2501
3484
|
@discount = discount
|
3485
|
+
@discount_end = discount_end
|
2502
3486
|
@promotion_code = promotion_code
|
2503
3487
|
end
|
2504
3488
|
end
|
@@ -2593,8 +3577,19 @@ module Stripe
|
|
2593
3577
|
@tax_rates = tax_rates
|
2594
3578
|
end
|
2595
3579
|
end
|
3580
|
+
|
3581
|
+
class Prebilling < Stripe::RequestParams
|
3582
|
+
# This is used to determine the number of billing cycles to prebill.
|
3583
|
+
attr_accessor :iterations
|
3584
|
+
|
3585
|
+
def initialize(iterations: nil)
|
3586
|
+
@iterations = iterations
|
3587
|
+
end
|
3588
|
+
end
|
2596
3589
|
# 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`.
|
2597
3590
|
attr_accessor :billing_cycle_anchor
|
3591
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
3592
|
+
attr_accessor :billing_mode
|
2598
3593
|
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
2599
3594
|
attr_accessor :cancel_at
|
2600
3595
|
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
|
@@ -2605,6 +3600,8 @@ module Stripe
|
|
2605
3600
|
attr_accessor :default_tax_rates
|
2606
3601
|
# A list of up to 20 subscription items, each with an attached price.
|
2607
3602
|
attr_accessor :items
|
3603
|
+
# The pre-billing to apply to the subscription as a preview.
|
3604
|
+
attr_accessor :prebilling
|
2608
3605
|
# 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`.
|
2609
3606
|
attr_accessor :proration_behavior
|
2610
3607
|
# 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'.
|
@@ -2618,11 +3615,13 @@ module Stripe
|
|
2618
3615
|
|
2619
3616
|
def initialize(
|
2620
3617
|
billing_cycle_anchor: nil,
|
3618
|
+
billing_mode: nil,
|
2621
3619
|
cancel_at: nil,
|
2622
3620
|
cancel_at_period_end: nil,
|
2623
3621
|
cancel_now: nil,
|
2624
3622
|
default_tax_rates: nil,
|
2625
3623
|
items: nil,
|
3624
|
+
prebilling: nil,
|
2626
3625
|
proration_behavior: nil,
|
2627
3626
|
proration_date: nil,
|
2628
3627
|
resume_at: nil,
|
@@ -2630,11 +3629,13 @@ module Stripe
|
|
2630
3629
|
trial_end: nil
|
2631
3630
|
)
|
2632
3631
|
@billing_cycle_anchor = billing_cycle_anchor
|
3632
|
+
@billing_mode = billing_mode
|
2633
3633
|
@cancel_at = cancel_at
|
2634
3634
|
@cancel_at_period_end = cancel_at_period_end
|
2635
3635
|
@cancel_now = cancel_now
|
2636
3636
|
@default_tax_rates = default_tax_rates
|
2637
3637
|
@items = items
|
3638
|
+
@prebilling = prebilling
|
2638
3639
|
@proration_behavior = proration_behavior
|
2639
3640
|
@proration_date = proration_date
|
2640
3641
|
@resume_at = resume_at
|
@@ -2648,6 +3649,8 @@ module Stripe
|
|
2648
3649
|
attr_accessor :currency
|
2649
3650
|
# 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.
|
2650
3651
|
attr_accessor :customer
|
3652
|
+
# The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
|
3653
|
+
attr_accessor :customer_account
|
2651
3654
|
# 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.
|
2652
3655
|
attr_accessor :customer_details
|
2653
3656
|
# 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.
|
@@ -2675,6 +3678,7 @@ module Stripe
|
|
2675
3678
|
automatic_tax: nil,
|
2676
3679
|
currency: nil,
|
2677
3680
|
customer: nil,
|
3681
|
+
customer_account: nil,
|
2678
3682
|
customer_details: nil,
|
2679
3683
|
discounts: nil,
|
2680
3684
|
expand: nil,
|
@@ -2690,6 +3694,7 @@ module Stripe
|
|
2690
3694
|
@automatic_tax = automatic_tax
|
2691
3695
|
@currency = currency
|
2692
3696
|
@customer = customer
|
3697
|
+
@customer_account = customer_account
|
2693
3698
|
@customer_details = customer_details
|
2694
3699
|
@discounts = discounts
|
2695
3700
|
@expand = expand
|