stripe 15.3.0 → 15.4.0.pre.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +1594 -667
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +28 -0
- data/lib/stripe/api_version.rb +1 -2
- 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 +326 -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/dispute.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 +1063 -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 +2958 -0
- data/lib/stripe/resources/payment_attempt_record.rb +1099 -0
- data/lib/stripe/resources/payment_intent.rb +8540 -3584
- 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 +1628 -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 +2038 -7
- 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 +371 -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 +288 -9
- data/lib/stripe/resources/subscription_item.rb +84 -3
- data/lib/stripe/resources/subscription_schedule.rb +1007 -10
- data/lib/stripe/resources/tax/association.rb +66 -0
- data/lib/stripe/resources/tax/form.rb +211 -0
- data/lib/stripe/resources/tax_id.rb +12 -2
- data/lib/stripe/resources/terminal/reader.rb +8 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
- data/lib/stripe/resources/transfer.rb +6 -0
- data/lib/stripe/resources/treasury/financial_account.rb +22 -3
- data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
- data/lib/stripe/resources/treasury/received_credit.rb +38 -1
- data/lib/stripe/resources/treasury/received_debit.rb +40 -1
- data/lib/stripe/resources/v2/core/account.rb +1755 -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 +122 -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 +72 -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 +243 -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 +1014 -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 +2388 -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 +4879 -391
- 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 +1723 -8
- 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 +911 -10
- data/lib/stripe/services/subscription_service.rb +249 -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_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 +4170 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +4 -1
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +43 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
- data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
- data/lib/stripe/services/v2/money_management_service.rb +31 -0
- data/lib/stripe/services/v2/payment_service.rb +15 -0
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +137 -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 +4 -1
- 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 +193855 -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 -4995
- 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 -2086
- data/rbi/stripe/resources/checkout/session.rbi +0 -4060
- data/rbi/stripe/resources/climate/order.rbi +0 -245
- data/rbi/stripe/resources/climate/product.rbi +0 -75
- data/rbi/stripe/resources/climate/supplier.rbi +0 -72
- data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
- data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
- data/rbi/stripe/resources/country_spec.rbi +0 -85
- data/rbi/stripe/resources/coupon.rbi +0 -250
- data/rbi/stripe/resources/credit_note.rbi +0 -752
- data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
- data/rbi/stripe/resources/customer.rbi +0 -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 -564
- data/rbi/stripe/resources/invoice.rbi +0 -3842
- data/rbi/stripe/resources/invoice_item.rbi +0 -470
- data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
- data/rbi/stripe/resources/invoice_payment.rbi +0 -121
- data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
- data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
- data/rbi/stripe/resources/issuing/card.rbi +0 -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 -191
- data/rbi/stripe/resources/payment_intent.rbi +0 -9987
- data/rbi/stripe/resources/payment_link.rbi +0 -1801
- data/rbi/stripe/resources/payment_method.rbi +0 -1770
- data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
- data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
- data/rbi/stripe/resources/payout.rbi +0 -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 -1145
- 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 -3978
- 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 -2080
- data/rbi/stripe/resources/subscription_item.rbi +0 -404
- data/rbi/stripe/resources/subscription_schedule.rbi +0 -1645
- 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 -2732
- 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 -1387
- 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 -994
- 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 -869
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
- data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
- data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
- data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
- data/rbi/stripe/resources/v2/amount.rbi +0 -14
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
- data/rbi/stripe/resources/v2/event.rbi +0 -48
- data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
- data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
- data/rbi/stripe/services/account_capability_service.rbi +0 -51
- data/rbi/stripe/services/account_link_service.rbi +0 -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 -4281
- 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 -2670
- 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 -339
- data/rbi/stripe/services/identity_service.rbi +0 -10
- data/rbi/stripe/services/invoice_item_service.rbi +0 -366
- data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
- data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
- data/rbi/stripe/services/invoice_service.rbi +0 -3011
- 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 -7989
- 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 -781
- 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 -699
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
- data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
- data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
- data/rbi/stripe/services/radar_service.rbi +0 -11
- data/rbi/stripe/services/refund_service.rbi +0 -185
- data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
- data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
- data/rbi/stripe/services/reporting_service.rbi +0 -10
- data/rbi/stripe/services/review_service.rbi +0 -84
- data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
- data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
- data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
- data/rbi/stripe/services/sigma_service.rbi +0 -9
- data/rbi/stripe/services/source_service.rbi +0 -663
- data/rbi/stripe/services/subscription_item_service.rbi +0 -350
- data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1301
- data/rbi/stripe/services/subscription_service.rbi +0 -1684
- data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
- data/rbi/stripe/services/tax/registration_service.rbi +0 -1858
- 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 -540
- data/rbi/stripe/services/terminal_service.rbi +0 -12
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
- data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
- data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -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 -566
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
- data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
- data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
- data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
- data/rbi/stripe/services/treasury_service.rbi +0 -18
- data/rbi/stripe/services/v1_services.rbi +0 -77
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
- data/rbi/stripe/services/v2/billing_service.rbi +0 -14
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
- data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
- data/rbi/stripe/services/v2/core_service.rbi +0 -12
- data/rbi/stripe/services/v2_services.rbi +0 -10
- data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -49,6 +49,25 @@ module Stripe
|
|
49
49
|
|
50
50
|
nested_resource_class_methods :line, operations: %i[list]
|
51
51
|
|
52
|
+
class AmountsDue < Stripe::StripeObject
|
53
|
+
# Incremental amount due for this payment in cents (or local equivalent).
|
54
|
+
attr_reader :amount
|
55
|
+
# The amount in cents (or local equivalent) that was paid for this payment.
|
56
|
+
attr_reader :amount_paid
|
57
|
+
# The difference between the payment’s amount and amount_paid, in cents (or local equivalent).
|
58
|
+
attr_reader :amount_remaining
|
59
|
+
# Number of days from when invoice is finalized until the payment is due.
|
60
|
+
attr_reader :days_until_due
|
61
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
62
|
+
attr_reader :description
|
63
|
+
# Date on which a payment plan’s payment is due.
|
64
|
+
attr_reader :due_date
|
65
|
+
# Timestamp when the payment was paid.
|
66
|
+
attr_reader :paid_at
|
67
|
+
# The status of the payment, one of `open`, `paid`, or `past_due`
|
68
|
+
attr_reader :status
|
69
|
+
end
|
70
|
+
|
52
71
|
class AutomaticTax < Stripe::StripeObject
|
53
72
|
class Liability < Stripe::StripeObject
|
54
73
|
# The connected account being referenced when `type` is `account`.
|
@@ -221,9 +240,17 @@ module Stripe
|
|
221
240
|
end
|
222
241
|
|
223
242
|
class SubscriptionDetails < Stripe::StripeObject
|
243
|
+
class PauseCollection < Stripe::StripeObject
|
244
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
245
|
+
attr_reader :behavior
|
246
|
+
# The time after which the subscription will resume collecting payments.
|
247
|
+
attr_reader :resumes_at
|
248
|
+
end
|
224
249
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
|
225
250
|
# *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
226
251
|
attr_reader :metadata
|
252
|
+
# 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).
|
253
|
+
attr_reader :pause_collection
|
227
254
|
# The subscription that generated this invoice
|
228
255
|
attr_reader :subscription
|
229
256
|
# Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
@@ -283,6 +310,7 @@ module Stripe
|
|
283
310
|
attr_reader :funding_type
|
284
311
|
end
|
285
312
|
|
313
|
+
class IdBankTransfer < Stripe::StripeObject; end
|
286
314
|
class Konbini < Stripe::StripeObject; end
|
287
315
|
class SepaDebit < Stripe::StripeObject; end
|
288
316
|
|
@@ -291,6 +319,8 @@ module Stripe
|
|
291
319
|
class Filters < Stripe::StripeObject
|
292
320
|
# The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
293
321
|
attr_reader :account_subcategories
|
322
|
+
# The institution to use to filter for possible accounts to link.
|
323
|
+
attr_reader :institution
|
294
324
|
end
|
295
325
|
# Attribute for field filters
|
296
326
|
attr_reader :filters
|
@@ -312,6 +342,8 @@ module Stripe
|
|
312
342
|
attr_reader :card
|
313
343
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
314
344
|
attr_reader :customer_balance
|
345
|
+
# 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.
|
346
|
+
attr_reader :id_bank_transfer
|
315
347
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
316
348
|
attr_reader :konbini
|
317
349
|
# 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.
|
@@ -425,6 +457,13 @@ module Stripe
|
|
425
457
|
attr_reader :discount
|
426
458
|
end
|
427
459
|
|
460
|
+
class TotalMarginAmount < Stripe::StripeObject
|
461
|
+
# The amount, in cents (or local equivalent), of the reduction in line item amount.
|
462
|
+
attr_reader :amount
|
463
|
+
# The margin that was applied to get this margin amount.
|
464
|
+
attr_reader :margin
|
465
|
+
end
|
466
|
+
|
428
467
|
class TotalPretaxCreditAmount < Stripe::StripeObject
|
429
468
|
# The amount, in cents (or local equivalent), of the pretax credit amount.
|
430
469
|
attr_reader :amount
|
@@ -432,6 +471,8 @@ module Stripe
|
|
432
471
|
attr_reader :credit_balance_transaction
|
433
472
|
# The discount that was applied to get this pretax credit amount.
|
434
473
|
attr_reader :discount
|
474
|
+
# The margin that was applied to get this pretax credit amount.
|
475
|
+
attr_reader :margin
|
435
476
|
# Type of the pretax credit amount referenced.
|
436
477
|
attr_reader :type
|
437
478
|
end
|
@@ -458,6 +499,24 @@ module Stripe
|
|
458
499
|
class DeleteParams < Stripe::RequestParams; end
|
459
500
|
|
460
501
|
class UpdateParams < Stripe::RequestParams
|
502
|
+
class AmountsDue < Stripe::RequestParams
|
503
|
+
# The amount in cents (or local equivalent).
|
504
|
+
attr_accessor :amount
|
505
|
+
# Number of days from when invoice is finalized until the payment is due.
|
506
|
+
attr_accessor :days_until_due
|
507
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
508
|
+
attr_accessor :description
|
509
|
+
# Date on which a payment plan’s payment is due.
|
510
|
+
attr_accessor :due_date
|
511
|
+
|
512
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
513
|
+
@amount = amount
|
514
|
+
@days_until_due = days_until_due
|
515
|
+
@description = description
|
516
|
+
@due_date = due_date
|
517
|
+
end
|
518
|
+
end
|
519
|
+
|
461
520
|
class AutomaticTax < Stripe::RequestParams
|
462
521
|
class Liability < Stripe::RequestParams
|
463
522
|
# The connected account being referenced when `type` is `account`.
|
@@ -494,16 +553,44 @@ module Stripe
|
|
494
553
|
end
|
495
554
|
|
496
555
|
class Discount < Stripe::RequestParams
|
556
|
+
class DiscountEnd < Stripe::RequestParams
|
557
|
+
class Duration < Stripe::RequestParams
|
558
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
559
|
+
attr_accessor :interval
|
560
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
561
|
+
attr_accessor :interval_count
|
562
|
+
|
563
|
+
def initialize(interval: nil, interval_count: nil)
|
564
|
+
@interval = interval
|
565
|
+
@interval_count = interval_count
|
566
|
+
end
|
567
|
+
end
|
568
|
+
# Time span for the redeemed discount.
|
569
|
+
attr_accessor :duration
|
570
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
571
|
+
attr_accessor :timestamp
|
572
|
+
# The type of calculation made to determine when the discount ends.
|
573
|
+
attr_accessor :type
|
574
|
+
|
575
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
576
|
+
@duration = duration
|
577
|
+
@timestamp = timestamp
|
578
|
+
@type = type
|
579
|
+
end
|
580
|
+
end
|
497
581
|
# ID of the coupon to create a new discount for.
|
498
582
|
attr_accessor :coupon
|
499
583
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
500
584
|
attr_accessor :discount
|
585
|
+
# Details to determine how long the discount should be applied for.
|
586
|
+
attr_accessor :discount_end
|
501
587
|
# ID of the promotion code to create a new discount for.
|
502
588
|
attr_accessor :promotion_code
|
503
589
|
|
504
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
590
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
505
591
|
@coupon = coupon
|
506
592
|
@discount = discount
|
593
|
+
@discount_end = discount_end
|
507
594
|
@promotion_code = promotion_code
|
508
595
|
end
|
509
596
|
end
|
@@ -623,6 +710,7 @@ module Stripe
|
|
623
710
|
end
|
624
711
|
end
|
625
712
|
|
713
|
+
class IdBankTransfer < Stripe::RequestParams; end
|
626
714
|
class Konbini < Stripe::RequestParams; end
|
627
715
|
class SepaDebit < Stripe::RequestParams; end
|
628
716
|
|
@@ -631,9 +719,12 @@ module Stripe
|
|
631
719
|
class Filters < Stripe::RequestParams
|
632
720
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
633
721
|
attr_accessor :account_subcategories
|
722
|
+
# ID of the institution to use to filter for selectable accounts.
|
723
|
+
attr_accessor :institution
|
634
724
|
|
635
|
-
def initialize(account_subcategories: nil)
|
725
|
+
def initialize(account_subcategories: nil, institution: nil)
|
636
726
|
@account_subcategories = account_subcategories
|
727
|
+
@institution = institution
|
637
728
|
end
|
638
729
|
end
|
639
730
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -667,6 +758,8 @@ module Stripe
|
|
667
758
|
attr_accessor :card
|
668
759
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
669
760
|
attr_accessor :customer_balance
|
761
|
+
# 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.
|
762
|
+
attr_accessor :id_bank_transfer
|
670
763
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
671
764
|
attr_accessor :konbini
|
672
765
|
# 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.
|
@@ -679,6 +772,7 @@ module Stripe
|
|
679
772
|
bancontact: nil,
|
680
773
|
card: nil,
|
681
774
|
customer_balance: nil,
|
775
|
+
id_bank_transfer: nil,
|
682
776
|
konbini: nil,
|
683
777
|
sepa_debit: nil,
|
684
778
|
us_bank_account: nil
|
@@ -687,6 +781,7 @@ module Stripe
|
|
687
781
|
@bancontact = bancontact
|
688
782
|
@card = card
|
689
783
|
@customer_balance = customer_balance
|
784
|
+
@id_bank_transfer = id_bank_transfer
|
690
785
|
@konbini = konbini
|
691
786
|
@sepa_debit = sepa_debit
|
692
787
|
@us_bank_account = us_bank_account
|
@@ -898,6 +993,8 @@ module Stripe
|
|
898
993
|
end
|
899
994
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
900
995
|
attr_accessor :account_tax_ids
|
996
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
997
|
+
attr_accessor :amounts_due
|
901
998
|
# 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).
|
902
999
|
attr_accessor :application_fee_amount
|
903
1000
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -912,6 +1009,8 @@ module Stripe
|
|
912
1009
|
attr_accessor :custom_fields
|
913
1010
|
# 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.
|
914
1011
|
attr_accessor :days_until_due
|
1012
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1013
|
+
attr_accessor :default_margins
|
915
1014
|
# 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.
|
916
1015
|
attr_accessor :default_payment_method
|
917
1016
|
# 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.
|
@@ -953,6 +1052,7 @@ module Stripe
|
|
953
1052
|
|
954
1053
|
def initialize(
|
955
1054
|
account_tax_ids: nil,
|
1055
|
+
amounts_due: nil,
|
956
1056
|
application_fee_amount: nil,
|
957
1057
|
auto_advance: nil,
|
958
1058
|
automatic_tax: nil,
|
@@ -960,6 +1060,7 @@ module Stripe
|
|
960
1060
|
collection_method: nil,
|
961
1061
|
custom_fields: nil,
|
962
1062
|
days_until_due: nil,
|
1063
|
+
default_margins: nil,
|
963
1064
|
default_payment_method: nil,
|
964
1065
|
default_source: nil,
|
965
1066
|
default_tax_rates: nil,
|
@@ -981,6 +1082,7 @@ module Stripe
|
|
981
1082
|
transfer_data: nil
|
982
1083
|
)
|
983
1084
|
@account_tax_ids = account_tax_ids
|
1085
|
+
@amounts_due = amounts_due
|
984
1086
|
@application_fee_amount = application_fee_amount
|
985
1087
|
@auto_advance = auto_advance
|
986
1088
|
@automatic_tax = automatic_tax
|
@@ -988,6 +1090,7 @@ module Stripe
|
|
988
1090
|
@collection_method = collection_method
|
989
1091
|
@custom_fields = custom_fields
|
990
1092
|
@days_until_due = days_until_due
|
1093
|
+
@default_margins = default_margins
|
991
1094
|
@default_payment_method = default_payment_method
|
992
1095
|
@default_source = default_source
|
993
1096
|
@default_tax_rates = default_tax_rates
|
@@ -1052,6 +1155,8 @@ module Stripe
|
|
1052
1155
|
attr_accessor :created
|
1053
1156
|
# Only return invoices for the customer specified by this customer ID.
|
1054
1157
|
attr_accessor :customer
|
1158
|
+
# Only return invoices for the account specified by this account ID.
|
1159
|
+
attr_accessor :customer_account
|
1055
1160
|
# Attribute for param field due_date
|
1056
1161
|
attr_accessor :due_date
|
1057
1162
|
# 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.
|
@@ -1071,6 +1176,7 @@ module Stripe
|
|
1071
1176
|
collection_method: nil,
|
1072
1177
|
created: nil,
|
1073
1178
|
customer: nil,
|
1179
|
+
customer_account: nil,
|
1074
1180
|
due_date: nil,
|
1075
1181
|
ending_before: nil,
|
1076
1182
|
expand: nil,
|
@@ -1082,6 +1188,7 @@ module Stripe
|
|
1082
1188
|
@collection_method = collection_method
|
1083
1189
|
@created = created
|
1084
1190
|
@customer = customer
|
1191
|
+
@customer_account = customer_account
|
1085
1192
|
@due_date = due_date
|
1086
1193
|
@ending_before = ending_before
|
1087
1194
|
@expand = expand
|
@@ -1093,6 +1200,24 @@ module Stripe
|
|
1093
1200
|
end
|
1094
1201
|
|
1095
1202
|
class CreateParams < Stripe::RequestParams
|
1203
|
+
class AmountsDue < Stripe::RequestParams
|
1204
|
+
# The amount in cents (or local equivalent).
|
1205
|
+
attr_accessor :amount
|
1206
|
+
# Number of days from when invoice is finalized until the payment is due.
|
1207
|
+
attr_accessor :days_until_due
|
1208
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
1209
|
+
attr_accessor :description
|
1210
|
+
# Date on which a payment plan’s payment is due.
|
1211
|
+
attr_accessor :due_date
|
1212
|
+
|
1213
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
1214
|
+
@amount = amount
|
1215
|
+
@days_until_due = days_until_due
|
1216
|
+
@description = description
|
1217
|
+
@due_date = due_date
|
1218
|
+
end
|
1219
|
+
end
|
1220
|
+
|
1096
1221
|
class AutomaticTax < Stripe::RequestParams
|
1097
1222
|
class Liability < Stripe::RequestParams
|
1098
1223
|
# The connected account being referenced when `type` is `account`.
|
@@ -1129,16 +1254,44 @@ module Stripe
|
|
1129
1254
|
end
|
1130
1255
|
|
1131
1256
|
class Discount < Stripe::RequestParams
|
1257
|
+
class DiscountEnd < Stripe::RequestParams
|
1258
|
+
class Duration < Stripe::RequestParams
|
1259
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1260
|
+
attr_accessor :interval
|
1261
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1262
|
+
attr_accessor :interval_count
|
1263
|
+
|
1264
|
+
def initialize(interval: nil, interval_count: nil)
|
1265
|
+
@interval = interval
|
1266
|
+
@interval_count = interval_count
|
1267
|
+
end
|
1268
|
+
end
|
1269
|
+
# Time span for the redeemed discount.
|
1270
|
+
attr_accessor :duration
|
1271
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1272
|
+
attr_accessor :timestamp
|
1273
|
+
# The type of calculation made to determine when the discount ends.
|
1274
|
+
attr_accessor :type
|
1275
|
+
|
1276
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1277
|
+
@duration = duration
|
1278
|
+
@timestamp = timestamp
|
1279
|
+
@type = type
|
1280
|
+
end
|
1281
|
+
end
|
1132
1282
|
# ID of the coupon to create a new discount for.
|
1133
1283
|
attr_accessor :coupon
|
1134
1284
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1135
1285
|
attr_accessor :discount
|
1286
|
+
# Details to determine how long the discount should be applied for.
|
1287
|
+
attr_accessor :discount_end
|
1136
1288
|
# ID of the promotion code to create a new discount for.
|
1137
1289
|
attr_accessor :promotion_code
|
1138
1290
|
|
1139
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1291
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1140
1292
|
@coupon = coupon
|
1141
1293
|
@discount = discount
|
1294
|
+
@discount_end = discount_end
|
1142
1295
|
@promotion_code = promotion_code
|
1143
1296
|
end
|
1144
1297
|
end
|
@@ -1270,6 +1423,7 @@ module Stripe
|
|
1270
1423
|
end
|
1271
1424
|
end
|
1272
1425
|
|
1426
|
+
class IdBankTransfer < Stripe::RequestParams; end
|
1273
1427
|
class Konbini < Stripe::RequestParams; end
|
1274
1428
|
class SepaDebit < Stripe::RequestParams; end
|
1275
1429
|
|
@@ -1278,9 +1432,12 @@ module Stripe
|
|
1278
1432
|
class Filters < Stripe::RequestParams
|
1279
1433
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
1280
1434
|
attr_accessor :account_subcategories
|
1435
|
+
# ID of the institution to use to filter for selectable accounts.
|
1436
|
+
attr_accessor :institution
|
1281
1437
|
|
1282
|
-
def initialize(account_subcategories: nil)
|
1438
|
+
def initialize(account_subcategories: nil, institution: nil)
|
1283
1439
|
@account_subcategories = account_subcategories
|
1440
|
+
@institution = institution
|
1284
1441
|
end
|
1285
1442
|
end
|
1286
1443
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -1314,6 +1471,8 @@ module Stripe
|
|
1314
1471
|
attr_accessor :card
|
1315
1472
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1316
1473
|
attr_accessor :customer_balance
|
1474
|
+
# 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.
|
1475
|
+
attr_accessor :id_bank_transfer
|
1317
1476
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1318
1477
|
attr_accessor :konbini
|
1319
1478
|
# 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.
|
@@ -1326,6 +1485,7 @@ module Stripe
|
|
1326
1485
|
bancontact: nil,
|
1327
1486
|
card: nil,
|
1328
1487
|
customer_balance: nil,
|
1488
|
+
id_bank_transfer: nil,
|
1329
1489
|
konbini: nil,
|
1330
1490
|
sepa_debit: nil,
|
1331
1491
|
us_bank_account: nil
|
@@ -1334,6 +1494,7 @@ module Stripe
|
|
1334
1494
|
@bancontact = bancontact
|
1335
1495
|
@card = card
|
1336
1496
|
@customer_balance = customer_balance
|
1497
|
+
@id_bank_transfer = id_bank_transfer
|
1337
1498
|
@konbini = konbini
|
1338
1499
|
@sepa_debit = sepa_debit
|
1339
1500
|
@us_bank_account = us_bank_account
|
@@ -1545,6 +1706,8 @@ module Stripe
|
|
1545
1706
|
end
|
1546
1707
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1547
1708
|
attr_accessor :account_tax_ids
|
1709
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1710
|
+
attr_accessor :amounts_due
|
1548
1711
|
# 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).
|
1549
1712
|
attr_accessor :application_fee_amount
|
1550
1713
|
# 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.
|
@@ -1561,8 +1724,12 @@ module Stripe
|
|
1561
1724
|
attr_accessor :custom_fields
|
1562
1725
|
# The ID of the customer who will be billed.
|
1563
1726
|
attr_accessor :customer
|
1727
|
+
# The ID of the account who will be billed.
|
1728
|
+
attr_accessor :customer_account
|
1564
1729
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1565
1730
|
attr_accessor :days_until_due
|
1731
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1732
|
+
attr_accessor :default_margins
|
1566
1733
|
# 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.
|
1567
1734
|
attr_accessor :default_payment_method
|
1568
1735
|
# 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.
|
@@ -1610,6 +1777,7 @@ module Stripe
|
|
1610
1777
|
|
1611
1778
|
def initialize(
|
1612
1779
|
account_tax_ids: nil,
|
1780
|
+
amounts_due: nil,
|
1613
1781
|
application_fee_amount: nil,
|
1614
1782
|
auto_advance: nil,
|
1615
1783
|
automatic_tax: nil,
|
@@ -1618,7 +1786,9 @@ module Stripe
|
|
1618
1786
|
currency: nil,
|
1619
1787
|
custom_fields: nil,
|
1620
1788
|
customer: nil,
|
1789
|
+
customer_account: nil,
|
1621
1790
|
days_until_due: nil,
|
1791
|
+
default_margins: nil,
|
1622
1792
|
default_payment_method: nil,
|
1623
1793
|
default_source: nil,
|
1624
1794
|
default_tax_rates: nil,
|
@@ -1643,6 +1813,7 @@ module Stripe
|
|
1643
1813
|
transfer_data: nil
|
1644
1814
|
)
|
1645
1815
|
@account_tax_ids = account_tax_ids
|
1816
|
+
@amounts_due = amounts_due
|
1646
1817
|
@application_fee_amount = application_fee_amount
|
1647
1818
|
@auto_advance = auto_advance
|
1648
1819
|
@automatic_tax = automatic_tax
|
@@ -1651,7 +1822,9 @@ module Stripe
|
|
1651
1822
|
@currency = currency
|
1652
1823
|
@custom_fields = custom_fields
|
1653
1824
|
@customer = customer
|
1825
|
+
@customer_account = customer_account
|
1654
1826
|
@days_until_due = days_until_due
|
1827
|
+
@default_margins = default_margins
|
1655
1828
|
@default_payment_method = default_payment_method
|
1656
1829
|
@default_source = default_source
|
1657
1830
|
@default_tax_rates = default_tax_rates
|
@@ -1698,16 +1871,44 @@ module Stripe
|
|
1698
1871
|
class AddLinesParams < Stripe::RequestParams
|
1699
1872
|
class Line < Stripe::RequestParams
|
1700
1873
|
class Discount < Stripe::RequestParams
|
1874
|
+
class DiscountEnd < Stripe::RequestParams
|
1875
|
+
class Duration < Stripe::RequestParams
|
1876
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1877
|
+
attr_accessor :interval
|
1878
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1879
|
+
attr_accessor :interval_count
|
1880
|
+
|
1881
|
+
def initialize(interval: nil, interval_count: nil)
|
1882
|
+
@interval = interval
|
1883
|
+
@interval_count = interval_count
|
1884
|
+
end
|
1885
|
+
end
|
1886
|
+
# Time span for the redeemed discount.
|
1887
|
+
attr_accessor :duration
|
1888
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1889
|
+
attr_accessor :timestamp
|
1890
|
+
# The type of calculation made to determine when the discount ends.
|
1891
|
+
attr_accessor :type
|
1892
|
+
|
1893
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1894
|
+
@duration = duration
|
1895
|
+
@timestamp = timestamp
|
1896
|
+
@type = type
|
1897
|
+
end
|
1898
|
+
end
|
1701
1899
|
# ID of the coupon to create a new discount for.
|
1702
1900
|
attr_accessor :coupon
|
1703
1901
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1704
1902
|
attr_accessor :discount
|
1903
|
+
# Details to determine how long the discount should be applied for.
|
1904
|
+
attr_accessor :discount_end
|
1705
1905
|
# ID of the promotion code to create a new discount for.
|
1706
1906
|
attr_accessor :promotion_code
|
1707
1907
|
|
1708
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1908
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1709
1909
|
@coupon = coupon
|
1710
1910
|
@discount = discount
|
1911
|
+
@discount_end = discount_end
|
1711
1912
|
@promotion_code = promotion_code
|
1712
1913
|
end
|
1713
1914
|
end
|
@@ -1860,6 +2061,8 @@ module Stripe
|
|
1860
2061
|
attr_accessor :discounts
|
1861
2062
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1862
2063
|
attr_accessor :invoice_item
|
2064
|
+
# 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.
|
2065
|
+
attr_accessor :margins
|
1863
2066
|
# 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`.
|
1864
2067
|
attr_accessor :metadata
|
1865
2068
|
# 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.
|
@@ -1881,6 +2084,7 @@ module Stripe
|
|
1881
2084
|
discountable: nil,
|
1882
2085
|
discounts: nil,
|
1883
2086
|
invoice_item: nil,
|
2087
|
+
margins: nil,
|
1884
2088
|
metadata: nil,
|
1885
2089
|
period: nil,
|
1886
2090
|
price_data: nil,
|
@@ -1894,6 +2098,7 @@ module Stripe
|
|
1894
2098
|
@discountable = discountable
|
1895
2099
|
@discounts = discounts
|
1896
2100
|
@invoice_item = invoice_item
|
2101
|
+
@margins = margins
|
1897
2102
|
@metadata = metadata
|
1898
2103
|
@period = period
|
1899
2104
|
@price_data = price_data
|
@@ -1918,14 +2123,59 @@ module Stripe
|
|
1918
2123
|
end
|
1919
2124
|
|
1920
2125
|
class AttachPaymentParams < Stripe::RequestParams
|
2126
|
+
class PaymentRecordData < Stripe::RequestParams
|
2127
|
+
# The amount that was paid out of band.
|
2128
|
+
attr_accessor :amount
|
2129
|
+
# The currency that was paid out of band.
|
2130
|
+
attr_accessor :currency
|
2131
|
+
# 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`.
|
2132
|
+
attr_accessor :metadata
|
2133
|
+
# The type of money movement for this out of band payment record.
|
2134
|
+
attr_accessor :money_movement_type
|
2135
|
+
# The timestamp when this out of band payment was paid.
|
2136
|
+
attr_accessor :paid_at
|
2137
|
+
# The reference for this out of band payment record.
|
2138
|
+
attr_accessor :payment_reference
|
2139
|
+
|
2140
|
+
def initialize(
|
2141
|
+
amount: nil,
|
2142
|
+
currency: nil,
|
2143
|
+
metadata: nil,
|
2144
|
+
money_movement_type: nil,
|
2145
|
+
paid_at: nil,
|
2146
|
+
payment_reference: nil
|
2147
|
+
)
|
2148
|
+
@amount = amount
|
2149
|
+
@currency = currency
|
2150
|
+
@metadata = metadata
|
2151
|
+
@money_movement_type = money_movement_type
|
2152
|
+
@paid_at = paid_at
|
2153
|
+
@payment_reference = payment_reference
|
2154
|
+
end
|
2155
|
+
end
|
2156
|
+
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
2157
|
+
attr_accessor :amount_requested
|
1921
2158
|
# Specifies which fields in the response should be expanded.
|
1922
2159
|
attr_accessor :expand
|
1923
2160
|
# The ID of the PaymentIntent to attach to the invoice.
|
1924
2161
|
attr_accessor :payment_intent
|
2162
|
+
# The ID of the PaymentRecord to attach to the invoice.
|
2163
|
+
attr_accessor :payment_record
|
2164
|
+
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
2165
|
+
attr_accessor :payment_record_data
|
1925
2166
|
|
1926
|
-
def initialize(
|
2167
|
+
def initialize(
|
2168
|
+
amount_requested: nil,
|
2169
|
+
expand: nil,
|
2170
|
+
payment_intent: nil,
|
2171
|
+
payment_record: nil,
|
2172
|
+
payment_record_data: nil
|
2173
|
+
)
|
2174
|
+
@amount_requested = amount_requested
|
1927
2175
|
@expand = expand
|
1928
2176
|
@payment_intent = payment_intent
|
2177
|
+
@payment_record = payment_record
|
2178
|
+
@payment_record_data = payment_record_data
|
1929
2179
|
end
|
1930
2180
|
end
|
1931
2181
|
|
@@ -2025,16 +2275,44 @@ module Stripe
|
|
2025
2275
|
class UpdateLinesParams < Stripe::RequestParams
|
2026
2276
|
class Line < Stripe::RequestParams
|
2027
2277
|
class Discount < Stripe::RequestParams
|
2278
|
+
class DiscountEnd < Stripe::RequestParams
|
2279
|
+
class Duration < Stripe::RequestParams
|
2280
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2281
|
+
attr_accessor :interval
|
2282
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2283
|
+
attr_accessor :interval_count
|
2284
|
+
|
2285
|
+
def initialize(interval: nil, interval_count: nil)
|
2286
|
+
@interval = interval
|
2287
|
+
@interval_count = interval_count
|
2288
|
+
end
|
2289
|
+
end
|
2290
|
+
# Time span for the redeemed discount.
|
2291
|
+
attr_accessor :duration
|
2292
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2293
|
+
attr_accessor :timestamp
|
2294
|
+
# The type of calculation made to determine when the discount ends.
|
2295
|
+
attr_accessor :type
|
2296
|
+
|
2297
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2298
|
+
@duration = duration
|
2299
|
+
@timestamp = timestamp
|
2300
|
+
@type = type
|
2301
|
+
end
|
2302
|
+
end
|
2028
2303
|
# ID of the coupon to create a new discount for.
|
2029
2304
|
attr_accessor :coupon
|
2030
2305
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2031
2306
|
attr_accessor :discount
|
2307
|
+
# Details to determine how long the discount should be applied for.
|
2308
|
+
attr_accessor :discount_end
|
2032
2309
|
# ID of the promotion code to create a new discount for.
|
2033
2310
|
attr_accessor :promotion_code
|
2034
2311
|
|
2035
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2312
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2036
2313
|
@coupon = coupon
|
2037
2314
|
@discount = discount
|
2315
|
+
@discount_end = discount_end
|
2038
2316
|
@promotion_code = promotion_code
|
2039
2317
|
end
|
2040
2318
|
end
|
@@ -2187,6 +2465,8 @@ module Stripe
|
|
2187
2465
|
attr_accessor :discounts
|
2188
2466
|
# ID of an existing line item on the invoice.
|
2189
2467
|
attr_accessor :id
|
2468
|
+
# 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.
|
2469
|
+
attr_accessor :margins
|
2190
2470
|
# 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.
|
2191
2471
|
attr_accessor :metadata
|
2192
2472
|
# 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.
|
@@ -2208,6 +2488,7 @@ module Stripe
|
|
2208
2488
|
discountable: nil,
|
2209
2489
|
discounts: nil,
|
2210
2490
|
id: nil,
|
2491
|
+
margins: nil,
|
2211
2492
|
metadata: nil,
|
2212
2493
|
period: nil,
|
2213
2494
|
price_data: nil,
|
@@ -2221,6 +2502,7 @@ module Stripe
|
|
2221
2502
|
@discountable = discountable
|
2222
2503
|
@discounts = discounts
|
2223
2504
|
@id = id
|
2505
|
+
@margins = margins
|
2224
2506
|
@metadata = metadata
|
2225
2507
|
@period = period
|
2226
2508
|
@price_data = price_data
|
@@ -2395,32 +2677,88 @@ module Stripe
|
|
2395
2677
|
end
|
2396
2678
|
|
2397
2679
|
class Discount < Stripe::RequestParams
|
2680
|
+
class DiscountEnd < Stripe::RequestParams
|
2681
|
+
class Duration < Stripe::RequestParams
|
2682
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2683
|
+
attr_accessor :interval
|
2684
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2685
|
+
attr_accessor :interval_count
|
2686
|
+
|
2687
|
+
def initialize(interval: nil, interval_count: nil)
|
2688
|
+
@interval = interval
|
2689
|
+
@interval_count = interval_count
|
2690
|
+
end
|
2691
|
+
end
|
2692
|
+
# Time span for the redeemed discount.
|
2693
|
+
attr_accessor :duration
|
2694
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2695
|
+
attr_accessor :timestamp
|
2696
|
+
# The type of calculation made to determine when the discount ends.
|
2697
|
+
attr_accessor :type
|
2698
|
+
|
2699
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2700
|
+
@duration = duration
|
2701
|
+
@timestamp = timestamp
|
2702
|
+
@type = type
|
2703
|
+
end
|
2704
|
+
end
|
2398
2705
|
# ID of the coupon to create a new discount for.
|
2399
2706
|
attr_accessor :coupon
|
2400
2707
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2401
2708
|
attr_accessor :discount
|
2709
|
+
# Details to determine how long the discount should be applied for.
|
2710
|
+
attr_accessor :discount_end
|
2402
2711
|
# ID of the promotion code to create a new discount for.
|
2403
2712
|
attr_accessor :promotion_code
|
2404
2713
|
|
2405
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2714
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2406
2715
|
@coupon = coupon
|
2407
2716
|
@discount = discount
|
2717
|
+
@discount_end = discount_end
|
2408
2718
|
@promotion_code = promotion_code
|
2409
2719
|
end
|
2410
2720
|
end
|
2411
2721
|
|
2412
2722
|
class InvoiceItem < Stripe::RequestParams
|
2413
2723
|
class Discount < Stripe::RequestParams
|
2724
|
+
class DiscountEnd < Stripe::RequestParams
|
2725
|
+
class Duration < Stripe::RequestParams
|
2726
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2727
|
+
attr_accessor :interval
|
2728
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2729
|
+
attr_accessor :interval_count
|
2730
|
+
|
2731
|
+
def initialize(interval: nil, interval_count: nil)
|
2732
|
+
@interval = interval
|
2733
|
+
@interval_count = interval_count
|
2734
|
+
end
|
2735
|
+
end
|
2736
|
+
# Time span for the redeemed discount.
|
2737
|
+
attr_accessor :duration
|
2738
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2739
|
+
attr_accessor :timestamp
|
2740
|
+
# The type of calculation made to determine when the discount ends.
|
2741
|
+
attr_accessor :type
|
2742
|
+
|
2743
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2744
|
+
@duration = duration
|
2745
|
+
@timestamp = timestamp
|
2746
|
+
@type = type
|
2747
|
+
end
|
2748
|
+
end
|
2414
2749
|
# ID of the coupon to create a new discount for.
|
2415
2750
|
attr_accessor :coupon
|
2416
2751
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2417
2752
|
attr_accessor :discount
|
2753
|
+
# Details to determine how long the discount should be applied for.
|
2754
|
+
attr_accessor :discount_end
|
2418
2755
|
# ID of the promotion code to create a new discount for.
|
2419
2756
|
attr_accessor :promotion_code
|
2420
2757
|
|
2421
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2758
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2422
2759
|
@coupon = coupon
|
2423
2760
|
@discount = discount
|
2761
|
+
@discount_end = discount_end
|
2424
2762
|
@promotion_code = promotion_code
|
2425
2763
|
end
|
2426
2764
|
end
|
@@ -2546,6 +2884,458 @@ module Stripe
|
|
2546
2884
|
end
|
2547
2885
|
|
2548
2886
|
class ScheduleDetails < Stripe::RequestParams
|
2887
|
+
class Amendment < Stripe::RequestParams
|
2888
|
+
class AmendmentEnd < Stripe::RequestParams
|
2889
|
+
class DiscountEnd < Stripe::RequestParams
|
2890
|
+
# The ID of a specific discount.
|
2891
|
+
attr_accessor :discount
|
2892
|
+
|
2893
|
+
def initialize(discount: nil)
|
2894
|
+
@discount = discount
|
2895
|
+
end
|
2896
|
+
end
|
2897
|
+
|
2898
|
+
class Duration < Stripe::RequestParams
|
2899
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2900
|
+
attr_accessor :interval
|
2901
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2902
|
+
attr_accessor :interval_count
|
2903
|
+
|
2904
|
+
def initialize(interval: nil, interval_count: nil)
|
2905
|
+
@interval = interval
|
2906
|
+
@interval_count = interval_count
|
2907
|
+
end
|
2908
|
+
end
|
2909
|
+
# Use the `end` time of a given discount.
|
2910
|
+
attr_accessor :discount_end
|
2911
|
+
# Time span for the amendment starting from the `amendment_start`.
|
2912
|
+
attr_accessor :duration
|
2913
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2914
|
+
attr_accessor :timestamp
|
2915
|
+
# Select one of three ways to pass the `amendment_end`.
|
2916
|
+
attr_accessor :type
|
2917
|
+
|
2918
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2919
|
+
@discount_end = discount_end
|
2920
|
+
@duration = duration
|
2921
|
+
@timestamp = timestamp
|
2922
|
+
@type = type
|
2923
|
+
end
|
2924
|
+
end
|
2925
|
+
|
2926
|
+
class AmendmentStart < Stripe::RequestParams
|
2927
|
+
class AmendmentEnd < Stripe::RequestParams
|
2928
|
+
# 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.
|
2929
|
+
attr_accessor :index
|
2930
|
+
|
2931
|
+
def initialize(index: nil)
|
2932
|
+
@index = index
|
2933
|
+
end
|
2934
|
+
end
|
2935
|
+
|
2936
|
+
class DiscountEnd < Stripe::RequestParams
|
2937
|
+
# The ID of a specific discount.
|
2938
|
+
attr_accessor :discount
|
2939
|
+
|
2940
|
+
def initialize(discount: nil)
|
2941
|
+
@discount = discount
|
2942
|
+
end
|
2943
|
+
end
|
2944
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2945
|
+
attr_accessor :amendment_end
|
2946
|
+
# Use the `end` time of a given discount.
|
2947
|
+
attr_accessor :discount_end
|
2948
|
+
# A precise Unix timestamp for the amendment to start.
|
2949
|
+
attr_accessor :timestamp
|
2950
|
+
# Select one of three ways to pass the `amendment_start`.
|
2951
|
+
attr_accessor :type
|
2952
|
+
|
2953
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2954
|
+
@amendment_end = amendment_end
|
2955
|
+
@discount_end = discount_end
|
2956
|
+
@timestamp = timestamp
|
2957
|
+
@type = type
|
2958
|
+
end
|
2959
|
+
end
|
2960
|
+
|
2961
|
+
class DiscountAction < Stripe::RequestParams
|
2962
|
+
class Add < Stripe::RequestParams
|
2963
|
+
class DiscountEnd < Stripe::RequestParams
|
2964
|
+
# The type of calculation made to determine when the discount ends.
|
2965
|
+
attr_accessor :type
|
2966
|
+
|
2967
|
+
def initialize(type: nil)
|
2968
|
+
@type = type
|
2969
|
+
end
|
2970
|
+
end
|
2971
|
+
# The coupon code to redeem.
|
2972
|
+
attr_accessor :coupon
|
2973
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
2974
|
+
attr_accessor :discount
|
2975
|
+
# Details to determine how long the discount should be applied for.
|
2976
|
+
attr_accessor :discount_end
|
2977
|
+
# 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.
|
2978
|
+
attr_accessor :index
|
2979
|
+
# The promotion code to redeem.
|
2980
|
+
attr_accessor :promotion_code
|
2981
|
+
|
2982
|
+
def initialize(
|
2983
|
+
coupon: nil,
|
2984
|
+
discount: nil,
|
2985
|
+
discount_end: nil,
|
2986
|
+
index: nil,
|
2987
|
+
promotion_code: nil
|
2988
|
+
)
|
2989
|
+
@coupon = coupon
|
2990
|
+
@discount = discount
|
2991
|
+
@discount_end = discount_end
|
2992
|
+
@index = index
|
2993
|
+
@promotion_code = promotion_code
|
2994
|
+
end
|
2995
|
+
end
|
2996
|
+
|
2997
|
+
class Remove < Stripe::RequestParams
|
2998
|
+
# The coupon code to remove from the `discounts` array.
|
2999
|
+
attr_accessor :coupon
|
3000
|
+
# The ID of a discount to remove from the `discounts` array.
|
3001
|
+
attr_accessor :discount
|
3002
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
3003
|
+
attr_accessor :promotion_code
|
3004
|
+
|
3005
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3006
|
+
@coupon = coupon
|
3007
|
+
@discount = discount
|
3008
|
+
@promotion_code = promotion_code
|
3009
|
+
end
|
3010
|
+
end
|
3011
|
+
|
3012
|
+
class Set < Stripe::RequestParams
|
3013
|
+
# The coupon code to replace the `discounts` array with.
|
3014
|
+
attr_accessor :coupon
|
3015
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
3016
|
+
attr_accessor :discount
|
3017
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
3018
|
+
attr_accessor :promotion_code
|
3019
|
+
|
3020
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3021
|
+
@coupon = coupon
|
3022
|
+
@discount = discount
|
3023
|
+
@promotion_code = promotion_code
|
3024
|
+
end
|
3025
|
+
end
|
3026
|
+
# Details of the discount to add.
|
3027
|
+
attr_accessor :add
|
3028
|
+
# Details of the discount to remove.
|
3029
|
+
attr_accessor :remove
|
3030
|
+
# Details of the discount to replace the existing discounts with.
|
3031
|
+
attr_accessor :set
|
3032
|
+
# Determines the type of discount action.
|
3033
|
+
attr_accessor :type
|
3034
|
+
|
3035
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3036
|
+
@add = add
|
3037
|
+
@remove = remove
|
3038
|
+
@set = set
|
3039
|
+
@type = type
|
3040
|
+
end
|
3041
|
+
end
|
3042
|
+
|
3043
|
+
class ItemAction < Stripe::RequestParams
|
3044
|
+
class Add < Stripe::RequestParams
|
3045
|
+
class Discount < Stripe::RequestParams
|
3046
|
+
class DiscountEnd < Stripe::RequestParams
|
3047
|
+
class Duration < Stripe::RequestParams
|
3048
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3049
|
+
attr_accessor :interval
|
3050
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3051
|
+
attr_accessor :interval_count
|
3052
|
+
|
3053
|
+
def initialize(interval: nil, interval_count: nil)
|
3054
|
+
@interval = interval
|
3055
|
+
@interval_count = interval_count
|
3056
|
+
end
|
3057
|
+
end
|
3058
|
+
# Time span for the redeemed discount.
|
3059
|
+
attr_accessor :duration
|
3060
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3061
|
+
attr_accessor :timestamp
|
3062
|
+
# The type of calculation made to determine when the discount ends.
|
3063
|
+
attr_accessor :type
|
3064
|
+
|
3065
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3066
|
+
@duration = duration
|
3067
|
+
@timestamp = timestamp
|
3068
|
+
@type = type
|
3069
|
+
end
|
3070
|
+
end
|
3071
|
+
# ID of the coupon to create a new discount for.
|
3072
|
+
attr_accessor :coupon
|
3073
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3074
|
+
attr_accessor :discount
|
3075
|
+
# Details to determine how long the discount should be applied for.
|
3076
|
+
attr_accessor :discount_end
|
3077
|
+
# ID of the promotion code to create a new discount for.
|
3078
|
+
attr_accessor :promotion_code
|
3079
|
+
|
3080
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3081
|
+
@coupon = coupon
|
3082
|
+
@discount = discount
|
3083
|
+
@discount_end = discount_end
|
3084
|
+
@promotion_code = promotion_code
|
3085
|
+
end
|
3086
|
+
end
|
3087
|
+
|
3088
|
+
class Trial < Stripe::RequestParams
|
3089
|
+
# 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.
|
3090
|
+
attr_accessor :converts_to
|
3091
|
+
# Determines the type of trial for this item.
|
3092
|
+
attr_accessor :type
|
3093
|
+
|
3094
|
+
def initialize(converts_to: nil, type: nil)
|
3095
|
+
@converts_to = converts_to
|
3096
|
+
@type = type
|
3097
|
+
end
|
3098
|
+
end
|
3099
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
3100
|
+
attr_accessor :discounts
|
3101
|
+
# 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`.
|
3102
|
+
attr_accessor :metadata
|
3103
|
+
# The ID of the price object.
|
3104
|
+
attr_accessor :price
|
3105
|
+
# Quantity for this item.
|
3106
|
+
attr_accessor :quantity
|
3107
|
+
# 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`.
|
3108
|
+
attr_accessor :tax_rates
|
3109
|
+
# Options that configure the trial on the subscription item.
|
3110
|
+
attr_accessor :trial
|
3111
|
+
|
3112
|
+
def initialize(
|
3113
|
+
discounts: nil,
|
3114
|
+
metadata: nil,
|
3115
|
+
price: nil,
|
3116
|
+
quantity: nil,
|
3117
|
+
tax_rates: nil,
|
3118
|
+
trial: nil
|
3119
|
+
)
|
3120
|
+
@discounts = discounts
|
3121
|
+
@metadata = metadata
|
3122
|
+
@price = price
|
3123
|
+
@quantity = quantity
|
3124
|
+
@tax_rates = tax_rates
|
3125
|
+
@trial = trial
|
3126
|
+
end
|
3127
|
+
end
|
3128
|
+
|
3129
|
+
class Remove < Stripe::RequestParams
|
3130
|
+
# ID of a price to remove.
|
3131
|
+
attr_accessor :price
|
3132
|
+
|
3133
|
+
def initialize(price: nil)
|
3134
|
+
@price = price
|
3135
|
+
end
|
3136
|
+
end
|
3137
|
+
|
3138
|
+
class Set < Stripe::RequestParams
|
3139
|
+
class Discount < Stripe::RequestParams
|
3140
|
+
class DiscountEnd < Stripe::RequestParams
|
3141
|
+
class Duration < Stripe::RequestParams
|
3142
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3143
|
+
attr_accessor :interval
|
3144
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3145
|
+
attr_accessor :interval_count
|
3146
|
+
|
3147
|
+
def initialize(interval: nil, interval_count: nil)
|
3148
|
+
@interval = interval
|
3149
|
+
@interval_count = interval_count
|
3150
|
+
end
|
3151
|
+
end
|
3152
|
+
# Time span for the redeemed discount.
|
3153
|
+
attr_accessor :duration
|
3154
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3155
|
+
attr_accessor :timestamp
|
3156
|
+
# The type of calculation made to determine when the discount ends.
|
3157
|
+
attr_accessor :type
|
3158
|
+
|
3159
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3160
|
+
@duration = duration
|
3161
|
+
@timestamp = timestamp
|
3162
|
+
@type = type
|
3163
|
+
end
|
3164
|
+
end
|
3165
|
+
# ID of the coupon to create a new discount for.
|
3166
|
+
attr_accessor :coupon
|
3167
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3168
|
+
attr_accessor :discount
|
3169
|
+
# Details to determine how long the discount should be applied for.
|
3170
|
+
attr_accessor :discount_end
|
3171
|
+
# ID of the promotion code to create a new discount for.
|
3172
|
+
attr_accessor :promotion_code
|
3173
|
+
|
3174
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3175
|
+
@coupon = coupon
|
3176
|
+
@discount = discount
|
3177
|
+
@discount_end = discount_end
|
3178
|
+
@promotion_code = promotion_code
|
3179
|
+
end
|
3180
|
+
end
|
3181
|
+
|
3182
|
+
class Trial < Stripe::RequestParams
|
3183
|
+
# 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.
|
3184
|
+
attr_accessor :converts_to
|
3185
|
+
# Determines the type of trial for this item.
|
3186
|
+
attr_accessor :type
|
3187
|
+
|
3188
|
+
def initialize(converts_to: nil, type: nil)
|
3189
|
+
@converts_to = converts_to
|
3190
|
+
@type = type
|
3191
|
+
end
|
3192
|
+
end
|
3193
|
+
# 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`.
|
3194
|
+
attr_accessor :discounts
|
3195
|
+
# 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`.
|
3196
|
+
attr_accessor :metadata
|
3197
|
+
# The ID of the price object.
|
3198
|
+
attr_accessor :price
|
3199
|
+
# 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`.
|
3200
|
+
attr_accessor :quantity
|
3201
|
+
# 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`.
|
3202
|
+
attr_accessor :tax_rates
|
3203
|
+
# 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`.
|
3204
|
+
attr_accessor :trial
|
3205
|
+
|
3206
|
+
def initialize(
|
3207
|
+
discounts: nil,
|
3208
|
+
metadata: nil,
|
3209
|
+
price: nil,
|
3210
|
+
quantity: nil,
|
3211
|
+
tax_rates: nil,
|
3212
|
+
trial: nil
|
3213
|
+
)
|
3214
|
+
@discounts = discounts
|
3215
|
+
@metadata = metadata
|
3216
|
+
@price = price
|
3217
|
+
@quantity = quantity
|
3218
|
+
@tax_rates = tax_rates
|
3219
|
+
@trial = trial
|
3220
|
+
end
|
3221
|
+
end
|
3222
|
+
# 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.
|
3223
|
+
attr_accessor :add
|
3224
|
+
# Details of the subscription item to remove.
|
3225
|
+
attr_accessor :remove
|
3226
|
+
# 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.
|
3227
|
+
attr_accessor :set
|
3228
|
+
# Determines the type of item action.
|
3229
|
+
attr_accessor :type
|
3230
|
+
|
3231
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3232
|
+
@add = add
|
3233
|
+
@remove = remove
|
3234
|
+
@set = set
|
3235
|
+
@type = type
|
3236
|
+
end
|
3237
|
+
end
|
3238
|
+
|
3239
|
+
class MetadataAction < Stripe::RequestParams
|
3240
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
3241
|
+
attr_accessor :add
|
3242
|
+
# Keys to remove from schedule phase metadata.
|
3243
|
+
attr_accessor :remove
|
3244
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
3245
|
+
attr_accessor :set
|
3246
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
3247
|
+
attr_accessor :type
|
3248
|
+
|
3249
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3250
|
+
@add = add
|
3251
|
+
@remove = remove
|
3252
|
+
@set = set
|
3253
|
+
@type = type
|
3254
|
+
end
|
3255
|
+
end
|
3256
|
+
|
3257
|
+
class SetPauseCollection < Stripe::RequestParams
|
3258
|
+
class Set < Stripe::RequestParams
|
3259
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3260
|
+
attr_accessor :behavior
|
3261
|
+
|
3262
|
+
def initialize(behavior: nil)
|
3263
|
+
@behavior = behavior
|
3264
|
+
end
|
3265
|
+
end
|
3266
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
3267
|
+
attr_accessor :set
|
3268
|
+
# Determines the type of the pause_collection amendment.
|
3269
|
+
attr_accessor :type
|
3270
|
+
|
3271
|
+
def initialize(set: nil, type: nil)
|
3272
|
+
@set = set
|
3273
|
+
@type = type
|
3274
|
+
end
|
3275
|
+
end
|
3276
|
+
|
3277
|
+
class TrialSettings < Stripe::RequestParams
|
3278
|
+
class EndBehavior < Stripe::RequestParams
|
3279
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3280
|
+
attr_accessor :prorate_up_front
|
3281
|
+
|
3282
|
+
def initialize(prorate_up_front: nil)
|
3283
|
+
@prorate_up_front = prorate_up_front
|
3284
|
+
end
|
3285
|
+
end
|
3286
|
+
# Defines how the subscription should behave when a trial ends.
|
3287
|
+
attr_accessor :end_behavior
|
3288
|
+
|
3289
|
+
def initialize(end_behavior: nil)
|
3290
|
+
@end_behavior = end_behavior
|
3291
|
+
end
|
3292
|
+
end
|
3293
|
+
# 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.
|
3294
|
+
attr_accessor :amendment_end
|
3295
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
3296
|
+
attr_accessor :amendment_start
|
3297
|
+
# 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.
|
3298
|
+
attr_accessor :billing_cycle_anchor
|
3299
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
3300
|
+
attr_accessor :discount_actions
|
3301
|
+
# Changes to the subscription items during the amendment time span.
|
3302
|
+
attr_accessor :item_actions
|
3303
|
+
# Instructions for how to modify phase metadata
|
3304
|
+
attr_accessor :metadata_actions
|
3305
|
+
# 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`.
|
3306
|
+
attr_accessor :proration_behavior
|
3307
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
3308
|
+
attr_accessor :set_pause_collection
|
3309
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
3310
|
+
attr_accessor :set_schedule_end
|
3311
|
+
# Settings related to subscription trials.
|
3312
|
+
attr_accessor :trial_settings
|
3313
|
+
|
3314
|
+
def initialize(
|
3315
|
+
amendment_end: nil,
|
3316
|
+
amendment_start: nil,
|
3317
|
+
billing_cycle_anchor: nil,
|
3318
|
+
discount_actions: nil,
|
3319
|
+
item_actions: nil,
|
3320
|
+
metadata_actions: nil,
|
3321
|
+
proration_behavior: nil,
|
3322
|
+
set_pause_collection: nil,
|
3323
|
+
set_schedule_end: nil,
|
3324
|
+
trial_settings: nil
|
3325
|
+
)
|
3326
|
+
@amendment_end = amendment_end
|
3327
|
+
@amendment_start = amendment_start
|
3328
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
3329
|
+
@discount_actions = discount_actions
|
3330
|
+
@item_actions = item_actions
|
3331
|
+
@metadata_actions = metadata_actions
|
3332
|
+
@proration_behavior = proration_behavior
|
3333
|
+
@set_pause_collection = set_pause_collection
|
3334
|
+
@set_schedule_end = set_schedule_end
|
3335
|
+
@trial_settings = trial_settings
|
3336
|
+
end
|
3337
|
+
end
|
3338
|
+
|
2549
3339
|
class BillingMode < Stripe::RequestParams
|
2550
3340
|
# Attribute for param field type
|
2551
3341
|
attr_accessor :type
|
@@ -2558,16 +3348,44 @@ module Stripe
|
|
2558
3348
|
class Phase < Stripe::RequestParams
|
2559
3349
|
class AddInvoiceItem < Stripe::RequestParams
|
2560
3350
|
class Discount < Stripe::RequestParams
|
3351
|
+
class DiscountEnd < Stripe::RequestParams
|
3352
|
+
class Duration < Stripe::RequestParams
|
3353
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3354
|
+
attr_accessor :interval
|
3355
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3356
|
+
attr_accessor :interval_count
|
3357
|
+
|
3358
|
+
def initialize(interval: nil, interval_count: nil)
|
3359
|
+
@interval = interval
|
3360
|
+
@interval_count = interval_count
|
3361
|
+
end
|
3362
|
+
end
|
3363
|
+
# Time span for the redeemed discount.
|
3364
|
+
attr_accessor :duration
|
3365
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3366
|
+
attr_accessor :timestamp
|
3367
|
+
# The type of calculation made to determine when the discount ends.
|
3368
|
+
attr_accessor :type
|
3369
|
+
|
3370
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3371
|
+
@duration = duration
|
3372
|
+
@timestamp = timestamp
|
3373
|
+
@type = type
|
3374
|
+
end
|
3375
|
+
end
|
2561
3376
|
# ID of the coupon to create a new discount for.
|
2562
3377
|
attr_accessor :coupon
|
2563
3378
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2564
3379
|
attr_accessor :discount
|
3380
|
+
# Details to determine how long the discount should be applied for.
|
3381
|
+
attr_accessor :discount_end
|
2565
3382
|
# ID of the promotion code to create a new discount for.
|
2566
3383
|
attr_accessor :promotion_code
|
2567
3384
|
|
2568
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3385
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2569
3386
|
@coupon = coupon
|
2570
3387
|
@discount = discount
|
3388
|
+
@discount_end = discount_end
|
2571
3389
|
@promotion_code = promotion_code
|
2572
3390
|
end
|
2573
3391
|
end
|
@@ -2660,16 +3478,44 @@ module Stripe
|
|
2660
3478
|
end
|
2661
3479
|
|
2662
3480
|
class Discount < Stripe::RequestParams
|
3481
|
+
class DiscountEnd < Stripe::RequestParams
|
3482
|
+
class Duration < Stripe::RequestParams
|
3483
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3484
|
+
attr_accessor :interval
|
3485
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3486
|
+
attr_accessor :interval_count
|
3487
|
+
|
3488
|
+
def initialize(interval: nil, interval_count: nil)
|
3489
|
+
@interval = interval
|
3490
|
+
@interval_count = interval_count
|
3491
|
+
end
|
3492
|
+
end
|
3493
|
+
# Time span for the redeemed discount.
|
3494
|
+
attr_accessor :duration
|
3495
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3496
|
+
attr_accessor :timestamp
|
3497
|
+
# The type of calculation made to determine when the discount ends.
|
3498
|
+
attr_accessor :type
|
3499
|
+
|
3500
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3501
|
+
@duration = duration
|
3502
|
+
@timestamp = timestamp
|
3503
|
+
@type = type
|
3504
|
+
end
|
3505
|
+
end
|
2663
3506
|
# ID of the coupon to create a new discount for.
|
2664
3507
|
attr_accessor :coupon
|
2665
3508
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2666
3509
|
attr_accessor :discount
|
3510
|
+
# Details to determine how long the discount should be applied for.
|
3511
|
+
attr_accessor :discount_end
|
2667
3512
|
# ID of the promotion code to create a new discount for.
|
2668
3513
|
attr_accessor :promotion_code
|
2669
3514
|
|
2670
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3515
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2671
3516
|
@coupon = coupon
|
2672
3517
|
@discount = discount
|
3518
|
+
@discount_end = discount_end
|
2673
3519
|
@promotion_code = promotion_code
|
2674
3520
|
end
|
2675
3521
|
end
|
@@ -2711,16 +3557,44 @@ module Stripe
|
|
2711
3557
|
end
|
2712
3558
|
|
2713
3559
|
class Discount < Stripe::RequestParams
|
3560
|
+
class DiscountEnd < Stripe::RequestParams
|
3561
|
+
class Duration < Stripe::RequestParams
|
3562
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3563
|
+
attr_accessor :interval
|
3564
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3565
|
+
attr_accessor :interval_count
|
3566
|
+
|
3567
|
+
def initialize(interval: nil, interval_count: nil)
|
3568
|
+
@interval = interval
|
3569
|
+
@interval_count = interval_count
|
3570
|
+
end
|
3571
|
+
end
|
3572
|
+
# Time span for the redeemed discount.
|
3573
|
+
attr_accessor :duration
|
3574
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3575
|
+
attr_accessor :timestamp
|
3576
|
+
# The type of calculation made to determine when the discount ends.
|
3577
|
+
attr_accessor :type
|
3578
|
+
|
3579
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3580
|
+
@duration = duration
|
3581
|
+
@timestamp = timestamp
|
3582
|
+
@type = type
|
3583
|
+
end
|
3584
|
+
end
|
2714
3585
|
# ID of the coupon to create a new discount for.
|
2715
3586
|
attr_accessor :coupon
|
2716
3587
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2717
3588
|
attr_accessor :discount
|
3589
|
+
# Details to determine how long the discount should be applied for.
|
3590
|
+
attr_accessor :discount_end
|
2718
3591
|
# ID of the promotion code to create a new discount for.
|
2719
3592
|
attr_accessor :promotion_code
|
2720
3593
|
|
2721
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3594
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2722
3595
|
@coupon = coupon
|
2723
3596
|
@discount = discount
|
3597
|
+
@discount_end = discount_end
|
2724
3598
|
@promotion_code = promotion_code
|
2725
3599
|
end
|
2726
3600
|
end
|
@@ -2766,6 +3640,18 @@ module Stripe
|
|
2766
3640
|
@unit_amount_decimal = unit_amount_decimal
|
2767
3641
|
end
|
2768
3642
|
end
|
3643
|
+
|
3644
|
+
class Trial < Stripe::RequestParams
|
3645
|
+
# 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.
|
3646
|
+
attr_accessor :converts_to
|
3647
|
+
# Determines the type of trial for this item.
|
3648
|
+
attr_accessor :type
|
3649
|
+
|
3650
|
+
def initialize(converts_to: nil, type: nil)
|
3651
|
+
@converts_to = converts_to
|
3652
|
+
@type = type
|
3653
|
+
end
|
3654
|
+
end
|
2769
3655
|
# 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.
|
2770
3656
|
attr_accessor :billing_thresholds
|
2771
3657
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -2782,6 +3668,8 @@ module Stripe
|
|
2782
3668
|
attr_accessor :quantity
|
2783
3669
|
# 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.
|
2784
3670
|
attr_accessor :tax_rates
|
3671
|
+
# Options that configure the trial on the subscription item.
|
3672
|
+
attr_accessor :trial
|
2785
3673
|
|
2786
3674
|
def initialize(
|
2787
3675
|
billing_thresholds: nil,
|
@@ -2791,7 +3679,8 @@ module Stripe
|
|
2791
3679
|
price: nil,
|
2792
3680
|
price_data: nil,
|
2793
3681
|
quantity: nil,
|
2794
|
-
tax_rates: nil
|
3682
|
+
tax_rates: nil,
|
3683
|
+
trial: nil
|
2795
3684
|
)
|
2796
3685
|
@billing_thresholds = billing_thresholds
|
2797
3686
|
@discounts = discounts
|
@@ -2801,6 +3690,16 @@ module Stripe
|
|
2801
3690
|
@price_data = price_data
|
2802
3691
|
@quantity = quantity
|
2803
3692
|
@tax_rates = tax_rates
|
3693
|
+
@trial = trial
|
3694
|
+
end
|
3695
|
+
end
|
3696
|
+
|
3697
|
+
class PauseCollection < Stripe::RequestParams
|
3698
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3699
|
+
attr_accessor :behavior
|
3700
|
+
|
3701
|
+
def initialize(behavior: nil)
|
3702
|
+
@behavior = behavior
|
2804
3703
|
end
|
2805
3704
|
end
|
2806
3705
|
|
@@ -2815,6 +3714,23 @@ module Stripe
|
|
2815
3714
|
@destination = destination
|
2816
3715
|
end
|
2817
3716
|
end
|
3717
|
+
|
3718
|
+
class TrialSettings < Stripe::RequestParams
|
3719
|
+
class EndBehavior < Stripe::RequestParams
|
3720
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3721
|
+
attr_accessor :prorate_up_front
|
3722
|
+
|
3723
|
+
def initialize(prorate_up_front: nil)
|
3724
|
+
@prorate_up_front = prorate_up_front
|
3725
|
+
end
|
3726
|
+
end
|
3727
|
+
# Defines how the subscription should behave when a trial ends.
|
3728
|
+
attr_accessor :end_behavior
|
3729
|
+
|
3730
|
+
def initialize(end_behavior: nil)
|
3731
|
+
@end_behavior = end_behavior
|
3732
|
+
end
|
3733
|
+
end
|
2818
3734
|
# 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.
|
2819
3735
|
attr_accessor :add_invoice_items
|
2820
3736
|
# 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).
|
@@ -2849,6 +3765,8 @@ module Stripe
|
|
2849
3765
|
attr_accessor :metadata
|
2850
3766
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
2851
3767
|
attr_accessor :on_behalf_of
|
3768
|
+
# 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).
|
3769
|
+
attr_accessor :pause_collection
|
2852
3770
|
# 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.
|
2853
3771
|
attr_accessor :proration_behavior
|
2854
3772
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -2857,8 +3775,12 @@ module Stripe
|
|
2857
3775
|
attr_accessor :transfer_data
|
2858
3776
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
2859
3777
|
attr_accessor :trial
|
3778
|
+
# Specify trial behavior when crossing phase boundaries
|
3779
|
+
attr_accessor :trial_continuation
|
2860
3780
|
# 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`
|
2861
3781
|
attr_accessor :trial_end
|
3782
|
+
# Settings related to subscription trials.
|
3783
|
+
attr_accessor :trial_settings
|
2862
3784
|
|
2863
3785
|
def initialize(
|
2864
3786
|
add_invoice_items: nil,
|
@@ -2878,11 +3800,14 @@ module Stripe
|
|
2878
3800
|
iterations: nil,
|
2879
3801
|
metadata: nil,
|
2880
3802
|
on_behalf_of: nil,
|
3803
|
+
pause_collection: nil,
|
2881
3804
|
proration_behavior: nil,
|
2882
3805
|
start_date: nil,
|
2883
3806
|
transfer_data: nil,
|
2884
3807
|
trial: nil,
|
2885
|
-
|
3808
|
+
trial_continuation: nil,
|
3809
|
+
trial_end: nil,
|
3810
|
+
trial_settings: nil
|
2886
3811
|
)
|
2887
3812
|
@add_invoice_items = add_invoice_items
|
2888
3813
|
@application_fee_percent = application_fee_percent
|
@@ -2901,26 +3826,95 @@ module Stripe
|
|
2901
3826
|
@iterations = iterations
|
2902
3827
|
@metadata = metadata
|
2903
3828
|
@on_behalf_of = on_behalf_of
|
3829
|
+
@pause_collection = pause_collection
|
2904
3830
|
@proration_behavior = proration_behavior
|
2905
3831
|
@start_date = start_date
|
2906
3832
|
@transfer_data = transfer_data
|
2907
3833
|
@trial = trial
|
3834
|
+
@trial_continuation = trial_continuation
|
2908
3835
|
@trial_end = trial_end
|
3836
|
+
@trial_settings = trial_settings
|
3837
|
+
end
|
3838
|
+
end
|
3839
|
+
|
3840
|
+
class Prebilling < Stripe::RequestParams
|
3841
|
+
class BillUntil < Stripe::RequestParams
|
3842
|
+
class AmendmentEnd < Stripe::RequestParams
|
3843
|
+
# 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.
|
3844
|
+
attr_accessor :index
|
3845
|
+
|
3846
|
+
def initialize(index: nil)
|
3847
|
+
@index = index
|
3848
|
+
end
|
3849
|
+
end
|
3850
|
+
|
3851
|
+
class Duration < Stripe::RequestParams
|
3852
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3853
|
+
attr_accessor :interval
|
3854
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3855
|
+
attr_accessor :interval_count
|
3856
|
+
|
3857
|
+
def initialize(interval: nil, interval_count: nil)
|
3858
|
+
@interval = interval
|
3859
|
+
@interval_count = interval_count
|
3860
|
+
end
|
3861
|
+
end
|
3862
|
+
# End the prebilled period when a specified amendment ends.
|
3863
|
+
attr_accessor :amendment_end
|
3864
|
+
# Time span for prebilling, starting from `bill_from`.
|
3865
|
+
attr_accessor :duration
|
3866
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3867
|
+
attr_accessor :timestamp
|
3868
|
+
# Select one of several ways to pass the `bill_until` value.
|
3869
|
+
attr_accessor :type
|
3870
|
+
|
3871
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3872
|
+
@amendment_end = amendment_end
|
3873
|
+
@duration = duration
|
3874
|
+
@timestamp = timestamp
|
3875
|
+
@type = type
|
3876
|
+
end
|
3877
|
+
end
|
3878
|
+
# The end of the prebilled time period.
|
3879
|
+
attr_accessor :bill_until
|
3880
|
+
# This is used to determine the number of billing cycles to prebill.
|
3881
|
+
attr_accessor :iterations
|
3882
|
+
|
3883
|
+
def initialize(bill_until: nil, iterations: nil)
|
3884
|
+
@bill_until = bill_until
|
3885
|
+
@iterations = iterations
|
2909
3886
|
end
|
2910
3887
|
end
|
3888
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3889
|
+
attr_accessor :amendments
|
3890
|
+
# 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.
|
3891
|
+
attr_accessor :billing_behavior
|
2911
3892
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2912
3893
|
attr_accessor :billing_mode
|
2913
3894
|
# 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.
|
2914
3895
|
attr_accessor :end_behavior
|
2915
3896
|
# 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.
|
2916
3897
|
attr_accessor :phases
|
3898
|
+
# Provide any time periods to bill in advance.
|
3899
|
+
attr_accessor :prebilling
|
2917
3900
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
2918
3901
|
attr_accessor :proration_behavior
|
2919
3902
|
|
2920
|
-
def initialize(
|
3903
|
+
def initialize(
|
3904
|
+
amendments: nil,
|
3905
|
+
billing_behavior: nil,
|
3906
|
+
billing_mode: nil,
|
3907
|
+
end_behavior: nil,
|
3908
|
+
phases: nil,
|
3909
|
+
prebilling: nil,
|
3910
|
+
proration_behavior: nil
|
3911
|
+
)
|
3912
|
+
@amendments = amendments
|
3913
|
+
@billing_behavior = billing_behavior
|
2921
3914
|
@billing_mode = billing_mode
|
2922
3915
|
@end_behavior = end_behavior
|
2923
3916
|
@phases = phases
|
3917
|
+
@prebilling = prebilling
|
2924
3918
|
@proration_behavior = proration_behavior
|
2925
3919
|
end
|
2926
3920
|
end
|
@@ -2946,16 +3940,44 @@ module Stripe
|
|
2946
3940
|
end
|
2947
3941
|
|
2948
3942
|
class Discount < Stripe::RequestParams
|
3943
|
+
class DiscountEnd < Stripe::RequestParams
|
3944
|
+
class Duration < Stripe::RequestParams
|
3945
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3946
|
+
attr_accessor :interval
|
3947
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3948
|
+
attr_accessor :interval_count
|
3949
|
+
|
3950
|
+
def initialize(interval: nil, interval_count: nil)
|
3951
|
+
@interval = interval
|
3952
|
+
@interval_count = interval_count
|
3953
|
+
end
|
3954
|
+
end
|
3955
|
+
# Time span for the redeemed discount.
|
3956
|
+
attr_accessor :duration
|
3957
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3958
|
+
attr_accessor :timestamp
|
3959
|
+
# The type of calculation made to determine when the discount ends.
|
3960
|
+
attr_accessor :type
|
3961
|
+
|
3962
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3963
|
+
@duration = duration
|
3964
|
+
@timestamp = timestamp
|
3965
|
+
@type = type
|
3966
|
+
end
|
3967
|
+
end
|
2949
3968
|
# ID of the coupon to create a new discount for.
|
2950
3969
|
attr_accessor :coupon
|
2951
3970
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2952
3971
|
attr_accessor :discount
|
3972
|
+
# Details to determine how long the discount should be applied for.
|
3973
|
+
attr_accessor :discount_end
|
2953
3974
|
# ID of the promotion code to create a new discount for.
|
2954
3975
|
attr_accessor :promotion_code
|
2955
3976
|
|
2956
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3977
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2957
3978
|
@coupon = coupon
|
2958
3979
|
@discount = discount
|
3980
|
+
@discount_end = discount_end
|
2959
3981
|
@promotion_code = promotion_code
|
2960
3982
|
end
|
2961
3983
|
end
|
@@ -3050,6 +4072,15 @@ module Stripe
|
|
3050
4072
|
@tax_rates = tax_rates
|
3051
4073
|
end
|
3052
4074
|
end
|
4075
|
+
|
4076
|
+
class Prebilling < Stripe::RequestParams
|
4077
|
+
# This is used to determine the number of billing cycles to prebill.
|
4078
|
+
attr_accessor :iterations
|
4079
|
+
|
4080
|
+
def initialize(iterations: nil)
|
4081
|
+
@iterations = iterations
|
4082
|
+
end
|
4083
|
+
end
|
3053
4084
|
# 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`.
|
3054
4085
|
attr_accessor :billing_cycle_anchor
|
3055
4086
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
@@ -3064,6 +4095,8 @@ module Stripe
|
|
3064
4095
|
attr_accessor :default_tax_rates
|
3065
4096
|
# A list of up to 20 subscription items, each with an attached price.
|
3066
4097
|
attr_accessor :items
|
4098
|
+
# The pre-billing to apply to the subscription as a preview.
|
4099
|
+
attr_accessor :prebilling
|
3067
4100
|
# 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`.
|
3068
4101
|
attr_accessor :proration_behavior
|
3069
4102
|
# 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'.
|
@@ -3083,6 +4116,7 @@ module Stripe
|
|
3083
4116
|
cancel_now: nil,
|
3084
4117
|
default_tax_rates: nil,
|
3085
4118
|
items: nil,
|
4119
|
+
prebilling: nil,
|
3086
4120
|
proration_behavior: nil,
|
3087
4121
|
proration_date: nil,
|
3088
4122
|
resume_at: nil,
|
@@ -3096,6 +4130,7 @@ module Stripe
|
|
3096
4130
|
@cancel_now = cancel_now
|
3097
4131
|
@default_tax_rates = default_tax_rates
|
3098
4132
|
@items = items
|
4133
|
+
@prebilling = prebilling
|
3099
4134
|
@proration_behavior = proration_behavior
|
3100
4135
|
@proration_date = proration_date
|
3101
4136
|
@resume_at = resume_at
|
@@ -3109,6 +4144,8 @@ module Stripe
|
|
3109
4144
|
attr_accessor :currency
|
3110
4145
|
# 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.
|
3111
4146
|
attr_accessor :customer
|
4147
|
+
# 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.
|
4148
|
+
attr_accessor :customer_account
|
3112
4149
|
# 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.
|
3113
4150
|
attr_accessor :customer_details
|
3114
4151
|
# 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.
|
@@ -3136,6 +4173,7 @@ module Stripe
|
|
3136
4173
|
automatic_tax: nil,
|
3137
4174
|
currency: nil,
|
3138
4175
|
customer: nil,
|
4176
|
+
customer_account: nil,
|
3139
4177
|
customer_details: nil,
|
3140
4178
|
discounts: nil,
|
3141
4179
|
expand: nil,
|
@@ -3151,6 +4189,7 @@ module Stripe
|
|
3151
4189
|
@automatic_tax = automatic_tax
|
3152
4190
|
@currency = currency
|
3153
4191
|
@customer = customer
|
4192
|
+
@customer_account = customer_account
|
3154
4193
|
@customer_details = customer_details
|
3155
4194
|
@discounts = discounts
|
3156
4195
|
@expand = expand
|
@@ -3180,6 +4219,8 @@ module Stripe
|
|
3180
4219
|
attr_reader :amount_remaining
|
3181
4220
|
# This is the sum of all the shipping amounts.
|
3182
4221
|
attr_reader :amount_shipping
|
4222
|
+
# List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
|
4223
|
+
attr_reader :amounts_due
|
3183
4224
|
# ID of the Connect Application that created the invoice.
|
3184
4225
|
attr_reader :application
|
3185
4226
|
# Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
|
@@ -3214,6 +4255,8 @@ module Stripe
|
|
3214
4255
|
attr_reader :custom_fields
|
3215
4256
|
# The ID of the customer who will be billed.
|
3216
4257
|
attr_reader :customer
|
4258
|
+
# The ID of the account who will be billed.
|
4259
|
+
attr_reader :customer_account
|
3217
4260
|
# The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
|
3218
4261
|
attr_reader :customer_address
|
3219
4262
|
# The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
|
@@ -3228,6 +4271,8 @@ module Stripe
|
|
3228
4271
|
attr_reader :customer_tax_exempt
|
3229
4272
|
# The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
|
3230
4273
|
attr_reader :customer_tax_ids
|
4274
|
+
# The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
|
4275
|
+
attr_reader :default_margins
|
3231
4276
|
# 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.
|
3232
4277
|
attr_reader :default_payment_method
|
3233
4278
|
# 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.
|
@@ -3318,6 +4363,8 @@ module Stripe
|
|
3318
4363
|
attr_reader :total_discount_amounts
|
3319
4364
|
# The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
|
3320
4365
|
attr_reader :total_excluding_tax
|
4366
|
+
# The aggregate amounts calculated per margin across all line items.
|
4367
|
+
attr_reader :total_margin_amounts
|
3321
4368
|
# Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
|
3322
4369
|
attr_reader :total_pretax_credit_amounts
|
3323
4370
|
# The aggregate tax information of all line items.
|