stripe 15.5.0.pre.beta.1 → 15.5.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/API_VERSION +1 -1
- data/CHANGELOG.md +680 -1634
- data/OPENAPI_VERSION +1 -1
- data/README.md +6 -4
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -32
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -60
- data/lib/stripe/event_types.rb +0 -102
- data/lib/stripe/object_types.rb +0 -53
- data/lib/stripe/resources/account.rb +3 -655
- data/lib/stripe/resources/account_session.rb +76 -250
- data/lib/stripe/resources/balance.rb +2 -7
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +0 -10
- data/lib/stripe/resources/billing/meter.rb +2 -2
- data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
- data/lib/stripe/resources/billing_portal/session.rb +0 -6
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +38 -1543
- data/lib/stripe/resources/checkout/session.rb +16 -403
- data/lib/stripe/resources/confirmation_token.rb +0 -170
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +3 -9
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +0 -2
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +1 -6
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/dispute.rb +1 -12
- data/lib/stripe/resources/event.rb +0 -31
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/file_link.rb +1 -1
- data/lib/stripe/resources/financial_connections/account.rb +1 -22
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +55 -1136
- data/lib/stripe/resources/invoice_item.rb +2 -78
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/card.rb +8 -0
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/transaction.rb +0 -6
- data/lib/stripe/resources/line_item.rb +0 -37
- data/lib/stripe/resources/mandate.rb +0 -24
- data/lib/stripe/resources/payment_intent.rb +401 -6126
- data/lib/stripe/resources/payment_link.rb +1 -1
- data/lib/stripe/resources/payment_method.rb +1 -192
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/promotion_code.rb +5 -12
- data/lib/stripe/resources/quote.rb +7 -2038
- data/lib/stripe/resources/refund.rb +0 -9
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +10 -579
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +116 -374
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +134 -1009
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +49 -0
- data/lib/stripe/resources/terminal/reader.rb +22 -8
- data/lib/stripe/resources/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources.rb +0 -109
- data/lib/stripe/services/account_service.rb +1 -562
- data/lib/stripe/services/account_session_service.rb +46 -220
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/billing_service.rb +1 -2
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +13 -319
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
- data/lib/stripe/services/credit_note_service.rb +2 -6
- data/lib/stripe/services/customer_service.rb +4 -4
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/file_link_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/invoice_item_service.rb +2 -74
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +83 -0
- data/lib/stripe/services/invoice_service.rb +54 -1069
- data/lib/stripe/services/issuing/card_service.rb +8 -0
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +351 -5612
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +1 -120
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +9 -1724
- data/lib/stripe/services/setup_intent_service.rb +9 -538
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +110 -913
- data/lib/stripe/services/subscription_service.rb +116 -318
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +38 -0
- data/lib/stripe/services/terminal_service.rb +1 -3
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -97
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/transfer_service.rb +0 -4
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +5 -14
- data/lib/stripe/services/v2/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core_service.rb +2 -5
- data/lib/stripe/services/v2_services.rb +1 -4
- data/lib/stripe/services.rb +1 -55
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/stripe_service.rb +3 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4991 -0
- data/rbi/stripe/resources/account_link.rbi +76 -0
- data/rbi/stripe/resources/account_session.rbi +1173 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
- data/rbi/stripe/resources/application.rbi +20 -0
- data/rbi/stripe/resources/application_fee.rbi +118 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
- data/rbi/stripe/resources/apps/secret.rbi +195 -0
- data/rbi/stripe/resources/balance.rbi +230 -0
- data/rbi/stripe/resources/balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +712 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2136 -0
- data/rbi/stripe/resources/checkout/session.rbi +4105 -0
- data/rbi/stripe/resources/climate/order.rbi +245 -0
- data/rbi/stripe/resources/climate/product.rbi +75 -0
- data/rbi/stripe/resources/climate/supplier.rbi +72 -0
- data/rbi/stripe/resources/confirmation_token.rbi +1818 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
- data/rbi/stripe/resources/country_spec.rbi +85 -0
- data/rbi/stripe/resources/coupon.rbi +250 -0
- data/rbi/stripe/resources/credit_note.rbi +752 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +993 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
- data/rbi/stripe/resources/customer_session.rbi +200 -0
- data/rbi/stripe/resources/discount.rbi +53 -0
- data/rbi/stripe/resources/dispute.rbi +761 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
- data/rbi/stripe/resources/event.rbi +137 -0
- data/rbi/stripe/resources/exchange_rate.rbi +66 -0
- data/rbi/stripe/resources/file.rbi +143 -0
- data/rbi/stripe/resources/file_link.rbi +141 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
- data/rbi/stripe/resources/forwarding/request.rbi +216 -0
- data/rbi/stripe/resources/funding_instructions.rbi +437 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
- data/rbi/stripe/resources/invoice.rbi +3894 -0
- data/rbi/stripe/resources/invoice_item.rbi +470 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +121 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
- data/rbi/stripe/resources/issuing/card.rbi +749 -0
- data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
- data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
- data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
- data/rbi/stripe/resources/issuing/token.rbi +226 -0
- data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
- data/rbi/stripe/resources/line_item.rbi +72 -0
- data/rbi/stripe/resources/login_link.rbi +19 -0
- data/rbi/stripe/resources/mandate.rbi +191 -0
- data/rbi/stripe/resources/payment_intent.rbi +10011 -0
- data/rbi/stripe/resources/payment_link.rbi +1891 -0
- data/rbi/stripe/resources/payment_method.rbi +1770 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
- data/rbi/stripe/resources/payout.rbi +307 -0
- data/rbi/stripe/resources/person.rbi +401 -0
- data/rbi/stripe/resources/plan.rbi +371 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +553 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +264 -0
- data/rbi/stripe/resources/quote.rbi +1137 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +168 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
- data/rbi/stripe/resources/refund.rbi +523 -0
- data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
- data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
- data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
- data/rbi/stripe/resources/reversal.rbi +51 -0
- data/rbi/stripe/resources/review.rbi +154 -0
- data/rbi/stripe/resources/setup_attempt.rbi +477 -0
- data/rbi/stripe/resources/setup_intent.rbi +3974 -0
- data/rbi/stripe/resources/shipping_rate.rbi +305 -0
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
- data/rbi/stripe/resources/source.rbi +1496 -0
- data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
- data/rbi/stripe/resources/source_transaction.rbi +127 -0
- data/rbi/stripe/resources/subscription.rbi +2154 -0
- data/rbi/stripe/resources/subscription_item.rbi +404 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1795 -0
- data/rbi/stripe/resources/tax/calculation.rbi +478 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
- data/rbi/stripe/resources/tax/registration.rbi +3216 -0
- data/rbi/stripe/resources/tax/settings.rbi +141 -0
- data/rbi/stripe/resources/tax/transaction.rbi +351 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
- data/rbi/stripe/resources/tax_code.rbi +44 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
- data/rbi/stripe/resources/tax_id.rbi +165 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1647 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +222 -0
- data/rbi/stripe/resources/terminal/reader.rbi +1016 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
- data/rbi/stripe/resources/token.rbi +1281 -0
- data/rbi/stripe/resources/topup.rbi +222 -0
- data/rbi/stripe/resources/transfer.rbi +199 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
- data/rbi/stripe/resources/v2/event.rbi +48 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
- data/rbi/stripe/services/account_link_service.rbi +60 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +1007 -0
- data/rbi/stripe/services/account_service.rbi +4281 -0
- data/rbi/stripe/services/account_session_service.rbi +748 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +561 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2697 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +142 -0
- data/rbi/stripe/services/climate/product_service.rbi +46 -0
- data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
- data/rbi/stripe/services/climate_service.rbi +11 -0
- data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
- data/rbi/stripe/services/country_spec_service.rbi +44 -0
- data/rbi/stripe/services/coupon_service.rbi +194 -0
- data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +415 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
- data/rbi/stripe/services/customer_service.rbi +635 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
- data/rbi/stripe/services/dispute_service.rbi +424 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
- data/rbi/stripe/services/event_service.rbi +83 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
- data/rbi/stripe/services/file_link_service.rbi +124 -0
- data/rbi/stripe/services/file_service.rbi +116 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
- data/rbi/stripe/services/financial_connections_service.rbi +11 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +339 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +366 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
- data/rbi/stripe/services/invoice_service.rbi +3073 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +503 -0
- data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
- data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
- data/rbi/stripe/services/issuing/token_service.rbi +99 -0
- data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
- data/rbi/stripe/services/issuing_service.rbi +16 -0
- data/rbi/stripe/services/mandate_service.rbi +20 -0
- data/rbi/stripe/services/payment_intent_service.rbi +8010 -0
- data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1441 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +781 -0
- data/rbi/stripe/services/payout_service.rbi +209 -0
- data/rbi/stripe/services/plan_service.rbi +282 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +67 -0
- data/rbi/stripe/services/product_service.rbi +477 -0
- data/rbi/stripe/services/promotion_code_service.rbi +214 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
- data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/quote_service.rbi +695 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +185 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +84 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
- data/rbi/stripe/services/setup_intent_service.rbi +3709 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +663 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +350 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1425 -0
- data/rbi/stripe/services/subscription_service.rbi +1768 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
- data/rbi/stripe/services/tax/registration_service.rbi +2278 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +110 -0
- data/rbi/stripe/services/tax_rate_service.rbi +185 -0
- data/rbi/stripe/services/tax_service.rbi +12 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +1328 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +182 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +540 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
- data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
- data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +117 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
- data/rbi/stripe/services/test_helpers_service.rbi +15 -0
- data/rbi/stripe/services/token_service.rbi +1255 -0
- data/rbi/stripe/services/topup_service.rbi +176 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
- data/rbi/stripe/services/transfer_service.rbi +152 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +77 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
- data/stripe.gemspec +1 -4
- metadata +325 -169
- 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/balance_settings.rb +0 -105
- 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 -1101
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1630
- 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 -371
- 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 -1930
- 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/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 -77
- 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 -78
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
- 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/balance_settings_service.rb +0 -96
- 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/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 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- 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 -4522
- 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 -116
- 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/rbi/stripe.rbi +0 -199016
@@ -22,24 +22,6 @@ module Stripe
|
|
22
22
|
end
|
23
23
|
|
24
24
|
class UpdateParams < Stripe::RequestParams
|
25
|
-
class AmountsDue < Stripe::RequestParams
|
26
|
-
# The amount in cents (or local equivalent).
|
27
|
-
attr_accessor :amount
|
28
|
-
# Number of days from when invoice is finalized until the payment is due.
|
29
|
-
attr_accessor :days_until_due
|
30
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
31
|
-
attr_accessor :description
|
32
|
-
# Date on which a payment plan’s payment is due.
|
33
|
-
attr_accessor :due_date
|
34
|
-
|
35
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
36
|
-
@amount = amount
|
37
|
-
@days_until_due = days_until_due
|
38
|
-
@description = description
|
39
|
-
@due_date = due_date
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
25
|
class AutomaticTax < Stripe::RequestParams
|
44
26
|
class Liability < Stripe::RequestParams
|
45
27
|
# The connected account being referenced when `type` is `account`.
|
@@ -76,44 +58,16 @@ module Stripe
|
|
76
58
|
end
|
77
59
|
|
78
60
|
class Discount < Stripe::RequestParams
|
79
|
-
class DiscountEnd < Stripe::RequestParams
|
80
|
-
class Duration < Stripe::RequestParams
|
81
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
82
|
-
attr_accessor :interval
|
83
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
84
|
-
attr_accessor :interval_count
|
85
|
-
|
86
|
-
def initialize(interval: nil, interval_count: nil)
|
87
|
-
@interval = interval
|
88
|
-
@interval_count = interval_count
|
89
|
-
end
|
90
|
-
end
|
91
|
-
# Time span for the redeemed discount.
|
92
|
-
attr_accessor :duration
|
93
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
94
|
-
attr_accessor :timestamp
|
95
|
-
# The type of calculation made to determine when the discount ends.
|
96
|
-
attr_accessor :type
|
97
|
-
|
98
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
99
|
-
@duration = duration
|
100
|
-
@timestamp = timestamp
|
101
|
-
@type = type
|
102
|
-
end
|
103
|
-
end
|
104
61
|
# ID of the coupon to create a new discount for.
|
105
62
|
attr_accessor :coupon
|
106
63
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
107
64
|
attr_accessor :discount
|
108
|
-
# Details to determine how long the discount should be applied for.
|
109
|
-
attr_accessor :discount_end
|
110
65
|
# ID of the promotion code to create a new discount for.
|
111
66
|
attr_accessor :promotion_code
|
112
67
|
|
113
|
-
def initialize(coupon: nil, discount: nil,
|
68
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
114
69
|
@coupon = coupon
|
115
70
|
@discount = discount
|
116
|
-
@discount_end = discount_end
|
117
71
|
@promotion_code = promotion_code
|
118
72
|
end
|
119
73
|
end
|
@@ -233,47 +187,17 @@ module Stripe
|
|
233
187
|
end
|
234
188
|
end
|
235
189
|
|
236
|
-
class IdBankTransfer < Stripe::RequestParams; end
|
237
190
|
class Konbini < Stripe::RequestParams; end
|
238
191
|
class SepaDebit < Stripe::RequestParams; end
|
239
192
|
|
240
|
-
class Upi < Stripe::RequestParams
|
241
|
-
class MandateOptions < Stripe::RequestParams
|
242
|
-
# Amount to be charged for future payments.
|
243
|
-
attr_accessor :amount
|
244
|
-
# One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
245
|
-
attr_accessor :amount_type
|
246
|
-
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
247
|
-
attr_accessor :description
|
248
|
-
# End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
249
|
-
attr_accessor :end_date
|
250
|
-
|
251
|
-
def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
|
252
|
-
@amount = amount
|
253
|
-
@amount_type = amount_type
|
254
|
-
@description = description
|
255
|
-
@end_date = end_date
|
256
|
-
end
|
257
|
-
end
|
258
|
-
# Configuration options for setting up an eMandate
|
259
|
-
attr_accessor :mandate_options
|
260
|
-
|
261
|
-
def initialize(mandate_options: nil)
|
262
|
-
@mandate_options = mandate_options
|
263
|
-
end
|
264
|
-
end
|
265
|
-
|
266
193
|
class UsBankAccount < Stripe::RequestParams
|
267
194
|
class FinancialConnections < Stripe::RequestParams
|
268
195
|
class Filters < Stripe::RequestParams
|
269
196
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
270
197
|
attr_accessor :account_subcategories
|
271
|
-
# ID of the institution to use to filter for selectable accounts.
|
272
|
-
attr_accessor :institution
|
273
198
|
|
274
|
-
def initialize(account_subcategories: nil
|
199
|
+
def initialize(account_subcategories: nil)
|
275
200
|
@account_subcategories = account_subcategories
|
276
|
-
@institution = institution
|
277
201
|
end
|
278
202
|
end
|
279
203
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -307,14 +231,10 @@ module Stripe
|
|
307
231
|
attr_accessor :card
|
308
232
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
309
233
|
attr_accessor :customer_balance
|
310
|
-
# If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
311
|
-
attr_accessor :id_bank_transfer
|
312
234
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
313
235
|
attr_accessor :konbini
|
314
236
|
# If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
315
237
|
attr_accessor :sepa_debit
|
316
|
-
# If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
|
317
|
-
attr_accessor :upi
|
318
238
|
# If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
319
239
|
attr_accessor :us_bank_account
|
320
240
|
|
@@ -323,20 +243,16 @@ module Stripe
|
|
323
243
|
bancontact: nil,
|
324
244
|
card: nil,
|
325
245
|
customer_balance: nil,
|
326
|
-
id_bank_transfer: nil,
|
327
246
|
konbini: nil,
|
328
247
|
sepa_debit: nil,
|
329
|
-
upi: nil,
|
330
248
|
us_bank_account: nil
|
331
249
|
)
|
332
250
|
@acss_debit = acss_debit
|
333
251
|
@bancontact = bancontact
|
334
252
|
@card = card
|
335
253
|
@customer_balance = customer_balance
|
336
|
-
@id_bank_transfer = id_bank_transfer
|
337
254
|
@konbini = konbini
|
338
255
|
@sepa_debit = sepa_debit
|
339
|
-
@upi = upi
|
340
256
|
@us_bank_account = us_bank_account
|
341
257
|
end
|
342
258
|
end
|
@@ -546,8 +462,6 @@ module Stripe
|
|
546
462
|
end
|
547
463
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
548
464
|
attr_accessor :account_tax_ids
|
549
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
550
|
-
attr_accessor :amounts_due
|
551
465
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
552
466
|
attr_accessor :application_fee_amount
|
553
467
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -562,8 +476,6 @@ module Stripe
|
|
562
476
|
attr_accessor :custom_fields
|
563
477
|
# The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
|
564
478
|
attr_accessor :days_until_due
|
565
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
566
|
-
attr_accessor :default_margins
|
567
479
|
# ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
568
480
|
attr_accessor :default_payment_method
|
569
481
|
# ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
@@ -605,7 +517,6 @@ module Stripe
|
|
605
517
|
|
606
518
|
def initialize(
|
607
519
|
account_tax_ids: nil,
|
608
|
-
amounts_due: nil,
|
609
520
|
application_fee_amount: nil,
|
610
521
|
auto_advance: nil,
|
611
522
|
automatic_tax: nil,
|
@@ -613,7 +524,6 @@ module Stripe
|
|
613
524
|
collection_method: nil,
|
614
525
|
custom_fields: nil,
|
615
526
|
days_until_due: nil,
|
616
|
-
default_margins: nil,
|
617
527
|
default_payment_method: nil,
|
618
528
|
default_source: nil,
|
619
529
|
default_tax_rates: nil,
|
@@ -635,7 +545,6 @@ module Stripe
|
|
635
545
|
transfer_data: nil
|
636
546
|
)
|
637
547
|
@account_tax_ids = account_tax_ids
|
638
|
-
@amounts_due = amounts_due
|
639
548
|
@application_fee_amount = application_fee_amount
|
640
549
|
@auto_advance = auto_advance
|
641
550
|
@automatic_tax = automatic_tax
|
@@ -643,7 +552,6 @@ module Stripe
|
|
643
552
|
@collection_method = collection_method
|
644
553
|
@custom_fields = custom_fields
|
645
554
|
@days_until_due = days_until_due
|
646
|
-
@default_margins = default_margins
|
647
555
|
@default_payment_method = default_payment_method
|
648
556
|
@default_source = default_source
|
649
557
|
@default_tax_rates = default_tax_rates
|
@@ -708,8 +616,6 @@ module Stripe
|
|
708
616
|
attr_accessor :created
|
709
617
|
# Only return invoices for the customer specified by this customer ID.
|
710
618
|
attr_accessor :customer
|
711
|
-
# Only return invoices for the account specified by this account ID.
|
712
|
-
attr_accessor :customer_account
|
713
619
|
# Attribute for param field due_date
|
714
620
|
attr_accessor :due_date
|
715
621
|
# 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.
|
@@ -729,7 +635,6 @@ module Stripe
|
|
729
635
|
collection_method: nil,
|
730
636
|
created: nil,
|
731
637
|
customer: nil,
|
732
|
-
customer_account: nil,
|
733
638
|
due_date: nil,
|
734
639
|
ending_before: nil,
|
735
640
|
expand: nil,
|
@@ -741,7 +646,6 @@ module Stripe
|
|
741
646
|
@collection_method = collection_method
|
742
647
|
@created = created
|
743
648
|
@customer = customer
|
744
|
-
@customer_account = customer_account
|
745
649
|
@due_date = due_date
|
746
650
|
@ending_before = ending_before
|
747
651
|
@expand = expand
|
@@ -753,24 +657,6 @@ module Stripe
|
|
753
657
|
end
|
754
658
|
|
755
659
|
class CreateParams < Stripe::RequestParams
|
756
|
-
class AmountsDue < Stripe::RequestParams
|
757
|
-
# The amount in cents (or local equivalent).
|
758
|
-
attr_accessor :amount
|
759
|
-
# Number of days from when invoice is finalized until the payment is due.
|
760
|
-
attr_accessor :days_until_due
|
761
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
762
|
-
attr_accessor :description
|
763
|
-
# Date on which a payment plan’s payment is due.
|
764
|
-
attr_accessor :due_date
|
765
|
-
|
766
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
767
|
-
@amount = amount
|
768
|
-
@days_until_due = days_until_due
|
769
|
-
@description = description
|
770
|
-
@due_date = due_date
|
771
|
-
end
|
772
|
-
end
|
773
|
-
|
774
660
|
class AutomaticTax < Stripe::RequestParams
|
775
661
|
class Liability < Stripe::RequestParams
|
776
662
|
# The connected account being referenced when `type` is `account`.
|
@@ -807,44 +693,16 @@ module Stripe
|
|
807
693
|
end
|
808
694
|
|
809
695
|
class Discount < Stripe::RequestParams
|
810
|
-
class DiscountEnd < Stripe::RequestParams
|
811
|
-
class Duration < Stripe::RequestParams
|
812
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
813
|
-
attr_accessor :interval
|
814
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
815
|
-
attr_accessor :interval_count
|
816
|
-
|
817
|
-
def initialize(interval: nil, interval_count: nil)
|
818
|
-
@interval = interval
|
819
|
-
@interval_count = interval_count
|
820
|
-
end
|
821
|
-
end
|
822
|
-
# Time span for the redeemed discount.
|
823
|
-
attr_accessor :duration
|
824
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
825
|
-
attr_accessor :timestamp
|
826
|
-
# The type of calculation made to determine when the discount ends.
|
827
|
-
attr_accessor :type
|
828
|
-
|
829
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
830
|
-
@duration = duration
|
831
|
-
@timestamp = timestamp
|
832
|
-
@type = type
|
833
|
-
end
|
834
|
-
end
|
835
696
|
# ID of the coupon to create a new discount for.
|
836
697
|
attr_accessor :coupon
|
837
698
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
838
699
|
attr_accessor :discount
|
839
|
-
# Details to determine how long the discount should be applied for.
|
840
|
-
attr_accessor :discount_end
|
841
700
|
# ID of the promotion code to create a new discount for.
|
842
701
|
attr_accessor :promotion_code
|
843
702
|
|
844
|
-
def initialize(coupon: nil, discount: nil,
|
703
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
845
704
|
@coupon = coupon
|
846
705
|
@discount = discount
|
847
|
-
@discount_end = discount_end
|
848
706
|
@promotion_code = promotion_code
|
849
707
|
end
|
850
708
|
end
|
@@ -976,47 +834,17 @@ module Stripe
|
|
976
834
|
end
|
977
835
|
end
|
978
836
|
|
979
|
-
class IdBankTransfer < Stripe::RequestParams; end
|
980
837
|
class Konbini < Stripe::RequestParams; end
|
981
838
|
class SepaDebit < Stripe::RequestParams; end
|
982
839
|
|
983
|
-
class Upi < Stripe::RequestParams
|
984
|
-
class MandateOptions < Stripe::RequestParams
|
985
|
-
# Amount to be charged for future payments.
|
986
|
-
attr_accessor :amount
|
987
|
-
# One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
988
|
-
attr_accessor :amount_type
|
989
|
-
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
990
|
-
attr_accessor :description
|
991
|
-
# End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
992
|
-
attr_accessor :end_date
|
993
|
-
|
994
|
-
def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
|
995
|
-
@amount = amount
|
996
|
-
@amount_type = amount_type
|
997
|
-
@description = description
|
998
|
-
@end_date = end_date
|
999
|
-
end
|
1000
|
-
end
|
1001
|
-
# Configuration options for setting up an eMandate
|
1002
|
-
attr_accessor :mandate_options
|
1003
|
-
|
1004
|
-
def initialize(mandate_options: nil)
|
1005
|
-
@mandate_options = mandate_options
|
1006
|
-
end
|
1007
|
-
end
|
1008
|
-
|
1009
840
|
class UsBankAccount < Stripe::RequestParams
|
1010
841
|
class FinancialConnections < Stripe::RequestParams
|
1011
842
|
class Filters < Stripe::RequestParams
|
1012
843
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
1013
844
|
attr_accessor :account_subcategories
|
1014
|
-
# ID of the institution to use to filter for selectable accounts.
|
1015
|
-
attr_accessor :institution
|
1016
845
|
|
1017
|
-
def initialize(account_subcategories: nil
|
846
|
+
def initialize(account_subcategories: nil)
|
1018
847
|
@account_subcategories = account_subcategories
|
1019
|
-
@institution = institution
|
1020
848
|
end
|
1021
849
|
end
|
1022
850
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -1050,14 +878,10 @@ module Stripe
|
|
1050
878
|
attr_accessor :card
|
1051
879
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1052
880
|
attr_accessor :customer_balance
|
1053
|
-
# If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1054
|
-
attr_accessor :id_bank_transfer
|
1055
881
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1056
882
|
attr_accessor :konbini
|
1057
883
|
# If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
1058
884
|
attr_accessor :sepa_debit
|
1059
|
-
# If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
|
1060
|
-
attr_accessor :upi
|
1061
885
|
# If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
1062
886
|
attr_accessor :us_bank_account
|
1063
887
|
|
@@ -1066,20 +890,16 @@ module Stripe
|
|
1066
890
|
bancontact: nil,
|
1067
891
|
card: nil,
|
1068
892
|
customer_balance: nil,
|
1069
|
-
id_bank_transfer: nil,
|
1070
893
|
konbini: nil,
|
1071
894
|
sepa_debit: nil,
|
1072
|
-
upi: nil,
|
1073
895
|
us_bank_account: nil
|
1074
896
|
)
|
1075
897
|
@acss_debit = acss_debit
|
1076
898
|
@bancontact = bancontact
|
1077
899
|
@card = card
|
1078
900
|
@customer_balance = customer_balance
|
1079
|
-
@id_bank_transfer = id_bank_transfer
|
1080
901
|
@konbini = konbini
|
1081
902
|
@sepa_debit = sepa_debit
|
1082
|
-
@upi = upi
|
1083
903
|
@us_bank_account = us_bank_account
|
1084
904
|
end
|
1085
905
|
end
|
@@ -1289,8 +1109,6 @@ module Stripe
|
|
1289
1109
|
end
|
1290
1110
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1291
1111
|
attr_accessor :account_tax_ids
|
1292
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1293
|
-
attr_accessor :amounts_due
|
1294
1112
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
1295
1113
|
attr_accessor :application_fee_amount
|
1296
1114
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false.
|
@@ -1307,12 +1125,8 @@ module Stripe
|
|
1307
1125
|
attr_accessor :custom_fields
|
1308
1126
|
# The ID of the customer who will be billed.
|
1309
1127
|
attr_accessor :customer
|
1310
|
-
# The ID of the account who will be billed.
|
1311
|
-
attr_accessor :customer_account
|
1312
1128
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1313
1129
|
attr_accessor :days_until_due
|
1314
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1315
|
-
attr_accessor :default_margins
|
1316
1130
|
# ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
1317
1131
|
attr_accessor :default_payment_method
|
1318
1132
|
# ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
@@ -1360,7 +1174,6 @@ module Stripe
|
|
1360
1174
|
|
1361
1175
|
def initialize(
|
1362
1176
|
account_tax_ids: nil,
|
1363
|
-
amounts_due: nil,
|
1364
1177
|
application_fee_amount: nil,
|
1365
1178
|
auto_advance: nil,
|
1366
1179
|
automatic_tax: nil,
|
@@ -1369,9 +1182,7 @@ module Stripe
|
|
1369
1182
|
currency: nil,
|
1370
1183
|
custom_fields: nil,
|
1371
1184
|
customer: nil,
|
1372
|
-
customer_account: nil,
|
1373
1185
|
days_until_due: nil,
|
1374
|
-
default_margins: nil,
|
1375
1186
|
default_payment_method: nil,
|
1376
1187
|
default_source: nil,
|
1377
1188
|
default_tax_rates: nil,
|
@@ -1396,7 +1207,6 @@ module Stripe
|
|
1396
1207
|
transfer_data: nil
|
1397
1208
|
)
|
1398
1209
|
@account_tax_ids = account_tax_ids
|
1399
|
-
@amounts_due = amounts_due
|
1400
1210
|
@application_fee_amount = application_fee_amount
|
1401
1211
|
@auto_advance = auto_advance
|
1402
1212
|
@automatic_tax = automatic_tax
|
@@ -1405,9 +1215,7 @@ module Stripe
|
|
1405
1215
|
@currency = currency
|
1406
1216
|
@custom_fields = custom_fields
|
1407
1217
|
@customer = customer
|
1408
|
-
@customer_account = customer_account
|
1409
1218
|
@days_until_due = days_until_due
|
1410
|
-
@default_margins = default_margins
|
1411
1219
|
@default_payment_method = default_payment_method
|
1412
1220
|
@default_source = default_source
|
1413
1221
|
@default_tax_rates = default_tax_rates
|
@@ -1454,44 +1262,16 @@ module Stripe
|
|
1454
1262
|
class AddLinesParams < Stripe::RequestParams
|
1455
1263
|
class Line < Stripe::RequestParams
|
1456
1264
|
class Discount < Stripe::RequestParams
|
1457
|
-
class DiscountEnd < Stripe::RequestParams
|
1458
|
-
class Duration < Stripe::RequestParams
|
1459
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1460
|
-
attr_accessor :interval
|
1461
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1462
|
-
attr_accessor :interval_count
|
1463
|
-
|
1464
|
-
def initialize(interval: nil, interval_count: nil)
|
1465
|
-
@interval = interval
|
1466
|
-
@interval_count = interval_count
|
1467
|
-
end
|
1468
|
-
end
|
1469
|
-
# Time span for the redeemed discount.
|
1470
|
-
attr_accessor :duration
|
1471
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1472
|
-
attr_accessor :timestamp
|
1473
|
-
# The type of calculation made to determine when the discount ends.
|
1474
|
-
attr_accessor :type
|
1475
|
-
|
1476
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1477
|
-
@duration = duration
|
1478
|
-
@timestamp = timestamp
|
1479
|
-
@type = type
|
1480
|
-
end
|
1481
|
-
end
|
1482
1265
|
# ID of the coupon to create a new discount for.
|
1483
1266
|
attr_accessor :coupon
|
1484
1267
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1485
1268
|
attr_accessor :discount
|
1486
|
-
# Details to determine how long the discount should be applied for.
|
1487
|
-
attr_accessor :discount_end
|
1488
1269
|
# ID of the promotion code to create a new discount for.
|
1489
1270
|
attr_accessor :promotion_code
|
1490
1271
|
|
1491
|
-
def initialize(coupon: nil, discount: nil,
|
1272
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1492
1273
|
@coupon = coupon
|
1493
1274
|
@discount = discount
|
1494
|
-
@discount_end = discount_end
|
1495
1275
|
@promotion_code = promotion_code
|
1496
1276
|
end
|
1497
1277
|
end
|
@@ -1644,8 +1424,6 @@ module Stripe
|
|
1644
1424
|
attr_accessor :discounts
|
1645
1425
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1646
1426
|
attr_accessor :invoice_item
|
1647
|
-
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
1648
|
-
attr_accessor :margins
|
1649
1427
|
# 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`.
|
1650
1428
|
attr_accessor :metadata
|
1651
1429
|
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
@@ -1667,7 +1445,6 @@ module Stripe
|
|
1667
1445
|
discountable: nil,
|
1668
1446
|
discounts: nil,
|
1669
1447
|
invoice_item: nil,
|
1670
|
-
margins: nil,
|
1671
1448
|
metadata: nil,
|
1672
1449
|
period: nil,
|
1673
1450
|
price_data: nil,
|
@@ -1681,7 +1458,6 @@ module Stripe
|
|
1681
1458
|
@discountable = discountable
|
1682
1459
|
@discounts = discounts
|
1683
1460
|
@invoice_item = invoice_item
|
1684
|
-
@margins = margins
|
1685
1461
|
@metadata = metadata
|
1686
1462
|
@period = period
|
1687
1463
|
@price_data = price_data
|
@@ -1706,59 +1482,14 @@ module Stripe
|
|
1706
1482
|
end
|
1707
1483
|
|
1708
1484
|
class AttachPaymentParams < Stripe::RequestParams
|
1709
|
-
class PaymentRecordData < Stripe::RequestParams
|
1710
|
-
# The amount that was paid out of band.
|
1711
|
-
attr_accessor :amount
|
1712
|
-
# The currency that was paid out of band.
|
1713
|
-
attr_accessor :currency
|
1714
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1715
|
-
attr_accessor :metadata
|
1716
|
-
# The type of money movement for this out of band payment record.
|
1717
|
-
attr_accessor :money_movement_type
|
1718
|
-
# The timestamp when this out of band payment was paid.
|
1719
|
-
attr_accessor :paid_at
|
1720
|
-
# The reference for this out of band payment record.
|
1721
|
-
attr_accessor :payment_reference
|
1722
|
-
|
1723
|
-
def initialize(
|
1724
|
-
amount: nil,
|
1725
|
-
currency: nil,
|
1726
|
-
metadata: nil,
|
1727
|
-
money_movement_type: nil,
|
1728
|
-
paid_at: nil,
|
1729
|
-
payment_reference: nil
|
1730
|
-
)
|
1731
|
-
@amount = amount
|
1732
|
-
@currency = currency
|
1733
|
-
@metadata = metadata
|
1734
|
-
@money_movement_type = money_movement_type
|
1735
|
-
@paid_at = paid_at
|
1736
|
-
@payment_reference = payment_reference
|
1737
|
-
end
|
1738
|
-
end
|
1739
|
-
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
1740
|
-
attr_accessor :amount_requested
|
1741
1485
|
# Specifies which fields in the response should be expanded.
|
1742
1486
|
attr_accessor :expand
|
1743
1487
|
# The ID of the PaymentIntent to attach to the invoice.
|
1744
1488
|
attr_accessor :payment_intent
|
1745
|
-
# The ID of the PaymentRecord to attach to the invoice.
|
1746
|
-
attr_accessor :payment_record
|
1747
|
-
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
1748
|
-
attr_accessor :payment_record_data
|
1749
1489
|
|
1750
|
-
def initialize(
|
1751
|
-
amount_requested: nil,
|
1752
|
-
expand: nil,
|
1753
|
-
payment_intent: nil,
|
1754
|
-
payment_record: nil,
|
1755
|
-
payment_record_data: nil
|
1756
|
-
)
|
1757
|
-
@amount_requested = amount_requested
|
1490
|
+
def initialize(expand: nil, payment_intent: nil)
|
1758
1491
|
@expand = expand
|
1759
1492
|
@payment_intent = payment_intent
|
1760
|
-
@payment_record = payment_record
|
1761
|
-
@payment_record_data = payment_record_data
|
1762
1493
|
end
|
1763
1494
|
end
|
1764
1495
|
|
@@ -1858,44 +1589,16 @@ module Stripe
|
|
1858
1589
|
class UpdateLinesParams < Stripe::RequestParams
|
1859
1590
|
class Line < Stripe::RequestParams
|
1860
1591
|
class Discount < Stripe::RequestParams
|
1861
|
-
class DiscountEnd < Stripe::RequestParams
|
1862
|
-
class Duration < Stripe::RequestParams
|
1863
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1864
|
-
attr_accessor :interval
|
1865
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1866
|
-
attr_accessor :interval_count
|
1867
|
-
|
1868
|
-
def initialize(interval: nil, interval_count: nil)
|
1869
|
-
@interval = interval
|
1870
|
-
@interval_count = interval_count
|
1871
|
-
end
|
1872
|
-
end
|
1873
|
-
# Time span for the redeemed discount.
|
1874
|
-
attr_accessor :duration
|
1875
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1876
|
-
attr_accessor :timestamp
|
1877
|
-
# The type of calculation made to determine when the discount ends.
|
1878
|
-
attr_accessor :type
|
1879
|
-
|
1880
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1881
|
-
@duration = duration
|
1882
|
-
@timestamp = timestamp
|
1883
|
-
@type = type
|
1884
|
-
end
|
1885
|
-
end
|
1886
1592
|
# ID of the coupon to create a new discount for.
|
1887
1593
|
attr_accessor :coupon
|
1888
1594
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1889
1595
|
attr_accessor :discount
|
1890
|
-
# Details to determine how long the discount should be applied for.
|
1891
|
-
attr_accessor :discount_end
|
1892
1596
|
# ID of the promotion code to create a new discount for.
|
1893
1597
|
attr_accessor :promotion_code
|
1894
1598
|
|
1895
|
-
def initialize(coupon: nil, discount: nil,
|
1599
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1896
1600
|
@coupon = coupon
|
1897
1601
|
@discount = discount
|
1898
|
-
@discount_end = discount_end
|
1899
1602
|
@promotion_code = promotion_code
|
1900
1603
|
end
|
1901
1604
|
end
|
@@ -2048,8 +1751,6 @@ module Stripe
|
|
2048
1751
|
attr_accessor :discounts
|
2049
1752
|
# ID of an existing line item on the invoice.
|
2050
1753
|
attr_accessor :id
|
2051
|
-
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
2052
|
-
attr_accessor :margins
|
2053
1754
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
2054
1755
|
attr_accessor :metadata
|
2055
1756
|
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
@@ -2071,7 +1772,6 @@ module Stripe
|
|
2071
1772
|
discountable: nil,
|
2072
1773
|
discounts: nil,
|
2073
1774
|
id: nil,
|
2074
|
-
margins: nil,
|
2075
1775
|
metadata: nil,
|
2076
1776
|
period: nil,
|
2077
1777
|
price_data: nil,
|
@@ -2085,7 +1785,6 @@ module Stripe
|
|
2085
1785
|
@discountable = discountable
|
2086
1786
|
@discounts = discounts
|
2087
1787
|
@id = id
|
2088
|
-
@margins = margins
|
2089
1788
|
@metadata = metadata
|
2090
1789
|
@period = period
|
2091
1790
|
@price_data = price_data
|
@@ -2260,88 +1959,32 @@ module Stripe
|
|
2260
1959
|
end
|
2261
1960
|
|
2262
1961
|
class Discount < Stripe::RequestParams
|
2263
|
-
class DiscountEnd < Stripe::RequestParams
|
2264
|
-
class Duration < Stripe::RequestParams
|
2265
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2266
|
-
attr_accessor :interval
|
2267
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2268
|
-
attr_accessor :interval_count
|
2269
|
-
|
2270
|
-
def initialize(interval: nil, interval_count: nil)
|
2271
|
-
@interval = interval
|
2272
|
-
@interval_count = interval_count
|
2273
|
-
end
|
2274
|
-
end
|
2275
|
-
# Time span for the redeemed discount.
|
2276
|
-
attr_accessor :duration
|
2277
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2278
|
-
attr_accessor :timestamp
|
2279
|
-
# The type of calculation made to determine when the discount ends.
|
2280
|
-
attr_accessor :type
|
2281
|
-
|
2282
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2283
|
-
@duration = duration
|
2284
|
-
@timestamp = timestamp
|
2285
|
-
@type = type
|
2286
|
-
end
|
2287
|
-
end
|
2288
1962
|
# ID of the coupon to create a new discount for.
|
2289
1963
|
attr_accessor :coupon
|
2290
1964
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2291
1965
|
attr_accessor :discount
|
2292
|
-
# Details to determine how long the discount should be applied for.
|
2293
|
-
attr_accessor :discount_end
|
2294
1966
|
# ID of the promotion code to create a new discount for.
|
2295
1967
|
attr_accessor :promotion_code
|
2296
1968
|
|
2297
|
-
def initialize(coupon: nil, discount: nil,
|
1969
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2298
1970
|
@coupon = coupon
|
2299
1971
|
@discount = discount
|
2300
|
-
@discount_end = discount_end
|
2301
1972
|
@promotion_code = promotion_code
|
2302
1973
|
end
|
2303
1974
|
end
|
2304
1975
|
|
2305
1976
|
class InvoiceItem < Stripe::RequestParams
|
2306
1977
|
class Discount < Stripe::RequestParams
|
2307
|
-
class DiscountEnd < Stripe::RequestParams
|
2308
|
-
class Duration < Stripe::RequestParams
|
2309
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2310
|
-
attr_accessor :interval
|
2311
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2312
|
-
attr_accessor :interval_count
|
2313
|
-
|
2314
|
-
def initialize(interval: nil, interval_count: nil)
|
2315
|
-
@interval = interval
|
2316
|
-
@interval_count = interval_count
|
2317
|
-
end
|
2318
|
-
end
|
2319
|
-
# Time span for the redeemed discount.
|
2320
|
-
attr_accessor :duration
|
2321
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2322
|
-
attr_accessor :timestamp
|
2323
|
-
# The type of calculation made to determine when the discount ends.
|
2324
|
-
attr_accessor :type
|
2325
|
-
|
2326
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2327
|
-
@duration = duration
|
2328
|
-
@timestamp = timestamp
|
2329
|
-
@type = type
|
2330
|
-
end
|
2331
|
-
end
|
2332
1978
|
# ID of the coupon to create a new discount for.
|
2333
1979
|
attr_accessor :coupon
|
2334
1980
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2335
1981
|
attr_accessor :discount
|
2336
|
-
# Details to determine how long the discount should be applied for.
|
2337
|
-
attr_accessor :discount_end
|
2338
1982
|
# ID of the promotion code to create a new discount for.
|
2339
1983
|
attr_accessor :promotion_code
|
2340
1984
|
|
2341
|
-
def initialize(coupon: nil, discount: nil,
|
1985
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2342
1986
|
@coupon = coupon
|
2343
1987
|
@discount = discount
|
2344
|
-
@discount_end = discount_end
|
2345
1988
|
@promotion_code = promotion_code
|
2346
1989
|
end
|
2347
1990
|
end
|
@@ -2467,137 +2110,23 @@ module Stripe
|
|
2467
2110
|
end
|
2468
2111
|
|
2469
2112
|
class ScheduleDetails < Stripe::RequestParams
|
2470
|
-
class
|
2471
|
-
|
2472
|
-
|
2473
|
-
# The ID of a specific discount.
|
2474
|
-
attr_accessor :discount
|
2475
|
-
|
2476
|
-
def initialize(discount: nil)
|
2477
|
-
@discount = discount
|
2478
|
-
end
|
2479
|
-
end
|
2480
|
-
|
2481
|
-
class Duration < Stripe::RequestParams
|
2482
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2483
|
-
attr_accessor :interval
|
2484
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2485
|
-
attr_accessor :interval_count
|
2486
|
-
|
2487
|
-
def initialize(interval: nil, interval_count: nil)
|
2488
|
-
@interval = interval
|
2489
|
-
@interval_count = interval_count
|
2490
|
-
end
|
2491
|
-
end
|
2492
|
-
# Use the `end` time of a given discount.
|
2493
|
-
attr_accessor :discount_end
|
2494
|
-
# Time span for the amendment starting from the `amendment_start`.
|
2495
|
-
attr_accessor :duration
|
2496
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2497
|
-
attr_accessor :timestamp
|
2498
|
-
# Select one of three ways to pass the `amendment_end`.
|
2499
|
-
attr_accessor :type
|
2500
|
-
|
2501
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2502
|
-
@discount_end = discount_end
|
2503
|
-
@duration = duration
|
2504
|
-
@timestamp = timestamp
|
2505
|
-
@type = type
|
2506
|
-
end
|
2507
|
-
end
|
2508
|
-
|
2509
|
-
class AmendmentStart < Stripe::RequestParams
|
2510
|
-
class AmendmentEnd < Stripe::RequestParams
|
2511
|
-
# The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
|
2512
|
-
attr_accessor :index
|
2513
|
-
|
2514
|
-
def initialize(index: nil)
|
2515
|
-
@index = index
|
2516
|
-
end
|
2517
|
-
end
|
2518
|
-
|
2519
|
-
class DiscountEnd < Stripe::RequestParams
|
2520
|
-
# The ID of a specific discount.
|
2521
|
-
attr_accessor :discount
|
2113
|
+
class BillingMode < Stripe::RequestParams
|
2114
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
2115
|
+
attr_accessor :type
|
2522
2116
|
|
2523
|
-
|
2524
|
-
|
2525
|
-
end
|
2526
|
-
end
|
2527
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2528
|
-
attr_accessor :amendment_end
|
2529
|
-
# Use the `end` time of a given discount.
|
2530
|
-
attr_accessor :discount_end
|
2531
|
-
# A precise Unix timestamp for the amendment to start.
|
2532
|
-
attr_accessor :timestamp
|
2533
|
-
# Select one of three ways to pass the `amendment_start`.
|
2534
|
-
attr_accessor :type
|
2535
|
-
|
2536
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2537
|
-
@amendment_end = amendment_end
|
2538
|
-
@discount_end = discount_end
|
2539
|
-
@timestamp = timestamp
|
2540
|
-
@type = type
|
2541
|
-
end
|
2117
|
+
def initialize(type: nil)
|
2118
|
+
@type = type
|
2542
2119
|
end
|
2120
|
+
end
|
2543
2121
|
|
2544
|
-
|
2545
|
-
|
2546
|
-
|
2547
|
-
|
2548
|
-
attr_accessor :type
|
2549
|
-
|
2550
|
-
def initialize(type: nil)
|
2551
|
-
@type = type
|
2552
|
-
end
|
2553
|
-
end
|
2554
|
-
# The coupon code to redeem.
|
2555
|
-
attr_accessor :coupon
|
2556
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
2557
|
-
attr_accessor :discount
|
2558
|
-
# Details to determine how long the discount should be applied for.
|
2559
|
-
attr_accessor :discount_end
|
2560
|
-
# The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
|
2561
|
-
attr_accessor :index
|
2562
|
-
# The promotion code to redeem.
|
2563
|
-
attr_accessor :promotion_code
|
2564
|
-
|
2565
|
-
def initialize(
|
2566
|
-
coupon: nil,
|
2567
|
-
discount: nil,
|
2568
|
-
discount_end: nil,
|
2569
|
-
index: nil,
|
2570
|
-
promotion_code: nil
|
2571
|
-
)
|
2572
|
-
@coupon = coupon
|
2573
|
-
@discount = discount
|
2574
|
-
@discount_end = discount_end
|
2575
|
-
@index = index
|
2576
|
-
@promotion_code = promotion_code
|
2577
|
-
end
|
2578
|
-
end
|
2579
|
-
|
2580
|
-
class Remove < Stripe::RequestParams
|
2581
|
-
# The coupon code to remove from the `discounts` array.
|
2582
|
-
attr_accessor :coupon
|
2583
|
-
# The ID of a discount to remove from the `discounts` array.
|
2584
|
-
attr_accessor :discount
|
2585
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
2586
|
-
attr_accessor :promotion_code
|
2587
|
-
|
2588
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2589
|
-
@coupon = coupon
|
2590
|
-
@discount = discount
|
2591
|
-
@promotion_code = promotion_code
|
2592
|
-
end
|
2593
|
-
end
|
2594
|
-
|
2595
|
-
class Set < Stripe::RequestParams
|
2596
|
-
# The coupon code to replace the `discounts` array with.
|
2122
|
+
class Phase < Stripe::RequestParams
|
2123
|
+
class AddInvoiceItem < Stripe::RequestParams
|
2124
|
+
class Discount < Stripe::RequestParams
|
2125
|
+
# ID of the coupon to create a new discount for.
|
2597
2126
|
attr_accessor :coupon
|
2598
|
-
#
|
2127
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2599
2128
|
attr_accessor :discount
|
2600
|
-
#
|
2129
|
+
# ID of the promotion code to create a new discount for.
|
2601
2130
|
attr_accessor :promotion_code
|
2602
2131
|
|
2603
2132
|
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
@@ -2606,370 +2135,39 @@ module Stripe
|
|
2606
2135
|
@promotion_code = promotion_code
|
2607
2136
|
end
|
2608
2137
|
end
|
2609
|
-
# Details of the discount to add.
|
2610
|
-
attr_accessor :add
|
2611
|
-
# Details of the discount to remove.
|
2612
|
-
attr_accessor :remove
|
2613
|
-
# Details of the discount to replace the existing discounts with.
|
2614
|
-
attr_accessor :set
|
2615
|
-
# Determines the type of discount action.
|
2616
|
-
attr_accessor :type
|
2617
|
-
|
2618
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2619
|
-
@add = add
|
2620
|
-
@remove = remove
|
2621
|
-
@set = set
|
2622
|
-
@type = type
|
2623
|
-
end
|
2624
|
-
end
|
2625
|
-
|
2626
|
-
class ItemAction < Stripe::RequestParams
|
2627
|
-
class Add < Stripe::RequestParams
|
2628
|
-
class Discount < Stripe::RequestParams
|
2629
|
-
class DiscountEnd < Stripe::RequestParams
|
2630
|
-
class Duration < Stripe::RequestParams
|
2631
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2632
|
-
attr_accessor :interval
|
2633
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2634
|
-
attr_accessor :interval_count
|
2635
|
-
|
2636
|
-
def initialize(interval: nil, interval_count: nil)
|
2637
|
-
@interval = interval
|
2638
|
-
@interval_count = interval_count
|
2639
|
-
end
|
2640
|
-
end
|
2641
|
-
# Time span for the redeemed discount.
|
2642
|
-
attr_accessor :duration
|
2643
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2644
|
-
attr_accessor :timestamp
|
2645
|
-
# The type of calculation made to determine when the discount ends.
|
2646
|
-
attr_accessor :type
|
2647
|
-
|
2648
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2649
|
-
@duration = duration
|
2650
|
-
@timestamp = timestamp
|
2651
|
-
@type = type
|
2652
|
-
end
|
2653
|
-
end
|
2654
|
-
# ID of the coupon to create a new discount for.
|
2655
|
-
attr_accessor :coupon
|
2656
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2657
|
-
attr_accessor :discount
|
2658
|
-
# Details to determine how long the discount should be applied for.
|
2659
|
-
attr_accessor :discount_end
|
2660
|
-
# ID of the promotion code to create a new discount for.
|
2661
|
-
attr_accessor :promotion_code
|
2662
|
-
|
2663
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2664
|
-
@coupon = coupon
|
2665
|
-
@discount = discount
|
2666
|
-
@discount_end = discount_end
|
2667
|
-
@promotion_code = promotion_code
|
2668
|
-
end
|
2669
|
-
end
|
2670
2138
|
|
2671
|
-
|
2672
|
-
|
2673
|
-
|
2674
|
-
|
2675
|
-
|
2676
|
-
|
2677
|
-
def initialize(converts_to: nil, type: nil)
|
2678
|
-
@converts_to = converts_to
|
2679
|
-
@type = type
|
2680
|
-
end
|
2681
|
-
end
|
2682
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2683
|
-
attr_accessor :discounts
|
2684
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2685
|
-
attr_accessor :metadata
|
2686
|
-
# The ID of the price object.
|
2687
|
-
attr_accessor :price
|
2688
|
-
# Quantity for this item.
|
2689
|
-
attr_accessor :quantity
|
2690
|
-
# The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
2691
|
-
attr_accessor :tax_rates
|
2692
|
-
# Options that configure the trial on the subscription item.
|
2693
|
-
attr_accessor :trial
|
2694
|
-
|
2695
|
-
def initialize(
|
2696
|
-
discounts: nil,
|
2697
|
-
metadata: nil,
|
2698
|
-
price: nil,
|
2699
|
-
quantity: nil,
|
2700
|
-
tax_rates: nil,
|
2701
|
-
trial: nil
|
2702
|
-
)
|
2703
|
-
@discounts = discounts
|
2704
|
-
@metadata = metadata
|
2705
|
-
@price = price
|
2706
|
-
@quantity = quantity
|
2707
|
-
@tax_rates = tax_rates
|
2708
|
-
@trial = trial
|
2709
|
-
end
|
2710
|
-
end
|
2711
|
-
|
2712
|
-
class Remove < Stripe::RequestParams
|
2713
|
-
# ID of a price to remove.
|
2714
|
-
attr_accessor :price
|
2715
|
-
|
2716
|
-
def initialize(price: nil)
|
2717
|
-
@price = price
|
2718
|
-
end
|
2719
|
-
end
|
2720
|
-
|
2721
|
-
class Set < Stripe::RequestParams
|
2722
|
-
class Discount < Stripe::RequestParams
|
2723
|
-
class DiscountEnd < Stripe::RequestParams
|
2724
|
-
class Duration < Stripe::RequestParams
|
2725
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2726
|
-
attr_accessor :interval
|
2727
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2728
|
-
attr_accessor :interval_count
|
2729
|
-
|
2730
|
-
def initialize(interval: nil, interval_count: nil)
|
2731
|
-
@interval = interval
|
2732
|
-
@interval_count = interval_count
|
2733
|
-
end
|
2734
|
-
end
|
2735
|
-
# Time span for the redeemed discount.
|
2736
|
-
attr_accessor :duration
|
2737
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2738
|
-
attr_accessor :timestamp
|
2739
|
-
# The type of calculation made to determine when the discount ends.
|
2740
|
-
attr_accessor :type
|
2741
|
-
|
2742
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2743
|
-
@duration = duration
|
2744
|
-
@timestamp = timestamp
|
2745
|
-
@type = type
|
2746
|
-
end
|
2747
|
-
end
|
2748
|
-
# ID of the coupon to create a new discount for.
|
2749
|
-
attr_accessor :coupon
|
2750
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2751
|
-
attr_accessor :discount
|
2752
|
-
# Details to determine how long the discount should be applied for.
|
2753
|
-
attr_accessor :discount_end
|
2754
|
-
# ID of the promotion code to create a new discount for.
|
2755
|
-
attr_accessor :promotion_code
|
2756
|
-
|
2757
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2758
|
-
@coupon = coupon
|
2759
|
-
@discount = discount
|
2760
|
-
@discount_end = discount_end
|
2761
|
-
@promotion_code = promotion_code
|
2762
|
-
end
|
2763
|
-
end
|
2764
|
-
|
2765
|
-
class Trial < Stripe::RequestParams
|
2766
|
-
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
2767
|
-
attr_accessor :converts_to
|
2768
|
-
# Determines the type of trial for this item.
|
2139
|
+
class Period < Stripe::RequestParams
|
2140
|
+
class End < Stripe::RequestParams
|
2141
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
2142
|
+
attr_accessor :timestamp
|
2143
|
+
# Select how to calculate the end of the invoice item period.
|
2769
2144
|
attr_accessor :type
|
2770
2145
|
|
2771
|
-
def initialize(
|
2772
|
-
@
|
2146
|
+
def initialize(timestamp: nil, type: nil)
|
2147
|
+
@timestamp = timestamp
|
2773
2148
|
@type = type
|
2774
2149
|
end
|
2775
2150
|
end
|
2776
|
-
# If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
|
2777
|
-
attr_accessor :discounts
|
2778
|
-
# If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
|
2779
|
-
attr_accessor :metadata
|
2780
|
-
# The ID of the price object.
|
2781
|
-
attr_accessor :price
|
2782
|
-
# If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
|
2783
|
-
attr_accessor :quantity
|
2784
|
-
# If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
|
2785
|
-
attr_accessor :tax_rates
|
2786
|
-
# If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
|
2787
|
-
attr_accessor :trial
|
2788
2151
|
|
2789
|
-
|
2790
|
-
|
2791
|
-
metadata: nil,
|
2792
|
-
price: nil,
|
2793
|
-
quantity: nil,
|
2794
|
-
tax_rates: nil,
|
2795
|
-
trial: nil
|
2796
|
-
)
|
2797
|
-
@discounts = discounts
|
2798
|
-
@metadata = metadata
|
2799
|
-
@price = price
|
2800
|
-
@quantity = quantity
|
2801
|
-
@tax_rates = tax_rates
|
2802
|
-
@trial = trial
|
2803
|
-
end
|
2804
|
-
end
|
2805
|
-
# Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
|
2806
|
-
attr_accessor :add
|
2807
|
-
# Details of the subscription item to remove.
|
2808
|
-
attr_accessor :remove
|
2809
|
-
# Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
|
2810
|
-
attr_accessor :set
|
2811
|
-
# Determines the type of item action.
|
2812
|
-
attr_accessor :type
|
2813
|
-
|
2814
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2815
|
-
@add = add
|
2816
|
-
@remove = remove
|
2817
|
-
@set = set
|
2818
|
-
@type = type
|
2819
|
-
end
|
2820
|
-
end
|
2821
|
-
|
2822
|
-
class MetadataAction < Stripe::RequestParams
|
2823
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2824
|
-
attr_accessor :add
|
2825
|
-
# Keys to remove from schedule phase metadata.
|
2826
|
-
attr_accessor :remove
|
2827
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2828
|
-
attr_accessor :set
|
2829
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2830
|
-
attr_accessor :type
|
2831
|
-
|
2832
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2833
|
-
@add = add
|
2834
|
-
@remove = remove
|
2835
|
-
@set = set
|
2836
|
-
@type = type
|
2837
|
-
end
|
2838
|
-
end
|
2839
|
-
|
2840
|
-
class SetPauseCollection < Stripe::RequestParams
|
2841
|
-
class Set < Stripe::RequestParams
|
2842
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2843
|
-
attr_accessor :behavior
|
2844
|
-
|
2845
|
-
def initialize(behavior: nil)
|
2846
|
-
@behavior = behavior
|
2847
|
-
end
|
2848
|
-
end
|
2849
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2850
|
-
attr_accessor :set
|
2851
|
-
# Determines the type of the pause_collection amendment.
|
2852
|
-
attr_accessor :type
|
2853
|
-
|
2854
|
-
def initialize(set: nil, type: nil)
|
2855
|
-
@set = set
|
2856
|
-
@type = type
|
2857
|
-
end
|
2858
|
-
end
|
2859
|
-
|
2860
|
-
class TrialSettings < Stripe::RequestParams
|
2861
|
-
class EndBehavior < Stripe::RequestParams
|
2862
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2863
|
-
attr_accessor :prorate_up_front
|
2864
|
-
|
2865
|
-
def initialize(prorate_up_front: nil)
|
2866
|
-
@prorate_up_front = prorate_up_front
|
2867
|
-
end
|
2868
|
-
end
|
2869
|
-
# Defines how the subscription should behave when a trial ends.
|
2870
|
-
attr_accessor :end_behavior
|
2871
|
-
|
2872
|
-
def initialize(end_behavior: nil)
|
2873
|
-
@end_behavior = end_behavior
|
2874
|
-
end
|
2875
|
-
end
|
2876
|
-
# Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
|
2877
|
-
attr_accessor :amendment_end
|
2878
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2879
|
-
attr_accessor :amendment_start
|
2880
|
-
# For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
|
2881
|
-
attr_accessor :billing_cycle_anchor
|
2882
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2883
|
-
attr_accessor :discount_actions
|
2884
|
-
# Changes to the subscription items during the amendment time span.
|
2885
|
-
attr_accessor :item_actions
|
2886
|
-
# Instructions for how to modify phase metadata
|
2887
|
-
attr_accessor :metadata_actions
|
2888
|
-
# Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
|
2889
|
-
attr_accessor :proration_behavior
|
2890
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2891
|
-
attr_accessor :set_pause_collection
|
2892
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2893
|
-
attr_accessor :set_schedule_end
|
2894
|
-
# Settings related to subscription trials.
|
2895
|
-
attr_accessor :trial_settings
|
2896
|
-
|
2897
|
-
def initialize(
|
2898
|
-
amendment_end: nil,
|
2899
|
-
amendment_start: nil,
|
2900
|
-
billing_cycle_anchor: nil,
|
2901
|
-
discount_actions: nil,
|
2902
|
-
item_actions: nil,
|
2903
|
-
metadata_actions: nil,
|
2904
|
-
proration_behavior: nil,
|
2905
|
-
set_pause_collection: nil,
|
2906
|
-
set_schedule_end: nil,
|
2907
|
-
trial_settings: nil
|
2908
|
-
)
|
2909
|
-
@amendment_end = amendment_end
|
2910
|
-
@amendment_start = amendment_start
|
2911
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2912
|
-
@discount_actions = discount_actions
|
2913
|
-
@item_actions = item_actions
|
2914
|
-
@metadata_actions = metadata_actions
|
2915
|
-
@proration_behavior = proration_behavior
|
2916
|
-
@set_pause_collection = set_pause_collection
|
2917
|
-
@set_schedule_end = set_schedule_end
|
2918
|
-
@trial_settings = trial_settings
|
2919
|
-
end
|
2920
|
-
end
|
2921
|
-
|
2922
|
-
class BillingMode < Stripe::RequestParams
|
2923
|
-
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
2924
|
-
attr_accessor :type
|
2925
|
-
|
2926
|
-
def initialize(type: nil)
|
2927
|
-
@type = type
|
2928
|
-
end
|
2929
|
-
end
|
2930
|
-
|
2931
|
-
class Phase < Stripe::RequestParams
|
2932
|
-
class AddInvoiceItem < Stripe::RequestParams
|
2933
|
-
class Discount < Stripe::RequestParams
|
2934
|
-
class DiscountEnd < Stripe::RequestParams
|
2935
|
-
class Duration < Stripe::RequestParams
|
2936
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2937
|
-
attr_accessor :interval
|
2938
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2939
|
-
attr_accessor :interval_count
|
2940
|
-
|
2941
|
-
def initialize(interval: nil, interval_count: nil)
|
2942
|
-
@interval = interval
|
2943
|
-
@interval_count = interval_count
|
2944
|
-
end
|
2945
|
-
end
|
2946
|
-
# Time span for the redeemed discount.
|
2947
|
-
attr_accessor :duration
|
2948
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2152
|
+
class Start < Stripe::RequestParams
|
2153
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
2949
2154
|
attr_accessor :timestamp
|
2950
|
-
#
|
2155
|
+
# Select how to calculate the start of the invoice item period.
|
2951
2156
|
attr_accessor :type
|
2952
2157
|
|
2953
|
-
def initialize(
|
2954
|
-
@duration = duration
|
2158
|
+
def initialize(timestamp: nil, type: nil)
|
2955
2159
|
@timestamp = timestamp
|
2956
2160
|
@type = type
|
2957
2161
|
end
|
2958
2162
|
end
|
2959
|
-
#
|
2960
|
-
attr_accessor :
|
2961
|
-
#
|
2962
|
-
attr_accessor :
|
2963
|
-
|
2964
|
-
|
2965
|
-
|
2966
|
-
|
2967
|
-
|
2968
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2969
|
-
@coupon = coupon
|
2970
|
-
@discount = discount
|
2971
|
-
@discount_end = discount_end
|
2972
|
-
@promotion_code = promotion_code
|
2163
|
+
# End of the invoice item period.
|
2164
|
+
attr_accessor :end
|
2165
|
+
# Start of the invoice item period.
|
2166
|
+
attr_accessor :start
|
2167
|
+
|
2168
|
+
def initialize(end_: nil, start: nil)
|
2169
|
+
@end = end_
|
2170
|
+
@start = start
|
2973
2171
|
end
|
2974
2172
|
end
|
2975
2173
|
|
@@ -3001,6 +2199,10 @@ module Stripe
|
|
3001
2199
|
end
|
3002
2200
|
# The coupons to redeem into discounts for the item.
|
3003
2201
|
attr_accessor :discounts
|
2202
|
+
# 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`.
|
2203
|
+
attr_accessor :metadata
|
2204
|
+
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
2205
|
+
attr_accessor :period
|
3004
2206
|
# The ID of the price object. One of `price` or `price_data` is required.
|
3005
2207
|
attr_accessor :price
|
3006
2208
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -3012,12 +2214,16 @@ module Stripe
|
|
3012
2214
|
|
3013
2215
|
def initialize(
|
3014
2216
|
discounts: nil,
|
2217
|
+
metadata: nil,
|
2218
|
+
period: nil,
|
3015
2219
|
price: nil,
|
3016
2220
|
price_data: nil,
|
3017
2221
|
quantity: nil,
|
3018
2222
|
tax_rates: nil
|
3019
2223
|
)
|
3020
2224
|
@discounts = discounts
|
2225
|
+
@metadata = metadata
|
2226
|
+
@period = period
|
3021
2227
|
@price = price
|
3022
2228
|
@price_data = price_data
|
3023
2229
|
@quantity = quantity
|
@@ -3061,44 +2267,16 @@ module Stripe
|
|
3061
2267
|
end
|
3062
2268
|
|
3063
2269
|
class Discount < Stripe::RequestParams
|
3064
|
-
class DiscountEnd < Stripe::RequestParams
|
3065
|
-
class Duration < Stripe::RequestParams
|
3066
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3067
|
-
attr_accessor :interval
|
3068
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3069
|
-
attr_accessor :interval_count
|
3070
|
-
|
3071
|
-
def initialize(interval: nil, interval_count: nil)
|
3072
|
-
@interval = interval
|
3073
|
-
@interval_count = interval_count
|
3074
|
-
end
|
3075
|
-
end
|
3076
|
-
# Time span for the redeemed discount.
|
3077
|
-
attr_accessor :duration
|
3078
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3079
|
-
attr_accessor :timestamp
|
3080
|
-
# The type of calculation made to determine when the discount ends.
|
3081
|
-
attr_accessor :type
|
3082
|
-
|
3083
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3084
|
-
@duration = duration
|
3085
|
-
@timestamp = timestamp
|
3086
|
-
@type = type
|
3087
|
-
end
|
3088
|
-
end
|
3089
2270
|
# ID of the coupon to create a new discount for.
|
3090
2271
|
attr_accessor :coupon
|
3091
2272
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3092
2273
|
attr_accessor :discount
|
3093
|
-
# Details to determine how long the discount should be applied for.
|
3094
|
-
attr_accessor :discount_end
|
3095
2274
|
# ID of the promotion code to create a new discount for.
|
3096
2275
|
attr_accessor :promotion_code
|
3097
2276
|
|
3098
|
-
def initialize(coupon: nil, discount: nil,
|
2277
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3099
2278
|
@coupon = coupon
|
3100
2279
|
@discount = discount
|
3101
|
-
@discount_end = discount_end
|
3102
2280
|
@promotion_code = promotion_code
|
3103
2281
|
end
|
3104
2282
|
end
|
@@ -3152,44 +2330,16 @@ module Stripe
|
|
3152
2330
|
end
|
3153
2331
|
|
3154
2332
|
class Discount < Stripe::RequestParams
|
3155
|
-
class DiscountEnd < Stripe::RequestParams
|
3156
|
-
class Duration < Stripe::RequestParams
|
3157
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3158
|
-
attr_accessor :interval
|
3159
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3160
|
-
attr_accessor :interval_count
|
3161
|
-
|
3162
|
-
def initialize(interval: nil, interval_count: nil)
|
3163
|
-
@interval = interval
|
3164
|
-
@interval_count = interval_count
|
3165
|
-
end
|
3166
|
-
end
|
3167
|
-
# Time span for the redeemed discount.
|
3168
|
-
attr_accessor :duration
|
3169
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3170
|
-
attr_accessor :timestamp
|
3171
|
-
# The type of calculation made to determine when the discount ends.
|
3172
|
-
attr_accessor :type
|
3173
|
-
|
3174
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3175
|
-
@duration = duration
|
3176
|
-
@timestamp = timestamp
|
3177
|
-
@type = type
|
3178
|
-
end
|
3179
|
-
end
|
3180
2333
|
# ID of the coupon to create a new discount for.
|
3181
2334
|
attr_accessor :coupon
|
3182
2335
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3183
2336
|
attr_accessor :discount
|
3184
|
-
# Details to determine how long the discount should be applied for.
|
3185
|
-
attr_accessor :discount_end
|
3186
2337
|
# ID of the promotion code to create a new discount for.
|
3187
2338
|
attr_accessor :promotion_code
|
3188
2339
|
|
3189
|
-
def initialize(coupon: nil, discount: nil,
|
2340
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3190
2341
|
@coupon = coupon
|
3191
2342
|
@discount = discount
|
3192
|
-
@discount_end = discount_end
|
3193
2343
|
@promotion_code = promotion_code
|
3194
2344
|
end
|
3195
2345
|
end
|
@@ -3235,18 +2385,6 @@ module Stripe
|
|
3235
2385
|
@unit_amount_decimal = unit_amount_decimal
|
3236
2386
|
end
|
3237
2387
|
end
|
3238
|
-
|
3239
|
-
class Trial < Stripe::RequestParams
|
3240
|
-
# 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.
|
3241
|
-
attr_accessor :converts_to
|
3242
|
-
# Determines the type of trial for this item.
|
3243
|
-
attr_accessor :type
|
3244
|
-
|
3245
|
-
def initialize(converts_to: nil, type: nil)
|
3246
|
-
@converts_to = converts_to
|
3247
|
-
@type = type
|
3248
|
-
end
|
3249
|
-
end
|
3250
2388
|
# 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.
|
3251
2389
|
attr_accessor :billing_thresholds
|
3252
2390
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -3263,8 +2401,6 @@ module Stripe
|
|
3263
2401
|
attr_accessor :quantity
|
3264
2402
|
# 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.
|
3265
2403
|
attr_accessor :tax_rates
|
3266
|
-
# Options that configure the trial on the subscription item.
|
3267
|
-
attr_accessor :trial
|
3268
2404
|
|
3269
2405
|
def initialize(
|
3270
2406
|
billing_thresholds: nil,
|
@@ -3274,8 +2410,7 @@ module Stripe
|
|
3274
2410
|
price: nil,
|
3275
2411
|
price_data: nil,
|
3276
2412
|
quantity: nil,
|
3277
|
-
tax_rates: nil
|
3278
|
-
trial: nil
|
2413
|
+
tax_rates: nil
|
3279
2414
|
)
|
3280
2415
|
@billing_thresholds = billing_thresholds
|
3281
2416
|
@discounts = discounts
|
@@ -3285,16 +2420,6 @@ module Stripe
|
|
3285
2420
|
@price_data = price_data
|
3286
2421
|
@quantity = quantity
|
3287
2422
|
@tax_rates = tax_rates
|
3288
|
-
@trial = trial
|
3289
|
-
end
|
3290
|
-
end
|
3291
|
-
|
3292
|
-
class PauseCollection < Stripe::RequestParams
|
3293
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3294
|
-
attr_accessor :behavior
|
3295
|
-
|
3296
|
-
def initialize(behavior: nil)
|
3297
|
-
@behavior = behavior
|
3298
2423
|
end
|
3299
2424
|
end
|
3300
2425
|
|
@@ -3309,23 +2434,6 @@ module Stripe
|
|
3309
2434
|
@destination = destination
|
3310
2435
|
end
|
3311
2436
|
end
|
3312
|
-
|
3313
|
-
class TrialSettings < Stripe::RequestParams
|
3314
|
-
class EndBehavior < Stripe::RequestParams
|
3315
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3316
|
-
attr_accessor :prorate_up_front
|
3317
|
-
|
3318
|
-
def initialize(prorate_up_front: nil)
|
3319
|
-
@prorate_up_front = prorate_up_front
|
3320
|
-
end
|
3321
|
-
end
|
3322
|
-
# Defines how the subscription should behave when a trial ends.
|
3323
|
-
attr_accessor :end_behavior
|
3324
|
-
|
3325
|
-
def initialize(end_behavior: nil)
|
3326
|
-
@end_behavior = end_behavior
|
3327
|
-
end
|
3328
|
-
end
|
3329
2437
|
# 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.
|
3330
2438
|
attr_accessor :add_invoice_items
|
3331
2439
|
# 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).
|
@@ -3362,8 +2470,6 @@ module Stripe
|
|
3362
2470
|
attr_accessor :metadata
|
3363
2471
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3364
2472
|
attr_accessor :on_behalf_of
|
3365
|
-
# 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).
|
3366
|
-
attr_accessor :pause_collection
|
3367
2473
|
# 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.
|
3368
2474
|
attr_accessor :proration_behavior
|
3369
2475
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -3372,12 +2478,8 @@ module Stripe
|
|
3372
2478
|
attr_accessor :transfer_data
|
3373
2479
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
3374
2480
|
attr_accessor :trial
|
3375
|
-
# Specify trial behavior when crossing phase boundaries
|
3376
|
-
attr_accessor :trial_continuation
|
3377
2481
|
# 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`
|
3378
2482
|
attr_accessor :trial_end
|
3379
|
-
# Settings related to subscription trials.
|
3380
|
-
attr_accessor :trial_settings
|
3381
2483
|
|
3382
2484
|
def initialize(
|
3383
2485
|
add_invoice_items: nil,
|
@@ -3398,14 +2500,11 @@ module Stripe
|
|
3398
2500
|
iterations: nil,
|
3399
2501
|
metadata: nil,
|
3400
2502
|
on_behalf_of: nil,
|
3401
|
-
pause_collection: nil,
|
3402
2503
|
proration_behavior: nil,
|
3403
2504
|
start_date: nil,
|
3404
2505
|
transfer_data: nil,
|
3405
2506
|
trial: nil,
|
3406
|
-
|
3407
|
-
trial_end: nil,
|
3408
|
-
trial_settings: nil
|
2507
|
+
trial_end: nil
|
3409
2508
|
)
|
3410
2509
|
@add_invoice_items = add_invoice_items
|
3411
2510
|
@application_fee_percent = application_fee_percent
|
@@ -3425,95 +2524,26 @@ module Stripe
|
|
3425
2524
|
@iterations = iterations
|
3426
2525
|
@metadata = metadata
|
3427
2526
|
@on_behalf_of = on_behalf_of
|
3428
|
-
@pause_collection = pause_collection
|
3429
2527
|
@proration_behavior = proration_behavior
|
3430
2528
|
@start_date = start_date
|
3431
2529
|
@transfer_data = transfer_data
|
3432
2530
|
@trial = trial
|
3433
|
-
@trial_continuation = trial_continuation
|
3434
2531
|
@trial_end = trial_end
|
3435
|
-
@trial_settings = trial_settings
|
3436
|
-
end
|
3437
|
-
end
|
3438
|
-
|
3439
|
-
class Prebilling < Stripe::RequestParams
|
3440
|
-
class BillUntil < Stripe::RequestParams
|
3441
|
-
class AmendmentEnd < Stripe::RequestParams
|
3442
|
-
# 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.
|
3443
|
-
attr_accessor :index
|
3444
|
-
|
3445
|
-
def initialize(index: nil)
|
3446
|
-
@index = index
|
3447
|
-
end
|
3448
|
-
end
|
3449
|
-
|
3450
|
-
class Duration < Stripe::RequestParams
|
3451
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3452
|
-
attr_accessor :interval
|
3453
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3454
|
-
attr_accessor :interval_count
|
3455
|
-
|
3456
|
-
def initialize(interval: nil, interval_count: nil)
|
3457
|
-
@interval = interval
|
3458
|
-
@interval_count = interval_count
|
3459
|
-
end
|
3460
|
-
end
|
3461
|
-
# End the prebilled period when a specified amendment ends.
|
3462
|
-
attr_accessor :amendment_end
|
3463
|
-
# Time span for prebilling, starting from `bill_from`.
|
3464
|
-
attr_accessor :duration
|
3465
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3466
|
-
attr_accessor :timestamp
|
3467
|
-
# Select one of several ways to pass the `bill_until` value.
|
3468
|
-
attr_accessor :type
|
3469
|
-
|
3470
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3471
|
-
@amendment_end = amendment_end
|
3472
|
-
@duration = duration
|
3473
|
-
@timestamp = timestamp
|
3474
|
-
@type = type
|
3475
|
-
end
|
3476
|
-
end
|
3477
|
-
# The end of the prebilled time period.
|
3478
|
-
attr_accessor :bill_until
|
3479
|
-
# This is used to determine the number of billing cycles to prebill.
|
3480
|
-
attr_accessor :iterations
|
3481
|
-
|
3482
|
-
def initialize(bill_until: nil, iterations: nil)
|
3483
|
-
@bill_until = bill_until
|
3484
|
-
@iterations = iterations
|
3485
2532
|
end
|
3486
2533
|
end
|
3487
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3488
|
-
attr_accessor :amendments
|
3489
|
-
# 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.
|
3490
|
-
attr_accessor :billing_behavior
|
3491
2534
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
3492
2535
|
attr_accessor :billing_mode
|
3493
2536
|
# 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.
|
3494
2537
|
attr_accessor :end_behavior
|
3495
2538
|
# 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.
|
3496
2539
|
attr_accessor :phases
|
3497
|
-
# Provide any time periods to bill in advance.
|
3498
|
-
attr_accessor :prebilling
|
3499
2540
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
3500
2541
|
attr_accessor :proration_behavior
|
3501
2542
|
|
3502
|
-
def initialize(
|
3503
|
-
amendments: nil,
|
3504
|
-
billing_behavior: nil,
|
3505
|
-
billing_mode: nil,
|
3506
|
-
end_behavior: nil,
|
3507
|
-
phases: nil,
|
3508
|
-
prebilling: nil,
|
3509
|
-
proration_behavior: nil
|
3510
|
-
)
|
3511
|
-
@amendments = amendments
|
3512
|
-
@billing_behavior = billing_behavior
|
2543
|
+
def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil)
|
3513
2544
|
@billing_mode = billing_mode
|
3514
2545
|
@end_behavior = end_behavior
|
3515
2546
|
@phases = phases
|
3516
|
-
@prebilling = prebilling
|
3517
2547
|
@proration_behavior = proration_behavior
|
3518
2548
|
end
|
3519
2549
|
end
|
@@ -3539,44 +2569,16 @@ module Stripe
|
|
3539
2569
|
end
|
3540
2570
|
|
3541
2571
|
class Discount < Stripe::RequestParams
|
3542
|
-
class DiscountEnd < Stripe::RequestParams
|
3543
|
-
class Duration < Stripe::RequestParams
|
3544
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3545
|
-
attr_accessor :interval
|
3546
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3547
|
-
attr_accessor :interval_count
|
3548
|
-
|
3549
|
-
def initialize(interval: nil, interval_count: nil)
|
3550
|
-
@interval = interval
|
3551
|
-
@interval_count = interval_count
|
3552
|
-
end
|
3553
|
-
end
|
3554
|
-
# Time span for the redeemed discount.
|
3555
|
-
attr_accessor :duration
|
3556
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3557
|
-
attr_accessor :timestamp
|
3558
|
-
# The type of calculation made to determine when the discount ends.
|
3559
|
-
attr_accessor :type
|
3560
|
-
|
3561
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3562
|
-
@duration = duration
|
3563
|
-
@timestamp = timestamp
|
3564
|
-
@type = type
|
3565
|
-
end
|
3566
|
-
end
|
3567
2572
|
# ID of the coupon to create a new discount for.
|
3568
2573
|
attr_accessor :coupon
|
3569
2574
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3570
2575
|
attr_accessor :discount
|
3571
|
-
# Details to determine how long the discount should be applied for.
|
3572
|
-
attr_accessor :discount_end
|
3573
2576
|
# ID of the promotion code to create a new discount for.
|
3574
2577
|
attr_accessor :promotion_code
|
3575
2578
|
|
3576
|
-
def initialize(coupon: nil, discount: nil,
|
2579
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3577
2580
|
@coupon = coupon
|
3578
2581
|
@discount = discount
|
3579
|
-
@discount_end = discount_end
|
3580
2582
|
@promotion_code = promotion_code
|
3581
2583
|
end
|
3582
2584
|
end
|
@@ -3671,15 +2673,6 @@ module Stripe
|
|
3671
2673
|
@tax_rates = tax_rates
|
3672
2674
|
end
|
3673
2675
|
end
|
3674
|
-
|
3675
|
-
class Prebilling < Stripe::RequestParams
|
3676
|
-
# This is used to determine the number of billing cycles to prebill.
|
3677
|
-
attr_accessor :iterations
|
3678
|
-
|
3679
|
-
def initialize(iterations: nil)
|
3680
|
-
@iterations = iterations
|
3681
|
-
end
|
3682
|
-
end
|
3683
2676
|
# For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
3684
2677
|
attr_accessor :billing_cycle_anchor
|
3685
2678
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
@@ -3694,8 +2687,6 @@ module Stripe
|
|
3694
2687
|
attr_accessor :default_tax_rates
|
3695
2688
|
# A list of up to 20 subscription items, each with an attached price.
|
3696
2689
|
attr_accessor :items
|
3697
|
-
# The pre-billing to apply to the subscription as a preview.
|
3698
|
-
attr_accessor :prebilling
|
3699
2690
|
# Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
3700
2691
|
attr_accessor :proration_behavior
|
3701
2692
|
# If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
|
@@ -3715,7 +2706,6 @@ module Stripe
|
|
3715
2706
|
cancel_now: nil,
|
3716
2707
|
default_tax_rates: nil,
|
3717
2708
|
items: nil,
|
3718
|
-
prebilling: nil,
|
3719
2709
|
proration_behavior: nil,
|
3720
2710
|
proration_date: nil,
|
3721
2711
|
resume_at: nil,
|
@@ -3729,7 +2719,6 @@ module Stripe
|
|
3729
2719
|
@cancel_now = cancel_now
|
3730
2720
|
@default_tax_rates = default_tax_rates
|
3731
2721
|
@items = items
|
3732
|
-
@prebilling = prebilling
|
3733
2722
|
@proration_behavior = proration_behavior
|
3734
2723
|
@proration_date = proration_date
|
3735
2724
|
@resume_at = resume_at
|
@@ -3743,8 +2732,6 @@ module Stripe
|
|
3743
2732
|
attr_accessor :currency
|
3744
2733
|
# The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
3745
2734
|
attr_accessor :customer
|
3746
|
-
# The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
|
3747
|
-
attr_accessor :customer_account
|
3748
2735
|
# Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
3749
2736
|
attr_accessor :customer_details
|
3750
2737
|
# The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
|
@@ -3772,7 +2759,6 @@ module Stripe
|
|
3772
2759
|
automatic_tax: nil,
|
3773
2760
|
currency: nil,
|
3774
2761
|
customer: nil,
|
3775
|
-
customer_account: nil,
|
3776
2762
|
customer_details: nil,
|
3777
2763
|
discounts: nil,
|
3778
2764
|
expand: nil,
|
@@ -3788,7 +2774,6 @@ module Stripe
|
|
3788
2774
|
@automatic_tax = automatic_tax
|
3789
2775
|
@currency = currency
|
3790
2776
|
@customer = customer
|
3791
|
-
@customer_account = customer_account
|
3792
2777
|
@customer_details = customer_details
|
3793
2778
|
@discounts = discounts
|
3794
2779
|
@expand = expand
|