stripe 15.6.0.pre.beta.1 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stripe/api_requestor.rb +5 -34
- data/lib/stripe/api_resource.rb +3 -0
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -60
- data/lib/stripe/event_types.rb +20 -108
- data/lib/stripe/events/unknown_event_notification.rb +19 -0
- data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +115 -15
- data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +93 -6
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +35 -12
- data/lib/stripe/object_types.rb +2 -54
- data/lib/stripe/params/account_capability_list_params.rb +13 -0
- data/lib/stripe/params/account_capability_retrieve_params.rb +13 -0
- data/lib/stripe/params/account_capability_update_params.rb +18 -0
- data/lib/stripe/params/account_create_params.rb +2083 -0
- data/lib/stripe/params/account_delete_params.rb +6 -0
- data/lib/stripe/params/account_external_account_create_params.rb +134 -0
- data/lib/stripe/params/account_external_account_delete_params.rb +6 -0
- data/lib/stripe/params/account_external_account_list_params.rb +25 -0
- data/lib/stripe/params/account_external_account_retrieve_params.rb +13 -0
- data/lib/stripe/params/account_external_account_update_params.rb +91 -0
- data/lib/stripe/params/account_link_create_params.rb +52 -0
- data/lib/stripe/params/account_list_params.rb +42 -0
- data/lib/stripe/params/account_login_link_create_params.rb +13 -0
- data/lib/stripe/params/account_person_create_params.rb +435 -0
- data/lib/stripe/params/account_person_delete_params.rb +6 -0
- data/lib/stripe/params/account_person_list_params.rb +61 -0
- data/lib/stripe/params/account_person_retrieve_params.rb +13 -0
- data/lib/stripe/params/account_person_update_params.rb +435 -0
- data/lib/stripe/params/account_persons_params.rb +61 -0
- data/lib/stripe/params/account_reject_params.rb +16 -0
- data/lib/stripe/params/account_retrieve_current_params.rb +13 -0
- data/lib/stripe/params/account_retrieve_params.rb +13 -0
- data/lib/stripe/params/account_session_create_params.rb +598 -0
- data/lib/stripe/params/account_update_params.rb +2030 -0
- data/lib/stripe/params/apple_pay_domain_create_params.rb +16 -0
- data/lib/stripe/params/apple_pay_domain_delete_params.rb +6 -0
- data/lib/stripe/params/apple_pay_domain_list_params.rb +31 -0
- data/lib/stripe/params/apple_pay_domain_retrieve_params.rb +13 -0
- data/lib/stripe/params/application_fee_list_params.rb +52 -0
- data/lib/stripe/params/application_fee_refund_create_params.rb +19 -0
- data/lib/stripe/params/application_fee_refund_list_params.rb +22 -0
- data/lib/stripe/params/application_fee_refund_retrieve_params.rb +13 -0
- data/lib/stripe/params/application_fee_refund_update_params.rb +16 -0
- data/lib/stripe/params/application_fee_retrieve_params.rb +13 -0
- data/lib/stripe/params/apps/secret_create_params.rb +38 -0
- data/lib/stripe/params/apps/secret_delete_where_params.rb +32 -0
- data/lib/stripe/params/apps/secret_find_params.rb +32 -0
- data/lib/stripe/{services/quote_line_service.rb → params/apps/secret_list_params.rb} +17 -14
- data/lib/stripe/params/balance_retrieve_params.rb +13 -0
- data/lib/stripe/params/balance_settings_retrieve_params.rb +13 -0
- data/lib/stripe/params/balance_settings_update_params.rb +67 -0
- data/lib/stripe/params/balance_transaction_list_params.rb +64 -0
- data/lib/stripe/params/balance_transaction_retrieve_params.rb +13 -0
- data/lib/stripe/params/billing/alert_activate_params.rb +15 -0
- data/lib/stripe/params/billing/alert_archive_params.rb +15 -0
- data/lib/stripe/params/billing/alert_create_params.rb +52 -0
- data/lib/stripe/params/billing/alert_deactivate_params.rb +15 -0
- data/lib/stripe/params/billing/alert_list_params.rb +37 -0
- data/lib/stripe/params/billing/alert_retrieve_params.rb +15 -0
- data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +54 -0
- data/lib/stripe/params/billing/credit_balance_transaction_list_params.rb +37 -0
- data/lib/stripe/params/billing/credit_balance_transaction_retrieve_params.rb +15 -0
- data/lib/stripe/params/billing/credit_grant_create_params.rb +103 -0
- data/lib/stripe/params/billing/credit_grant_expire_params.rb +15 -0
- data/lib/stripe/params/billing/credit_grant_list_params.rb +33 -0
- data/lib/stripe/params/billing/credit_grant_retrieve_params.rb +15 -0
- data/lib/stripe/params/billing/credit_grant_update_params.rb +21 -0
- data/lib/stripe/params/billing/credit_grant_void_grant_params.rb +15 -0
- data/lib/stripe/params/billing/meter_create_params.rb +70 -0
- data/lib/stripe/params/billing/meter_deactivate_params.rb +15 -0
- data/lib/stripe/params/billing/meter_event_adjustment_create_params.rb +32 -0
- data/lib/stripe/params/billing/meter_event_create_params.rb +27 -0
- data/lib/stripe/params/billing/meter_event_summary_list_params.rb +45 -0
- data/lib/stripe/params/billing/meter_list_params.rb +27 -0
- data/lib/stripe/params/billing/meter_reactivate_params.rb +15 -0
- data/lib/stripe/params/billing/meter_retrieve_params.rb +15 -0
- data/lib/stripe/params/billing/meter_update_params.rb +18 -0
- data/lib/stripe/params/billing_portal/configuration_create_params.rb +225 -0
- data/lib/stripe/params/billing_portal/configuration_list_params.rb +37 -0
- data/lib/stripe/params/billing_portal/configuration_retrieve_params.rb +15 -0
- data/lib/stripe/params/billing_portal/configuration_update_params.rb +231 -0
- data/lib/stripe/params/billing_portal/session_create_params.rb +179 -0
- data/lib/stripe/params/charge_capture_params.rb +57 -0
- data/lib/stripe/params/charge_create_params.rb +172 -0
- data/lib/stripe/params/charge_list_params.rb +60 -0
- data/lib/stripe/params/charge_retrieve_params.rb +13 -0
- data/lib/stripe/params/charge_search_params.rb +22 -0
- data/lib/stripe/params/charge_update_params.rb +102 -0
- data/lib/stripe/params/checkout/session_create_params.rb +2445 -0
- data/lib/stripe/params/checkout/session_expire_params.rb +15 -0
- data/lib/stripe/{services/quote_preview_subscription_schedule_service.rb → params/checkout/session_line_item_list_params.rb} +2 -13
- data/lib/stripe/{services/order_line_item_service.rb → params/checkout/session_list_line_items_params.rb} +2 -13
- data/lib/stripe/params/checkout/session_list_params.rb +83 -0
- data/lib/stripe/params/checkout/session_retrieve_params.rb +15 -0
- data/lib/stripe/params/checkout/session_update_params.rb +179 -0
- data/lib/stripe/params/climate/order_cancel_params.rb +15 -0
- data/lib/stripe/params/climate/order_create_params.rb +49 -0
- data/lib/stripe/params/climate/order_list_params.rb +24 -0
- data/lib/stripe/params/climate/order_retrieve_params.rb +15 -0
- data/lib/stripe/params/climate/order_update_params.rb +29 -0
- data/lib/stripe/params/climate/product_list_params.rb +24 -0
- data/lib/stripe/params/climate/product_retrieve_params.rb +15 -0
- data/lib/stripe/params/climate/supplier_list_params.rb +24 -0
- data/lib/stripe/params/climate/supplier_retrieve_params.rb +15 -0
- data/lib/stripe/params/confirmation_token_create_params.rb +650 -0
- data/lib/stripe/params/confirmation_token_retrieve_params.rb +13 -0
- data/lib/stripe/params/country_spec_list_params.rb +22 -0
- data/lib/stripe/params/country_spec_retrieve_params.rb +13 -0
- data/lib/stripe/params/coupon_create_params.rb +80 -0
- data/lib/stripe/params/coupon_delete_params.rb +6 -0
- data/lib/stripe/params/coupon_list_params.rb +42 -0
- data/lib/stripe/params/coupon_retrieve_params.rb +13 -0
- data/lib/stripe/params/coupon_update_params.rb +30 -0
- data/lib/stripe/params/credit_note_create_params.rb +144 -0
- data/lib/stripe/params/credit_note_line_item_list_params.rb +22 -0
- data/lib/stripe/params/credit_note_list_params.rb +56 -0
- data/lib/stripe/params/credit_note_list_preview_line_items_params.rb +156 -0
- data/lib/stripe/params/credit_note_preview_lines_list_params.rb +156 -0
- data/lib/stripe/params/credit_note_preview_params.rb +144 -0
- data/lib/stripe/params/credit_note_retrieve_params.rb +13 -0
- data/lib/stripe/params/credit_note_update_params.rb +19 -0
- data/lib/stripe/params/credit_note_void_credit_note_params.rb +13 -0
- data/lib/stripe/params/customer_balance_transaction_create_params.rb +25 -0
- data/lib/stripe/params/customer_balance_transaction_list_params.rb +22 -0
- data/lib/stripe/params/customer_balance_transaction_retrieve_params.rb +13 -0
- data/lib/stripe/params/customer_balance_transaction_update_params.rb +19 -0
- data/lib/stripe/params/customer_cash_balance_retrieve_params.rb +13 -0
- data/lib/stripe/params/customer_cash_balance_transaction_list_params.rb +22 -0
- data/lib/stripe/params/customer_cash_balance_transaction_retrieve_params.rb +13 -0
- data/lib/stripe/params/customer_cash_balance_update_params.rb +24 -0
- data/lib/stripe/params/customer_create_funding_instructions_params.rb +46 -0
- data/lib/stripe/params/customer_create_params.rb +259 -0
- data/lib/stripe/params/customer_delete_discount_params.rb +6 -0
- data/lib/stripe/params/customer_delete_params.rb +6 -0
- data/lib/stripe/params/customer_fund_cash_balance_params.rb +22 -0
- data/lib/stripe/params/customer_funding_instructions_create_params.rb +46 -0
- data/lib/stripe/params/customer_list_params.rb +56 -0
- data/lib/stripe/params/customer_list_payment_methods_params.rb +35 -0
- data/lib/stripe/params/customer_payment_method_list_params.rb +35 -0
- data/lib/stripe/params/customer_payment_method_retrieve_params.rb +13 -0
- data/lib/stripe/params/customer_payment_source_create_params.rb +22 -0
- data/lib/stripe/params/customer_payment_source_delete_params.rb +13 -0
- data/lib/stripe/params/customer_payment_source_list_params.rb +25 -0
- data/lib/stripe/params/customer_payment_source_retrieve_params.rb +13 -0
- data/lib/stripe/params/customer_payment_source_update_params.rb +114 -0
- data/lib/stripe/params/customer_payment_source_verify_params.rb +16 -0
- data/lib/stripe/params/customer_retrieve_params.rb +13 -0
- data/lib/stripe/params/customer_retrieve_payment_method_params.rb +13 -0
- data/lib/stripe/params/customer_search_params.rb +22 -0
- data/lib/stripe/params/customer_session_create_params.rb +100 -0
- data/lib/stripe/params/customer_tax_id_create_params.rb +19 -0
- data/lib/stripe/params/customer_tax_id_delete_params.rb +6 -0
- data/lib/stripe/params/customer_tax_id_list_params.rb +22 -0
- data/lib/stripe/params/customer_tax_id_retrieve_params.rb +13 -0
- data/lib/stripe/params/customer_update_params.rb +243 -0
- data/lib/stripe/params/dispute_close_params.rb +13 -0
- data/lib/stripe/params/dispute_list_params.rb +56 -0
- data/lib/stripe/params/dispute_retrieve_params.rb +13 -0
- data/lib/stripe/params/dispute_update_params.rb +308 -0
- data/lib/stripe/params/entitlements/active_entitlement_list_params.rb +33 -0
- data/lib/stripe/params/entitlements/active_entitlement_retrieve_params.rb +15 -0
- data/lib/stripe/params/entitlements/feature_create_params.rb +24 -0
- data/lib/stripe/params/entitlements/feature_list_params.rb +37 -0
- data/lib/stripe/params/entitlements/feature_retrieve_params.rb +15 -0
- data/lib/stripe/params/entitlements/feature_update_params.rb +24 -0
- data/lib/stripe/params/ephemeral_key_create_params.rb +31 -0
- data/lib/stripe/params/ephemeral_key_delete_params.rb +13 -0
- data/lib/stripe/params/event_list_params.rb +60 -0
- data/lib/stripe/params/event_retrieve_params.rb +13 -0
- data/lib/stripe/params/exchange_rate_list_params.rb +22 -0
- data/lib/stripe/params/exchange_rate_retrieve_params.rb +13 -0
- data/lib/stripe/params/file_create_params.rb +36 -0
- data/lib/stripe/params/file_link_create_params.rb +22 -0
- data/lib/stripe/params/file_link_list_params.rb +56 -0
- data/lib/stripe/params/file_link_retrieve_params.rb +13 -0
- data/lib/stripe/params/file_link_update_params.rb +19 -0
- data/lib/stripe/params/file_list_params.rb +52 -0
- data/lib/stripe/params/file_retrieve_params.rb +13 -0
- data/lib/stripe/params/financial_connections/account_disconnect_params.rb +15 -0
- data/lib/stripe/params/financial_connections/account_list_owners_params.rb +33 -0
- data/lib/stripe/params/financial_connections/account_list_params.rb +48 -0
- data/lib/stripe/params/financial_connections/account_owner_list_params.rb +33 -0
- data/lib/stripe/params/financial_connections/account_refresh_account_params.rb +18 -0
- data/lib/stripe/params/financial_connections/account_refresh_params.rb +18 -0
- data/lib/stripe/params/financial_connections/account_retrieve_params.rb +15 -0
- data/lib/stripe/params/financial_connections/account_subscribe_params.rb +18 -0
- data/lib/stripe/params/financial_connections/account_unsubscribe_params.rb +18 -0
- data/lib/stripe/params/financial_connections/session_create_params.rb +65 -0
- data/lib/stripe/params/financial_connections/session_retrieve_params.rb +15 -0
- data/lib/stripe/params/financial_connections/transaction_list_params.rb +67 -0
- data/lib/stripe/params/financial_connections/transaction_retrieve_params.rb +15 -0
- data/lib/stripe/params/forwarding/request_create_params.rb +59 -0
- data/lib/stripe/params/forwarding/request_list_params.rb +44 -0
- data/lib/stripe/params/forwarding/request_retrieve_params.rb +15 -0
- data/lib/stripe/params/identity/verification_report_list_params.rb +62 -0
- data/lib/stripe/params/identity/verification_report_retrieve_params.rb +15 -0
- data/lib/stripe/params/identity/verification_session_cancel_params.rb +15 -0
- data/lib/stripe/params/identity/verification_session_create_params.rb +107 -0
- data/lib/stripe/params/identity/verification_session_list_params.rb +62 -0
- data/lib/stripe/params/identity/verification_session_redact_params.rb +15 -0
- data/lib/stripe/params/identity/verification_session_retrieve_params.rb +15 -0
- data/lib/stripe/params/identity/verification_session_update_params.rb +69 -0
- data/lib/stripe/params/invoice_add_lines_params.rb +231 -0
- data/lib/stripe/params/invoice_attach_payment_params.rb +16 -0
- data/lib/stripe/params/invoice_create_params.rb +589 -0
- data/lib/stripe/params/invoice_create_preview_params.rb +993 -0
- data/lib/stripe/params/invoice_delete_params.rb +6 -0
- data/lib/stripe/params/invoice_finalize_invoice_params.rb +16 -0
- data/lib/stripe/params/invoice_item_create_params.rb +145 -0
- data/lib/stripe/params/invoice_item_delete_params.rb +6 -0
- data/lib/stripe/params/invoice_item_list_params.rb +60 -0
- data/lib/stripe/params/invoice_item_retrieve_params.rb +13 -0
- data/lib/stripe/params/invoice_item_update_params.rb +129 -0
- data/lib/stripe/params/invoice_line_item_list_params.rb +22 -0
- data/lib/stripe/params/invoice_line_item_update_params.rb +217 -0
- data/lib/stripe/params/invoice_list_params.rb +86 -0
- data/lib/stripe/params/invoice_mark_uncollectible_params.rb +13 -0
- data/lib/stripe/params/invoice_pay_params.rb +41 -0
- data/lib/stripe/params/invoice_payment_list_params.rb +50 -0
- data/lib/stripe/params/invoice_payment_retrieve_params.rb +13 -0
- data/lib/stripe/params/invoice_remove_lines_params.rb +30 -0
- data/lib/stripe/params/invoice_rendering_template_archive_params.rb +13 -0
- data/lib/stripe/params/invoice_rendering_template_list_params.rb +25 -0
- data/lib/stripe/params/invoice_rendering_template_retrieve_params.rb +16 -0
- data/lib/stripe/params/invoice_rendering_template_unarchive_params.rb +13 -0
- data/lib/stripe/params/invoice_retrieve_params.rb +13 -0
- data/lib/stripe/params/invoice_search_params.rb +22 -0
- data/lib/stripe/params/invoice_send_invoice_params.rb +13 -0
- data/lib/stripe/params/invoice_update_lines_params.rb +231 -0
- data/lib/stripe/params/invoice_update_params.rb +557 -0
- data/lib/stripe/params/invoice_void_invoice_params.rb +13 -0
- data/lib/stripe/params/issuing/authorization_approve_params.rb +21 -0
- data/lib/stripe/params/issuing/authorization_capture_params.rb +265 -0
- data/lib/stripe/params/issuing/authorization_create_params.rb +357 -0
- data/lib/stripe/params/issuing/authorization_decline_params.rb +18 -0
- data/lib/stripe/params/issuing/authorization_expire_params.rb +15 -0
- data/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +143 -0
- data/lib/stripe/params/issuing/authorization_increment_params.rb +21 -0
- data/lib/stripe/params/issuing/authorization_list_params.rb +62 -0
- data/lib/stripe/params/issuing/authorization_respond_params.rb +18 -0
- data/lib/stripe/params/issuing/authorization_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/authorization_reverse_params.rb +18 -0
- data/lib/stripe/params/issuing/authorization_update_params.rb +18 -0
- data/lib/stripe/params/issuing/card_create_params.rb +213 -0
- data/lib/stripe/params/issuing/card_deliver_card_params.rb +15 -0
- data/lib/stripe/params/issuing/card_fail_card_params.rb +15 -0
- data/lib/stripe/params/issuing/card_list_params.rb +78 -0
- data/lib/stripe/params/issuing/card_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/card_return_card_params.rb +15 -0
- data/lib/stripe/params/issuing/card_ship_card_params.rb +15 -0
- data/lib/stripe/params/issuing/card_submit_card_params.rb +15 -0
- data/lib/stripe/params/issuing/card_update_params.rb +181 -0
- data/lib/stripe/params/issuing/cardholder_create_params.rb +238 -0
- data/lib/stripe/params/issuing/cardholder_list_params.rb +66 -0
- data/lib/stripe/params/issuing/cardholder_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/cardholder_update_params.rb +230 -0
- data/lib/stripe/params/issuing/dispute_create_params.rb +297 -0
- data/lib/stripe/params/issuing/dispute_list_params.rb +58 -0
- data/lib/stripe/params/issuing/dispute_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/dispute_submit_params.rb +18 -0
- data/lib/stripe/params/issuing/dispute_update_params.rb +275 -0
- data/lib/stripe/params/issuing/personalization_design_activate_params.rb +15 -0
- data/lib/stripe/params/issuing/personalization_design_create_params.rb +75 -0
- data/lib/stripe/params/issuing/personalization_design_deactivate_params.rb +15 -0
- data/lib/stripe/params/issuing/personalization_design_list_params.rb +52 -0
- data/lib/stripe/params/issuing/personalization_design_reject_params.rb +29 -0
- data/lib/stripe/params/issuing/personalization_design_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/personalization_design_update_params.rb +75 -0
- data/lib/stripe/params/issuing/physical_bundle_list_params.rb +37 -0
- data/lib/stripe/params/issuing/physical_bundle_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/token_list_params.rb +58 -0
- data/lib/stripe/params/issuing/token_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/token_update_params.rb +18 -0
- data/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +316 -0
- data/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +316 -0
- data/lib/stripe/params/issuing/transaction_list_params.rb +62 -0
- data/lib/stripe/params/issuing/transaction_refund_params.rb +18 -0
- data/lib/stripe/params/issuing/transaction_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/transaction_update_params.rb +18 -0
- data/lib/stripe/params/mandate_retrieve_params.rb +13 -0
- data/lib/stripe/params/payment_intent_apply_customer_balance_params.rb +23 -0
- data/lib/stripe/params/payment_intent_cancel_params.rb +16 -0
- data/lib/stripe/params/payment_intent_capture_params.rb +54 -0
- data/lib/stripe/params/payment_intent_confirm_params.rb +2379 -0
- data/lib/stripe/params/payment_intent_create_params.rb +2480 -0
- data/lib/stripe/params/payment_intent_increment_authorization_params.rb +48 -0
- data/lib/stripe/params/payment_intent_list_params.rb +52 -0
- data/lib/stripe/params/payment_intent_retrieve_params.rb +16 -0
- data/lib/stripe/params/payment_intent_search_params.rb +22 -0
- data/lib/stripe/params/payment_intent_update_params.rb +2353 -0
- data/lib/stripe/params/payment_intent_verify_microdeposits_params.rb +19 -0
- data/lib/stripe/params/payment_link_create_params.rb +776 -0
- data/lib/stripe/params/payment_link_line_item_list_params.rb +22 -0
- data/lib/stripe/params/payment_link_list_line_items_params.rb +22 -0
- data/lib/stripe/params/payment_link_list_params.rb +25 -0
- data/lib/stripe/params/payment_link_retrieve_params.rb +13 -0
- data/lib/stripe/params/payment_link_update_params.rb +564 -0
- data/lib/stripe/params/payment_method_attach_params.rb +16 -0
- data/lib/stripe/params/payment_method_configuration_create_params.rb +1135 -0
- data/lib/stripe/params/payment_method_configuration_list_params.rb +31 -0
- data/lib/stripe/params/payment_method_configuration_retrieve_params.rb +13 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +1135 -0
- data/lib/stripe/params/payment_method_create_params.rb +583 -0
- data/lib/stripe/params/payment_method_detach_params.rb +13 -0
- data/lib/stripe/params/payment_method_domain_create_params.rb +19 -0
- data/lib/stripe/params/payment_method_domain_list_params.rb +35 -0
- data/lib/stripe/params/payment_method_domain_retrieve_params.rb +13 -0
- data/lib/stripe/params/payment_method_domain_update_params.rb +16 -0
- data/lib/stripe/params/payment_method_domain_validate_params.rb +13 -0
- data/lib/stripe/params/payment_method_list_params.rb +35 -0
- data/lib/stripe/params/payment_method_retrieve_params.rb +13 -0
- data/lib/stripe/params/payment_method_update_params.rb +120 -0
- data/lib/stripe/params/payout_cancel_params.rb +13 -0
- data/lib/stripe/params/payout_create_params.rb +51 -0
- data/lib/stripe/params/payout_list_params.rb +78 -0
- data/lib/stripe/params/payout_retrieve_params.rb +13 -0
- data/lib/stripe/params/payout_reverse_params.rb +16 -0
- data/lib/stripe/params/payout_update_params.rb +16 -0
- data/lib/stripe/params/plan_create_params.rb +158 -0
- data/lib/stripe/params/plan_delete_params.rb +6 -0
- data/lib/stripe/params/plan_list_params.rb +56 -0
- data/lib/stripe/params/plan_retrieve_params.rb +13 -0
- data/lib/stripe/params/plan_update_params.rb +35 -0
- data/lib/stripe/params/price_create_params.rb +278 -0
- data/lib/stripe/params/price_list_params.rb +87 -0
- data/lib/stripe/params/price_retrieve_params.rb +13 -0
- data/lib/stripe/params/price_search_params.rb +22 -0
- data/lib/stripe/params/price_update_params.rb +113 -0
- data/lib/stripe/params/product_create_params.rb +243 -0
- data/lib/stripe/params/product_delete_params.rb +6 -0
- data/lib/stripe/params/product_feature_create_params.rb +16 -0
- data/lib/stripe/params/product_feature_delete_params.rb +6 -0
- data/lib/stripe/params/product_feature_list_params.rb +22 -0
- data/lib/stripe/params/product_feature_retrieve_params.rb +13 -0
- data/lib/stripe/params/product_list_params.rb +68 -0
- data/lib/stripe/params/product_retrieve_params.rb +13 -0
- data/lib/stripe/params/product_search_params.rb +22 -0
- data/lib/stripe/params/product_update_params.rb +96 -0
- data/lib/stripe/params/promotion_code_create_params.rb +91 -0
- data/lib/stripe/params/promotion_code_list_params.rb +64 -0
- data/lib/stripe/params/promotion_code_retrieve_params.rb +13 -0
- data/lib/stripe/params/promotion_code_update_params.rb +38 -0
- data/lib/stripe/params/quote_accept_params.rb +13 -0
- data/lib/stripe/params/quote_cancel_params.rb +13 -0
- data/lib/stripe/params/quote_computed_upfront_line_items_list_params.rb +22 -0
- data/lib/stripe/params/quote_create_params.rb +301 -0
- data/lib/stripe/params/quote_finalize_quote_params.rb +16 -0
- data/lib/stripe/params/quote_line_item_list_params.rb +22 -0
- data/lib/stripe/params/quote_list_computed_upfront_line_items_params.rb +22 -0
- data/lib/stripe/params/quote_list_line_items_params.rb +22 -0
- data/lib/stripe/params/quote_list_params.rb +39 -0
- data/lib/stripe/params/quote_pdf_params.rb +13 -0
- data/lib/stripe/params/quote_retrieve_params.rb +13 -0
- data/lib/stripe/params/quote_update_params.rb +263 -0
- data/lib/stripe/params/radar/early_fraud_warning_list_params.rb +58 -0
- data/lib/stripe/params/radar/early_fraud_warning_retrieve_params.rb +15 -0
- data/lib/stripe/params/radar/value_list_create_params.rb +27 -0
- data/lib/stripe/params/radar/value_list_delete_params.rb +8 -0
- data/lib/stripe/params/radar/value_list_item_create_params.rb +21 -0
- data/lib/stripe/params/radar/value_list_item_delete_params.rb +8 -0
- data/lib/stripe/params/radar/value_list_item_list_params.rb +58 -0
- data/lib/stripe/params/radar/value_list_item_retrieve_params.rb +15 -0
- data/lib/stripe/params/radar/value_list_list_params.rb +58 -0
- data/lib/stripe/params/radar/value_list_retrieve_params.rb +15 -0
- data/lib/stripe/params/radar/value_list_update_params.rb +24 -0
- data/lib/stripe/params/refund_cancel_params.rb +13 -0
- data/lib/stripe/params/refund_create_params.rb +59 -0
- data/lib/stripe/params/refund_expire_params.rb +13 -0
- data/lib/stripe/params/refund_list_params.rb +56 -0
- data/lib/stripe/params/refund_retrieve_params.rb +13 -0
- data/lib/stripe/params/refund_update_params.rb +16 -0
- data/lib/stripe/params/reporting/report_run_create_params.rb +59 -0
- data/lib/stripe/params/reporting/report_run_list_params.rb +44 -0
- data/lib/stripe/params/reporting/report_run_retrieve_params.rb +15 -0
- data/lib/stripe/params/reporting/report_type_list_params.rb +15 -0
- data/lib/stripe/params/reporting/report_type_retrieve_params.rb +15 -0
- data/lib/stripe/params/review_approve_params.rb +13 -0
- data/lib/stripe/params/review_list_params.rb +42 -0
- data/lib/stripe/params/review_retrieve_params.rb +13 -0
- data/lib/stripe/params/setup_attempt_list_params.rb +55 -0
- data/lib/stripe/params/setup_intent_cancel_params.rb +16 -0
- data/lib/stripe/params/setup_intent_confirm_params.rb +1050 -0
- data/lib/stripe/params/setup_intent_create_params.rb +1130 -0
- data/lib/stripe/params/setup_intent_list_params.rb +62 -0
- data/lib/stripe/params/setup_intent_retrieve_params.rb +16 -0
- data/lib/stripe/params/setup_intent_update_params.rb +1025 -0
- data/lib/stripe/params/setup_intent_verify_microdeposits_params.rb +19 -0
- data/lib/stripe/params/shipping_rate_create_params.rb +103 -0
- data/lib/stripe/params/shipping_rate_list_params.rb +56 -0
- data/lib/stripe/params/shipping_rate_retrieve_params.rb +13 -0
- data/lib/stripe/params/shipping_rate_update_params.rb +44 -0
- data/lib/stripe/params/sigma/scheduled_query_run_list_params.rb +24 -0
- data/lib/stripe/params/sigma/scheduled_query_run_retrieve_params.rb +15 -0
- data/lib/stripe/params/source_create_params.rb +317 -0
- data/lib/stripe/params/source_detach_params.rb +13 -0
- data/lib/stripe/params/source_retrieve_params.rb +16 -0
- data/lib/stripe/params/source_transaction_list_params.rb +22 -0
- data/lib/stripe/params/source_update_params.rb +259 -0
- data/lib/stripe/params/source_verify_params.rb +16 -0
- data/lib/stripe/params/subscription_cancel_params.rb +33 -0
- data/lib/stripe/params/subscription_create_params.rb +704 -0
- data/lib/stripe/params/subscription_delete_discount_params.rb +6 -0
- data/lib/stripe/params/subscription_item_create_params.rb +134 -0
- data/lib/stripe/params/subscription_item_delete_params.rb +19 -0
- data/lib/stripe/params/subscription_item_list_params.rb +31 -0
- data/lib/stripe/params/subscription_item_retrieve_params.rb +13 -0
- data/lib/stripe/params/subscription_item_update_params.rb +134 -0
- data/lib/stripe/params/subscription_list_params.rb +129 -0
- data/lib/stripe/params/subscription_migrate_params.rb +35 -0
- data/lib/stripe/params/subscription_resume_params.rb +27 -0
- data/lib/stripe/params/subscription_retrieve_params.rb +13 -0
- data/lib/stripe/params/subscription_schedule_cancel_params.rb +19 -0
- data/lib/stripe/params/subscription_schedule_create_params.rb +590 -0
- data/lib/stripe/params/subscription_schedule_list_params.rb +122 -0
- data/lib/stripe/params/subscription_schedule_release_params.rb +16 -0
- data/lib/stripe/params/subscription_schedule_retrieve_params.rb +13 -0
- data/lib/stripe/params/subscription_schedule_update_params.rb +562 -0
- data/lib/stripe/params/subscription_search_params.rb +22 -0
- data/lib/stripe/params/subscription_update_params.rb +683 -0
- data/lib/stripe/params/tax/calculation_create_params.rb +206 -0
- data/lib/stripe/params/tax/calculation_line_item_list_params.rb +24 -0
- data/lib/stripe/{services/quote_preview_invoice_service.rb → params/tax/calculation_list_line_items_params.rb} +2 -13
- data/lib/stripe/params/tax/calculation_retrieve_params.rb +15 -0
- data/lib/stripe/params/tax/registration_create_params.rb +2018 -0
- data/lib/stripe/params/tax/registration_list_params.rb +27 -0
- data/lib/stripe/params/tax/registration_retrieve_params.rb +15 -0
- data/lib/stripe/params/tax/registration_update_params.rb +21 -0
- data/lib/stripe/params/tax/settings_retrieve_params.rb +15 -0
- data/lib/stripe/params/tax/settings_update_params.rb +71 -0
- data/lib/stripe/params/tax/transaction_create_from_calculation_params.rb +27 -0
- data/lib/stripe/params/tax/transaction_create_reversal_params.rb +87 -0
- data/lib/stripe/params/tax/transaction_line_item_list_params.rb +24 -0
- data/lib/stripe/{services/payment_intent_amount_details_line_item_service.rb → params/tax/transaction_list_line_items_params.rb} +2 -13
- data/lib/stripe/params/tax/transaction_retrieve_params.rb +15 -0
- data/lib/stripe/params/tax_code_list_params.rb +22 -0
- data/lib/stripe/params/tax_code_retrieve_params.rb +13 -0
- data/lib/stripe/params/tax_id_create_params.rb +36 -0
- data/lib/stripe/params/tax_id_delete_params.rb +6 -0
- data/lib/stripe/params/tax_id_list_params.rb +39 -0
- data/lib/stripe/params/tax_id_retrieve_params.rb +13 -0
- data/lib/stripe/params/tax_rate_create_params.rb +55 -0
- data/lib/stripe/params/tax_rate_list_params.rb +56 -0
- data/lib/stripe/params/tax_rate_retrieve_params.rb +13 -0
- data/lib/stripe/params/tax_rate_update_params.rb +47 -0
- data/lib/stripe/params/terminal/configuration_create_params.rb +593 -0
- data/lib/stripe/params/terminal/configuration_delete_params.rb +8 -0
- data/lib/stripe/params/terminal/configuration_list_params.rb +33 -0
- data/lib/stripe/params/terminal/configuration_retrieve_params.rb +15 -0
- data/lib/stripe/params/terminal/configuration_update_params.rb +593 -0
- data/lib/stripe/params/terminal/connection_token_create_params.rb +18 -0
- data/lib/stripe/params/terminal/location_create_params.rb +153 -0
- data/lib/stripe/params/terminal/location_delete_params.rb +8 -0
- data/lib/stripe/params/terminal/location_list_params.rb +24 -0
- data/lib/stripe/params/terminal/location_retrieve_params.rb +15 -0
- data/lib/stripe/params/terminal/location_update_params.rb +153 -0
- data/lib/stripe/params/terminal/reader_cancel_action_params.rb +15 -0
- data/lib/stripe/params/terminal/reader_collect_inputs_params.rb +96 -0
- data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +51 -0
- data/lib/stripe/params/terminal/reader_confirm_payment_intent_params.rb +29 -0
- data/lib/stripe/params/terminal/reader_create_params.rb +27 -0
- data/lib/stripe/params/terminal/reader_delete_params.rb +8 -0
- data/lib/stripe/params/terminal/reader_list_params.rb +45 -0
- data/lib/stripe/params/terminal/reader_present_payment_method_params.rb +72 -0
- data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +55 -0
- data/lib/stripe/params/terminal/reader_process_setup_intent_params.rb +32 -0
- data/lib/stripe/params/terminal/reader_refund_payment_params.rb +53 -0
- data/lib/stripe/params/terminal/reader_retrieve_params.rb +15 -0
- data/lib/stripe/params/terminal/reader_set_reader_display_params.rb +52 -0
- data/lib/stripe/params/terminal/reader_succeed_input_collection_params.rb +18 -0
- data/lib/stripe/params/terminal/reader_timeout_input_collection_params.rb +15 -0
- data/lib/stripe/params/terminal/reader_update_params.rb +21 -0
- data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +652 -0
- data/lib/stripe/params/test_helpers/customer_fund_cash_balance_params.rb +24 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +267 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +359 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_expire_params.rb +17 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +145 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_increment_params.rb +23 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_respond_params.rb +20 -0
- data/lib/stripe/params/test_helpers/issuing/authorization_reverse_params.rb +20 -0
- data/lib/stripe/params/test_helpers/issuing/card_deliver_card_params.rb +17 -0
- data/lib/stripe/params/test_helpers/issuing/card_fail_card_params.rb +17 -0
- data/lib/stripe/params/test_helpers/issuing/card_return_card_params.rb +17 -0
- data/lib/stripe/params/test_helpers/issuing/card_ship_card_params.rb +17 -0
- data/lib/stripe/params/test_helpers/issuing/card_submit_card_params.rb +17 -0
- data/lib/stripe/params/test_helpers/issuing/personalization_design_activate_params.rb +17 -0
- data/lib/stripe/params/test_helpers/issuing/personalization_design_deactivate_params.rb +17 -0
- data/lib/stripe/params/test_helpers/issuing/personalization_design_reject_params.rb +31 -0
- data/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +318 -0
- data/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +318 -0
- data/lib/stripe/params/test_helpers/issuing/transaction_refund_params.rb +20 -0
- data/lib/stripe/params/test_helpers/refund_expire_params.rb +15 -0
- data/lib/stripe/params/test_helpers/terminal/reader_present_payment_method_params.rb +74 -0
- data/lib/stripe/params/test_helpers/terminal/reader_succeed_input_collection_params.rb +20 -0
- data/lib/stripe/params/test_helpers/terminal/reader_timeout_input_collection_params.rb +17 -0
- data/lib/stripe/params/test_helpers/test_clock_advance_params.rb +18 -0
- data/lib/stripe/params/test_helpers/test_clock_create_params.rb +21 -0
- data/lib/stripe/params/test_helpers/test_clock_delete_params.rb +8 -0
- data/lib/stripe/params/test_helpers/test_clock_list_params.rb +24 -0
- data/lib/stripe/params/test_helpers/test_clock_retrieve_params.rb +15 -0
- data/lib/stripe/params/test_helpers/treasury/inbound_transfer_fail_params.rb +28 -0
- data/lib/stripe/params/test_helpers/treasury/inbound_transfer_return_inbound_transfer_params.rb +17 -0
- data/lib/stripe/params/test_helpers/treasury/inbound_transfer_succeed_params.rb +17 -0
- data/lib/stripe/params/test_helpers/treasury/outbound_payment_fail_params.rb +17 -0
- data/lib/stripe/params/test_helpers/treasury/outbound_payment_post_params.rb +17 -0
- data/lib/stripe/params/test_helpers/treasury/outbound_payment_return_outbound_payment_params.rb +28 -0
- data/lib/stripe/params/test_helpers/treasury/outbound_payment_update_params.rb +57 -0
- data/lib/stripe/params/test_helpers/treasury/outbound_transfer_fail_params.rb +17 -0
- data/lib/stripe/params/test_helpers/treasury/outbound_transfer_post_params.rb +17 -0
- data/lib/stripe/params/test_helpers/treasury/outbound_transfer_return_outbound_transfer_params.rb +28 -0
- data/lib/stripe/params/test_helpers/treasury/outbound_transfer_update_params.rb +57 -0
- data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +68 -0
- data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +68 -0
- data/lib/stripe/params/token_create_params.rb +1191 -0
- data/lib/stripe/params/token_retrieve_params.rb +13 -0
- data/lib/stripe/params/topup_cancel_params.rb +13 -0
- data/lib/stripe/params/topup_create_params.rb +43 -0
- data/lib/stripe/params/topup_list_params.rb +74 -0
- data/lib/stripe/params/topup_retrieve_params.rb +13 -0
- data/lib/stripe/params/topup_update_params.rb +19 -0
- data/lib/stripe/params/transfer_create_params.rb +47 -0
- data/lib/stripe/params/transfer_list_params.rb +56 -0
- data/lib/stripe/params/transfer_retrieve_params.rb +13 -0
- data/lib/stripe/params/transfer_reversal_create_params.rb +31 -0
- data/lib/stripe/params/transfer_reversal_list_params.rb +22 -0
- data/lib/stripe/params/transfer_reversal_retrieve_params.rb +13 -0
- data/lib/stripe/params/transfer_reversal_update_params.rb +16 -0
- data/lib/stripe/params/transfer_update_params.rb +19 -0
- data/lib/stripe/params/treasury/credit_reversal_create_params.rb +21 -0
- data/lib/stripe/params/treasury/credit_reversal_list_params.rb +41 -0
- data/lib/stripe/params/treasury/credit_reversal_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/debit_reversal_create_params.rb +21 -0
- data/lib/stripe/params/treasury/debit_reversal_list_params.rb +45 -0
- data/lib/stripe/params/treasury/debit_reversal_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/financial_account_close_params.rb +32 -0
- data/lib/stripe/params/treasury/financial_account_create_params.rb +201 -0
- data/lib/stripe/params/treasury/financial_account_features_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/financial_account_features_update_params.rb +163 -0
- data/lib/stripe/params/treasury/financial_account_list_params.rb +54 -0
- data/lib/stripe/params/treasury/financial_account_retrieve_features_params.rb +15 -0
- data/lib/stripe/params/treasury/financial_account_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/financial_account_update_features_params.rb +163 -0
- data/lib/stripe/params/treasury/financial_account_update_params.rb +216 -0
- data/lib/stripe/params/treasury/inbound_transfer_cancel_params.rb +15 -0
- data/lib/stripe/params/treasury/inbound_transfer_create_params.rb +45 -0
- data/lib/stripe/params/treasury/inbound_transfer_fail_params.rb +26 -0
- data/lib/stripe/params/treasury/inbound_transfer_list_params.rb +37 -0
- data/lib/stripe/params/treasury/inbound_transfer_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/inbound_transfer_return_inbound_transfer_params.rb +15 -0
- data/lib/stripe/params/treasury/inbound_transfer_succeed_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_payment_cancel_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_payment_create_params.rb +190 -0
- data/lib/stripe/params/treasury/outbound_payment_fail_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_payment_list_params.rb +62 -0
- data/lib/stripe/params/treasury/outbound_payment_post_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_payment_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_payment_return_outbound_payment_params.rb +26 -0
- data/lib/stripe/params/treasury/outbound_payment_update_params.rb +55 -0
- data/lib/stripe/params/treasury/outbound_transfer_cancel_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +81 -0
- data/lib/stripe/params/treasury/outbound_transfer_fail_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_transfer_list_params.rb +37 -0
- data/lib/stripe/params/treasury/outbound_transfer_post_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_transfer_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/outbound_transfer_return_outbound_transfer_params.rb +26 -0
- data/lib/stripe/params/treasury/outbound_transfer_update_params.rb +55 -0
- data/lib/stripe/params/treasury/received_credit_create_params.rb +66 -0
- data/lib/stripe/params/treasury/received_credit_list_params.rb +49 -0
- data/lib/stripe/params/treasury/received_credit_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/received_debit_create_params.rb +66 -0
- data/lib/stripe/params/treasury/received_debit_list_params.rb +37 -0
- data/lib/stripe/params/treasury/received_debit_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/transaction_entry_list_params.rb +84 -0
- data/lib/stripe/params/treasury/transaction_entry_retrieve_params.rb +15 -0
- data/lib/stripe/params/treasury/transaction_list_params.rb +92 -0
- data/lib/stripe/params/treasury/transaction_retrieve_params.rb +15 -0
- data/lib/stripe/params/v2/billing/meter_event_adjustment_create_params.rb +31 -0
- data/lib/stripe/params/v2/billing/meter_event_create_params.rb +33 -0
- data/lib/stripe/params/v2/billing/meter_event_session_create_params.rb +10 -0
- data/lib/stripe/params/v2/billing/meter_event_stream_create_params.rb +41 -0
- data/lib/stripe/params/v2/core/event_destination_create_params.rb +79 -0
- data/lib/stripe/params/v2/core/event_destination_delete_params.rb +10 -0
- data/lib/stripe/params/v2/core/event_destination_disable_params.rb +10 -0
- data/lib/stripe/params/v2/core/event_destination_enable_params.rb +10 -0
- data/lib/stripe/params/v2/core/event_destination_list_params.rb +20 -0
- data/lib/stripe/params/v2/core/event_destination_ping_params.rb +10 -0
- data/lib/stripe/params/v2/core/event_destination_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/core/event_destination_update_params.rb +47 -0
- data/lib/stripe/params/v2/core/event_list_params.rb +22 -0
- data/lib/stripe/params/v2/core/event_retrieve_params.rb +10 -0
- data/lib/stripe/params/webhook_endpoint_create_params.rb +39 -0
- data/lib/stripe/params/webhook_endpoint_delete_params.rb +6 -0
- data/lib/stripe/params/webhook_endpoint_list_params.rb +22 -0
- data/lib/stripe/params/webhook_endpoint_retrieve_params.rb +13 -0
- data/lib/stripe/params/webhook_endpoint_update_params.rb +35 -0
- data/lib/stripe/params.rb +588 -0
- data/lib/stripe/request_options.rb +14 -5
- data/lib/stripe/resources/account.rb +437 -4906
- data/lib/stripe/resources/account_link.rb +8 -47
- data/lib/stripe/resources/account_session.rb +338 -910
- data/lib/stripe/resources/apple_pay_domain.rb +8 -40
- data/lib/stripe/resources/application.rb +8 -0
- data/lib/stripe/resources/application_fee.rb +12 -44
- data/lib/stripe/resources/application_fee_refund.rb +8 -0
- data/lib/stripe/resources/apps/secret.rb +12 -112
- data/lib/stripe/resources/balance.rb +159 -0
- data/lib/stripe/resources/balance_settings.rb +40 -60
- data/lib/stripe/resources/balance_transaction.rb +12 -56
- data/lib/stripe/resources/bank_account.rb +40 -0
- data/lib/stripe/resources/billing/alert.rb +20 -100
- data/lib/stripe/resources/billing/alert_triggered.rb +8 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +48 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +73 -33
- data/lib/stripe/resources/billing/credit_grant.rb +42 -161
- data/lib/stripe/resources/billing/meter.rb +40 -116
- data/lib/stripe/resources/billing/meter_event.rb +8 -20
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +12 -22
- data/lib/stripe/resources/billing/meter_event_summary.rb +8 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +120 -473
- data/lib/stripe/resources/billing_portal/session.rb +98 -176
- data/lib/stripe/resources/capability.rb +56 -0
- data/lib/stripe/resources/card.rb +17 -3
- data/lib/stripe/resources/cash_balance.rb +16 -2
- data/lib/stripe/resources/charge.rb +949 -1945
- data/lib/stripe/resources/checkout/session.rb +1038 -2991
- data/lib/stripe/resources/climate/order.rb +28 -89
- data/lib/stripe/resources/climate/product.rb +13 -15
- data/lib/stripe/resources/climate/supplier.rb +13 -15
- data/lib/stripe/resources/confirmation_token.rb +883 -841
- data/lib/stripe/resources/connect_collection_transfer.rb +8 -0
- data/lib/stripe/resources/country_spec.rb +29 -15
- data/lib/stripe/resources/coupon.rb +19 -166
- data/lib/stripe/resources/credit_note.rb +66 -510
- data/lib/stripe/resources/credit_note_line_item.rb +43 -8
- data/lib/stripe/resources/customer.rb +81 -677
- data/lib/stripe/resources/customer_balance_transaction.rb +8 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +108 -2
- data/lib/stripe/resources/customer_session.rb +49 -98
- data/lib/stripe/resources/discount.rb +24 -6
- data/lib/stripe/resources/dispute.rb +159 -376
- data/lib/stripe/resources/entitlements/active_entitlement.rb +8 -26
- data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +8 -0
- data/lib/stripe/resources/entitlements/feature.rb +8 -66
- data/lib/stripe/resources/ephemeral_key.rb +8 -8
- data/lib/stripe/resources/event.rb +16 -79
- data/lib/stripe/resources/exchange_rate.rb +18 -17
- data/lib/stripe/resources/file.rb +8 -79
- data/lib/stripe/resources/file_link.rb +8 -84
- data/lib/stripe/resources/financial_connections/account.rb +65 -130
- data/lib/stripe/resources/financial_connections/account_owner.rb +8 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +8 -0
- data/lib/stripe/resources/financial_connections/session.rb +20 -115
- data/lib/stripe/resources/financial_connections/transaction.rb +12 -57
- data/lib/stripe/resources/forwarding/request.rb +48 -93
- data/lib/stripe/resources/funding_instructions.rb +217 -24
- data/lib/stripe/resources/identity/verification_report.rb +165 -56
- data/lib/stripe/resources/identity/verification_session.rb +124 -247
- data/lib/stripe/resources/invoice.rb +500 -4017
- data/lib/stripe/resources/invoice_item.rb +69 -385
- data/lib/stripe/resources/invoice_line_item.rb +124 -251
- data/lib/stripe/resources/invoice_payment.rb +20 -47
- data/lib/stripe/resources/invoice_rendering_template.rb +8 -38
- data/lib/stripe/resources/issuing/authorization.rb +173 -836
- data/lib/stripe/resources/issuing/card.rb +98 -499
- data/lib/stripe/resources/issuing/cardholder.rb +108 -515
- data/lib/stripe/resources/issuing/dispute.rb +93 -620
- data/lib/stripe/resources/issuing/personalization_design.rb +32 -221
- data/lib/stripe/resources/issuing/physical_bundle.rb +13 -28
- data/lib/stripe/resources/issuing/token.rb +57 -60
- data/lib/stripe/resources/issuing/transaction.rb +147 -702
- data/lib/stripe/resources/line_item.rb +22 -35
- data/lib/stripe/resources/login_link.rb +8 -0
- data/lib/stripe/resources/mandate.rb +219 -94
- data/lib/stripe/resources/payment_intent.rb +1241 -13361
- data/lib/stripe/resources/payment_link.rb +333 -1357
- data/lib/stripe/resources/payment_method.rb +796 -966
- data/lib/stripe/resources/payment_method_configuration.rb +862 -2528
- data/lib/stripe/resources/payment_method_domain.rb +107 -63
- data/lib/stripe/resources/payout.rb +12 -150
- data/lib/stripe/resources/person.rb +184 -4
- data/lib/stripe/resources/plan.rb +20 -235
- data/lib/stripe/resources/price.rb +65 -509
- data/lib/stripe/resources/product.rb +23 -411
- data/lib/stripe/resources/product_feature.rb +8 -0
- data/lib/stripe/resources/promotion_code.rb +40 -182
- data/lib/stripe/resources/quote.rb +280 -2743
- data/lib/stripe/resources/radar/early_fraud_warning.rb +8 -51
- data/lib/stripe/resources/radar/value_list.rb +8 -92
- data/lib/stripe/resources/radar/value_list_item.rb +8 -68
- data/lib/stripe/resources/refund.rb +365 -159
- data/lib/stripe/resources/reporting/report_run.rb +12 -93
- data/lib/stripe/resources/reporting/report_type.rb +8 -8
- data/lib/stripe/resources/reserve_transaction.rb +8 -0
- data/lib/stripe/resources/reversal.rb +8 -0
- data/lib/stripe/resources/review.rb +20 -43
- data/lib/stripe/resources/setup_attempt.rb +284 -87
- data/lib/stripe/resources/setup_intent.rb +358 -4143
- data/lib/stripe/resources/shipping_rate.rb +44 -187
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +13 -15
- data/lib/stripe/resources/source.rb +267 -611
- data/lib/stripe/resources/source_mandate_notification.rb +32 -0
- data/lib/stripe/resources/source_transaction.rb +54 -0
- data/lib/stripe/resources/subscription.rb +266 -1931
- data/lib/stripe/resources/subscription_item.rb +12 -379
- data/lib/stripe/resources/subscription_schedule.rb +230 -2273
- data/lib/stripe/resources/tax/calculation.rb +111 -220
- data/lib/stripe/resources/tax/calculation_line_item.rb +32 -0
- data/lib/stripe/resources/tax/registration.rb +1274 -2096
- data/lib/stripe/resources/tax/settings.rb +61 -64
- data/lib/stripe/resources/tax/transaction.rb +95 -122
- data/lib/stripe/resources/tax/transaction_line_item.rb +16 -0
- data/lib/stripe/resources/tax_code.rb +8 -17
- data/lib/stripe/resources/tax_deducted_at_source.rb +8 -0
- data/lib/stripe/resources/tax_id.rb +20 -75
- data/lib/stripe/resources/tax_rate.rb +12 -142
- data/lib/stripe/resources/terminal/configuration.rb +301 -1205
- data/lib/stripe/resources/terminal/connection_token.rb +8 -11
- data/lib/stripe/resources/terminal/location.rb +72 -126
- data/lib/stripe/resources/terminal/reader.rb +237 -509
- data/lib/stripe/resources/test_helpers/test_clock.rb +20 -43
- data/lib/stripe/resources/token.rb +8 -1191
- data/lib/stripe/resources/topup.rb +8 -132
- data/lib/stripe/resources/transfer.rb +8 -115
- data/lib/stripe/resources/treasury/credit_reversal.rb +12 -46
- data/lib/stripe/resources/treasury/debit_reversal.rb +20 -50
- data/lib/stripe/resources/treasury/financial_account.rb +55 -658
- data/lib/stripe/resources/treasury/financial_account_features.rb +192 -2
- data/lib/stripe/resources/treasury/inbound_transfer.rb +67 -115
- data/lib/stripe/resources/treasury/outbound_payment.rb +104 -334
- data/lib/stripe/resources/treasury/outbound_transfer.rb +93 -235
- data/lib/stripe/resources/treasury/received_credit.rb +76 -136
- data/lib/stripe/resources/treasury/received_debit.rb +68 -126
- data/lib/stripe/resources/treasury/transaction.rb +32 -82
- data/lib/stripe/resources/treasury/transaction_entry.rb +20 -74
- data/lib/stripe/resources/v2/billing/meter_event.rb +8 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +16 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +8 -0
- data/lib/stripe/resources/v2/core/event.rb +67 -0
- data/lib/stripe/resources/v2/core/event_destination.rb +119 -0
- data/lib/stripe/resources/v2/core/event_notification.rb +62 -0
- data/lib/stripe/resources/v2/deleted_object.rb +21 -0
- data/lib/stripe/resources/webhook_endpoint.rb +8 -85
- data/lib/stripe/resources.rb +3 -110
- data/lib/stripe/services/account_capability_service.rb +0 -32
- data/lib/stripe/services/account_external_account_service.rb +0 -249
- data/lib/stripe/services/account_link_service.rb +0 -48
- data/lib/stripe/services/account_login_link_service.rb +0 -9
- data/lib/stripe/services/account_person_service.rb +0 -958
- data/lib/stripe/services/account_service.rb +0 -4710
- data/lib/stripe/services/account_session_service.rb +0 -862
- data/lib/stripe/services/apple_pay_domain_service.rb +0 -50
- data/lib/stripe/services/application_fee_refund_service.rb +0 -54
- data/lib/stripe/services/application_fee_service.rb +0 -57
- data/lib/stripe/services/apps/secret_service.rb +0 -116
- data/lib/stripe/services/balance_service.rb +0 -9
- data/lib/stripe/services/balance_settings_service.rb +0 -69
- data/lib/stripe/services/balance_transaction_service.rb +0 -69
- data/lib/stripe/services/billing/alert_service.rb +0 -113
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +0 -51
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -44
- data/lib/stripe/services/billing/credit_grant_service.rb +0 -174
- data/lib/stripe/services/billing/meter_event_adjustment_service.rb +0 -26
- data/lib/stripe/services/billing/meter_event_service.rb +0 -21
- data/lib/stripe/services/billing/meter_event_summary_service.rb +0 -39
- data/lib/stripe/services/billing/meter_service.rb +0 -130
- data/lib/stripe/services/billing_portal/configuration_service.rb +0 -486
- data/lib/stripe/services/billing_portal/session_service.rb +0 -177
- data/lib/stripe/services/billing_service.rb +1 -2
- data/lib/stripe/services/charge_service.rb +0 -1820
- data/lib/stripe/services/checkout/session_line_item_service.rb +0 -18
- data/lib/stripe/services/checkout/session_service.rb +0 -2882
- data/lib/stripe/services/climate/order_service.rb +0 -102
- data/lib/stripe/services/climate/product_service.rb +0 -27
- data/lib/stripe/services/climate/supplier_service.rb +0 -27
- data/lib/stripe/services/confirmation_token_service.rb +0 -9
- data/lib/stripe/services/country_spec_service.rb +0 -27
- data/lib/stripe/services/coupon_service.rb +0 -167
- data/lib/stripe/services/credit_note_line_item_service.rb +0 -18
- data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -152
- data/lib/stripe/services/credit_note_service.rb +0 -369
- data/lib/stripe/services/customer_balance_transaction_service.rb +0 -63
- data/lib/stripe/services/customer_cash_balance_service.rb +0 -29
- data/lib/stripe/services/customer_cash_balance_transaction_service.rb +0 -27
- data/lib/stripe/services/customer_funding_instructions_service.rb +0 -42
- data/lib/stripe/services/customer_payment_method_service.rb +0 -40
- data/lib/stripe/services/customer_payment_source_service.rb +0 -179
- data/lib/stripe/services/customer_service.rb +0 -575
- data/lib/stripe/services/customer_session_service.rb +0 -99
- data/lib/stripe/services/customer_tax_id_service.rb +0 -44
- data/lib/stripe/services/dispute_service.rb +0 -374
- data/lib/stripe/services/entitlements/active_entitlement_service.rb +0 -36
- data/lib/stripe/services/entitlements/feature_service.rb +0 -76
- data/lib/stripe/services/ephemeral_key_service.rb +0 -36
- data/lib/stripe/services/event_service.rb +0 -65
- data/lib/stripe/services/exchange_rate_service.rb +4 -27
- data/lib/stripe/services/file_link_service.rb +0 -94
- data/lib/stripe/services/file_service.rb +0 -89
- data/lib/stripe/services/financial_connections/account_owner_service.rb +0 -27
- data/lib/stripe/services/financial_connections/account_service.rb +1 -102
- data/lib/stripe/services/financial_connections/session_service.rb +0 -100
- data/lib/stripe/services/financial_connections/transaction_service.rb +0 -70
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/forwarding/request_service.rb +0 -106
- data/lib/stripe/services/identity/verification_report_service.rb +0 -65
- data/lib/stripe/services/identity/verification_session_service.rb +0 -255
- data/lib/stripe/services/invoice_item_service.rb +0 -405
- data/lib/stripe/services/invoice_line_item_service.rb +0 -253
- data/lib/stripe/services/invoice_payment_service.rb +0 -58
- data/lib/stripe/services/invoice_rendering_template_service.rb +0 -51
- data/lib/stripe/services/invoice_service.rb +0 -3836
- data/lib/stripe/services/issuing/authorization_service.rb +0 -104
- data/lib/stripe/services/issuing/card_service.rb +0 -463
- data/lib/stripe/services/issuing/cardholder_service.rb +0 -526
- data/lib/stripe/services/issuing/dispute_service.rb +0 -633
- data/lib/stripe/services/issuing/personalization_design_service.rb +0 -193
- data/lib/stripe/services/issuing/physical_bundle_service.rb +0 -40
- data/lib/stripe/services/issuing/token_service.rb +0 -73
- data/lib/stripe/services/issuing/transaction_service.rb +0 -81
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/mandate_service.rb +0 -49
- data/lib/stripe/services/payment_intent_service.rb +0 -12747
- data/lib/stripe/services/payment_link_line_item_service.rb +0 -18
- data/lib/stripe/services/payment_link_service.rb +0 -1352
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -2466
- data/lib/stripe/services/payment_method_domain_service.rb +0 -76
- data/lib/stripe/services/payment_method_service.rb +0 -881
- data/lib/stripe/services/payout_service.rb +0 -163
- data/lib/stripe/services/plan_service.rb +0 -248
- data/lib/stripe/services/price_service.rb +0 -512
- data/lib/stripe/services/product_feature_service.rb +0 -41
- data/lib/stripe/services/product_service.rb +0 -424
- data/lib/stripe/services/promotion_code_service.rb +1 -187
- data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +0 -18
- data/lib/stripe/services/quote_line_item_service.rb +0 -18
- data/lib/stripe/services/quote_service.rb +1 -2344
- data/lib/stripe/services/radar/early_fraud_warning_service.rb +0 -61
- data/lib/stripe/services/radar/value_list_item_service.rb +0 -78
- data/lib/stripe/services/radar/value_list_service.rb +0 -102
- data/lib/stripe/services/refund_service.rb +0 -137
- data/lib/stripe/services/reporting/report_run_service.rb +0 -106
- data/lib/stripe/services/reporting/report_type_service.rb +0 -18
- data/lib/stripe/services/review_service.rb +0 -56
- data/lib/stripe/services/setup_attempt_service.rb +0 -51
- data/lib/stripe/services/setup_intent_service.rb +0 -3957
- data/lib/stripe/services/shipping_rate_service.rb +0 -200
- data/lib/stripe/services/sigma/scheduled_query_run_service.rb +0 -27
- data/lib/stripe/services/source_service.rb +0 -601
- data/lib/stripe/services/source_transaction_service.rb +0 -18
- data/lib/stripe/services/subscription_item_service.rb +0 -383
- data/lib/stripe/services/subscription_schedule_service.rb +0 -2196
- data/lib/stripe/services/subscription_service.rb +0 -1894
- data/lib/stripe/services/tax/calculation_line_item_service.rb +0 -18
- data/lib/stripe/services/tax/calculation_service.rb +0 -209
- data/lib/stripe/services/tax/registration_service.rb +0 -2063
- data/lib/stripe/services/tax/settings_service.rb +0 -74
- data/lib/stripe/services/tax/transaction_line_item_service.rb +0 -18
- data/lib/stripe/services/tax/transaction_service.rb +0 -111
- data/lib/stripe/services/tax_code_service.rb +0 -27
- data/lib/stripe/services/tax_id_service.rb +0 -84
- data/lib/stripe/services/tax_rate_service.rb +0 -155
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +0 -1212
- data/lib/stripe/services/terminal/connection_token_service.rb +0 -12
- data/lib/stripe/services/terminal/location_service.rb +0 -143
- data/lib/stripe/services/terminal/reader_service.rb +0 -427
- data/lib/stripe/services/terminal_service.rb +1 -3
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -738
- data/lib/stripe/services/test_helpers/customer_service.rb +0 -18
- data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +0 -745
- data/lib/stripe/services/test_helpers/issuing/card_service.rb +0 -45
- data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +0 -41
- data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +0 -632
- data/lib/stripe/services/test_helpers/refund_service.rb +0 -9
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -87
- data/lib/stripe/services/test_helpers/test_clock_service.rb +0 -56
- data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +0 -38
- data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +0 -87
- data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +0 -87
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +0 -84
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +0 -84
- data/lib/stripe/services/token_service.rb +0 -1201
- data/lib/stripe/services/topup_service.rb +0 -142
- data/lib/stripe/services/transfer_reversal_service.rb +0 -66
- data/lib/stripe/services/transfer_service.rb +0 -123
- data/lib/stripe/services/treasury/credit_reversal_service.rb +0 -59
- data/lib/stripe/services/treasury/debit_reversal_service.rb +0 -63
- data/lib/stripe/services/treasury/financial_account_features_service.rb +0 -169
- data/lib/stripe/services/treasury/financial_account_service.rb +0 -502
- data/lib/stripe/services/treasury/inbound_transfer_service.rb +0 -88
- data/lib/stripe/services/treasury/outbound_payment_service.rb +0 -258
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -148
- data/lib/stripe/services/treasury/received_credit_service.rb +0 -52
- data/lib/stripe/services/treasury/received_debit_service.rb +0 -40
- data/lib/stripe/services/treasury/transaction_entry_service.rb +0 -87
- data/lib/stripe/services/treasury/transaction_service.rb +0 -95
- data/lib/stripe/services/v1_services.rb +1 -10
- data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +0 -23
- data/lib/stripe/services/v2/billing/meter_event_service.rb +0 -25
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +0 -2
- data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +0 -33
- data/lib/stripe/services/v2/core/event_destination_service.rb +0 -137
- data/lib/stripe/services/v2/core/event_service.rb +0 -16
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +1 -4
- data/lib/stripe/services/webhook_endpoint_service.rb +0 -95
- data/lib/stripe/services.rb +0 -54
- data/lib/stripe/stripe_client.rb +8 -5
- data/lib/stripe/stripe_configuration.rb +2 -9
- data/lib/stripe/stripe_context.rb +68 -0
- data/lib/stripe/stripe_object.rb +34 -10
- data/lib/stripe/util.rb +25 -20
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +3 -54
- data/rbi/stripe/resources/v2/core/event_notification.rbi +43 -0
- data/rbi/stripe/stripe_client.rbi +17 -0
- data/rbi/stripe.rbi +121931 -190301
- metadata +599 -189
- data/API_VERSION +0 -1
- data/CHANGELOG.md +0 -2780
- data/CODE_OF_CONDUCT.md +0 -77
- data/CONTRIBUTING.md +0 -25
- data/CONTRIBUTORS +0 -3
- data/Gemfile +0 -41
- data/History.txt +0 -1
- data/LICENSE +0 -21
- data/Makefile +0 -22
- data/OPENAPI_VERSION +0 -1
- data/README.md +0 -424
- data/Rakefile +0 -34
- data/VERSION +0 -1
- data/examples/README.md +0 -16
- data/examples/example_template.rb +0 -36
- data/examples/meter_event_stream.rb +0 -57
- data/examples/thinevent_webhook_handler.rb +0 -39
- data/justfile +0 -43
- data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_link_returned_event.rb +0 -13
- data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -22
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/billing/meter_usage.rb +0 -23
- data/lib/stripe/resources/billing/meter_usage_row.rb +0 -28
- data/lib/stripe/resources/capital/financing_offer.rb +0 -179
- data/lib/stripe/resources/capital/financing_summary.rb +0 -55
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -92
- data/lib/stripe/resources/fx_quote.rb +0 -186
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
- data/lib/stripe/resources/issuing/settlement.rb +0 -53
- data/lib/stripe/resources/margin.rb +0 -115
- data/lib/stripe/resources/order.rb +0 -2958
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1181
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1727
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -680
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -395
- data/lib/stripe/resources/tax/association.rb +0 -66
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/onboarding_link.rb +0 -84
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1938
- data/lib/stripe/resources/v2/core/account_link.rb +0 -72
- data/lib/stripe/resources/v2/core/person.rb +0 -276
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
- data/lib/stripe/resources/v2/event.rb +0 -41
- data/lib/stripe/resources/v2/event_destination.rb +0 -73
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -79
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -77
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -80
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -70
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -89
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/billing/meter_usage_service.rb +0 -76
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/external_account_service.rb +0 -317
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
- data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
- data/lib/stripe/services/fx_quote_service.rb +0 -123
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_service.rb +0 -2388
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -52
- data/lib/stripe/services/payment_record_service.rb +0 -562
- data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
- data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +0 -37
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/onboarding_link_service.rb +0 -56
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -114
- data/lib/stripe/services/v2/core/account_service.rb +0 -4536
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -119
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/payment_service.rb +0 -15
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -152
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -53
- data/lib/stripe/thin_event.rb +0 -37
- data/stripe.gemspec +0 -47
@@ -16,10 +16,32 @@ module Stripe
|
|
16
16
|
end
|
17
17
|
|
18
18
|
class BillingMode < Stripe::StripeObject
|
19
|
+
class Flexible < Stripe::StripeObject
|
20
|
+
# Controls how invoices and invoice items display proration amounts and discount amounts.
|
21
|
+
attr_reader :proration_discounts
|
22
|
+
|
23
|
+
def self.inner_class_types
|
24
|
+
@inner_class_types = {}
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.field_remappings
|
28
|
+
@field_remappings = {}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
# Configure behavior for flexible billing mode
|
32
|
+
attr_reader :flexible
|
19
33
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
20
34
|
attr_reader :type
|
21
35
|
# Details on when the current billing_mode was adopted.
|
22
36
|
attr_reader :updated_at
|
37
|
+
|
38
|
+
def self.inner_class_types
|
39
|
+
@inner_class_types = { flexible: Flexible }
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.field_remappings
|
43
|
+
@field_remappings = {}
|
44
|
+
end
|
23
45
|
end
|
24
46
|
|
25
47
|
class CurrentPhase < Stripe::StripeObject
|
@@ -27,6 +49,14 @@ module Stripe
|
|
27
49
|
attr_reader :end_date
|
28
50
|
# The start of this phase of the subscription schedule.
|
29
51
|
attr_reader :start_date
|
52
|
+
|
53
|
+
def self.inner_class_types
|
54
|
+
@inner_class_types = {}
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.field_remappings
|
58
|
+
@field_remappings = {}
|
59
|
+
end
|
30
60
|
end
|
31
61
|
|
32
62
|
class DefaultSettings < Stripe::StripeObject
|
@@ -36,6 +66,14 @@ module Stripe
|
|
36
66
|
attr_reader :account
|
37
67
|
# Type of the account referenced.
|
38
68
|
attr_reader :type
|
69
|
+
|
70
|
+
def self.inner_class_types
|
71
|
+
@inner_class_types = {}
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.field_remappings
|
75
|
+
@field_remappings = {}
|
76
|
+
end
|
39
77
|
end
|
40
78
|
# If Stripe disabled automatic tax, this enum describes why.
|
41
79
|
attr_reader :disabled_reason
|
@@ -43,6 +81,14 @@ module Stripe
|
|
43
81
|
attr_reader :enabled
|
44
82
|
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
45
83
|
attr_reader :liability
|
84
|
+
|
85
|
+
def self.inner_class_types
|
86
|
+
@inner_class_types = { liability: Liability }
|
87
|
+
end
|
88
|
+
|
89
|
+
def self.field_remappings
|
90
|
+
@field_remappings = {}
|
91
|
+
end
|
46
92
|
end
|
47
93
|
|
48
94
|
class BillingThresholds < Stripe::StripeObject
|
@@ -50,6 +96,14 @@ module Stripe
|
|
50
96
|
attr_reader :amount_gte
|
51
97
|
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
52
98
|
attr_reader :reset_billing_cycle_anchor
|
99
|
+
|
100
|
+
def self.inner_class_types
|
101
|
+
@inner_class_types = {}
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.field_remappings
|
105
|
+
@field_remappings = {}
|
106
|
+
end
|
53
107
|
end
|
54
108
|
|
55
109
|
class InvoiceSettings < Stripe::StripeObject
|
@@ -58,6 +112,14 @@ module Stripe
|
|
58
112
|
attr_reader :account
|
59
113
|
# Type of the account referenced.
|
60
114
|
attr_reader :type
|
115
|
+
|
116
|
+
def self.inner_class_types
|
117
|
+
@inner_class_types = {}
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.field_remappings
|
121
|
+
@field_remappings = {}
|
122
|
+
end
|
61
123
|
end
|
62
124
|
# The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
|
63
125
|
attr_reader :account_tax_ids
|
@@ -65,6 +127,14 @@ module Stripe
|
|
65
127
|
attr_reader :days_until_due
|
66
128
|
# Attribute for field issuer
|
67
129
|
attr_reader :issuer
|
130
|
+
|
131
|
+
def self.inner_class_types
|
132
|
+
@inner_class_types = { issuer: Issuer }
|
133
|
+
end
|
134
|
+
|
135
|
+
def self.field_remappings
|
136
|
+
@field_remappings = {}
|
137
|
+
end
|
68
138
|
end
|
69
139
|
|
70
140
|
class TransferData < Stripe::StripeObject
|
@@ -72,6 +142,14 @@ module Stripe
|
|
72
142
|
attr_reader :amount_percent
|
73
143
|
# The account where funds from the payment will be transferred to upon payment success.
|
74
144
|
attr_reader :destination
|
145
|
+
|
146
|
+
def self.inner_class_types
|
147
|
+
@inner_class_types = {}
|
148
|
+
end
|
149
|
+
|
150
|
+
def self.field_remappings
|
151
|
+
@field_remappings = {}
|
152
|
+
end
|
75
153
|
end
|
76
154
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule.
|
77
155
|
attr_reader :application_fee_percent
|
@@ -93,40 +171,38 @@ module Stripe
|
|
93
171
|
attr_reader :on_behalf_of
|
94
172
|
# The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
95
173
|
attr_reader :transfer_data
|
96
|
-
end
|
97
174
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
175
|
+
def self.inner_class_types
|
176
|
+
@inner_class_types = {
|
177
|
+
automatic_tax: AutomaticTax,
|
178
|
+
billing_thresholds: BillingThresholds,
|
179
|
+
invoice_settings: InvoiceSettings,
|
180
|
+
transfer_data: TransferData,
|
181
|
+
}
|
182
|
+
end
|
183
|
+
|
184
|
+
def self.field_remappings
|
185
|
+
@field_remappings = {}
|
104
186
|
end
|
105
|
-
# The time at which the price migration encountered an error.
|
106
|
-
attr_reader :errored_at
|
107
|
-
# The involved price pairs in each failed transition.
|
108
|
-
attr_reader :failed_transitions
|
109
|
-
# The type of error encountered by the price migration.
|
110
|
-
attr_reader :type
|
111
187
|
end
|
112
188
|
|
113
189
|
class Phase < Stripe::StripeObject
|
114
190
|
class AddInvoiceItem < Stripe::StripeObject
|
115
191
|
class Discount < Stripe::StripeObject
|
116
|
-
class DiscountEnd < Stripe::StripeObject
|
117
|
-
# The discount end timestamp.
|
118
|
-
attr_reader :timestamp
|
119
|
-
# The discount end type.
|
120
|
-
attr_reader :type
|
121
|
-
end
|
122
192
|
# ID of the coupon to create a new discount for.
|
123
193
|
attr_reader :coupon
|
124
194
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
125
195
|
attr_reader :discount
|
126
|
-
# Details to determine how long the discount should be applied for.
|
127
|
-
attr_reader :discount_end
|
128
196
|
# ID of the promotion code to create a new discount for.
|
129
197
|
attr_reader :promotion_code
|
198
|
+
|
199
|
+
def self.inner_class_types
|
200
|
+
@inner_class_types = {}
|
201
|
+
end
|
202
|
+
|
203
|
+
def self.field_remappings
|
204
|
+
@field_remappings = {}
|
205
|
+
end
|
130
206
|
end
|
131
207
|
|
132
208
|
class Period < Stripe::StripeObject
|
@@ -135,6 +211,14 @@ module Stripe
|
|
135
211
|
attr_reader :timestamp
|
136
212
|
# Select how to calculate the end of the invoice item period.
|
137
213
|
attr_reader :type
|
214
|
+
|
215
|
+
def self.inner_class_types
|
216
|
+
@inner_class_types = {}
|
217
|
+
end
|
218
|
+
|
219
|
+
def self.field_remappings
|
220
|
+
@field_remappings = {}
|
221
|
+
end
|
138
222
|
end
|
139
223
|
|
140
224
|
class Start < Stripe::StripeObject
|
@@ -142,11 +226,27 @@ module Stripe
|
|
142
226
|
attr_reader :timestamp
|
143
227
|
# Select how to calculate the start of the invoice item period.
|
144
228
|
attr_reader :type
|
229
|
+
|
230
|
+
def self.inner_class_types
|
231
|
+
@inner_class_types = {}
|
232
|
+
end
|
233
|
+
|
234
|
+
def self.field_remappings
|
235
|
+
@field_remappings = {}
|
236
|
+
end
|
145
237
|
end
|
146
238
|
# Attribute for field end
|
147
239
|
attr_reader :end
|
148
240
|
# Attribute for field start
|
149
241
|
attr_reader :start
|
242
|
+
|
243
|
+
def self.inner_class_types
|
244
|
+
@inner_class_types = { end: End, start: Start }
|
245
|
+
end
|
246
|
+
|
247
|
+
def self.field_remappings
|
248
|
+
@field_remappings = {}
|
249
|
+
end
|
150
250
|
end
|
151
251
|
# The stackable discounts that will be applied to the item.
|
152
252
|
attr_reader :discounts
|
@@ -160,6 +260,14 @@ module Stripe
|
|
160
260
|
attr_reader :quantity
|
161
261
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
162
262
|
attr_reader :tax_rates
|
263
|
+
|
264
|
+
def self.inner_class_types
|
265
|
+
@inner_class_types = { discounts: Discount, period: Period }
|
266
|
+
end
|
267
|
+
|
268
|
+
def self.field_remappings
|
269
|
+
@field_remappings = {}
|
270
|
+
end
|
163
271
|
end
|
164
272
|
|
165
273
|
class AutomaticTax < Stripe::StripeObject
|
@@ -168,6 +276,14 @@ module Stripe
|
|
168
276
|
attr_reader :account
|
169
277
|
# Type of the account referenced.
|
170
278
|
attr_reader :type
|
279
|
+
|
280
|
+
def self.inner_class_types
|
281
|
+
@inner_class_types = {}
|
282
|
+
end
|
283
|
+
|
284
|
+
def self.field_remappings
|
285
|
+
@field_remappings = {}
|
286
|
+
end
|
171
287
|
end
|
172
288
|
# If Stripe disabled automatic tax, this enum describes why.
|
173
289
|
attr_reader :disabled_reason
|
@@ -175,6 +291,14 @@ module Stripe
|
|
175
291
|
attr_reader :enabled
|
176
292
|
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
177
293
|
attr_reader :liability
|
294
|
+
|
295
|
+
def self.inner_class_types
|
296
|
+
@inner_class_types = { liability: Liability }
|
297
|
+
end
|
298
|
+
|
299
|
+
def self.field_remappings
|
300
|
+
@field_remappings = {}
|
301
|
+
end
|
178
302
|
end
|
179
303
|
|
180
304
|
class BillingThresholds < Stripe::StripeObject
|
@@ -182,23 +306,31 @@ module Stripe
|
|
182
306
|
attr_reader :amount_gte
|
183
307
|
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
184
308
|
attr_reader :reset_billing_cycle_anchor
|
309
|
+
|
310
|
+
def self.inner_class_types
|
311
|
+
@inner_class_types = {}
|
312
|
+
end
|
313
|
+
|
314
|
+
def self.field_remappings
|
315
|
+
@field_remappings = {}
|
316
|
+
end
|
185
317
|
end
|
186
318
|
|
187
319
|
class Discount < Stripe::StripeObject
|
188
|
-
class DiscountEnd < Stripe::StripeObject
|
189
|
-
# The discount end timestamp.
|
190
|
-
attr_reader :timestamp
|
191
|
-
# The discount end type.
|
192
|
-
attr_reader :type
|
193
|
-
end
|
194
320
|
# ID of the coupon to create a new discount for.
|
195
321
|
attr_reader :coupon
|
196
322
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
197
323
|
attr_reader :discount
|
198
|
-
# Details to determine how long the discount should be applied for.
|
199
|
-
attr_reader :discount_end
|
200
324
|
# ID of the promotion code to create a new discount for.
|
201
325
|
attr_reader :promotion_code
|
326
|
+
|
327
|
+
def self.inner_class_types
|
328
|
+
@inner_class_types = {}
|
329
|
+
end
|
330
|
+
|
331
|
+
def self.field_remappings
|
332
|
+
@field_remappings = {}
|
333
|
+
end
|
202
334
|
end
|
203
335
|
|
204
336
|
class InvoiceSettings < Stripe::StripeObject
|
@@ -207,6 +339,14 @@ module Stripe
|
|
207
339
|
attr_reader :account
|
208
340
|
# Type of the account referenced.
|
209
341
|
attr_reader :type
|
342
|
+
|
343
|
+
def self.inner_class_types
|
344
|
+
@inner_class_types = {}
|
345
|
+
end
|
346
|
+
|
347
|
+
def self.field_remappings
|
348
|
+
@field_remappings = {}
|
349
|
+
end
|
210
350
|
end
|
211
351
|
# The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
212
352
|
attr_reader :account_tax_ids
|
@@ -214,36 +354,45 @@ module Stripe
|
|
214
354
|
attr_reader :days_until_due
|
215
355
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
216
356
|
attr_reader :issuer
|
357
|
+
|
358
|
+
def self.inner_class_types
|
359
|
+
@inner_class_types = { issuer: Issuer }
|
360
|
+
end
|
361
|
+
|
362
|
+
def self.field_remappings
|
363
|
+
@field_remappings = {}
|
364
|
+
end
|
217
365
|
end
|
218
366
|
|
219
367
|
class Item < Stripe::StripeObject
|
220
368
|
class BillingThresholds < Stripe::StripeObject
|
221
369
|
# Usage threshold that triggers the subscription to create an invoice
|
222
370
|
attr_reader :usage_gte
|
371
|
+
|
372
|
+
def self.inner_class_types
|
373
|
+
@inner_class_types = {}
|
374
|
+
end
|
375
|
+
|
376
|
+
def self.field_remappings
|
377
|
+
@field_remappings = {}
|
378
|
+
end
|
223
379
|
end
|
224
380
|
|
225
381
|
class Discount < Stripe::StripeObject
|
226
|
-
class DiscountEnd < Stripe::StripeObject
|
227
|
-
# The discount end timestamp.
|
228
|
-
attr_reader :timestamp
|
229
|
-
# The discount end type.
|
230
|
-
attr_reader :type
|
231
|
-
end
|
232
382
|
# ID of the coupon to create a new discount for.
|
233
383
|
attr_reader :coupon
|
234
384
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
235
385
|
attr_reader :discount
|
236
|
-
# Details to determine how long the discount should be applied for.
|
237
|
-
attr_reader :discount_end
|
238
386
|
# ID of the promotion code to create a new discount for.
|
239
387
|
attr_reader :promotion_code
|
240
|
-
end
|
241
388
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
389
|
+
def self.inner_class_types
|
390
|
+
@inner_class_types = {}
|
391
|
+
end
|
392
|
+
|
393
|
+
def self.field_remappings
|
394
|
+
@field_remappings = {}
|
395
|
+
end
|
247
396
|
end
|
248
397
|
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
249
398
|
attr_reader :billing_thresholds
|
@@ -259,13 +408,14 @@ module Stripe
|
|
259
408
|
attr_reader :quantity
|
260
409
|
# The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
|
261
410
|
attr_reader :tax_rates
|
262
|
-
# Options that configure the trial on the subscription item.
|
263
|
-
attr_reader :trial
|
264
|
-
end
|
265
411
|
|
266
|
-
|
267
|
-
|
268
|
-
|
412
|
+
def self.inner_class_types
|
413
|
+
@inner_class_types = { billing_thresholds: BillingThresholds, discounts: Discount }
|
414
|
+
end
|
415
|
+
|
416
|
+
def self.field_remappings
|
417
|
+
@field_remappings = {}
|
418
|
+
end
|
269
419
|
end
|
270
420
|
|
271
421
|
class TransferData < Stripe::StripeObject
|
@@ -273,15 +423,14 @@ module Stripe
|
|
273
423
|
attr_reader :amount_percent
|
274
424
|
# The account where funds from the payment will be transferred to upon payment success.
|
275
425
|
attr_reader :destination
|
276
|
-
end
|
277
426
|
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
427
|
+
def self.inner_class_types
|
428
|
+
@inner_class_types = {}
|
429
|
+
end
|
430
|
+
|
431
|
+
def self.field_remappings
|
432
|
+
@field_remappings = {}
|
282
433
|
end
|
283
|
-
# Defines how the subscription should behave when a trial ends.
|
284
|
-
attr_reader :end_behavior
|
285
434
|
end
|
286
435
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
|
287
436
|
attr_reader :add_invoice_items
|
@@ -315,2212 +464,33 @@ module Stripe
|
|
315
464
|
attr_reader :metadata
|
316
465
|
# The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
|
317
466
|
attr_reader :on_behalf_of
|
318
|
-
# 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).
|
319
|
-
attr_reader :pause_collection
|
320
467
|
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
321
468
|
attr_reader :proration_behavior
|
322
469
|
# The start of this phase of the subscription schedule.
|
323
470
|
attr_reader :start_date
|
324
471
|
# The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
325
472
|
attr_reader :transfer_data
|
326
|
-
# Specify behavior of the trial when crossing schedule phase boundaries
|
327
|
-
attr_reader :trial_continuation
|
328
473
|
# When the trial ends within the phase.
|
329
474
|
attr_reader :trial_end
|
330
|
-
# Settings related to any trials on the subscription during this phase.
|
331
|
-
attr_reader :trial_settings
|
332
|
-
end
|
333
|
-
|
334
|
-
class Prebilling < Stripe::StripeObject
|
335
|
-
# ID of the prebilling invoice.
|
336
|
-
attr_reader :invoice
|
337
|
-
# The end of the last period for which the invoice pre-bills.
|
338
|
-
attr_reader :period_end
|
339
|
-
# The start of the first period for which the invoice pre-bills.
|
340
|
-
attr_reader :period_start
|
341
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
342
|
-
attr_reader :update_behavior
|
343
|
-
end
|
344
|
-
|
345
|
-
class ListParams < Stripe::RequestParams
|
346
|
-
class CanceledAt < Stripe::RequestParams
|
347
|
-
# Minimum value to filter by (exclusive)
|
348
|
-
attr_accessor :gt
|
349
|
-
# Minimum value to filter by (inclusive)
|
350
|
-
attr_accessor :gte
|
351
|
-
# Maximum value to filter by (exclusive)
|
352
|
-
attr_accessor :lt
|
353
|
-
# Maximum value to filter by (inclusive)
|
354
|
-
attr_accessor :lte
|
355
|
-
|
356
|
-
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
357
|
-
@gt = gt
|
358
|
-
@gte = gte
|
359
|
-
@lt = lt
|
360
|
-
@lte = lte
|
361
|
-
end
|
362
|
-
end
|
363
|
-
|
364
|
-
class CompletedAt < Stripe::RequestParams
|
365
|
-
# Minimum value to filter by (exclusive)
|
366
|
-
attr_accessor :gt
|
367
|
-
# Minimum value to filter by (inclusive)
|
368
|
-
attr_accessor :gte
|
369
|
-
# Maximum value to filter by (exclusive)
|
370
|
-
attr_accessor :lt
|
371
|
-
# Maximum value to filter by (inclusive)
|
372
|
-
attr_accessor :lte
|
373
|
-
|
374
|
-
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
375
|
-
@gt = gt
|
376
|
-
@gte = gte
|
377
|
-
@lt = lt
|
378
|
-
@lte = lte
|
379
|
-
end
|
380
|
-
end
|
381
|
-
|
382
|
-
class Created < Stripe::RequestParams
|
383
|
-
# Minimum value to filter by (exclusive)
|
384
|
-
attr_accessor :gt
|
385
|
-
# Minimum value to filter by (inclusive)
|
386
|
-
attr_accessor :gte
|
387
|
-
# Maximum value to filter by (exclusive)
|
388
|
-
attr_accessor :lt
|
389
|
-
# Maximum value to filter by (inclusive)
|
390
|
-
attr_accessor :lte
|
391
|
-
|
392
|
-
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
393
|
-
@gt = gt
|
394
|
-
@gte = gte
|
395
|
-
@lt = lt
|
396
|
-
@lte = lte
|
397
|
-
end
|
398
|
-
end
|
399
|
-
|
400
|
-
class ReleasedAt < Stripe::RequestParams
|
401
|
-
# Minimum value to filter by (exclusive)
|
402
|
-
attr_accessor :gt
|
403
|
-
# Minimum value to filter by (inclusive)
|
404
|
-
attr_accessor :gte
|
405
|
-
# Maximum value to filter by (exclusive)
|
406
|
-
attr_accessor :lt
|
407
|
-
# Maximum value to filter by (inclusive)
|
408
|
-
attr_accessor :lte
|
409
|
-
|
410
|
-
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
411
|
-
@gt = gt
|
412
|
-
@gte = gte
|
413
|
-
@lt = lt
|
414
|
-
@lte = lte
|
415
|
-
end
|
416
|
-
end
|
417
|
-
# Only return subscription schedules that were created canceled the given date interval.
|
418
|
-
attr_accessor :canceled_at
|
419
|
-
# Only return subscription schedules that completed during the given date interval.
|
420
|
-
attr_accessor :completed_at
|
421
|
-
# Only return subscription schedules that were created during the given date interval.
|
422
|
-
attr_accessor :created
|
423
|
-
# Only return subscription schedules for the given customer.
|
424
|
-
attr_accessor :customer
|
425
|
-
# Only return subscription schedules for the given account.
|
426
|
-
attr_accessor :customer_account
|
427
|
-
# 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.
|
428
|
-
attr_accessor :ending_before
|
429
|
-
# Specifies which fields in the response should be expanded.
|
430
|
-
attr_accessor :expand
|
431
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
432
|
-
attr_accessor :limit
|
433
|
-
# Only return subscription schedules that were released during the given date interval.
|
434
|
-
attr_accessor :released_at
|
435
|
-
# Only return subscription schedules that have not started yet.
|
436
|
-
attr_accessor :scheduled
|
437
|
-
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
438
|
-
attr_accessor :starting_after
|
439
|
-
|
440
|
-
def initialize(
|
441
|
-
canceled_at: nil,
|
442
|
-
completed_at: nil,
|
443
|
-
created: nil,
|
444
|
-
customer: nil,
|
445
|
-
customer_account: nil,
|
446
|
-
ending_before: nil,
|
447
|
-
expand: nil,
|
448
|
-
limit: nil,
|
449
|
-
released_at: nil,
|
450
|
-
scheduled: nil,
|
451
|
-
starting_after: nil
|
452
|
-
)
|
453
|
-
@canceled_at = canceled_at
|
454
|
-
@completed_at = completed_at
|
455
|
-
@created = created
|
456
|
-
@customer = customer
|
457
|
-
@customer_account = customer_account
|
458
|
-
@ending_before = ending_before
|
459
|
-
@expand = expand
|
460
|
-
@limit = limit
|
461
|
-
@released_at = released_at
|
462
|
-
@scheduled = scheduled
|
463
|
-
@starting_after = starting_after
|
464
|
-
end
|
465
|
-
end
|
466
|
-
|
467
|
-
class CreateParams < Stripe::RequestParams
|
468
|
-
class BillingMode < Stripe::RequestParams
|
469
|
-
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
470
|
-
attr_accessor :type
|
471
|
-
|
472
|
-
def initialize(type: nil)
|
473
|
-
@type = type
|
474
|
-
end
|
475
|
-
end
|
476
|
-
|
477
|
-
class DefaultSettings < Stripe::RequestParams
|
478
|
-
class AutomaticTax < Stripe::RequestParams
|
479
|
-
class Liability < Stripe::RequestParams
|
480
|
-
# The connected account being referenced when `type` is `account`.
|
481
|
-
attr_accessor :account
|
482
|
-
# Type of the account referenced in the request.
|
483
|
-
attr_accessor :type
|
484
|
-
|
485
|
-
def initialize(account: nil, type: nil)
|
486
|
-
@account = account
|
487
|
-
@type = type
|
488
|
-
end
|
489
|
-
end
|
490
|
-
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
491
|
-
attr_accessor :enabled
|
492
|
-
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
493
|
-
attr_accessor :liability
|
494
|
-
|
495
|
-
def initialize(enabled: nil, liability: nil)
|
496
|
-
@enabled = enabled
|
497
|
-
@liability = liability
|
498
|
-
end
|
499
|
-
end
|
500
|
-
|
501
|
-
class BillingThresholds < Stripe::RequestParams
|
502
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
503
|
-
attr_accessor :amount_gte
|
504
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
505
|
-
attr_accessor :reset_billing_cycle_anchor
|
506
|
-
|
507
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
508
|
-
@amount_gte = amount_gte
|
509
|
-
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
510
|
-
end
|
511
|
-
end
|
512
|
-
|
513
|
-
class InvoiceSettings < Stripe::RequestParams
|
514
|
-
class Issuer < Stripe::RequestParams
|
515
|
-
# The connected account being referenced when `type` is `account`.
|
516
|
-
attr_accessor :account
|
517
|
-
# Type of the account referenced in the request.
|
518
|
-
attr_accessor :type
|
519
|
-
|
520
|
-
def initialize(account: nil, type: nil)
|
521
|
-
@account = account
|
522
|
-
@type = type
|
523
|
-
end
|
524
|
-
end
|
525
|
-
# The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
|
526
|
-
attr_accessor :account_tax_ids
|
527
|
-
# Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
|
528
|
-
attr_accessor :days_until_due
|
529
|
-
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
530
|
-
attr_accessor :issuer
|
531
|
-
|
532
|
-
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
|
533
|
-
@account_tax_ids = account_tax_ids
|
534
|
-
@days_until_due = days_until_due
|
535
|
-
@issuer = issuer
|
536
|
-
end
|
537
|
-
end
|
538
|
-
|
539
|
-
class TransferData < Stripe::RequestParams
|
540
|
-
# 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.
|
541
|
-
attr_accessor :amount_percent
|
542
|
-
# ID of an existing, connected Stripe account.
|
543
|
-
attr_accessor :destination
|
544
|
-
|
545
|
-
def initialize(amount_percent: nil, destination: nil)
|
546
|
-
@amount_percent = amount_percent
|
547
|
-
@destination = destination
|
548
|
-
end
|
549
|
-
end
|
550
|
-
# 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).
|
551
|
-
attr_accessor :application_fee_percent
|
552
|
-
# Default settings for automatic tax computation.
|
553
|
-
attr_accessor :automatic_tax
|
554
|
-
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
555
|
-
attr_accessor :billing_cycle_anchor
|
556
|
-
# 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.
|
557
|
-
attr_accessor :billing_thresholds
|
558
|
-
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
559
|
-
attr_accessor :collection_method
|
560
|
-
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
561
|
-
attr_accessor :default_payment_method
|
562
|
-
# Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
563
|
-
attr_accessor :description
|
564
|
-
# All invoices will be billed using the specified settings.
|
565
|
-
attr_accessor :invoice_settings
|
566
|
-
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
567
|
-
attr_accessor :on_behalf_of
|
568
|
-
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
569
|
-
attr_accessor :transfer_data
|
570
|
-
|
571
|
-
def initialize(
|
572
|
-
application_fee_percent: nil,
|
573
|
-
automatic_tax: nil,
|
574
|
-
billing_cycle_anchor: nil,
|
575
|
-
billing_thresholds: nil,
|
576
|
-
collection_method: nil,
|
577
|
-
default_payment_method: nil,
|
578
|
-
description: nil,
|
579
|
-
invoice_settings: nil,
|
580
|
-
on_behalf_of: nil,
|
581
|
-
transfer_data: nil
|
582
|
-
)
|
583
|
-
@application_fee_percent = application_fee_percent
|
584
|
-
@automatic_tax = automatic_tax
|
585
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
586
|
-
@billing_thresholds = billing_thresholds
|
587
|
-
@collection_method = collection_method
|
588
|
-
@default_payment_method = default_payment_method
|
589
|
-
@description = description
|
590
|
-
@invoice_settings = invoice_settings
|
591
|
-
@on_behalf_of = on_behalf_of
|
592
|
-
@transfer_data = transfer_data
|
593
|
-
end
|
594
|
-
end
|
595
|
-
|
596
|
-
class Phase < Stripe::RequestParams
|
597
|
-
class AddInvoiceItem < Stripe::RequestParams
|
598
|
-
class Discount < Stripe::RequestParams
|
599
|
-
class DiscountEnd < Stripe::RequestParams
|
600
|
-
class Duration < Stripe::RequestParams
|
601
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
602
|
-
attr_accessor :interval
|
603
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
604
|
-
attr_accessor :interval_count
|
605
|
-
|
606
|
-
def initialize(interval: nil, interval_count: nil)
|
607
|
-
@interval = interval
|
608
|
-
@interval_count = interval_count
|
609
|
-
end
|
610
|
-
end
|
611
|
-
# Time span for the redeemed discount.
|
612
|
-
attr_accessor :duration
|
613
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
614
|
-
attr_accessor :timestamp
|
615
|
-
# The type of calculation made to determine when the discount ends.
|
616
|
-
attr_accessor :type
|
617
|
-
|
618
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
619
|
-
@duration = duration
|
620
|
-
@timestamp = timestamp
|
621
|
-
@type = type
|
622
|
-
end
|
623
|
-
end
|
624
|
-
# ID of the coupon to create a new discount for.
|
625
|
-
attr_accessor :coupon
|
626
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
627
|
-
attr_accessor :discount
|
628
|
-
# Details to determine how long the discount should be applied for.
|
629
|
-
attr_accessor :discount_end
|
630
|
-
# ID of the promotion code to create a new discount for.
|
631
|
-
attr_accessor :promotion_code
|
632
|
-
|
633
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
634
|
-
@coupon = coupon
|
635
|
-
@discount = discount
|
636
|
-
@discount_end = discount_end
|
637
|
-
@promotion_code = promotion_code
|
638
|
-
end
|
639
|
-
end
|
640
|
-
|
641
|
-
class Period < Stripe::RequestParams
|
642
|
-
class End < Stripe::RequestParams
|
643
|
-
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
644
|
-
attr_accessor :timestamp
|
645
|
-
# Select how to calculate the end of the invoice item period.
|
646
|
-
attr_accessor :type
|
647
|
-
|
648
|
-
def initialize(timestamp: nil, type: nil)
|
649
|
-
@timestamp = timestamp
|
650
|
-
@type = type
|
651
|
-
end
|
652
|
-
end
|
653
|
-
|
654
|
-
class Start < Stripe::RequestParams
|
655
|
-
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
656
|
-
attr_accessor :timestamp
|
657
|
-
# Select how to calculate the start of the invoice item period.
|
658
|
-
attr_accessor :type
|
659
|
-
|
660
|
-
def initialize(timestamp: nil, type: nil)
|
661
|
-
@timestamp = timestamp
|
662
|
-
@type = type
|
663
|
-
end
|
664
|
-
end
|
665
|
-
# End of the invoice item period.
|
666
|
-
attr_accessor :end
|
667
|
-
# Start of the invoice item period.
|
668
|
-
attr_accessor :start
|
669
|
-
|
670
|
-
def initialize(end_: nil, start: nil)
|
671
|
-
@end = end_
|
672
|
-
@start = start
|
673
|
-
end
|
674
|
-
end
|
675
|
-
|
676
|
-
class PriceData < Stripe::RequestParams
|
677
|
-
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
678
|
-
attr_accessor :currency
|
679
|
-
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
680
|
-
attr_accessor :product
|
681
|
-
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
682
|
-
attr_accessor :tax_behavior
|
683
|
-
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
|
684
|
-
attr_accessor :unit_amount
|
685
|
-
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
686
|
-
attr_accessor :unit_amount_decimal
|
687
|
-
|
688
|
-
def initialize(
|
689
|
-
currency: nil,
|
690
|
-
product: nil,
|
691
|
-
tax_behavior: nil,
|
692
|
-
unit_amount: nil,
|
693
|
-
unit_amount_decimal: nil
|
694
|
-
)
|
695
|
-
@currency = currency
|
696
|
-
@product = product
|
697
|
-
@tax_behavior = tax_behavior
|
698
|
-
@unit_amount = unit_amount
|
699
|
-
@unit_amount_decimal = unit_amount_decimal
|
700
|
-
end
|
701
|
-
end
|
702
|
-
# The coupons to redeem into discounts for the item.
|
703
|
-
attr_accessor :discounts
|
704
|
-
# 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`.
|
705
|
-
attr_accessor :metadata
|
706
|
-
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
707
|
-
attr_accessor :period
|
708
|
-
# The ID of the price object. One of `price` or `price_data` is required.
|
709
|
-
attr_accessor :price
|
710
|
-
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
711
|
-
attr_accessor :price_data
|
712
|
-
# Quantity for this item. Defaults to 1.
|
713
|
-
attr_accessor :quantity
|
714
|
-
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
715
|
-
attr_accessor :tax_rates
|
716
|
-
|
717
|
-
def initialize(
|
718
|
-
discounts: nil,
|
719
|
-
metadata: nil,
|
720
|
-
period: nil,
|
721
|
-
price: nil,
|
722
|
-
price_data: nil,
|
723
|
-
quantity: nil,
|
724
|
-
tax_rates: nil
|
725
|
-
)
|
726
|
-
@discounts = discounts
|
727
|
-
@metadata = metadata
|
728
|
-
@period = period
|
729
|
-
@price = price
|
730
|
-
@price_data = price_data
|
731
|
-
@quantity = quantity
|
732
|
-
@tax_rates = tax_rates
|
733
|
-
end
|
734
|
-
end
|
735
|
-
|
736
|
-
class AutomaticTax < Stripe::RequestParams
|
737
|
-
class Liability < Stripe::RequestParams
|
738
|
-
# The connected account being referenced when `type` is `account`.
|
739
|
-
attr_accessor :account
|
740
|
-
# Type of the account referenced in the request.
|
741
|
-
attr_accessor :type
|
742
|
-
|
743
|
-
def initialize(account: nil, type: nil)
|
744
|
-
@account = account
|
745
|
-
@type = type
|
746
|
-
end
|
747
|
-
end
|
748
|
-
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
749
|
-
attr_accessor :enabled
|
750
|
-
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
751
|
-
attr_accessor :liability
|
752
|
-
|
753
|
-
def initialize(enabled: nil, liability: nil)
|
754
|
-
@enabled = enabled
|
755
|
-
@liability = liability
|
756
|
-
end
|
757
|
-
end
|
758
|
-
|
759
|
-
class BillingThresholds < Stripe::RequestParams
|
760
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
761
|
-
attr_accessor :amount_gte
|
762
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
763
|
-
attr_accessor :reset_billing_cycle_anchor
|
764
|
-
|
765
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
766
|
-
@amount_gte = amount_gte
|
767
|
-
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
768
|
-
end
|
769
|
-
end
|
770
|
-
|
771
|
-
class Discount < Stripe::RequestParams
|
772
|
-
class DiscountEnd < Stripe::RequestParams
|
773
|
-
class Duration < Stripe::RequestParams
|
774
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
775
|
-
attr_accessor :interval
|
776
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
777
|
-
attr_accessor :interval_count
|
778
|
-
|
779
|
-
def initialize(interval: nil, interval_count: nil)
|
780
|
-
@interval = interval
|
781
|
-
@interval_count = interval_count
|
782
|
-
end
|
783
|
-
end
|
784
|
-
# Time span for the redeemed discount.
|
785
|
-
attr_accessor :duration
|
786
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
787
|
-
attr_accessor :timestamp
|
788
|
-
# The type of calculation made to determine when the discount ends.
|
789
|
-
attr_accessor :type
|
790
|
-
|
791
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
792
|
-
@duration = duration
|
793
|
-
@timestamp = timestamp
|
794
|
-
@type = type
|
795
|
-
end
|
796
|
-
end
|
797
|
-
# ID of the coupon to create a new discount for.
|
798
|
-
attr_accessor :coupon
|
799
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
800
|
-
attr_accessor :discount
|
801
|
-
# Details to determine how long the discount should be applied for.
|
802
|
-
attr_accessor :discount_end
|
803
|
-
# ID of the promotion code to create a new discount for.
|
804
|
-
attr_accessor :promotion_code
|
805
|
-
|
806
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
807
|
-
@coupon = coupon
|
808
|
-
@discount = discount
|
809
|
-
@discount_end = discount_end
|
810
|
-
@promotion_code = promotion_code
|
811
|
-
end
|
812
|
-
end
|
813
|
-
|
814
|
-
class Duration < Stripe::RequestParams
|
815
|
-
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
816
|
-
attr_accessor :interval
|
817
|
-
# The multiplier applied to the interval.
|
818
|
-
attr_accessor :interval_count
|
819
|
-
|
820
|
-
def initialize(interval: nil, interval_count: nil)
|
821
|
-
@interval = interval
|
822
|
-
@interval_count = interval_count
|
823
|
-
end
|
824
|
-
end
|
825
|
-
|
826
|
-
class InvoiceSettings < Stripe::RequestParams
|
827
|
-
class Issuer < Stripe::RequestParams
|
828
|
-
# The connected account being referenced when `type` is `account`.
|
829
|
-
attr_accessor :account
|
830
|
-
# Type of the account referenced in the request.
|
831
|
-
attr_accessor :type
|
832
|
-
|
833
|
-
def initialize(account: nil, type: nil)
|
834
|
-
@account = account
|
835
|
-
@type = type
|
836
|
-
end
|
837
|
-
end
|
838
|
-
# The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
839
|
-
attr_accessor :account_tax_ids
|
840
|
-
# Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
|
841
|
-
attr_accessor :days_until_due
|
842
|
-
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
843
|
-
attr_accessor :issuer
|
844
|
-
|
845
|
-
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
|
846
|
-
@account_tax_ids = account_tax_ids
|
847
|
-
@days_until_due = days_until_due
|
848
|
-
@issuer = issuer
|
849
|
-
end
|
850
|
-
end
|
851
|
-
|
852
|
-
class Item < Stripe::RequestParams
|
853
|
-
class BillingThresholds < Stripe::RequestParams
|
854
|
-
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
855
|
-
attr_accessor :usage_gte
|
856
|
-
|
857
|
-
def initialize(usage_gte: nil)
|
858
|
-
@usage_gte = usage_gte
|
859
|
-
end
|
860
|
-
end
|
861
|
-
|
862
|
-
class Discount < Stripe::RequestParams
|
863
|
-
class DiscountEnd < Stripe::RequestParams
|
864
|
-
class Duration < Stripe::RequestParams
|
865
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
866
|
-
attr_accessor :interval
|
867
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
868
|
-
attr_accessor :interval_count
|
869
|
-
|
870
|
-
def initialize(interval: nil, interval_count: nil)
|
871
|
-
@interval = interval
|
872
|
-
@interval_count = interval_count
|
873
|
-
end
|
874
|
-
end
|
875
|
-
# Time span for the redeemed discount.
|
876
|
-
attr_accessor :duration
|
877
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
878
|
-
attr_accessor :timestamp
|
879
|
-
# The type of calculation made to determine when the discount ends.
|
880
|
-
attr_accessor :type
|
881
|
-
|
882
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
883
|
-
@duration = duration
|
884
|
-
@timestamp = timestamp
|
885
|
-
@type = type
|
886
|
-
end
|
887
|
-
end
|
888
|
-
# ID of the coupon to create a new discount for.
|
889
|
-
attr_accessor :coupon
|
890
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
891
|
-
attr_accessor :discount
|
892
|
-
# Details to determine how long the discount should be applied for.
|
893
|
-
attr_accessor :discount_end
|
894
|
-
# ID of the promotion code to create a new discount for.
|
895
|
-
attr_accessor :promotion_code
|
896
|
-
|
897
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
898
|
-
@coupon = coupon
|
899
|
-
@discount = discount
|
900
|
-
@discount_end = discount_end
|
901
|
-
@promotion_code = promotion_code
|
902
|
-
end
|
903
|
-
end
|
904
|
-
|
905
|
-
class PriceData < Stripe::RequestParams
|
906
|
-
class Recurring < Stripe::RequestParams
|
907
|
-
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
908
|
-
attr_accessor :interval
|
909
|
-
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
910
|
-
attr_accessor :interval_count
|
911
|
-
|
912
|
-
def initialize(interval: nil, interval_count: nil)
|
913
|
-
@interval = interval
|
914
|
-
@interval_count = interval_count
|
915
|
-
end
|
916
|
-
end
|
917
|
-
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
918
|
-
attr_accessor :currency
|
919
|
-
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
920
|
-
attr_accessor :product
|
921
|
-
# The recurring components of a price such as `interval` and `interval_count`.
|
922
|
-
attr_accessor :recurring
|
923
|
-
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
924
|
-
attr_accessor :tax_behavior
|
925
|
-
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
926
|
-
attr_accessor :unit_amount
|
927
|
-
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
928
|
-
attr_accessor :unit_amount_decimal
|
929
|
-
|
930
|
-
def initialize(
|
931
|
-
currency: nil,
|
932
|
-
product: nil,
|
933
|
-
recurring: nil,
|
934
|
-
tax_behavior: nil,
|
935
|
-
unit_amount: nil,
|
936
|
-
unit_amount_decimal: nil
|
937
|
-
)
|
938
|
-
@currency = currency
|
939
|
-
@product = product
|
940
|
-
@recurring = recurring
|
941
|
-
@tax_behavior = tax_behavior
|
942
|
-
@unit_amount = unit_amount
|
943
|
-
@unit_amount_decimal = unit_amount_decimal
|
944
|
-
end
|
945
|
-
end
|
946
|
-
|
947
|
-
class Trial < Stripe::RequestParams
|
948
|
-
# 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.
|
949
|
-
attr_accessor :converts_to
|
950
|
-
# Determines the type of trial for this item.
|
951
|
-
attr_accessor :type
|
952
|
-
|
953
|
-
def initialize(converts_to: nil, type: nil)
|
954
|
-
@converts_to = converts_to
|
955
|
-
@type = type
|
956
|
-
end
|
957
|
-
end
|
958
|
-
# 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.
|
959
|
-
attr_accessor :billing_thresholds
|
960
|
-
# The coupons to redeem into discounts for the subscription item.
|
961
|
-
attr_accessor :discounts
|
962
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
963
|
-
attr_accessor :metadata
|
964
|
-
# The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
|
965
|
-
attr_accessor :plan
|
966
|
-
# The ID of the price object.
|
967
|
-
attr_accessor :price
|
968
|
-
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
969
|
-
attr_accessor :price_data
|
970
|
-
# Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
|
971
|
-
attr_accessor :quantity
|
972
|
-
# 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.
|
973
|
-
attr_accessor :tax_rates
|
974
|
-
# Options that configure the trial on the subscription item.
|
975
|
-
attr_accessor :trial
|
976
|
-
|
977
|
-
def initialize(
|
978
|
-
billing_thresholds: nil,
|
979
|
-
discounts: nil,
|
980
|
-
metadata: nil,
|
981
|
-
plan: nil,
|
982
|
-
price: nil,
|
983
|
-
price_data: nil,
|
984
|
-
quantity: nil,
|
985
|
-
tax_rates: nil,
|
986
|
-
trial: nil
|
987
|
-
)
|
988
|
-
@billing_thresholds = billing_thresholds
|
989
|
-
@discounts = discounts
|
990
|
-
@metadata = metadata
|
991
|
-
@plan = plan
|
992
|
-
@price = price
|
993
|
-
@price_data = price_data
|
994
|
-
@quantity = quantity
|
995
|
-
@tax_rates = tax_rates
|
996
|
-
@trial = trial
|
997
|
-
end
|
998
|
-
end
|
999
|
-
|
1000
|
-
class PauseCollection < Stripe::RequestParams
|
1001
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1002
|
-
attr_accessor :behavior
|
1003
|
-
|
1004
|
-
def initialize(behavior: nil)
|
1005
|
-
@behavior = behavior
|
1006
|
-
end
|
1007
|
-
end
|
1008
|
-
|
1009
|
-
class TransferData < Stripe::RequestParams
|
1010
|
-
# 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.
|
1011
|
-
attr_accessor :amount_percent
|
1012
|
-
# ID of an existing, connected Stripe account.
|
1013
|
-
attr_accessor :destination
|
1014
|
-
|
1015
|
-
def initialize(amount_percent: nil, destination: nil)
|
1016
|
-
@amount_percent = amount_percent
|
1017
|
-
@destination = destination
|
1018
|
-
end
|
1019
|
-
end
|
1020
|
-
|
1021
|
-
class TrialSettings < Stripe::RequestParams
|
1022
|
-
class EndBehavior < Stripe::RequestParams
|
1023
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1024
|
-
attr_accessor :prorate_up_front
|
1025
|
-
|
1026
|
-
def initialize(prorate_up_front: nil)
|
1027
|
-
@prorate_up_front = prorate_up_front
|
1028
|
-
end
|
1029
|
-
end
|
1030
|
-
# Defines how the subscription should behave when a trial ends.
|
1031
|
-
attr_accessor :end_behavior
|
1032
|
-
|
1033
|
-
def initialize(end_behavior: nil)
|
1034
|
-
@end_behavior = end_behavior
|
1035
|
-
end
|
1036
|
-
end
|
1037
|
-
# 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.
|
1038
|
-
attr_accessor :add_invoice_items
|
1039
|
-
# 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).
|
1040
|
-
attr_accessor :application_fee_percent
|
1041
|
-
# Automatic tax settings for this phase.
|
1042
|
-
attr_accessor :automatic_tax
|
1043
|
-
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
1044
|
-
attr_accessor :billing_cycle_anchor
|
1045
|
-
# 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.
|
1046
|
-
attr_accessor :billing_thresholds
|
1047
|
-
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
1048
|
-
attr_accessor :collection_method
|
1049
|
-
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1050
|
-
attr_accessor :currency
|
1051
|
-
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
1052
|
-
attr_accessor :default_payment_method
|
1053
|
-
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
|
1054
|
-
attr_accessor :default_tax_rates
|
1055
|
-
# Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
1056
|
-
attr_accessor :description
|
1057
|
-
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
1058
|
-
attr_accessor :discounts
|
1059
|
-
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
1060
|
-
attr_accessor :duration
|
1061
|
-
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
1062
|
-
attr_accessor :end_date
|
1063
|
-
# All invoices will be billed using the specified settings.
|
1064
|
-
attr_accessor :invoice_settings
|
1065
|
-
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
1066
|
-
attr_accessor :items
|
1067
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
1068
|
-
attr_accessor :iterations
|
1069
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
1070
|
-
attr_accessor :metadata
|
1071
|
-
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1072
|
-
attr_accessor :on_behalf_of
|
1073
|
-
# 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).
|
1074
|
-
attr_accessor :pause_collection
|
1075
|
-
# 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.
|
1076
|
-
attr_accessor :proration_behavior
|
1077
|
-
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
1078
|
-
attr_accessor :transfer_data
|
1079
|
-
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1080
|
-
attr_accessor :trial
|
1081
|
-
# Specify trial behavior when crossing phase boundaries
|
1082
|
-
attr_accessor :trial_continuation
|
1083
|
-
# 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`
|
1084
|
-
attr_accessor :trial_end
|
1085
|
-
# Settings related to subscription trials.
|
1086
|
-
attr_accessor :trial_settings
|
1087
|
-
|
1088
|
-
def initialize(
|
1089
|
-
add_invoice_items: nil,
|
1090
|
-
application_fee_percent: nil,
|
1091
|
-
automatic_tax: nil,
|
1092
|
-
billing_cycle_anchor: nil,
|
1093
|
-
billing_thresholds: nil,
|
1094
|
-
collection_method: nil,
|
1095
|
-
currency: nil,
|
1096
|
-
default_payment_method: nil,
|
1097
|
-
default_tax_rates: nil,
|
1098
|
-
description: nil,
|
1099
|
-
discounts: nil,
|
1100
|
-
duration: nil,
|
1101
|
-
end_date: nil,
|
1102
|
-
invoice_settings: nil,
|
1103
|
-
items: nil,
|
1104
|
-
iterations: nil,
|
1105
|
-
metadata: nil,
|
1106
|
-
on_behalf_of: nil,
|
1107
|
-
pause_collection: nil,
|
1108
|
-
proration_behavior: nil,
|
1109
|
-
transfer_data: nil,
|
1110
|
-
trial: nil,
|
1111
|
-
trial_continuation: nil,
|
1112
|
-
trial_end: nil,
|
1113
|
-
trial_settings: nil
|
1114
|
-
)
|
1115
|
-
@add_invoice_items = add_invoice_items
|
1116
|
-
@application_fee_percent = application_fee_percent
|
1117
|
-
@automatic_tax = automatic_tax
|
1118
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1119
|
-
@billing_thresholds = billing_thresholds
|
1120
|
-
@collection_method = collection_method
|
1121
|
-
@currency = currency
|
1122
|
-
@default_payment_method = default_payment_method
|
1123
|
-
@default_tax_rates = default_tax_rates
|
1124
|
-
@description = description
|
1125
|
-
@discounts = discounts
|
1126
|
-
@duration = duration
|
1127
|
-
@end_date = end_date
|
1128
|
-
@invoice_settings = invoice_settings
|
1129
|
-
@items = items
|
1130
|
-
@iterations = iterations
|
1131
|
-
@metadata = metadata
|
1132
|
-
@on_behalf_of = on_behalf_of
|
1133
|
-
@pause_collection = pause_collection
|
1134
|
-
@proration_behavior = proration_behavior
|
1135
|
-
@transfer_data = transfer_data
|
1136
|
-
@trial = trial
|
1137
|
-
@trial_continuation = trial_continuation
|
1138
|
-
@trial_end = trial_end
|
1139
|
-
@trial_settings = trial_settings
|
1140
|
-
end
|
1141
|
-
end
|
1142
475
|
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
end
|
1154
|
-
# 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.
|
1155
|
-
attr_accessor :billing_behavior
|
1156
|
-
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
1157
|
-
attr_accessor :billing_mode
|
1158
|
-
# The identifier of the customer to create the subscription schedule for.
|
1159
|
-
attr_accessor :customer
|
1160
|
-
# The identifier of the account to create the subscription schedule for.
|
1161
|
-
attr_accessor :customer_account
|
1162
|
-
# Object representing the subscription schedule's default settings.
|
1163
|
-
attr_accessor :default_settings
|
1164
|
-
# 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.
|
1165
|
-
attr_accessor :end_behavior
|
1166
|
-
# Specifies which fields in the response should be expanded.
|
1167
|
-
attr_accessor :expand
|
1168
|
-
# Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
|
1169
|
-
attr_accessor :from_subscription
|
1170
|
-
# 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`.
|
1171
|
-
attr_accessor :metadata
|
1172
|
-
# 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.
|
1173
|
-
attr_accessor :phases
|
1174
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1175
|
-
attr_accessor :prebilling
|
1176
|
-
# When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
|
1177
|
-
attr_accessor :start_date
|
1178
|
-
|
1179
|
-
def initialize(
|
1180
|
-
billing_behavior: nil,
|
1181
|
-
billing_mode: nil,
|
1182
|
-
customer: nil,
|
1183
|
-
customer_account: nil,
|
1184
|
-
default_settings: nil,
|
1185
|
-
end_behavior: nil,
|
1186
|
-
expand: nil,
|
1187
|
-
from_subscription: nil,
|
1188
|
-
metadata: nil,
|
1189
|
-
phases: nil,
|
1190
|
-
prebilling: nil,
|
1191
|
-
start_date: nil
|
1192
|
-
)
|
1193
|
-
@billing_behavior = billing_behavior
|
1194
|
-
@billing_mode = billing_mode
|
1195
|
-
@customer = customer
|
1196
|
-
@customer_account = customer_account
|
1197
|
-
@default_settings = default_settings
|
1198
|
-
@end_behavior = end_behavior
|
1199
|
-
@expand = expand
|
1200
|
-
@from_subscription = from_subscription
|
1201
|
-
@metadata = metadata
|
1202
|
-
@phases = phases
|
1203
|
-
@prebilling = prebilling
|
1204
|
-
@start_date = start_date
|
476
|
+
def self.inner_class_types
|
477
|
+
@inner_class_types = {
|
478
|
+
add_invoice_items: AddInvoiceItem,
|
479
|
+
automatic_tax: AutomaticTax,
|
480
|
+
billing_thresholds: BillingThresholds,
|
481
|
+
discounts: Discount,
|
482
|
+
invoice_settings: InvoiceSettings,
|
483
|
+
items: Item,
|
484
|
+
transfer_data: TransferData,
|
485
|
+
}
|
1205
486
|
end
|
1206
|
-
end
|
1207
|
-
|
1208
|
-
class UpdateParams < Stripe::RequestParams
|
1209
|
-
class DefaultSettings < Stripe::RequestParams
|
1210
|
-
class AutomaticTax < Stripe::RequestParams
|
1211
|
-
class Liability < Stripe::RequestParams
|
1212
|
-
# The connected account being referenced when `type` is `account`.
|
1213
|
-
attr_accessor :account
|
1214
|
-
# Type of the account referenced in the request.
|
1215
|
-
attr_accessor :type
|
1216
|
-
|
1217
|
-
def initialize(account: nil, type: nil)
|
1218
|
-
@account = account
|
1219
|
-
@type = type
|
1220
|
-
end
|
1221
|
-
end
|
1222
|
-
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
1223
|
-
attr_accessor :enabled
|
1224
|
-
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
1225
|
-
attr_accessor :liability
|
1226
|
-
|
1227
|
-
def initialize(enabled: nil, liability: nil)
|
1228
|
-
@enabled = enabled
|
1229
|
-
@liability = liability
|
1230
|
-
end
|
1231
|
-
end
|
1232
|
-
|
1233
|
-
class BillingThresholds < Stripe::RequestParams
|
1234
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1235
|
-
attr_accessor :amount_gte
|
1236
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
1237
|
-
attr_accessor :reset_billing_cycle_anchor
|
1238
|
-
|
1239
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
1240
|
-
@amount_gte = amount_gte
|
1241
|
-
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
1242
|
-
end
|
1243
|
-
end
|
1244
487
|
|
1245
|
-
|
1246
|
-
|
1247
|
-
# The connected account being referenced when `type` is `account`.
|
1248
|
-
attr_accessor :account
|
1249
|
-
# Type of the account referenced in the request.
|
1250
|
-
attr_accessor :type
|
1251
|
-
|
1252
|
-
def initialize(account: nil, type: nil)
|
1253
|
-
@account = account
|
1254
|
-
@type = type
|
1255
|
-
end
|
1256
|
-
end
|
1257
|
-
# The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
|
1258
|
-
attr_accessor :account_tax_ids
|
1259
|
-
# Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
|
1260
|
-
attr_accessor :days_until_due
|
1261
|
-
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
1262
|
-
attr_accessor :issuer
|
1263
|
-
|
1264
|
-
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
|
1265
|
-
@account_tax_ids = account_tax_ids
|
1266
|
-
@days_until_due = days_until_due
|
1267
|
-
@issuer = issuer
|
1268
|
-
end
|
1269
|
-
end
|
1270
|
-
|
1271
|
-
class TransferData < Stripe::RequestParams
|
1272
|
-
# 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.
|
1273
|
-
attr_accessor :amount_percent
|
1274
|
-
# ID of an existing, connected Stripe account.
|
1275
|
-
attr_accessor :destination
|
1276
|
-
|
1277
|
-
def initialize(amount_percent: nil, destination: nil)
|
1278
|
-
@amount_percent = amount_percent
|
1279
|
-
@destination = destination
|
1280
|
-
end
|
1281
|
-
end
|
1282
|
-
# 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).
|
1283
|
-
attr_accessor :application_fee_percent
|
1284
|
-
# Default settings for automatic tax computation.
|
1285
|
-
attr_accessor :automatic_tax
|
1286
|
-
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
1287
|
-
attr_accessor :billing_cycle_anchor
|
1288
|
-
# 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.
|
1289
|
-
attr_accessor :billing_thresholds
|
1290
|
-
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
1291
|
-
attr_accessor :collection_method
|
1292
|
-
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
1293
|
-
attr_accessor :default_payment_method
|
1294
|
-
# Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
1295
|
-
attr_accessor :description
|
1296
|
-
# All invoices will be billed using the specified settings.
|
1297
|
-
attr_accessor :invoice_settings
|
1298
|
-
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1299
|
-
attr_accessor :on_behalf_of
|
1300
|
-
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
1301
|
-
attr_accessor :transfer_data
|
1302
|
-
|
1303
|
-
def initialize(
|
1304
|
-
application_fee_percent: nil,
|
1305
|
-
automatic_tax: nil,
|
1306
|
-
billing_cycle_anchor: nil,
|
1307
|
-
billing_thresholds: nil,
|
1308
|
-
collection_method: nil,
|
1309
|
-
default_payment_method: nil,
|
1310
|
-
description: nil,
|
1311
|
-
invoice_settings: nil,
|
1312
|
-
on_behalf_of: nil,
|
1313
|
-
transfer_data: nil
|
1314
|
-
)
|
1315
|
-
@application_fee_percent = application_fee_percent
|
1316
|
-
@automatic_tax = automatic_tax
|
1317
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1318
|
-
@billing_thresholds = billing_thresholds
|
1319
|
-
@collection_method = collection_method
|
1320
|
-
@default_payment_method = default_payment_method
|
1321
|
-
@description = description
|
1322
|
-
@invoice_settings = invoice_settings
|
1323
|
-
@on_behalf_of = on_behalf_of
|
1324
|
-
@transfer_data = transfer_data
|
1325
|
-
end
|
1326
|
-
end
|
1327
|
-
|
1328
|
-
class Phase < Stripe::RequestParams
|
1329
|
-
class AddInvoiceItem < Stripe::RequestParams
|
1330
|
-
class Discount < Stripe::RequestParams
|
1331
|
-
class DiscountEnd < Stripe::RequestParams
|
1332
|
-
class Duration < Stripe::RequestParams
|
1333
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1334
|
-
attr_accessor :interval
|
1335
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1336
|
-
attr_accessor :interval_count
|
1337
|
-
|
1338
|
-
def initialize(interval: nil, interval_count: nil)
|
1339
|
-
@interval = interval
|
1340
|
-
@interval_count = interval_count
|
1341
|
-
end
|
1342
|
-
end
|
1343
|
-
# Time span for the redeemed discount.
|
1344
|
-
attr_accessor :duration
|
1345
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1346
|
-
attr_accessor :timestamp
|
1347
|
-
# The type of calculation made to determine when the discount ends.
|
1348
|
-
attr_accessor :type
|
1349
|
-
|
1350
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1351
|
-
@duration = duration
|
1352
|
-
@timestamp = timestamp
|
1353
|
-
@type = type
|
1354
|
-
end
|
1355
|
-
end
|
1356
|
-
# ID of the coupon to create a new discount for.
|
1357
|
-
attr_accessor :coupon
|
1358
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1359
|
-
attr_accessor :discount
|
1360
|
-
# Details to determine how long the discount should be applied for.
|
1361
|
-
attr_accessor :discount_end
|
1362
|
-
# ID of the promotion code to create a new discount for.
|
1363
|
-
attr_accessor :promotion_code
|
1364
|
-
|
1365
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1366
|
-
@coupon = coupon
|
1367
|
-
@discount = discount
|
1368
|
-
@discount_end = discount_end
|
1369
|
-
@promotion_code = promotion_code
|
1370
|
-
end
|
1371
|
-
end
|
1372
|
-
|
1373
|
-
class Period < Stripe::RequestParams
|
1374
|
-
class End < Stripe::RequestParams
|
1375
|
-
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
1376
|
-
attr_accessor :timestamp
|
1377
|
-
# Select how to calculate the end of the invoice item period.
|
1378
|
-
attr_accessor :type
|
1379
|
-
|
1380
|
-
def initialize(timestamp: nil, type: nil)
|
1381
|
-
@timestamp = timestamp
|
1382
|
-
@type = type
|
1383
|
-
end
|
1384
|
-
end
|
1385
|
-
|
1386
|
-
class Start < Stripe::RequestParams
|
1387
|
-
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
1388
|
-
attr_accessor :timestamp
|
1389
|
-
# Select how to calculate the start of the invoice item period.
|
1390
|
-
attr_accessor :type
|
1391
|
-
|
1392
|
-
def initialize(timestamp: nil, type: nil)
|
1393
|
-
@timestamp = timestamp
|
1394
|
-
@type = type
|
1395
|
-
end
|
1396
|
-
end
|
1397
|
-
# End of the invoice item period.
|
1398
|
-
attr_accessor :end
|
1399
|
-
# Start of the invoice item period.
|
1400
|
-
attr_accessor :start
|
1401
|
-
|
1402
|
-
def initialize(end_: nil, start: nil)
|
1403
|
-
@end = end_
|
1404
|
-
@start = start
|
1405
|
-
end
|
1406
|
-
end
|
1407
|
-
|
1408
|
-
class PriceData < Stripe::RequestParams
|
1409
|
-
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1410
|
-
attr_accessor :currency
|
1411
|
-
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1412
|
-
attr_accessor :product
|
1413
|
-
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
1414
|
-
attr_accessor :tax_behavior
|
1415
|
-
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
|
1416
|
-
attr_accessor :unit_amount
|
1417
|
-
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
1418
|
-
attr_accessor :unit_amount_decimal
|
1419
|
-
|
1420
|
-
def initialize(
|
1421
|
-
currency: nil,
|
1422
|
-
product: nil,
|
1423
|
-
tax_behavior: nil,
|
1424
|
-
unit_amount: nil,
|
1425
|
-
unit_amount_decimal: nil
|
1426
|
-
)
|
1427
|
-
@currency = currency
|
1428
|
-
@product = product
|
1429
|
-
@tax_behavior = tax_behavior
|
1430
|
-
@unit_amount = unit_amount
|
1431
|
-
@unit_amount_decimal = unit_amount_decimal
|
1432
|
-
end
|
1433
|
-
end
|
1434
|
-
# The coupons to redeem into discounts for the item.
|
1435
|
-
attr_accessor :discounts
|
1436
|
-
# 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`.
|
1437
|
-
attr_accessor :metadata
|
1438
|
-
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
1439
|
-
attr_accessor :period
|
1440
|
-
# The ID of the price object. One of `price` or `price_data` is required.
|
1441
|
-
attr_accessor :price
|
1442
|
-
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
1443
|
-
attr_accessor :price_data
|
1444
|
-
# Quantity for this item. Defaults to 1.
|
1445
|
-
attr_accessor :quantity
|
1446
|
-
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
1447
|
-
attr_accessor :tax_rates
|
1448
|
-
|
1449
|
-
def initialize(
|
1450
|
-
discounts: nil,
|
1451
|
-
metadata: nil,
|
1452
|
-
period: nil,
|
1453
|
-
price: nil,
|
1454
|
-
price_data: nil,
|
1455
|
-
quantity: nil,
|
1456
|
-
tax_rates: nil
|
1457
|
-
)
|
1458
|
-
@discounts = discounts
|
1459
|
-
@metadata = metadata
|
1460
|
-
@period = period
|
1461
|
-
@price = price
|
1462
|
-
@price_data = price_data
|
1463
|
-
@quantity = quantity
|
1464
|
-
@tax_rates = tax_rates
|
1465
|
-
end
|
1466
|
-
end
|
1467
|
-
|
1468
|
-
class AutomaticTax < Stripe::RequestParams
|
1469
|
-
class Liability < Stripe::RequestParams
|
1470
|
-
# The connected account being referenced when `type` is `account`.
|
1471
|
-
attr_accessor :account
|
1472
|
-
# Type of the account referenced in the request.
|
1473
|
-
attr_accessor :type
|
1474
|
-
|
1475
|
-
def initialize(account: nil, type: nil)
|
1476
|
-
@account = account
|
1477
|
-
@type = type
|
1478
|
-
end
|
1479
|
-
end
|
1480
|
-
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
1481
|
-
attr_accessor :enabled
|
1482
|
-
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
1483
|
-
attr_accessor :liability
|
1484
|
-
|
1485
|
-
def initialize(enabled: nil, liability: nil)
|
1486
|
-
@enabled = enabled
|
1487
|
-
@liability = liability
|
1488
|
-
end
|
1489
|
-
end
|
1490
|
-
|
1491
|
-
class BillingThresholds < Stripe::RequestParams
|
1492
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1493
|
-
attr_accessor :amount_gte
|
1494
|
-
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
1495
|
-
attr_accessor :reset_billing_cycle_anchor
|
1496
|
-
|
1497
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
1498
|
-
@amount_gte = amount_gte
|
1499
|
-
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
1500
|
-
end
|
1501
|
-
end
|
1502
|
-
|
1503
|
-
class Discount < Stripe::RequestParams
|
1504
|
-
class DiscountEnd < Stripe::RequestParams
|
1505
|
-
class Duration < Stripe::RequestParams
|
1506
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1507
|
-
attr_accessor :interval
|
1508
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1509
|
-
attr_accessor :interval_count
|
1510
|
-
|
1511
|
-
def initialize(interval: nil, interval_count: nil)
|
1512
|
-
@interval = interval
|
1513
|
-
@interval_count = interval_count
|
1514
|
-
end
|
1515
|
-
end
|
1516
|
-
# Time span for the redeemed discount.
|
1517
|
-
attr_accessor :duration
|
1518
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1519
|
-
attr_accessor :timestamp
|
1520
|
-
# The type of calculation made to determine when the discount ends.
|
1521
|
-
attr_accessor :type
|
1522
|
-
|
1523
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1524
|
-
@duration = duration
|
1525
|
-
@timestamp = timestamp
|
1526
|
-
@type = type
|
1527
|
-
end
|
1528
|
-
end
|
1529
|
-
# ID of the coupon to create a new discount for.
|
1530
|
-
attr_accessor :coupon
|
1531
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1532
|
-
attr_accessor :discount
|
1533
|
-
# Details to determine how long the discount should be applied for.
|
1534
|
-
attr_accessor :discount_end
|
1535
|
-
# ID of the promotion code to create a new discount for.
|
1536
|
-
attr_accessor :promotion_code
|
1537
|
-
|
1538
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1539
|
-
@coupon = coupon
|
1540
|
-
@discount = discount
|
1541
|
-
@discount_end = discount_end
|
1542
|
-
@promotion_code = promotion_code
|
1543
|
-
end
|
1544
|
-
end
|
1545
|
-
|
1546
|
-
class Duration < Stripe::RequestParams
|
1547
|
-
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
1548
|
-
attr_accessor :interval
|
1549
|
-
# The multiplier applied to the interval.
|
1550
|
-
attr_accessor :interval_count
|
1551
|
-
|
1552
|
-
def initialize(interval: nil, interval_count: nil)
|
1553
|
-
@interval = interval
|
1554
|
-
@interval_count = interval_count
|
1555
|
-
end
|
1556
|
-
end
|
1557
|
-
|
1558
|
-
class InvoiceSettings < Stripe::RequestParams
|
1559
|
-
class Issuer < Stripe::RequestParams
|
1560
|
-
# The connected account being referenced when `type` is `account`.
|
1561
|
-
attr_accessor :account
|
1562
|
-
# Type of the account referenced in the request.
|
1563
|
-
attr_accessor :type
|
1564
|
-
|
1565
|
-
def initialize(account: nil, type: nil)
|
1566
|
-
@account = account
|
1567
|
-
@type = type
|
1568
|
-
end
|
1569
|
-
end
|
1570
|
-
# The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
1571
|
-
attr_accessor :account_tax_ids
|
1572
|
-
# Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
|
1573
|
-
attr_accessor :days_until_due
|
1574
|
-
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
1575
|
-
attr_accessor :issuer
|
1576
|
-
|
1577
|
-
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
|
1578
|
-
@account_tax_ids = account_tax_ids
|
1579
|
-
@days_until_due = days_until_due
|
1580
|
-
@issuer = issuer
|
1581
|
-
end
|
1582
|
-
end
|
1583
|
-
|
1584
|
-
class Item < Stripe::RequestParams
|
1585
|
-
class BillingThresholds < Stripe::RequestParams
|
1586
|
-
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
1587
|
-
attr_accessor :usage_gte
|
1588
|
-
|
1589
|
-
def initialize(usage_gte: nil)
|
1590
|
-
@usage_gte = usage_gte
|
1591
|
-
end
|
1592
|
-
end
|
1593
|
-
|
1594
|
-
class Discount < Stripe::RequestParams
|
1595
|
-
class DiscountEnd < Stripe::RequestParams
|
1596
|
-
class Duration < Stripe::RequestParams
|
1597
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1598
|
-
attr_accessor :interval
|
1599
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1600
|
-
attr_accessor :interval_count
|
1601
|
-
|
1602
|
-
def initialize(interval: nil, interval_count: nil)
|
1603
|
-
@interval = interval
|
1604
|
-
@interval_count = interval_count
|
1605
|
-
end
|
1606
|
-
end
|
1607
|
-
# Time span for the redeemed discount.
|
1608
|
-
attr_accessor :duration
|
1609
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1610
|
-
attr_accessor :timestamp
|
1611
|
-
# The type of calculation made to determine when the discount ends.
|
1612
|
-
attr_accessor :type
|
1613
|
-
|
1614
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1615
|
-
@duration = duration
|
1616
|
-
@timestamp = timestamp
|
1617
|
-
@type = type
|
1618
|
-
end
|
1619
|
-
end
|
1620
|
-
# ID of the coupon to create a new discount for.
|
1621
|
-
attr_accessor :coupon
|
1622
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1623
|
-
attr_accessor :discount
|
1624
|
-
# Details to determine how long the discount should be applied for.
|
1625
|
-
attr_accessor :discount_end
|
1626
|
-
# ID of the promotion code to create a new discount for.
|
1627
|
-
attr_accessor :promotion_code
|
1628
|
-
|
1629
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1630
|
-
@coupon = coupon
|
1631
|
-
@discount = discount
|
1632
|
-
@discount_end = discount_end
|
1633
|
-
@promotion_code = promotion_code
|
1634
|
-
end
|
1635
|
-
end
|
1636
|
-
|
1637
|
-
class PriceData < Stripe::RequestParams
|
1638
|
-
class Recurring < Stripe::RequestParams
|
1639
|
-
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
1640
|
-
attr_accessor :interval
|
1641
|
-
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
1642
|
-
attr_accessor :interval_count
|
1643
|
-
|
1644
|
-
def initialize(interval: nil, interval_count: nil)
|
1645
|
-
@interval = interval
|
1646
|
-
@interval_count = interval_count
|
1647
|
-
end
|
1648
|
-
end
|
1649
|
-
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1650
|
-
attr_accessor :currency
|
1651
|
-
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1652
|
-
attr_accessor :product
|
1653
|
-
# The recurring components of a price such as `interval` and `interval_count`.
|
1654
|
-
attr_accessor :recurring
|
1655
|
-
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
1656
|
-
attr_accessor :tax_behavior
|
1657
|
-
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
1658
|
-
attr_accessor :unit_amount
|
1659
|
-
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
1660
|
-
attr_accessor :unit_amount_decimal
|
1661
|
-
|
1662
|
-
def initialize(
|
1663
|
-
currency: nil,
|
1664
|
-
product: nil,
|
1665
|
-
recurring: nil,
|
1666
|
-
tax_behavior: nil,
|
1667
|
-
unit_amount: nil,
|
1668
|
-
unit_amount_decimal: nil
|
1669
|
-
)
|
1670
|
-
@currency = currency
|
1671
|
-
@product = product
|
1672
|
-
@recurring = recurring
|
1673
|
-
@tax_behavior = tax_behavior
|
1674
|
-
@unit_amount = unit_amount
|
1675
|
-
@unit_amount_decimal = unit_amount_decimal
|
1676
|
-
end
|
1677
|
-
end
|
1678
|
-
|
1679
|
-
class Trial < Stripe::RequestParams
|
1680
|
-
# 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.
|
1681
|
-
attr_accessor :converts_to
|
1682
|
-
# Determines the type of trial for this item.
|
1683
|
-
attr_accessor :type
|
1684
|
-
|
1685
|
-
def initialize(converts_to: nil, type: nil)
|
1686
|
-
@converts_to = converts_to
|
1687
|
-
@type = type
|
1688
|
-
end
|
1689
|
-
end
|
1690
|
-
# 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.
|
1691
|
-
attr_accessor :billing_thresholds
|
1692
|
-
# The coupons to redeem into discounts for the subscription item.
|
1693
|
-
attr_accessor :discounts
|
1694
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
1695
|
-
attr_accessor :metadata
|
1696
|
-
# The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
|
1697
|
-
attr_accessor :plan
|
1698
|
-
# The ID of the price object.
|
1699
|
-
attr_accessor :price
|
1700
|
-
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
1701
|
-
attr_accessor :price_data
|
1702
|
-
# Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
|
1703
|
-
attr_accessor :quantity
|
1704
|
-
# 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.
|
1705
|
-
attr_accessor :tax_rates
|
1706
|
-
# Options that configure the trial on the subscription item.
|
1707
|
-
attr_accessor :trial
|
1708
|
-
|
1709
|
-
def initialize(
|
1710
|
-
billing_thresholds: nil,
|
1711
|
-
discounts: nil,
|
1712
|
-
metadata: nil,
|
1713
|
-
plan: nil,
|
1714
|
-
price: nil,
|
1715
|
-
price_data: nil,
|
1716
|
-
quantity: nil,
|
1717
|
-
tax_rates: nil,
|
1718
|
-
trial: nil
|
1719
|
-
)
|
1720
|
-
@billing_thresholds = billing_thresholds
|
1721
|
-
@discounts = discounts
|
1722
|
-
@metadata = metadata
|
1723
|
-
@plan = plan
|
1724
|
-
@price = price
|
1725
|
-
@price_data = price_data
|
1726
|
-
@quantity = quantity
|
1727
|
-
@tax_rates = tax_rates
|
1728
|
-
@trial = trial
|
1729
|
-
end
|
1730
|
-
end
|
1731
|
-
|
1732
|
-
class PauseCollection < Stripe::RequestParams
|
1733
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1734
|
-
attr_accessor :behavior
|
1735
|
-
|
1736
|
-
def initialize(behavior: nil)
|
1737
|
-
@behavior = behavior
|
1738
|
-
end
|
1739
|
-
end
|
1740
|
-
|
1741
|
-
class TransferData < Stripe::RequestParams
|
1742
|
-
# 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.
|
1743
|
-
attr_accessor :amount_percent
|
1744
|
-
# ID of an existing, connected Stripe account.
|
1745
|
-
attr_accessor :destination
|
1746
|
-
|
1747
|
-
def initialize(amount_percent: nil, destination: nil)
|
1748
|
-
@amount_percent = amount_percent
|
1749
|
-
@destination = destination
|
1750
|
-
end
|
1751
|
-
end
|
1752
|
-
|
1753
|
-
class TrialSettings < Stripe::RequestParams
|
1754
|
-
class EndBehavior < Stripe::RequestParams
|
1755
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1756
|
-
attr_accessor :prorate_up_front
|
1757
|
-
|
1758
|
-
def initialize(prorate_up_front: nil)
|
1759
|
-
@prorate_up_front = prorate_up_front
|
1760
|
-
end
|
1761
|
-
end
|
1762
|
-
# Defines how the subscription should behave when a trial ends.
|
1763
|
-
attr_accessor :end_behavior
|
1764
|
-
|
1765
|
-
def initialize(end_behavior: nil)
|
1766
|
-
@end_behavior = end_behavior
|
1767
|
-
end
|
1768
|
-
end
|
1769
|
-
# 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.
|
1770
|
-
attr_accessor :add_invoice_items
|
1771
|
-
# 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).
|
1772
|
-
attr_accessor :application_fee_percent
|
1773
|
-
# Automatic tax settings for this phase.
|
1774
|
-
attr_accessor :automatic_tax
|
1775
|
-
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
1776
|
-
attr_accessor :billing_cycle_anchor
|
1777
|
-
# 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.
|
1778
|
-
attr_accessor :billing_thresholds
|
1779
|
-
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
1780
|
-
attr_accessor :collection_method
|
1781
|
-
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1782
|
-
attr_accessor :currency
|
1783
|
-
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
1784
|
-
attr_accessor :default_payment_method
|
1785
|
-
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
|
1786
|
-
attr_accessor :default_tax_rates
|
1787
|
-
# Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
1788
|
-
attr_accessor :description
|
1789
|
-
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
1790
|
-
attr_accessor :discounts
|
1791
|
-
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
1792
|
-
attr_accessor :duration
|
1793
|
-
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
1794
|
-
attr_accessor :end_date
|
1795
|
-
# All invoices will be billed using the specified settings.
|
1796
|
-
attr_accessor :invoice_settings
|
1797
|
-
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
1798
|
-
attr_accessor :items
|
1799
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
1800
|
-
attr_accessor :iterations
|
1801
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
1802
|
-
attr_accessor :metadata
|
1803
|
-
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1804
|
-
attr_accessor :on_behalf_of
|
1805
|
-
# 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).
|
1806
|
-
attr_accessor :pause_collection
|
1807
|
-
# 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.
|
1808
|
-
attr_accessor :proration_behavior
|
1809
|
-
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
1810
|
-
attr_accessor :start_date
|
1811
|
-
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
1812
|
-
attr_accessor :transfer_data
|
1813
|
-
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1814
|
-
attr_accessor :trial
|
1815
|
-
# Specify trial behavior when crossing phase boundaries
|
1816
|
-
attr_accessor :trial_continuation
|
1817
|
-
# 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`
|
1818
|
-
attr_accessor :trial_end
|
1819
|
-
# Settings related to subscription trials.
|
1820
|
-
attr_accessor :trial_settings
|
1821
|
-
|
1822
|
-
def initialize(
|
1823
|
-
add_invoice_items: nil,
|
1824
|
-
application_fee_percent: nil,
|
1825
|
-
automatic_tax: nil,
|
1826
|
-
billing_cycle_anchor: nil,
|
1827
|
-
billing_thresholds: nil,
|
1828
|
-
collection_method: nil,
|
1829
|
-
currency: nil,
|
1830
|
-
default_payment_method: nil,
|
1831
|
-
default_tax_rates: nil,
|
1832
|
-
description: nil,
|
1833
|
-
discounts: nil,
|
1834
|
-
duration: nil,
|
1835
|
-
end_date: nil,
|
1836
|
-
invoice_settings: nil,
|
1837
|
-
items: nil,
|
1838
|
-
iterations: nil,
|
1839
|
-
metadata: nil,
|
1840
|
-
on_behalf_of: nil,
|
1841
|
-
pause_collection: nil,
|
1842
|
-
proration_behavior: nil,
|
1843
|
-
start_date: nil,
|
1844
|
-
transfer_data: nil,
|
1845
|
-
trial: nil,
|
1846
|
-
trial_continuation: nil,
|
1847
|
-
trial_end: nil,
|
1848
|
-
trial_settings: nil
|
1849
|
-
)
|
1850
|
-
@add_invoice_items = add_invoice_items
|
1851
|
-
@application_fee_percent = application_fee_percent
|
1852
|
-
@automatic_tax = automatic_tax
|
1853
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1854
|
-
@billing_thresholds = billing_thresholds
|
1855
|
-
@collection_method = collection_method
|
1856
|
-
@currency = currency
|
1857
|
-
@default_payment_method = default_payment_method
|
1858
|
-
@default_tax_rates = default_tax_rates
|
1859
|
-
@description = description
|
1860
|
-
@discounts = discounts
|
1861
|
-
@duration = duration
|
1862
|
-
@end_date = end_date
|
1863
|
-
@invoice_settings = invoice_settings
|
1864
|
-
@items = items
|
1865
|
-
@iterations = iterations
|
1866
|
-
@metadata = metadata
|
1867
|
-
@on_behalf_of = on_behalf_of
|
1868
|
-
@pause_collection = pause_collection
|
1869
|
-
@proration_behavior = proration_behavior
|
1870
|
-
@start_date = start_date
|
1871
|
-
@transfer_data = transfer_data
|
1872
|
-
@trial = trial
|
1873
|
-
@trial_continuation = trial_continuation
|
1874
|
-
@trial_end = trial_end
|
1875
|
-
@trial_settings = trial_settings
|
1876
|
-
end
|
1877
|
-
end
|
1878
|
-
|
1879
|
-
class Prebilling < Stripe::RequestParams
|
1880
|
-
# This is used to determine the number of billing cycles to prebill.
|
1881
|
-
attr_accessor :iterations
|
1882
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1883
|
-
attr_accessor :update_behavior
|
1884
|
-
|
1885
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1886
|
-
@iterations = iterations
|
1887
|
-
@update_behavior = update_behavior
|
1888
|
-
end
|
1889
|
-
end
|
1890
|
-
# 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.
|
1891
|
-
attr_accessor :billing_behavior
|
1892
|
-
# Object representing the subscription schedule's default settings.
|
1893
|
-
attr_accessor :default_settings
|
1894
|
-
# 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.
|
1895
|
-
attr_accessor :end_behavior
|
1896
|
-
# Specifies which fields in the response should be expanded.
|
1897
|
-
attr_accessor :expand
|
1898
|
-
# 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`.
|
1899
|
-
attr_accessor :metadata
|
1900
|
-
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
|
1901
|
-
attr_accessor :phases
|
1902
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1903
|
-
attr_accessor :prebilling
|
1904
|
-
# If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
|
1905
|
-
attr_accessor :proration_behavior
|
1906
|
-
|
1907
|
-
def initialize(
|
1908
|
-
billing_behavior: nil,
|
1909
|
-
default_settings: nil,
|
1910
|
-
end_behavior: nil,
|
1911
|
-
expand: nil,
|
1912
|
-
metadata: nil,
|
1913
|
-
phases: nil,
|
1914
|
-
prebilling: nil,
|
1915
|
-
proration_behavior: nil
|
1916
|
-
)
|
1917
|
-
@billing_behavior = billing_behavior
|
1918
|
-
@default_settings = default_settings
|
1919
|
-
@end_behavior = end_behavior
|
1920
|
-
@expand = expand
|
1921
|
-
@metadata = metadata
|
1922
|
-
@phases = phases
|
1923
|
-
@prebilling = prebilling
|
1924
|
-
@proration_behavior = proration_behavior
|
1925
|
-
end
|
1926
|
-
end
|
1927
|
-
|
1928
|
-
class AmendParams < Stripe::RequestParams
|
1929
|
-
class Amendment < Stripe::RequestParams
|
1930
|
-
class AmendmentEnd < Stripe::RequestParams
|
1931
|
-
class DiscountEnd < Stripe::RequestParams
|
1932
|
-
# The ID of a specific discount.
|
1933
|
-
attr_accessor :discount
|
1934
|
-
|
1935
|
-
def initialize(discount: nil)
|
1936
|
-
@discount = discount
|
1937
|
-
end
|
1938
|
-
end
|
1939
|
-
|
1940
|
-
class Duration < Stripe::RequestParams
|
1941
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1942
|
-
attr_accessor :interval
|
1943
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1944
|
-
attr_accessor :interval_count
|
1945
|
-
|
1946
|
-
def initialize(interval: nil, interval_count: nil)
|
1947
|
-
@interval = interval
|
1948
|
-
@interval_count = interval_count
|
1949
|
-
end
|
1950
|
-
end
|
1951
|
-
# Use the `end` time of a given discount.
|
1952
|
-
attr_accessor :discount_end
|
1953
|
-
# Time span for the amendment starting from the `amendment_start`.
|
1954
|
-
attr_accessor :duration
|
1955
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1956
|
-
attr_accessor :timestamp
|
1957
|
-
# Select one of three ways to pass the `amendment_end`.
|
1958
|
-
attr_accessor :type
|
1959
|
-
|
1960
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1961
|
-
@discount_end = discount_end
|
1962
|
-
@duration = duration
|
1963
|
-
@timestamp = timestamp
|
1964
|
-
@type = type
|
1965
|
-
end
|
1966
|
-
end
|
1967
|
-
|
1968
|
-
class AmendmentStart < Stripe::RequestParams
|
1969
|
-
class AmendmentEnd < Stripe::RequestParams
|
1970
|
-
# 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.
|
1971
|
-
attr_accessor :index
|
1972
|
-
|
1973
|
-
def initialize(index: nil)
|
1974
|
-
@index = index
|
1975
|
-
end
|
1976
|
-
end
|
1977
|
-
|
1978
|
-
class DiscountEnd < Stripe::RequestParams
|
1979
|
-
# The ID of a specific discount.
|
1980
|
-
attr_accessor :discount
|
1981
|
-
|
1982
|
-
def initialize(discount: nil)
|
1983
|
-
@discount = discount
|
1984
|
-
end
|
1985
|
-
end
|
1986
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1987
|
-
attr_accessor :amendment_end
|
1988
|
-
# Use the `end` time of a given discount.
|
1989
|
-
attr_accessor :discount_end
|
1990
|
-
# A precise Unix timestamp for the amendment to start.
|
1991
|
-
attr_accessor :timestamp
|
1992
|
-
# Select one of three ways to pass the `amendment_start`.
|
1993
|
-
attr_accessor :type
|
1994
|
-
|
1995
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1996
|
-
@amendment_end = amendment_end
|
1997
|
-
@discount_end = discount_end
|
1998
|
-
@timestamp = timestamp
|
1999
|
-
@type = type
|
2000
|
-
end
|
2001
|
-
end
|
2002
|
-
|
2003
|
-
class DiscountAction < Stripe::RequestParams
|
2004
|
-
class Add < Stripe::RequestParams
|
2005
|
-
class DiscountEnd < Stripe::RequestParams
|
2006
|
-
# The type of calculation made to determine when the discount ends.
|
2007
|
-
attr_accessor :type
|
2008
|
-
|
2009
|
-
def initialize(type: nil)
|
2010
|
-
@type = type
|
2011
|
-
end
|
2012
|
-
end
|
2013
|
-
# The coupon code to redeem.
|
2014
|
-
attr_accessor :coupon
|
2015
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
2016
|
-
attr_accessor :discount
|
2017
|
-
# Details to determine how long the discount should be applied for.
|
2018
|
-
attr_accessor :discount_end
|
2019
|
-
# 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.
|
2020
|
-
attr_accessor :index
|
2021
|
-
# The promotion code to redeem.
|
2022
|
-
attr_accessor :promotion_code
|
2023
|
-
|
2024
|
-
def initialize(
|
2025
|
-
coupon: nil,
|
2026
|
-
discount: nil,
|
2027
|
-
discount_end: nil,
|
2028
|
-
index: nil,
|
2029
|
-
promotion_code: nil
|
2030
|
-
)
|
2031
|
-
@coupon = coupon
|
2032
|
-
@discount = discount
|
2033
|
-
@discount_end = discount_end
|
2034
|
-
@index = index
|
2035
|
-
@promotion_code = promotion_code
|
2036
|
-
end
|
2037
|
-
end
|
2038
|
-
|
2039
|
-
class Remove < Stripe::RequestParams
|
2040
|
-
# The coupon code to remove from the `discounts` array.
|
2041
|
-
attr_accessor :coupon
|
2042
|
-
# The ID of a discount to remove from the `discounts` array.
|
2043
|
-
attr_accessor :discount
|
2044
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
2045
|
-
attr_accessor :promotion_code
|
2046
|
-
|
2047
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2048
|
-
@coupon = coupon
|
2049
|
-
@discount = discount
|
2050
|
-
@promotion_code = promotion_code
|
2051
|
-
end
|
2052
|
-
end
|
2053
|
-
|
2054
|
-
class Set < Stripe::RequestParams
|
2055
|
-
# The coupon code to replace the `discounts` array with.
|
2056
|
-
attr_accessor :coupon
|
2057
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
2058
|
-
attr_accessor :discount
|
2059
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
2060
|
-
attr_accessor :promotion_code
|
2061
|
-
|
2062
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2063
|
-
@coupon = coupon
|
2064
|
-
@discount = discount
|
2065
|
-
@promotion_code = promotion_code
|
2066
|
-
end
|
2067
|
-
end
|
2068
|
-
# Details of the discount to add.
|
2069
|
-
attr_accessor :add
|
2070
|
-
# Details of the discount to remove.
|
2071
|
-
attr_accessor :remove
|
2072
|
-
# Details of the discount to replace the existing discounts with.
|
2073
|
-
attr_accessor :set
|
2074
|
-
# Determines the type of discount action.
|
2075
|
-
attr_accessor :type
|
2076
|
-
|
2077
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2078
|
-
@add = add
|
2079
|
-
@remove = remove
|
2080
|
-
@set = set
|
2081
|
-
@type = type
|
2082
|
-
end
|
2083
|
-
end
|
2084
|
-
|
2085
|
-
class ItemAction < Stripe::RequestParams
|
2086
|
-
class Add < Stripe::RequestParams
|
2087
|
-
class Discount < Stripe::RequestParams
|
2088
|
-
class DiscountEnd < Stripe::RequestParams
|
2089
|
-
class Duration < Stripe::RequestParams
|
2090
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2091
|
-
attr_accessor :interval
|
2092
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2093
|
-
attr_accessor :interval_count
|
2094
|
-
|
2095
|
-
def initialize(interval: nil, interval_count: nil)
|
2096
|
-
@interval = interval
|
2097
|
-
@interval_count = interval_count
|
2098
|
-
end
|
2099
|
-
end
|
2100
|
-
# Time span for the redeemed discount.
|
2101
|
-
attr_accessor :duration
|
2102
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2103
|
-
attr_accessor :timestamp
|
2104
|
-
# The type of calculation made to determine when the discount ends.
|
2105
|
-
attr_accessor :type
|
2106
|
-
|
2107
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2108
|
-
@duration = duration
|
2109
|
-
@timestamp = timestamp
|
2110
|
-
@type = type
|
2111
|
-
end
|
2112
|
-
end
|
2113
|
-
# ID of the coupon to create a new discount for.
|
2114
|
-
attr_accessor :coupon
|
2115
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2116
|
-
attr_accessor :discount
|
2117
|
-
# Details to determine how long the discount should be applied for.
|
2118
|
-
attr_accessor :discount_end
|
2119
|
-
# ID of the promotion code to create a new discount for.
|
2120
|
-
attr_accessor :promotion_code
|
2121
|
-
|
2122
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2123
|
-
@coupon = coupon
|
2124
|
-
@discount = discount
|
2125
|
-
@discount_end = discount_end
|
2126
|
-
@promotion_code = promotion_code
|
2127
|
-
end
|
2128
|
-
end
|
2129
|
-
|
2130
|
-
class Trial < Stripe::RequestParams
|
2131
|
-
# 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.
|
2132
|
-
attr_accessor :converts_to
|
2133
|
-
# Determines the type of trial for this item.
|
2134
|
-
attr_accessor :type
|
2135
|
-
|
2136
|
-
def initialize(converts_to: nil, type: nil)
|
2137
|
-
@converts_to = converts_to
|
2138
|
-
@type = type
|
2139
|
-
end
|
2140
|
-
end
|
2141
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2142
|
-
attr_accessor :discounts
|
2143
|
-
# 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`.
|
2144
|
-
attr_accessor :metadata
|
2145
|
-
# The ID of the price object.
|
2146
|
-
attr_accessor :price
|
2147
|
-
# Quantity for this item.
|
2148
|
-
attr_accessor :quantity
|
2149
|
-
# 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`.
|
2150
|
-
attr_accessor :tax_rates
|
2151
|
-
# Options that configure the trial on the subscription item.
|
2152
|
-
attr_accessor :trial
|
2153
|
-
|
2154
|
-
def initialize(
|
2155
|
-
discounts: nil,
|
2156
|
-
metadata: nil,
|
2157
|
-
price: nil,
|
2158
|
-
quantity: nil,
|
2159
|
-
tax_rates: nil,
|
2160
|
-
trial: nil
|
2161
|
-
)
|
2162
|
-
@discounts = discounts
|
2163
|
-
@metadata = metadata
|
2164
|
-
@price = price
|
2165
|
-
@quantity = quantity
|
2166
|
-
@tax_rates = tax_rates
|
2167
|
-
@trial = trial
|
2168
|
-
end
|
2169
|
-
end
|
2170
|
-
|
2171
|
-
class Remove < Stripe::RequestParams
|
2172
|
-
# ID of a price to remove.
|
2173
|
-
attr_accessor :price
|
2174
|
-
|
2175
|
-
def initialize(price: nil)
|
2176
|
-
@price = price
|
2177
|
-
end
|
2178
|
-
end
|
2179
|
-
|
2180
|
-
class Set < Stripe::RequestParams
|
2181
|
-
class Discount < Stripe::RequestParams
|
2182
|
-
class DiscountEnd < Stripe::RequestParams
|
2183
|
-
class Duration < Stripe::RequestParams
|
2184
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2185
|
-
attr_accessor :interval
|
2186
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2187
|
-
attr_accessor :interval_count
|
2188
|
-
|
2189
|
-
def initialize(interval: nil, interval_count: nil)
|
2190
|
-
@interval = interval
|
2191
|
-
@interval_count = interval_count
|
2192
|
-
end
|
2193
|
-
end
|
2194
|
-
# Time span for the redeemed discount.
|
2195
|
-
attr_accessor :duration
|
2196
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2197
|
-
attr_accessor :timestamp
|
2198
|
-
# The type of calculation made to determine when the discount ends.
|
2199
|
-
attr_accessor :type
|
2200
|
-
|
2201
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2202
|
-
@duration = duration
|
2203
|
-
@timestamp = timestamp
|
2204
|
-
@type = type
|
2205
|
-
end
|
2206
|
-
end
|
2207
|
-
# ID of the coupon to create a new discount for.
|
2208
|
-
attr_accessor :coupon
|
2209
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2210
|
-
attr_accessor :discount
|
2211
|
-
# Details to determine how long the discount should be applied for.
|
2212
|
-
attr_accessor :discount_end
|
2213
|
-
# ID of the promotion code to create a new discount for.
|
2214
|
-
attr_accessor :promotion_code
|
2215
|
-
|
2216
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2217
|
-
@coupon = coupon
|
2218
|
-
@discount = discount
|
2219
|
-
@discount_end = discount_end
|
2220
|
-
@promotion_code = promotion_code
|
2221
|
-
end
|
2222
|
-
end
|
2223
|
-
|
2224
|
-
class Trial < Stripe::RequestParams
|
2225
|
-
# 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.
|
2226
|
-
attr_accessor :converts_to
|
2227
|
-
# Determines the type of trial for this item.
|
2228
|
-
attr_accessor :type
|
2229
|
-
|
2230
|
-
def initialize(converts_to: nil, type: nil)
|
2231
|
-
@converts_to = converts_to
|
2232
|
-
@type = type
|
2233
|
-
end
|
2234
|
-
end
|
2235
|
-
# 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`.
|
2236
|
-
attr_accessor :discounts
|
2237
|
-
# 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`.
|
2238
|
-
attr_accessor :metadata
|
2239
|
-
# The ID of the price object.
|
2240
|
-
attr_accessor :price
|
2241
|
-
# 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`.
|
2242
|
-
attr_accessor :quantity
|
2243
|
-
# 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`.
|
2244
|
-
attr_accessor :tax_rates
|
2245
|
-
# 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`.
|
2246
|
-
attr_accessor :trial
|
2247
|
-
|
2248
|
-
def initialize(
|
2249
|
-
discounts: nil,
|
2250
|
-
metadata: nil,
|
2251
|
-
price: nil,
|
2252
|
-
quantity: nil,
|
2253
|
-
tax_rates: nil,
|
2254
|
-
trial: nil
|
2255
|
-
)
|
2256
|
-
@discounts = discounts
|
2257
|
-
@metadata = metadata
|
2258
|
-
@price = price
|
2259
|
-
@quantity = quantity
|
2260
|
-
@tax_rates = tax_rates
|
2261
|
-
@trial = trial
|
2262
|
-
end
|
2263
|
-
end
|
2264
|
-
# 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.
|
2265
|
-
attr_accessor :add
|
2266
|
-
# Details of the subscription item to remove.
|
2267
|
-
attr_accessor :remove
|
2268
|
-
# 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.
|
2269
|
-
attr_accessor :set
|
2270
|
-
# Determines the type of item action.
|
2271
|
-
attr_accessor :type
|
2272
|
-
|
2273
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2274
|
-
@add = add
|
2275
|
-
@remove = remove
|
2276
|
-
@set = set
|
2277
|
-
@type = type
|
2278
|
-
end
|
2279
|
-
end
|
2280
|
-
|
2281
|
-
class MetadataAction < Stripe::RequestParams
|
2282
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2283
|
-
attr_accessor :add
|
2284
|
-
# Keys to remove from schedule phase metadata.
|
2285
|
-
attr_accessor :remove
|
2286
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2287
|
-
attr_accessor :set
|
2288
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2289
|
-
attr_accessor :type
|
2290
|
-
|
2291
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2292
|
-
@add = add
|
2293
|
-
@remove = remove
|
2294
|
-
@set = set
|
2295
|
-
@type = type
|
2296
|
-
end
|
2297
|
-
end
|
2298
|
-
|
2299
|
-
class SetPauseCollection < Stripe::RequestParams
|
2300
|
-
class Set < Stripe::RequestParams
|
2301
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2302
|
-
attr_accessor :behavior
|
2303
|
-
|
2304
|
-
def initialize(behavior: nil)
|
2305
|
-
@behavior = behavior
|
2306
|
-
end
|
2307
|
-
end
|
2308
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2309
|
-
attr_accessor :set
|
2310
|
-
# Determines the type of the pause_collection amendment.
|
2311
|
-
attr_accessor :type
|
2312
|
-
|
2313
|
-
def initialize(set: nil, type: nil)
|
2314
|
-
@set = set
|
2315
|
-
@type = type
|
2316
|
-
end
|
2317
|
-
end
|
2318
|
-
|
2319
|
-
class TrialSettings < Stripe::RequestParams
|
2320
|
-
class EndBehavior < Stripe::RequestParams
|
2321
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2322
|
-
attr_accessor :prorate_up_front
|
2323
|
-
|
2324
|
-
def initialize(prorate_up_front: nil)
|
2325
|
-
@prorate_up_front = prorate_up_front
|
2326
|
-
end
|
2327
|
-
end
|
2328
|
-
# Defines how the subscription should behave when a trial ends.
|
2329
|
-
attr_accessor :end_behavior
|
2330
|
-
|
2331
|
-
def initialize(end_behavior: nil)
|
2332
|
-
@end_behavior = end_behavior
|
2333
|
-
end
|
2334
|
-
end
|
2335
|
-
# 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.
|
2336
|
-
attr_accessor :amendment_end
|
2337
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2338
|
-
attr_accessor :amendment_start
|
2339
|
-
# 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.
|
2340
|
-
attr_accessor :billing_cycle_anchor
|
2341
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2342
|
-
attr_accessor :discount_actions
|
2343
|
-
# Changes to the subscription items during the amendment time span.
|
2344
|
-
attr_accessor :item_actions
|
2345
|
-
# Instructions for how to modify phase metadata
|
2346
|
-
attr_accessor :metadata_actions
|
2347
|
-
# 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`.
|
2348
|
-
attr_accessor :proration_behavior
|
2349
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2350
|
-
attr_accessor :set_pause_collection
|
2351
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2352
|
-
attr_accessor :set_schedule_end
|
2353
|
-
# Settings related to subscription trials.
|
2354
|
-
attr_accessor :trial_settings
|
2355
|
-
|
2356
|
-
def initialize(
|
2357
|
-
amendment_end: nil,
|
2358
|
-
amendment_start: nil,
|
2359
|
-
billing_cycle_anchor: nil,
|
2360
|
-
discount_actions: nil,
|
2361
|
-
item_actions: nil,
|
2362
|
-
metadata_actions: nil,
|
2363
|
-
proration_behavior: nil,
|
2364
|
-
set_pause_collection: nil,
|
2365
|
-
set_schedule_end: nil,
|
2366
|
-
trial_settings: nil
|
2367
|
-
)
|
2368
|
-
@amendment_end = amendment_end
|
2369
|
-
@amendment_start = amendment_start
|
2370
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2371
|
-
@discount_actions = discount_actions
|
2372
|
-
@item_actions = item_actions
|
2373
|
-
@metadata_actions = metadata_actions
|
2374
|
-
@proration_behavior = proration_behavior
|
2375
|
-
@set_pause_collection = set_pause_collection
|
2376
|
-
@set_schedule_end = set_schedule_end
|
2377
|
-
@trial_settings = trial_settings
|
2378
|
-
end
|
2379
|
-
end
|
2380
|
-
|
2381
|
-
class Prebilling < Stripe::RequestParams
|
2382
|
-
class BillFrom < Stripe::RequestParams
|
2383
|
-
class AmendmentStart < Stripe::RequestParams
|
2384
|
-
# The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
|
2385
|
-
attr_accessor :index
|
2386
|
-
|
2387
|
-
def initialize(index: nil)
|
2388
|
-
@index = index
|
2389
|
-
end
|
2390
|
-
end
|
2391
|
-
# Start the prebilled period when a specified amendment begins.
|
2392
|
-
attr_accessor :amendment_start
|
2393
|
-
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2394
|
-
attr_accessor :timestamp
|
2395
|
-
# Select one of several ways to pass the `bill_from` value.
|
2396
|
-
attr_accessor :type
|
2397
|
-
|
2398
|
-
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
2399
|
-
@amendment_start = amendment_start
|
2400
|
-
@timestamp = timestamp
|
2401
|
-
@type = type
|
2402
|
-
end
|
2403
|
-
end
|
2404
|
-
|
2405
|
-
class BillUntil < Stripe::RequestParams
|
2406
|
-
class AmendmentEnd < Stripe::RequestParams
|
2407
|
-
# 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.
|
2408
|
-
attr_accessor :index
|
2409
|
-
|
2410
|
-
def initialize(index: nil)
|
2411
|
-
@index = index
|
2412
|
-
end
|
2413
|
-
end
|
2414
|
-
|
2415
|
-
class Duration < Stripe::RequestParams
|
2416
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2417
|
-
attr_accessor :interval
|
2418
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2419
|
-
attr_accessor :interval_count
|
2420
|
-
|
2421
|
-
def initialize(interval: nil, interval_count: nil)
|
2422
|
-
@interval = interval
|
2423
|
-
@interval_count = interval_count
|
2424
|
-
end
|
2425
|
-
end
|
2426
|
-
# End the prebilled period when a specified amendment ends.
|
2427
|
-
attr_accessor :amendment_end
|
2428
|
-
# Time span for prebilling, starting from `bill_from`.
|
2429
|
-
attr_accessor :duration
|
2430
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2431
|
-
attr_accessor :timestamp
|
2432
|
-
# Select one of several ways to pass the `bill_until` value.
|
2433
|
-
attr_accessor :type
|
2434
|
-
|
2435
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2436
|
-
@amendment_end = amendment_end
|
2437
|
-
@duration = duration
|
2438
|
-
@timestamp = timestamp
|
2439
|
-
@type = type
|
2440
|
-
end
|
2441
|
-
end
|
2442
|
-
# The beginning of the prebilled time period. The default value is `now`.
|
2443
|
-
attr_accessor :bill_from
|
2444
|
-
# The end of the prebilled time period.
|
2445
|
-
attr_accessor :bill_until
|
2446
|
-
# When the prebilling invoice should be created. The default value is `now`.
|
2447
|
-
attr_accessor :invoice_at
|
2448
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2449
|
-
attr_accessor :update_behavior
|
2450
|
-
|
2451
|
-
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2452
|
-
@bill_from = bill_from
|
2453
|
-
@bill_until = bill_until
|
2454
|
-
@invoice_at = invoice_at
|
2455
|
-
@update_behavior = update_behavior
|
2456
|
-
end
|
2457
|
-
end
|
2458
|
-
|
2459
|
-
class ScheduleSettings < Stripe::RequestParams
|
2460
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2461
|
-
attr_accessor :end_behavior
|
2462
|
-
|
2463
|
-
def initialize(end_behavior: nil)
|
2464
|
-
@end_behavior = end_behavior
|
2465
|
-
end
|
2466
|
-
end
|
2467
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2468
|
-
attr_accessor :amendments
|
2469
|
-
# Specifies which fields in the response should be expanded.
|
2470
|
-
attr_accessor :expand
|
2471
|
-
# Provide any time periods to bill in advance.
|
2472
|
-
attr_accessor :prebilling
|
2473
|
-
# In cases where the amendment changes the currently active phase,
|
2474
|
-
# specifies if and how to prorate at the time of the request.
|
2475
|
-
attr_accessor :proration_behavior
|
2476
|
-
# Changes to apply to the subscription schedule.
|
2477
|
-
attr_accessor :schedule_settings
|
2478
|
-
|
2479
|
-
def initialize(
|
2480
|
-
amendments: nil,
|
2481
|
-
expand: nil,
|
2482
|
-
prebilling: nil,
|
2483
|
-
proration_behavior: nil,
|
2484
|
-
schedule_settings: nil
|
2485
|
-
)
|
2486
|
-
@amendments = amendments
|
2487
|
-
@expand = expand
|
2488
|
-
@prebilling = prebilling
|
2489
|
-
@proration_behavior = proration_behavior
|
2490
|
-
@schedule_settings = schedule_settings
|
2491
|
-
end
|
2492
|
-
end
|
2493
|
-
|
2494
|
-
class CancelParams < Stripe::RequestParams
|
2495
|
-
# Specifies which fields in the response should be expanded.
|
2496
|
-
attr_accessor :expand
|
2497
|
-
# If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
|
2498
|
-
attr_accessor :invoice_now
|
2499
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
|
2500
|
-
attr_accessor :prorate
|
2501
|
-
|
2502
|
-
def initialize(expand: nil, invoice_now: nil, prorate: nil)
|
2503
|
-
@expand = expand
|
2504
|
-
@invoice_now = invoice_now
|
2505
|
-
@prorate = prorate
|
2506
|
-
end
|
2507
|
-
end
|
2508
|
-
|
2509
|
-
class ReleaseParams < Stripe::RequestParams
|
2510
|
-
# Specifies which fields in the response should be expanded.
|
2511
|
-
attr_accessor :expand
|
2512
|
-
# Keep any cancellation on the subscription that the schedule has set
|
2513
|
-
attr_accessor :preserve_cancel_date
|
2514
|
-
|
2515
|
-
def initialize(expand: nil, preserve_cancel_date: nil)
|
2516
|
-
@expand = expand
|
2517
|
-
@preserve_cancel_date = preserve_cancel_date
|
488
|
+
def self.field_remappings
|
489
|
+
@field_remappings = {}
|
2518
490
|
end
|
2519
491
|
end
|
2520
492
|
# ID of the Connect Application that created the schedule.
|
2521
493
|
attr_reader :application
|
2522
|
-
# 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.
|
2523
|
-
attr_reader :billing_behavior
|
2524
494
|
# The billing mode of the subscription.
|
2525
495
|
attr_reader :billing_mode
|
2526
496
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
@@ -2533,16 +503,12 @@ module Stripe
|
|
2533
503
|
attr_reader :current_phase
|
2534
504
|
# ID of the customer who owns the subscription schedule.
|
2535
505
|
attr_reader :customer
|
2536
|
-
# ID of the account who owns the subscription schedule.
|
2537
|
-
attr_reader :customer_account
|
2538
506
|
# Attribute for field default_settings
|
2539
507
|
attr_reader :default_settings
|
2540
508
|
# 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.
|
2541
509
|
attr_reader :end_behavior
|
2542
510
|
# Unique identifier for the object.
|
2543
511
|
attr_reader :id
|
2544
|
-
# Details of the most recent price migration that failed for the subscription schedule.
|
2545
|
-
attr_reader :last_price_migration_error
|
2546
512
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
2547
513
|
attr_reader :livemode
|
2548
514
|
# 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.
|
@@ -2551,8 +517,6 @@ module Stripe
|
|
2551
517
|
attr_reader :object
|
2552
518
|
# Configuration for the subscription schedule's phases.
|
2553
519
|
attr_reader :phases
|
2554
|
-
# Time period and invoice for a Subscription billed in advance.
|
2555
|
-
attr_reader :prebilling
|
2556
520
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
2557
521
|
attr_reader :released_at
|
2558
522
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
@@ -2564,26 +528,6 @@ module Stripe
|
|
2564
528
|
# ID of the test clock this subscription schedule belongs to.
|
2565
529
|
attr_reader :test_clock
|
2566
530
|
|
2567
|
-
# Amends an existing subscription schedule.
|
2568
|
-
def amend(params = {}, opts = {})
|
2569
|
-
request_stripe_object(
|
2570
|
-
method: :post,
|
2571
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
2572
|
-
params: params,
|
2573
|
-
opts: opts
|
2574
|
-
)
|
2575
|
-
end
|
2576
|
-
|
2577
|
-
# Amends an existing subscription schedule.
|
2578
|
-
def self.amend(schedule, params = {}, opts = {})
|
2579
|
-
request_stripe_object(
|
2580
|
-
method: :post,
|
2581
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2582
|
-
params: params,
|
2583
|
-
opts: opts
|
2584
|
-
)
|
2585
|
-
end
|
2586
|
-
|
2587
531
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
2588
532
|
def cancel(params = {}, opts = {})
|
2589
533
|
request_stripe_object(
|
@@ -2653,5 +597,18 @@ module Stripe
|
|
2653
597
|
opts: opts
|
2654
598
|
)
|
2655
599
|
end
|
600
|
+
|
601
|
+
def self.inner_class_types
|
602
|
+
@inner_class_types = {
|
603
|
+
billing_mode: BillingMode,
|
604
|
+
current_phase: CurrentPhase,
|
605
|
+
default_settings: DefaultSettings,
|
606
|
+
phases: Phase,
|
607
|
+
}
|
608
|
+
end
|
609
|
+
|
610
|
+
def self.field_remappings
|
611
|
+
@field_remappings = {}
|
612
|
+
end
|
2656
613
|
end
|
2657
614
|
end
|