stripe 19.2.0.pre.beta.2 → 19.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stripe/api_requestor.rb +3 -36
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -87
- data/lib/stripe/event_types.rb +0 -228
- data/lib/stripe/object_types.rb +0 -61
- data/lib/stripe/params/account_create_params.rb +17 -364
- data/lib/stripe/params/account_session_create_params.rb +1 -226
- data/lib/stripe/params/account_update_params.rb +16 -326
- data/lib/stripe/params/balance_settings_update_params.rb +42 -2
- data/lib/stripe/params/charge_capture_params.rb +0 -1646
- data/lib/stripe/params/charge_create_params.rb +4 -1
- data/lib/stripe/params/charge_update_params.rb +0 -1646
- data/lib/stripe/params/checkout/session_create_params.rb +31 -141
- data/lib/stripe/params/checkout/session_update_params.rb +1 -176
- data/lib/stripe/params/confirmation_token_create_params.rb +11 -79
- data/lib/stripe/params/coupon_create_params.rb +1 -17
- data/lib/stripe/params/customer_session_create_params.rb +1 -32
- data/lib/stripe/params/dispute_update_params.rb +1 -10
- data/lib/stripe/params/financial_connections/session_create_params.rb +2 -64
- data/lib/stripe/params/invoice_add_lines_params.rb +1 -48
- data/lib/stripe/params/invoice_attach_payment_params.rb +1 -43
- data/lib/stripe/params/invoice_create_params.rb +2 -70
- data/lib/stripe/params/invoice_create_preview_params.rb +13 -790
- data/lib/stripe/params/invoice_item_create_params.rb +1 -33
- data/lib/stripe/params/invoice_item_update_params.rb +1 -33
- data/lib/stripe/params/invoice_line_item_update_params.rb +1 -48
- data/lib/stripe/params/invoice_update_lines_params.rb +1 -48
- data/lib/stripe/params/invoice_update_params.rb +2 -70
- data/lib/stripe/params/issuing/cardholder_create_params.rb +1 -2
- data/lib/stripe/params/issuing/transaction_list_params.rb +0 -4
- data/lib/stripe/params/payment_intent_capture_params.rb +3 -1645
- data/lib/stripe/params/payment_intent_confirm_params.rb +136 -3038
- data/lib/stripe/params/payment_intent_create_params.rb +167 -3043
- data/lib/stripe/params/payment_intent_increment_authorization_params.rb +2 -39
- data/lib/stripe/params/payment_intent_update_params.rb +121 -3034
- data/lib/stripe/params/payment_link_create_params.rb +30 -16
- data/lib/stripe/params/payment_link_update_params.rb +29 -0
- data/lib/stripe/params/payment_method_configuration_create_params.rb +24 -87
- data/lib/stripe/params/payment_method_configuration_list_params.rb +4 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +24 -87
- data/lib/stripe/params/payment_method_create_params.rb +11 -75
- data/lib/stripe/params/payout_create_params.rb +1 -1
- data/lib/stripe/params/plan_create_params.rb +0 -15
- data/lib/stripe/params/price_create_params.rb +0 -15
- data/lib/stripe/params/price_update_params.rb +0 -19
- data/lib/stripe/params/product_create_params.rb +0 -16
- data/lib/stripe/params/product_update_params.rb +0 -16
- data/lib/stripe/params/quote_create_params.rb +3 -809
- data/lib/stripe/params/quote_list_params.rb +0 -4
- data/lib/stripe/params/quote_update_params.rb +4 -817
- data/lib/stripe/params/setup_intent_confirm_params.rb +21 -110
- data/lib/stripe/params/setup_intent_create_params.rb +21 -110
- data/lib/stripe/params/setup_intent_update_params.rb +21 -110
- data/lib/stripe/params/subscription_create_params.rb +11 -181
- data/lib/stripe/params/subscription_item_create_params.rb +3 -69
- data/lib/stripe/params/subscription_item_delete_params.rb +1 -7
- data/lib/stripe/params/subscription_item_update_params.rb +2 -52
- data/lib/stripe/params/subscription_schedule_create_params.rb +9 -167
- data/lib/stripe/params/subscription_schedule_update_params.rb +9 -167
- data/lib/stripe/params/subscription_update_params.rb +11 -161
- data/lib/stripe/params/tax/calculation_create_params.rb +0 -4
- data/lib/stripe/params/tax/registration_create_params.rb +0 -104
- data/lib/stripe/params/terminal/configuration_create_params.rb +52 -13
- data/lib/stripe/params/terminal/configuration_update_params.rb +52 -13
- data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +11 -79
- data/lib/stripe/params/test_helpers/test_clock_create_params.rb +4 -1
- data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +1 -25
- data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +1 -25
- data/lib/stripe/params/transfer_create_params.rb +0 -4
- data/lib/stripe/params/treasury/financial_account_create_params.rb +1 -8
- data/lib/stripe/params/treasury/financial_account_features_update_params.rb +1 -4
- data/lib/stripe/params/treasury/financial_account_update_features_params.rb +1 -4
- data/lib/stripe/params/treasury/financial_account_update_params.rb +1 -8
- data/lib/stripe/params/treasury/outbound_payment_create_params.rb +0 -4
- data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +0 -24
- data/lib/stripe/params/treasury/received_credit_create_params.rb +1 -25
- data/lib/stripe/params/treasury/received_debit_create_params.rb +1 -25
- data/lib/stripe/params/v2/core/account_create_params.rb +33 -288
- data/lib/stripe/params/v2/core/account_token_create_params.rb +28 -18
- data/lib/stripe/params/v2/core/account_update_params.rb +33 -281
- data/lib/stripe/params.rb +1342 -795
- data/lib/stripe/railtie.rb +8 -0
- data/lib/stripe/resources/account.rb +5 -259
- data/lib/stripe/resources/account_session.rb +0 -81
- data/lib/stripe/resources/balance.rb +0 -83
- data/lib/stripe/resources/balance_settings.rb +42 -2
- data/lib/stripe/resources/billing/alert_triggered.rb +0 -4
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/charge.rb +36 -211
- data/lib/stripe/resources/checkout/session.rb +26 -82
- data/lib/stripe/resources/confirmation_token.rb +20 -125
- data/lib/stripe/resources/coupon.rb +1 -26
- data/lib/stripe/resources/credit_note_line_item.rb +0 -18
- data/lib/stripe/resources/customer_session.rb +0 -36
- data/lib/stripe/resources/discount.rb +2 -2
- data/lib/stripe/resources/dispute.rb +0 -22
- data/lib/stripe/resources/event.rb +1 -64
- data/lib/stripe/resources/financial_connections/account.rb +0 -57
- data/lib/stripe/resources/financial_connections/session.rb +1 -125
- data/lib/stripe/resources/invoice.rb +3 -117
- data/lib/stripe/resources/invoice_item.rb +34 -3
- data/lib/stripe/resources/invoice_line_item.rb +0 -40
- data/lib/stripe/resources/issuing/dispute.rb +1 -1
- data/lib/stripe/resources/issuing/personalization_design.rb +1 -1
- data/lib/stripe/resources/issuing/transaction.rb +0 -2
- data/lib/stripe/resources/line_item.rb +0 -42
- data/lib/stripe/resources/mandate.rb +13 -12
- data/lib/stripe/resources/payment_attempt_record.rb +41 -187
- data/lib/stripe/resources/payment_intent.rb +96 -1583
- data/lib/stripe/resources/payment_link.rb +40 -0
- data/lib/stripe/resources/payment_method.rb +21 -130
- data/lib/stripe/resources/payment_method_configuration.rb +20 -122
- data/lib/stripe/resources/payment_record.rb +41 -187
- data/lib/stripe/resources/price.rb +0 -20
- data/lib/stripe/resources/product.rb +0 -18
- data/lib/stripe/resources/quote.rb +2 -569
- data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
- data/lib/stripe/resources/refund.rb +13 -18
- data/lib/stripe/resources/reserve/hold.rb +0 -7
- data/lib/stripe/resources/reserve/release.rb +0 -12
- data/lib/stripe/resources/setup_attempt.rb +4 -26
- data/lib/stripe/resources/setup_intent.rb +27 -22
- data/lib/stripe/resources/source.rb +0 -38
- data/lib/stripe/resources/subscription.rb +10 -107
- data/lib/stripe/resources/subscription_item.rb +1 -41
- data/lib/stripe/resources/subscription_schedule.rb +5 -198
- data/lib/stripe/resources/tax/calculation_line_item.rb +0 -2
- data/lib/stripe/resources/tax/registration.rb +0 -128
- data/lib/stripe/resources/tax_code.rb +1 -15
- data/lib/stripe/resources/terminal/configuration.rb +64 -16
- data/lib/stripe/resources/terminal/reader.rb +116 -8
- data/lib/stripe/resources/transfer.rb +0 -2
- data/lib/stripe/resources/treasury/financial_account.rb +0 -2
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_payment.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -30
- data/lib/stripe/resources/treasury/received_credit.rb +0 -30
- data/lib/stripe/resources/treasury/received_debit.rb +0 -32
- data/lib/stripe/resources/v2/commerce/product_catalog_import.rb +1 -1
- data/lib/stripe/resources/v2/core/account.rb +40 -607
- data/lib/stripe/resources/v2/core/account_token.rb +1 -1
- data/lib/stripe/resources/v2/core/event.rb +1 -0
- data/lib/stripe/resources.rb +500 -301
- data/lib/stripe/services/account_service.rb +0 -15
- data/lib/stripe/services/billing_service.rb +1 -2
- data/lib/stripe/services/credit_note_service.rb +0 -14
- data/lib/stripe/services/customer_service.rb +0 -15
- data/lib/stripe/services/financial_connections/account_service.rb +1 -3
- data/lib/stripe/services/financial_connections_service.rb +1 -3
- data/lib/stripe/services/invoice_service.rb +0 -41
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/mandate_service.rb +0 -5
- data/lib/stripe/services/payment_intent_service.rb +3 -38
- data/lib/stripe/services/promotion_code_service.rb +0 -29
- data/lib/stripe/services/quote_service.rb +1 -49
- data/lib/stripe/services/subscription_schedule_service.rb +0 -55
- data/lib/stripe/services/subscription_service.rb +2 -32
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers_service.rb +1 -2
- data/lib/stripe/services/v1_services.rb +1 -11
- data/lib/stripe/services/v2/billing_service.rb +1 -5
- data/lib/stripe/services/v2/core/account_service.rb +1 -1
- data/lib/stripe/services/v2/core/account_token_service.rb +5 -1
- data/lib/stripe/services/v2/core/event_service.rb +2 -1
- data/lib/stripe/services/v2/core_service.rb +1 -3
- data/lib/stripe/services/v2_services.rb +1 -8
- data/lib/stripe/services.rb +469 -268
- data/lib/stripe/stripe_client.rb +1 -8
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +25 -58
- data/rbi/stripe/stripe_client.rbi +0 -13
- data/rbi/stripe.rbi +53183 -118054
- metadata +5 -377
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +0 -63
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_batch_failed_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_canceled_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_completed_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_created_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_ready_for_upload_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_timeout_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_updated_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_upload_timeout_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_validating_event.rb +0 -44
- data/lib/stripe/events/v2_core_batch_job_validation_failed_event.rb +0 -44
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +0 -78
- data/lib/stripe/events/v2_data_reporting_query_run_created_event.rb +0 -44
- data/lib/stripe/events/v2_data_reporting_query_run_failed_event.rb +0 -44
- data/lib/stripe/events/v2_data_reporting_query_run_succeeded_event.rb +0 -44
- data/lib/stripe/events/v2_data_reporting_query_run_updated_event.rb +0 -44
- data/lib/stripe/events/v2_extend_workflow_run_failed_event.rb +0 -75
- data/lib/stripe/events/v2_extend_workflow_run_started_event.rb +0 -44
- data/lib/stripe/events/v2_extend_workflow_run_succeeded_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -61
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_payout_method_created_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -61
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -44
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -63
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -44
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_confirmed_event.rb +0 -97
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_created_event.rb +0 -97
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_partially_confirmed_event.rb +0 -97
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_terminated_event.rb +0 -97
- data/lib/stripe/params/account_notice_list_params.rb +0 -25
- data/lib/stripe/params/account_notice_retrieve_params.rb +0 -13
- data/lib/stripe/params/account_notice_update_params.rb +0 -36
- data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +0 -65
- data/lib/stripe/params/capital/financing_offer_list_params.rb +0 -58
- data/lib/stripe/params/capital/financing_offer_mark_delivered_params.rb +0 -15
- data/lib/stripe/params/capital/financing_offer_retrieve_params.rb +0 -15
- data/lib/stripe/params/capital/financing_summary_retrieve_params.rb +0 -15
- data/lib/stripe/params/capital/financing_transaction_list_params.rb +0 -45
- data/lib/stripe/params/capital/financing_transaction_retrieve_params.rb +0 -15
- data/lib/stripe/params/external_account_create_params.rb +0 -134
- data/lib/stripe/params/external_account_delete_params.rb +0 -6
- data/lib/stripe/params/external_account_list_params.rb +0 -25
- data/lib/stripe/params/external_account_retrieve_params.rb +0 -13
- data/lib/stripe/params/external_account_update_params.rb +0 -91
- data/lib/stripe/params/financial_connections/account_inferred_balance_list_params.rb +0 -24
- data/lib/stripe/params/financial_connections/authorization_retrieve_params.rb +0 -15
- data/lib/stripe/params/financial_connections/institution_list_params.rb +0 -24
- data/lib/stripe/params/financial_connections/institution_retrieve_params.rb +0 -15
- data/lib/stripe/params/fx_quote_create_params.rb +0 -73
- data/lib/stripe/params/fx_quote_list_params.rb +0 -22
- data/lib/stripe/params/fx_quote_retrieve_params.rb +0 -13
- data/lib/stripe/params/invoice_detach_payment_params.rb +0 -16
- data/lib/stripe/params/issuing/credit_underwriting_record_correct_params.rb +0 -163
- data/lib/stripe/params/issuing/credit_underwriting_record_create_from_application_params.rb +0 -50
- data/lib/stripe/params/issuing/credit_underwriting_record_create_from_proactive_review_params.rb +0 -128
- data/lib/stripe/params/issuing/credit_underwriting_record_list_params.rb +0 -24
- data/lib/stripe/params/issuing/credit_underwriting_record_report_decision_params.rb +0 -86
- data/lib/stripe/params/issuing/credit_underwriting_record_retrieve_params.rb +0 -15
- data/lib/stripe/params/issuing/dispute_settlement_detail_list_params.rb +0 -33
- data/lib/stripe/params/issuing/dispute_settlement_detail_retrieve_params.rb +0 -15
- data/lib/stripe/params/issuing/fraud_liability_debit_list_params.rb +0 -44
- data/lib/stripe/params/issuing/fraud_liability_debit_retrieve_params.rb +0 -15
- data/lib/stripe/params/mandate_list_params.rb +0 -39
- data/lib/stripe/params/margin_create_params.rb +0 -25
- data/lib/stripe/params/margin_list_params.rb +0 -25
- data/lib/stripe/params/margin_retrieve_params.rb +0 -13
- data/lib/stripe/params/margin_update_params.rb +0 -22
- data/lib/stripe/params/order_create_params.rb +0 -2083
- data/lib/stripe/params/order_list_params.rb +0 -25
- data/lib/stripe/params/order_retrieve_params.rb +0 -13
- data/lib/stripe/params/order_submit_params.rb +0 -16
- data/lib/stripe/params/order_update_params.rb +0 -2087
- data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +0 -297
- data/lib/stripe/params/payment_intent_trigger_action_params.rb +0 -27
- data/lib/stripe/params/privacy/redaction_job_cancel_params.rb +0 -15
- data/lib/stripe/params/privacy/redaction_job_create_params.rb +0 -67
- data/lib/stripe/params/privacy/redaction_job_list_params.rb +0 -27
- data/lib/stripe/params/privacy/redaction_job_retrieve_params.rb +0 -15
- data/lib/stripe/params/privacy/redaction_job_run_params.rb +0 -15
- data/lib/stripe/params/privacy/redaction_job_update_params.rb +0 -18
- data/lib/stripe/params/privacy/redaction_job_validate_params.rb +0 -15
- data/lib/stripe/params/privacy/redaction_job_validation_error_list_params.rb +0 -24
- data/lib/stripe/params/product_catalog/trial_offer_create_params.rb +0 -63
- data/lib/stripe/params/quote_line_list_params.rb +0 -22
- data/lib/stripe/params/quote_list_lines_params.rb +0 -22
- data/lib/stripe/params/quote_list_preview_invoice_lines_params.rb +0 -22
- data/lib/stripe/params/quote_mark_draft_params.rb +0 -13
- data/lib/stripe/params/quote_mark_stale_params.rb +0 -16
- data/lib/stripe/params/quote_preview_invoice_list_params.rb +0 -22
- data/lib/stripe/params/quote_preview_subscription_schedule_list_params.rb +0 -22
- data/lib/stripe/params/quote_reestimate_params.rb +0 -13
- data/lib/stripe/params/reserve/hold_list_params.rb +0 -53
- data/lib/stripe/params/reserve/hold_retrieve_params.rb +0 -15
- data/lib/stripe/params/reserve/plan_retrieve_params.rb +0 -15
- data/lib/stripe/params/reserve/release_list_params.rb +0 -41
- data/lib/stripe/params/reserve/release_retrieve_params.rb +0 -15
- data/lib/stripe/params/shared_payment/granted_token_create_params.rb +0 -47
- data/lib/stripe/params/shared_payment/granted_token_retrieve_params.rb +0 -15
- data/lib/stripe/params/shared_payment/granted_token_revoke_params.rb +0 -15
- data/lib/stripe/params/shared_payment/issued_token_create_params.rb +0 -67
- data/lib/stripe/params/shared_payment/issued_token_retrieve_params.rb +0 -15
- data/lib/stripe/params/shared_payment/issued_token_revoke_params.rb +0 -15
- data/lib/stripe/params/subscription_schedule_amend_params.rb +0 -578
- data/lib/stripe/params/tax/form_list_params.rb +0 -51
- data/lib/stripe/params/tax/form_pdf_params.rb +0 -15
- data/lib/stripe/params/tax/form_retrieve_params.rb +0 -15
- data/lib/stripe/params/tax/location_create_params.rb +0 -54
- data/lib/stripe/params/tax/location_list_params.rb +0 -27
- data/lib/stripe/params/tax/location_retrieve_params.rb +0 -15
- data/lib/stripe/params/terminal/reader_collected_data_retrieve_params.rb +0 -15
- data/lib/stripe/params/test_helpers/shared_payment/granted_token_create_params.rb +0 -49
- data/lib/stripe/params/test_helpers/shared_payment/granted_token_revoke_params.rb +0 -17
- data/lib/stripe/params/v2/billing/bill_setting_create_params.rb +0 -74
- data/lib/stripe/params/v2/billing/bill_setting_list_params.rb +0 -21
- data/lib/stripe/params/v2/billing/bill_setting_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/billing/bill_setting_update_params.rb +0 -80
- data/lib/stripe/params/v2/billing/bill_settings/version_list_params.rb +0 -19
- data/lib/stripe/params/v2/billing/bill_settings/version_retrieve_params.rb +0 -12
- data/lib/stripe/params/v2/billing/cadence_cancel_params.rb +0 -10
- data/lib/stripe/params/v2/billing/cadence_create_params.rb +0 -253
- data/lib/stripe/params/v2/billing/cadence_list_params.rb +0 -43
- data/lib/stripe/params/v2/billing/cadence_retrieve_params.rb +0 -17
- data/lib/stripe/params/v2/billing/cadence_update_params.rb +0 -75
- data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +0 -257
- data/lib/stripe/params/v2/billing/collection_setting_list_params.rb +0 -21
- data/lib/stripe/params/v2/billing/collection_setting_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +0 -263
- data/lib/stripe/params/v2/billing/collection_settings/version_list_params.rb +0 -19
- data/lib/stripe/params/v2/billing/collection_settings/version_retrieve_params.rb +0 -12
- data/lib/stripe/params/v2/billing/profile_create_params.rb +0 -37
- data/lib/stripe/params/v2/billing/profile_list_params.rb +0 -40
- data/lib/stripe/params/v2/billing/profile_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/billing/profile_update_params.rb +0 -35
- data/lib/stripe/params/v2/core/batch_job_cancel_params.rb +0 -10
- data/lib/stripe/params/v2/core/batch_job_create_params.rb +0 -58
- data/lib/stripe/params/v2/core/batch_job_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/core/vault/gb_bank_account_acknowledge_confirmation_of_payee_params.rb +0 -12
- data/lib/stripe/params/v2/core/vault/gb_bank_account_archive_params.rb +0 -12
- data/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +0 -58
- data/lib/stripe/params/v2/core/vault/gb_bank_account_initiate_confirmation_of_payee_params.rb +0 -22
- data/lib/stripe/params/v2/core/vault/gb_bank_account_list_params.rb +0 -19
- data/lib/stripe/params/v2/core/vault/gb_bank_account_retrieve_params.rb +0 -12
- data/lib/stripe/params/v2/core/vault/us_bank_account_archive_params.rb +0 -12
- data/lib/stripe/params/v2/core/vault/us_bank_account_confirm_microdeposits_params.rb +0 -22
- data/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb +0 -37
- data/lib/stripe/params/v2/core/vault/us_bank_account_list_params.rb +0 -22
- data/lib/stripe/params/v2/core/vault/us_bank_account_retrieve_params.rb +0 -12
- data/lib/stripe/params/v2/core/vault/us_bank_account_send_microdeposits_params.rb +0 -12
- data/lib/stripe/params/v2/core/vault/us_bank_account_update_params.rb +0 -22
- data/lib/stripe/params/v2/data/reporting/query_run_create_params.rb +0 -31
- data/lib/stripe/params/v2/data/reporting/query_run_retrieve_params.rb +0 -12
- data/lib/stripe/params/v2/extend/workflow_invoke_params.rb +0 -17
- data/lib/stripe/params/v2/extend/workflow_list_params.rb +0 -21
- data/lib/stripe/params/v2/extend/workflow_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/extend/workflow_run_list_params.rb +0 -23
- data/lib/stripe/params/v2/extend/workflow_run_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/iam/activity_log_list_params.rb +0 -23
- data/lib/stripe/params/v2/money_management/adjustment_list_params.rb +0 -48
- data/lib/stripe/params/v2/money_management/adjustment_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/financial_account_close_params.rb +0 -28
- data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +0 -34
- data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +0 -20
- data/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +0 -20
- data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +0 -20
- data/lib/stripe/params/v2/money_management/financial_address_list_params.rb +0 -23
- data/lib/stripe/params/v2/money_management/financial_address_retrieve_params.rb +0 -17
- data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +0 -50
- data/lib/stripe/params/v2/money_management/inbound_transfer_list_params.rb +0 -44
- data/lib/stripe/params/v2/money_management/inbound_transfer_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/outbound_payment_cancel_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +0 -102
- data/lib/stripe/params/v2/money_management/outbound_payment_list_params.rb +0 -52
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +0 -67
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/outbound_payment_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_cancel_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +0 -92
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_list_params.rb +0 -17
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +0 -87
- data/lib/stripe/params/v2/money_management/outbound_transfer_cancel_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +0 -77
- data/lib/stripe/params/v2/money_management/outbound_transfer_list_params.rb +0 -48
- data/lib/stripe/params/v2/money_management/outbound_transfer_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/payout_method_archive_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/payout_method_list_params.rb +0 -31
- data/lib/stripe/params/v2/money_management/payout_method_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/payout_method_unarchive_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/payout_methods_bank_account_spec_retrieve_params.rb +0 -17
- data/lib/stripe/params/v2/money_management/received_credit_list_params.rb +0 -44
- data/lib/stripe/params/v2/money_management/received_credit_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +0 -17
- data/lib/stripe/params/v2/money_management/received_debit_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/transaction_entry_list_params.rb +0 -43
- data/lib/stripe/params/v2/money_management/transaction_entry_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/money_management/transaction_list_params.rb +0 -47
- data/lib/stripe/params/v2/money_management/transaction_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/network/business_profile_me_params.rb +0 -10
- data/lib/stripe/params/v2/network/business_profile_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_confirm_params.rb +0 -10
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_create_params.rb +0 -17
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_list_params.rb +0 -20
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_retrieve_params.rb +0 -10
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_terminate_params.rb +0 -10
- data/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +0 -23
- data/lib/stripe/params/v2/test_helpers/financial_address_generate_microdeposits_params.rb +0 -10
- data/lib/stripe/resources/account_notice.rb +0 -94
- data/lib/stripe/resources/billing/analytics/meter_usage.rb +0 -33
- data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +0 -38
- data/lib/stripe/resources/capital/financing_offer.rb +0 -142
- data/lib/stripe/resources/capital/financing_summary.rb +0 -82
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -99
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -35
- data/lib/stripe/resources/financial_connections/authorization.rb +0 -82
- data/lib/stripe/resources/financial_connections/institution.rb +0 -127
- data/lib/stripe/resources/fx_quote.rb +0 -147
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -263
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -71
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -51
- data/lib/stripe/resources/issuing/settlement.rb +0 -61
- data/lib/stripe/resources/margin.rb +0 -64
- data/lib/stripe/resources/order.rb +0 -927
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -189
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -49
- data/lib/stripe/resources/product_catalog/trial_offer.rb +0 -103
- data/lib/stripe/resources/quote_line.rb +0 -525
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -1181
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -734
- data/lib/stripe/resources/shared_payment/granted_token.rb +0 -1766
- data/lib/stripe/resources/shared_payment/issued_token.rb +0 -291
- data/lib/stripe/resources/tax/form.rb +0 -264
- data/lib/stripe/resources/tax/location.rb +0 -72
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -47
- data/lib/stripe/resources/v2/billing/bill_setting.rb +0 -102
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +0 -91
- data/lib/stripe/resources/v2/billing/cadence.rb +0 -710
- data/lib/stripe/resources/v2/billing/collection_setting.rb +0 -327
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +0 -316
- data/lib/stripe/resources/v2/billing/profile.rb +0 -47
- data/lib/stripe/resources/v2/core/batch_job.rb +0 -492
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -136
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -105
- data/lib/stripe/resources/v2/data/reporting/query_run.rb +0 -142
- data/lib/stripe/resources/v2/extend/workflow.rb +0 -80
- data/lib/stripe/resources/v2/extend/workflow_run.rb +0 -158
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -29
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -31
- data/lib/stripe/resources/v2/iam/activity_log.rb +0 -187
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -67
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -140
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -160
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -181
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -219
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -144
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -69
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -196
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -145
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -83
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -230
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -136
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -135
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -105
- data/lib/stripe/resources/v2/network/business_profile.rb +0 -84
- data/lib/stripe/resources/v2/orchestrated_commerce/agreement.rb +0 -93
- data/lib/stripe/services/account_notice_service.rb +0 -39
- data/lib/stripe/services/billing/analytics/meter_usage_service.rb +0 -21
- data/lib/stripe/services/billing/analytics_service.rb +0 -15
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -42
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -19
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -31
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/external_account_service.rb +0 -68
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -19
- data/lib/stripe/services/financial_connections/authorization_service.rb +0 -19
- data/lib/stripe/services/financial_connections/institution_service.rb +0 -30
- data/lib/stripe/services/fx_quote_service.rb +0 -27
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -74
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -30
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -30
- data/lib/stripe/services/margin_service.rb +0 -50
- data/lib/stripe/services/order_service.rb +0 -53
- data/lib/stripe/services/privacy/redaction_job_service.rb +0 -104
- data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +0 -19
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/product_catalog/trial_offer_service.rb +0 -19
- data/lib/stripe/services/product_catalog_service.rb +0 -13
- data/lib/stripe/services/quote_line_service.rb +0 -17
- data/lib/stripe/services/quote_preview_invoice_service.rb +0 -17
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -17
- data/lib/stripe/services/reserve/hold_service.rb +0 -30
- data/lib/stripe/services/reserve/plan_service.rb +0 -19
- data/lib/stripe/services/reserve/release_service.rb +0 -30
- data/lib/stripe/services/reserve_service.rb +0 -15
- data/lib/stripe/services/shared_payment/granted_token_service.rb +0 -19
- data/lib/stripe/services/shared_payment/issued_token_service.rb +0 -41
- data/lib/stripe/services/shared_payment_service.rb +0 -14
- data/lib/stripe/services/tax/form_service.rb +0 -37
- data/lib/stripe/services/tax/location_service.rb +0 -45
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -19
- data/lib/stripe/services/test_helpers/shared_payment/granted_token_service.rb +0 -32
- data/lib/stripe/services/test_helpers/shared_payment_service.rb +0 -15
- data/lib/stripe/services/v2/billing/bill_setting_service.rb +0 -61
- data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +0 -34
- data/lib/stripe/services/v2/billing/cadence_service.rb +0 -65
- data/lib/stripe/services/v2/billing/collection_setting_service.rb +0 -69
- data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +0 -34
- data/lib/stripe/services/v2/billing/profile_service.rb +0 -54
- data/lib/stripe/services/v2/core/batch_job_service.rb +0 -43
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -85
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -101
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/data/reporting/query_run_service.rb +0 -35
- data/lib/stripe/services/v2/data/reporting_service.rb +0 -17
- data/lib/stripe/services/v2/datum_service.rb +0 -15
- data/lib/stripe/services/v2/extend/workflow_run_service.rb +0 -32
- data/lib/stripe/services/v2/extend/workflow_service.rb +0 -45
- data/lib/stripe/services/v2/extend_service.rb +0 -16
- data/lib/stripe/services/v2/iam/activity_log_service.rb +0 -21
- data/lib/stripe/services/v2/iam_service.rb +0 -15
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -46
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -45
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -34
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -62
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -75
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -60
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -66
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -23
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -32
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/network/business_profile_service.rb +0 -32
- data/lib/stripe/services/v2/network_service.rb +0 -15
- data/lib/stripe/services/v2/orchestrated_commerce/agreement_service.rb +0 -65
- data/lib/stripe/services/v2/orchestrated_commerce_service.rb +0 -15
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -36
- data/lib/stripe/stripe_event_notification_handler.rb +0 -581
|
@@ -5,44 +5,16 @@ module Stripe
|
|
|
5
5
|
class SubscriptionCreateParams < ::Stripe::RequestParams
|
|
6
6
|
class AddInvoiceItem < ::Stripe::RequestParams
|
|
7
7
|
class Discount < ::Stripe::RequestParams
|
|
8
|
-
class DiscountEnd < ::Stripe::RequestParams
|
|
9
|
-
class Duration < ::Stripe::RequestParams
|
|
10
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
11
|
-
attr_accessor :interval
|
|
12
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
13
|
-
attr_accessor :interval_count
|
|
14
|
-
|
|
15
|
-
def initialize(interval: nil, interval_count: nil)
|
|
16
|
-
@interval = interval
|
|
17
|
-
@interval_count = interval_count
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
# Time span for the redeemed discount.
|
|
21
|
-
attr_accessor :duration
|
|
22
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
23
|
-
attr_accessor :timestamp
|
|
24
|
-
# The type of calculation made to determine when the discount ends.
|
|
25
|
-
attr_accessor :type
|
|
26
|
-
|
|
27
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
28
|
-
@duration = duration
|
|
29
|
-
@timestamp = timestamp
|
|
30
|
-
@type = type
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
8
|
# ID of the coupon to create a new discount for.
|
|
34
9
|
attr_accessor :coupon
|
|
35
10
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
36
11
|
attr_accessor :discount
|
|
37
|
-
# Details to determine how long the discount should be applied for.
|
|
38
|
-
attr_accessor :discount_end
|
|
39
12
|
# ID of the promotion code to create a new discount for.
|
|
40
13
|
attr_accessor :promotion_code
|
|
41
14
|
|
|
42
|
-
def initialize(coupon: nil, discount: nil,
|
|
15
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
43
16
|
@coupon = coupon
|
|
44
17
|
@discount = discount
|
|
45
|
-
@discount_end = discount_end
|
|
46
18
|
@promotion_code = promotion_code
|
|
47
19
|
end
|
|
48
20
|
end
|
|
@@ -112,6 +84,8 @@ module Stripe
|
|
|
112
84
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
113
85
|
end
|
|
114
86
|
end
|
|
87
|
+
# Controls whether discounts apply to this invoice item. Defaults to true if no value is provided.
|
|
88
|
+
attr_accessor :discountable
|
|
115
89
|
# The coupons to redeem into discounts for the item.
|
|
116
90
|
attr_accessor :discounts
|
|
117
91
|
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
@@ -128,6 +102,7 @@ module Stripe
|
|
|
128
102
|
attr_accessor :tax_rates
|
|
129
103
|
|
|
130
104
|
def initialize(
|
|
105
|
+
discountable: nil,
|
|
131
106
|
discounts: nil,
|
|
132
107
|
metadata: nil,
|
|
133
108
|
period: nil,
|
|
@@ -136,6 +111,7 @@ module Stripe
|
|
|
136
111
|
quantity: nil,
|
|
137
112
|
tax_rates: nil
|
|
138
113
|
)
|
|
114
|
+
@discountable = discountable
|
|
139
115
|
@discounts = discounts
|
|
140
116
|
@metadata = metadata
|
|
141
117
|
@period = period
|
|
@@ -281,44 +257,16 @@ module Stripe
|
|
|
281
257
|
end
|
|
282
258
|
|
|
283
259
|
class Discount < ::Stripe::RequestParams
|
|
284
|
-
class DiscountEnd < ::Stripe::RequestParams
|
|
285
|
-
class Duration < ::Stripe::RequestParams
|
|
286
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
287
|
-
attr_accessor :interval
|
|
288
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
289
|
-
attr_accessor :interval_count
|
|
290
|
-
|
|
291
|
-
def initialize(interval: nil, interval_count: nil)
|
|
292
|
-
@interval = interval
|
|
293
|
-
@interval_count = interval_count
|
|
294
|
-
end
|
|
295
|
-
end
|
|
296
|
-
# Time span for the redeemed discount.
|
|
297
|
-
attr_accessor :duration
|
|
298
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
299
|
-
attr_accessor :timestamp
|
|
300
|
-
# The type of calculation made to determine when the discount ends.
|
|
301
|
-
attr_accessor :type
|
|
302
|
-
|
|
303
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
304
|
-
@duration = duration
|
|
305
|
-
@timestamp = timestamp
|
|
306
|
-
@type = type
|
|
307
|
-
end
|
|
308
|
-
end
|
|
309
260
|
# ID of the coupon to create a new discount for.
|
|
310
261
|
attr_accessor :coupon
|
|
311
262
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
312
263
|
attr_accessor :discount
|
|
313
|
-
# Details to determine how long the discount should be applied for.
|
|
314
|
-
attr_accessor :discount_end
|
|
315
264
|
# ID of the promotion code to create a new discount for.
|
|
316
265
|
attr_accessor :promotion_code
|
|
317
266
|
|
|
318
|
-
def initialize(coupon: nil, discount: nil,
|
|
267
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
319
268
|
@coupon = coupon
|
|
320
269
|
@discount = discount
|
|
321
|
-
@discount_end = discount_end
|
|
322
270
|
@promotion_code = promotion_code
|
|
323
271
|
end
|
|
324
272
|
end
|
|
@@ -356,57 +304,17 @@ module Stripe
|
|
|
356
304
|
end
|
|
357
305
|
end
|
|
358
306
|
|
|
359
|
-
class CurrentTrial < ::Stripe::RequestParams
|
|
360
|
-
# Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`.
|
|
361
|
-
attr_accessor :trial_end
|
|
362
|
-
# The ID of the trial offer to apply to the subscription item.
|
|
363
|
-
attr_accessor :trial_offer
|
|
364
|
-
|
|
365
|
-
def initialize(trial_end: nil, trial_offer: nil)
|
|
366
|
-
@trial_end = trial_end
|
|
367
|
-
@trial_offer = trial_offer
|
|
368
|
-
end
|
|
369
|
-
end
|
|
370
|
-
|
|
371
307
|
class Discount < ::Stripe::RequestParams
|
|
372
|
-
class DiscountEnd < ::Stripe::RequestParams
|
|
373
|
-
class Duration < ::Stripe::RequestParams
|
|
374
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
375
|
-
attr_accessor :interval
|
|
376
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
377
|
-
attr_accessor :interval_count
|
|
378
|
-
|
|
379
|
-
def initialize(interval: nil, interval_count: nil)
|
|
380
|
-
@interval = interval
|
|
381
|
-
@interval_count = interval_count
|
|
382
|
-
end
|
|
383
|
-
end
|
|
384
|
-
# Time span for the redeemed discount.
|
|
385
|
-
attr_accessor :duration
|
|
386
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
387
|
-
attr_accessor :timestamp
|
|
388
|
-
# The type of calculation made to determine when the discount ends.
|
|
389
|
-
attr_accessor :type
|
|
390
|
-
|
|
391
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
392
|
-
@duration = duration
|
|
393
|
-
@timestamp = timestamp
|
|
394
|
-
@type = type
|
|
395
|
-
end
|
|
396
|
-
end
|
|
397
308
|
# ID of the coupon to create a new discount for.
|
|
398
309
|
attr_accessor :coupon
|
|
399
310
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
400
311
|
attr_accessor :discount
|
|
401
|
-
# Details to determine how long the discount should be applied for.
|
|
402
|
-
attr_accessor :discount_end
|
|
403
312
|
# ID of the promotion code to create a new discount for.
|
|
404
313
|
attr_accessor :promotion_code
|
|
405
314
|
|
|
406
|
-
def initialize(coupon: nil, discount: nil,
|
|
315
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
407
316
|
@coupon = coupon
|
|
408
317
|
@discount = discount
|
|
409
|
-
@discount_end = discount_end
|
|
410
318
|
@promotion_code = promotion_code
|
|
411
319
|
end
|
|
412
320
|
end
|
|
@@ -456,22 +364,8 @@ module Stripe
|
|
|
456
364
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
457
365
|
end
|
|
458
366
|
end
|
|
459
|
-
|
|
460
|
-
class Trial < ::Stripe::RequestParams
|
|
461
|
-
# 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.
|
|
462
|
-
attr_accessor :converts_to
|
|
463
|
-
# Determines the type of trial for this item.
|
|
464
|
-
attr_accessor :type
|
|
465
|
-
|
|
466
|
-
def initialize(converts_to: nil, type: nil)
|
|
467
|
-
@converts_to = converts_to
|
|
468
|
-
@type = type
|
|
469
|
-
end
|
|
470
|
-
end
|
|
471
367
|
# 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.
|
|
472
368
|
attr_accessor :billing_thresholds
|
|
473
|
-
# The trial offer to apply to this subscription item.
|
|
474
|
-
attr_accessor :current_trial
|
|
475
369
|
# The coupons to redeem into discounts for the subscription item.
|
|
476
370
|
attr_accessor :discounts
|
|
477
371
|
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
@@ -486,23 +380,18 @@ module Stripe
|
|
|
486
380
|
attr_accessor :quantity
|
|
487
381
|
# A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
488
382
|
attr_accessor :tax_rates
|
|
489
|
-
# Define options to configure the trial on the subscription item.
|
|
490
|
-
attr_accessor :trial
|
|
491
383
|
|
|
492
384
|
def initialize(
|
|
493
385
|
billing_thresholds: nil,
|
|
494
|
-
current_trial: nil,
|
|
495
386
|
discounts: nil,
|
|
496
387
|
metadata: nil,
|
|
497
388
|
plan: nil,
|
|
498
389
|
price: nil,
|
|
499
390
|
price_data: nil,
|
|
500
391
|
quantity: nil,
|
|
501
|
-
tax_rates: nil
|
|
502
|
-
trial: nil
|
|
392
|
+
tax_rates: nil
|
|
503
393
|
)
|
|
504
394
|
@billing_thresholds = billing_thresholds
|
|
505
|
-
@current_trial = current_trial
|
|
506
395
|
@discounts = discounts
|
|
507
396
|
@metadata = metadata
|
|
508
397
|
@plan = plan
|
|
@@ -510,7 +399,6 @@ module Stripe
|
|
|
510
399
|
@price_data = price_data
|
|
511
400
|
@quantity = quantity
|
|
512
401
|
@tax_rates = tax_rates
|
|
513
|
-
@trial = trial
|
|
514
402
|
end
|
|
515
403
|
|
|
516
404
|
def self.field_encodings
|
|
@@ -551,23 +439,6 @@ module Stripe
|
|
|
551
439
|
end
|
|
552
440
|
end
|
|
553
441
|
|
|
554
|
-
class Blik < ::Stripe::RequestParams
|
|
555
|
-
class MandateOptions < ::Stripe::RequestParams
|
|
556
|
-
# Date when the mandate expires and no further payments will be charged. If not provided, the mandate will be set to be indefinite.
|
|
557
|
-
attr_accessor :expires_after
|
|
558
|
-
|
|
559
|
-
def initialize(expires_after: nil)
|
|
560
|
-
@expires_after = expires_after
|
|
561
|
-
end
|
|
562
|
-
end
|
|
563
|
-
# Configuration options for setting up a mandate
|
|
564
|
-
attr_accessor :mandate_options
|
|
565
|
-
|
|
566
|
-
def initialize(mandate_options: nil)
|
|
567
|
-
@mandate_options = mandate_options
|
|
568
|
-
end
|
|
569
|
-
end
|
|
570
|
-
|
|
571
442
|
class Card < ::Stripe::RequestParams
|
|
572
443
|
class MandateOptions < ::Stripe::RequestParams
|
|
573
444
|
# Amount to be charged for future payments, specified in the presentment currency.
|
|
@@ -628,7 +499,6 @@ module Stripe
|
|
|
628
499
|
end
|
|
629
500
|
end
|
|
630
501
|
|
|
631
|
-
class IdBankTransfer < ::Stripe::RequestParams; end
|
|
632
502
|
class Konbini < ::Stripe::RequestParams; end
|
|
633
503
|
|
|
634
504
|
class Payto < ::Stripe::RequestParams
|
|
@@ -718,12 +588,9 @@ module Stripe
|
|
|
718
588
|
class Filters < ::Stripe::RequestParams
|
|
719
589
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
720
590
|
attr_accessor :account_subcategories
|
|
721
|
-
# ID of the institution to use to filter for selectable accounts.
|
|
722
|
-
attr_accessor :institution
|
|
723
591
|
|
|
724
|
-
def initialize(account_subcategories: nil
|
|
592
|
+
def initialize(account_subcategories: nil)
|
|
725
593
|
@account_subcategories = account_subcategories
|
|
726
|
-
@institution = institution
|
|
727
594
|
end
|
|
728
595
|
end
|
|
729
596
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
|
@@ -753,14 +620,10 @@ module Stripe
|
|
|
753
620
|
attr_accessor :acss_debit
|
|
754
621
|
# This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
|
755
622
|
attr_accessor :bancontact
|
|
756
|
-
# This sub-hash contains details about the Blik payment method options to pass to the invoice’s PaymentIntent.
|
|
757
|
-
attr_accessor :blik
|
|
758
623
|
# This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
|
759
624
|
attr_accessor :card
|
|
760
625
|
# This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
|
761
626
|
attr_accessor :customer_balance
|
|
762
|
-
# This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
|
763
|
-
attr_accessor :id_bank_transfer
|
|
764
627
|
# This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
|
765
628
|
attr_accessor :konbini
|
|
766
629
|
# This sub-hash contains details about the PayTo payment method options to pass to the invoice’s PaymentIntent.
|
|
@@ -777,10 +640,8 @@ module Stripe
|
|
|
777
640
|
def initialize(
|
|
778
641
|
acss_debit: nil,
|
|
779
642
|
bancontact: nil,
|
|
780
|
-
blik: nil,
|
|
781
643
|
card: nil,
|
|
782
644
|
customer_balance: nil,
|
|
783
|
-
id_bank_transfer: nil,
|
|
784
645
|
konbini: nil,
|
|
785
646
|
payto: nil,
|
|
786
647
|
pix: nil,
|
|
@@ -790,10 +651,8 @@ module Stripe
|
|
|
790
651
|
)
|
|
791
652
|
@acss_debit = acss_debit
|
|
792
653
|
@bancontact = bancontact
|
|
793
|
-
@blik = blik
|
|
794
654
|
@card = card
|
|
795
655
|
@customer_balance = customer_balance
|
|
796
|
-
@id_bank_transfer = id_bank_transfer
|
|
797
656
|
@konbini = konbini
|
|
798
657
|
@payto = payto
|
|
799
658
|
@pix = pix
|
|
@@ -832,18 +691,6 @@ module Stripe
|
|
|
832
691
|
end
|
|
833
692
|
end
|
|
834
693
|
|
|
835
|
-
class Prebilling < ::Stripe::RequestParams
|
|
836
|
-
# This is used to determine the number of billing cycles to prebill.
|
|
837
|
-
attr_accessor :iterations
|
|
838
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
839
|
-
attr_accessor :update_behavior
|
|
840
|
-
|
|
841
|
-
def initialize(iterations: nil, update_behavior: nil)
|
|
842
|
-
@iterations = iterations
|
|
843
|
-
@update_behavior = update_behavior
|
|
844
|
-
end
|
|
845
|
-
end
|
|
846
|
-
|
|
847
694
|
class TransferData < ::Stripe::RequestParams
|
|
848
695
|
# 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 destination account. By default, the entire amount is transferred to the destination.
|
|
849
696
|
attr_accessor :amount_percent
|
|
@@ -858,13 +705,10 @@ module Stripe
|
|
|
858
705
|
|
|
859
706
|
class TrialSettings < ::Stripe::RequestParams
|
|
860
707
|
class EndBehavior < ::Stripe::RequestParams
|
|
861
|
-
# Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`.
|
|
862
|
-
attr_accessor :billing_cycle_anchor
|
|
863
708
|
# Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
|
|
864
709
|
attr_accessor :missing_payment_method
|
|
865
710
|
|
|
866
|
-
def initialize(
|
|
867
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
|
711
|
+
def initialize(missing_payment_method: nil)
|
|
868
712
|
@missing_payment_method = missing_payment_method
|
|
869
713
|
end
|
|
870
714
|
end
|
|
@@ -929,24 +773,12 @@ module Stripe
|
|
|
929
773
|
attr_accessor :off_session
|
|
930
774
|
# The account on behalf of which to charge, for each of the subscription's invoices.
|
|
931
775
|
attr_accessor :on_behalf_of
|
|
932
|
-
#
|
|
933
|
-
#
|
|
934
|
-
# Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://docs.stripe.com/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
|
|
935
|
-
#
|
|
936
|
-
# Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://docs.stripe.com/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.
|
|
937
|
-
#
|
|
938
|
-
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/upgrades#2019-03-14) to learn more.
|
|
939
|
-
#
|
|
940
|
-
# `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
|
|
941
|
-
#
|
|
942
|
-
# Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
|
|
776
|
+
# Controls how Stripe handles the first invoice when payment is required and `collection_method=charge_automatically`. Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
|
|
943
777
|
attr_accessor :payment_behavior
|
|
944
778
|
# Payment settings to pass to invoices created by the subscription.
|
|
945
779
|
attr_accessor :payment_settings
|
|
946
780
|
# Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](/api/invoices/create) for the given subscription at the specified interval.
|
|
947
781
|
attr_accessor :pending_invoice_item_interval
|
|
948
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
949
|
-
attr_accessor :prebilling
|
|
950
782
|
# Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
|
|
951
783
|
attr_accessor :proration_behavior
|
|
952
784
|
# If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
|
|
@@ -991,7 +823,6 @@ module Stripe
|
|
|
991
823
|
payment_behavior: nil,
|
|
992
824
|
payment_settings: nil,
|
|
993
825
|
pending_invoice_item_interval: nil,
|
|
994
|
-
prebilling: nil,
|
|
995
826
|
proration_behavior: nil,
|
|
996
827
|
transfer_data: nil,
|
|
997
828
|
trial_end: nil,
|
|
@@ -1029,7 +860,6 @@ module Stripe
|
|
|
1029
860
|
@payment_behavior = payment_behavior
|
|
1030
861
|
@payment_settings = payment_settings
|
|
1031
862
|
@pending_invoice_item_interval = pending_invoice_item_interval
|
|
1032
|
-
@prebilling = prebilling
|
|
1033
863
|
@proration_behavior = proration_behavior
|
|
1034
864
|
@transfer_data = transfer_data
|
|
1035
865
|
@trial_end = trial_end
|
|
@@ -12,57 +12,17 @@ module Stripe
|
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
class CurrentTrial < ::Stripe::RequestParams
|
|
16
|
-
# Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`.
|
|
17
|
-
attr_accessor :trial_end
|
|
18
|
-
# The ID of the trial offer to apply to the subscription item.
|
|
19
|
-
attr_accessor :trial_offer
|
|
20
|
-
|
|
21
|
-
def initialize(trial_end: nil, trial_offer: nil)
|
|
22
|
-
@trial_end = trial_end
|
|
23
|
-
@trial_offer = trial_offer
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
15
|
class Discount < ::Stripe::RequestParams
|
|
28
|
-
class DiscountEnd < ::Stripe::RequestParams
|
|
29
|
-
class Duration < ::Stripe::RequestParams
|
|
30
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
31
|
-
attr_accessor :interval
|
|
32
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
33
|
-
attr_accessor :interval_count
|
|
34
|
-
|
|
35
|
-
def initialize(interval: nil, interval_count: nil)
|
|
36
|
-
@interval = interval
|
|
37
|
-
@interval_count = interval_count
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
# Time span for the redeemed discount.
|
|
41
|
-
attr_accessor :duration
|
|
42
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
43
|
-
attr_accessor :timestamp
|
|
44
|
-
# The type of calculation made to determine when the discount ends.
|
|
45
|
-
attr_accessor :type
|
|
46
|
-
|
|
47
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
48
|
-
@duration = duration
|
|
49
|
-
@timestamp = timestamp
|
|
50
|
-
@type = type
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
16
|
# ID of the coupon to create a new discount for.
|
|
54
17
|
attr_accessor :coupon
|
|
55
18
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
56
19
|
attr_accessor :discount
|
|
57
|
-
# Details to determine how long the discount should be applied for.
|
|
58
|
-
attr_accessor :discount_end
|
|
59
20
|
# ID of the promotion code to create a new discount for.
|
|
60
21
|
attr_accessor :promotion_code
|
|
61
22
|
|
|
62
|
-
def initialize(coupon: nil, discount: nil,
|
|
23
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
63
24
|
@coupon = coupon
|
|
64
25
|
@discount = discount
|
|
65
|
-
@discount_end = discount_end
|
|
66
26
|
@promotion_code = promotion_code
|
|
67
27
|
end
|
|
68
28
|
end
|
|
@@ -112,35 +72,15 @@ module Stripe
|
|
|
112
72
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
113
73
|
end
|
|
114
74
|
end
|
|
115
|
-
|
|
116
|
-
class Trial < ::Stripe::RequestParams
|
|
117
|
-
# 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.
|
|
118
|
-
attr_accessor :converts_to
|
|
119
|
-
# Determines the type of trial for this item.
|
|
120
|
-
attr_accessor :type
|
|
121
|
-
|
|
122
|
-
def initialize(converts_to: nil, type: nil)
|
|
123
|
-
@converts_to = converts_to
|
|
124
|
-
@type = type
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
75
|
# 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.
|
|
128
76
|
attr_accessor :billing_thresholds
|
|
129
|
-
# The trial offer to apply to this subscription item.
|
|
130
|
-
attr_accessor :current_trial
|
|
131
77
|
# The coupons to redeem into discounts for the subscription item.
|
|
132
78
|
attr_accessor :discounts
|
|
133
79
|
# Specifies which fields in the response should be expanded.
|
|
134
80
|
attr_accessor :expand
|
|
135
81
|
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
136
82
|
attr_accessor :metadata
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
# Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://docs.stripe.com/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
|
|
140
|
-
#
|
|
141
|
-
# Use `pending_if_incomplete` to update the subscription using [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://docs.stripe.com/billing/pending-updates-reference#supported-attributes).
|
|
142
|
-
#
|
|
143
|
-
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
|
|
83
|
+
# Controls how Stripe handles payment when a subscription update requires payment and `collection_method=charge_automatically`.
|
|
144
84
|
attr_accessor :payment_behavior
|
|
145
85
|
# The identifier of the plan to add to the subscription.
|
|
146
86
|
attr_accessor :plan
|
|
@@ -158,12 +98,9 @@ module Stripe
|
|
|
158
98
|
attr_accessor :subscription
|
|
159
99
|
# A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
160
100
|
attr_accessor :tax_rates
|
|
161
|
-
# Options that configure the trial on the subscription item.
|
|
162
|
-
attr_accessor :trial
|
|
163
101
|
|
|
164
102
|
def initialize(
|
|
165
103
|
billing_thresholds: nil,
|
|
166
|
-
current_trial: nil,
|
|
167
104
|
discounts: nil,
|
|
168
105
|
expand: nil,
|
|
169
106
|
metadata: nil,
|
|
@@ -175,11 +112,9 @@ module Stripe
|
|
|
175
112
|
proration_date: nil,
|
|
176
113
|
quantity: nil,
|
|
177
114
|
subscription: nil,
|
|
178
|
-
tax_rates: nil
|
|
179
|
-
trial: nil
|
|
115
|
+
tax_rates: nil
|
|
180
116
|
)
|
|
181
117
|
@billing_thresholds = billing_thresholds
|
|
182
|
-
@current_trial = current_trial
|
|
183
118
|
@discounts = discounts
|
|
184
119
|
@expand = expand
|
|
185
120
|
@metadata = metadata
|
|
@@ -192,7 +127,6 @@ module Stripe
|
|
|
192
127
|
@quantity = quantity
|
|
193
128
|
@subscription = subscription
|
|
194
129
|
@tax_rates = tax_rates
|
|
195
|
-
@trial = trial
|
|
196
130
|
end
|
|
197
131
|
|
|
198
132
|
def self.field_encodings
|
|
@@ -5,13 +5,7 @@ module Stripe
|
|
|
5
5
|
class SubscriptionItemDeleteParams < ::Stripe::RequestParams
|
|
6
6
|
# Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.
|
|
7
7
|
attr_accessor :clear_usage
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
# Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://docs.stripe.com/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
|
|
11
|
-
#
|
|
12
|
-
# Use `pending_if_incomplete` to update the subscription using [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://docs.stripe.com/billing/pending-updates-reference#supported-attributes).
|
|
13
|
-
#
|
|
14
|
-
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
|
|
8
|
+
# Controls how Stripe handles payment when a subscription update requires payment and `collection_method=charge_automatically`.
|
|
15
9
|
attr_accessor :payment_behavior
|
|
16
10
|
# Determines how to handle [prorations](https://docs.stripe.com/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`.
|
|
17
11
|
attr_accessor :proration_behavior
|
|
@@ -12,57 +12,17 @@ module Stripe
|
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
class CurrentTrial < ::Stripe::RequestParams
|
|
16
|
-
# Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`.
|
|
17
|
-
attr_accessor :trial_end
|
|
18
|
-
# The ID of the trial offer to apply to the subscription item.
|
|
19
|
-
attr_accessor :trial_offer
|
|
20
|
-
|
|
21
|
-
def initialize(trial_end: nil, trial_offer: nil)
|
|
22
|
-
@trial_end = trial_end
|
|
23
|
-
@trial_offer = trial_offer
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
15
|
class Discount < ::Stripe::RequestParams
|
|
28
|
-
class DiscountEnd < ::Stripe::RequestParams
|
|
29
|
-
class Duration < ::Stripe::RequestParams
|
|
30
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
31
|
-
attr_accessor :interval
|
|
32
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
33
|
-
attr_accessor :interval_count
|
|
34
|
-
|
|
35
|
-
def initialize(interval: nil, interval_count: nil)
|
|
36
|
-
@interval = interval
|
|
37
|
-
@interval_count = interval_count
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
# Time span for the redeemed discount.
|
|
41
|
-
attr_accessor :duration
|
|
42
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
43
|
-
attr_accessor :timestamp
|
|
44
|
-
# The type of calculation made to determine when the discount ends.
|
|
45
|
-
attr_accessor :type
|
|
46
|
-
|
|
47
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
48
|
-
@duration = duration
|
|
49
|
-
@timestamp = timestamp
|
|
50
|
-
@type = type
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
16
|
# ID of the coupon to create a new discount for.
|
|
54
17
|
attr_accessor :coupon
|
|
55
18
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
56
19
|
attr_accessor :discount
|
|
57
|
-
# Details to determine how long the discount should be applied for.
|
|
58
|
-
attr_accessor :discount_end
|
|
59
20
|
# ID of the promotion code to create a new discount for.
|
|
60
21
|
attr_accessor :promotion_code
|
|
61
22
|
|
|
62
|
-
def initialize(coupon: nil, discount: nil,
|
|
23
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
63
24
|
@coupon = coupon
|
|
64
25
|
@discount = discount
|
|
65
|
-
@discount_end = discount_end
|
|
66
26
|
@promotion_code = promotion_code
|
|
67
27
|
end
|
|
68
28
|
end
|
|
@@ -114,8 +74,6 @@ module Stripe
|
|
|
114
74
|
end
|
|
115
75
|
# 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.
|
|
116
76
|
attr_accessor :billing_thresholds
|
|
117
|
-
# The trial offer to apply to this subscription item.
|
|
118
|
-
attr_accessor :current_trial
|
|
119
77
|
# The coupons to redeem into discounts for the subscription item.
|
|
120
78
|
attr_accessor :discounts
|
|
121
79
|
# Specifies which fields in the response should be expanded.
|
|
@@ -124,13 +82,7 @@ module Stripe
|
|
|
124
82
|
attr_accessor :metadata
|
|
125
83
|
# Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
|
|
126
84
|
attr_accessor :off_session
|
|
127
|
-
#
|
|
128
|
-
#
|
|
129
|
-
# Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://docs.stripe.com/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
|
|
130
|
-
#
|
|
131
|
-
# Use `pending_if_incomplete` to update the subscription using [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://docs.stripe.com/billing/pending-updates-reference#supported-attributes).
|
|
132
|
-
#
|
|
133
|
-
# Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
|
|
85
|
+
# Controls how Stripe handles payment when a subscription update requires payment and `collection_method=charge_automatically`.
|
|
134
86
|
attr_accessor :payment_behavior
|
|
135
87
|
# The identifier of the new plan for this subscription item.
|
|
136
88
|
attr_accessor :plan
|
|
@@ -149,7 +101,6 @@ module Stripe
|
|
|
149
101
|
|
|
150
102
|
def initialize(
|
|
151
103
|
billing_thresholds: nil,
|
|
152
|
-
current_trial: nil,
|
|
153
104
|
discounts: nil,
|
|
154
105
|
expand: nil,
|
|
155
106
|
metadata: nil,
|
|
@@ -164,7 +115,6 @@ module Stripe
|
|
|
164
115
|
tax_rates: nil
|
|
165
116
|
)
|
|
166
117
|
@billing_thresholds = billing_thresholds
|
|
167
|
-
@current_trial = current_trial
|
|
168
118
|
@discounts = discounts
|
|
169
119
|
@expand = expand
|
|
170
120
|
@metadata = metadata
|