stripe 15.1.0.pre.beta.1 → 15.1.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/CHANGELOG.md +697 -1533
- data/Gemfile +1 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +6 -0
- data/VERSION +1 -1
- data/lib/stripe/api_operations/nested_resource.rb +35 -35
- data/lib/stripe/api_requestor.rb +1 -29
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/connection_manager.rb +1 -3
- data/lib/stripe/errors.rb +0 -54
- data/lib/stripe/event_types.rb +1 -75
- data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +1 -1
- data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +1 -1
- data/lib/stripe/events/{v2_core_account_including_identity_updated_event.rb → v2_core_event_destination_ping_event.rb} +3 -3
- data/lib/stripe/oauth.rb +1 -1
- data/lib/stripe/object_types.rb +0 -51
- data/lib/stripe/resources/account.rb +54 -657
- data/lib/stripe/resources/account_session.rb +1 -299
- 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_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 +2 -1454
- data/lib/stripe/resources/checkout/session.rb +5 -258
- data/lib/stripe/resources/confirmation_token.rb +9 -178
- data/lib/stripe/resources/credit_note.rb +0 -10
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +2 -4
- 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/event.rb +0 -31
- data/lib/stripe/resources/financial_connections/account.rb +1 -20
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/funding_instructions.rb +1 -1
- data/lib/stripe/resources/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +17 -1175
- 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/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 +333 -5071
- data/lib/stripe/resources/payment_method.rb +11 -198
- data/lib/stripe/resources/payment_method_configuration.rb +13 -249
- data/lib/stripe/resources/payout.rb +0 -6
- data/lib/stripe/resources/person.rb +25 -1
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/product.rb +0 -59
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +6 -2040
- data/lib/stripe/resources/refund.rb +2 -9
- data/lib/stripe/resources/setup_attempt.rb +0 -21
- data/lib/stripe/resources/setup_intent.rb +21 -599
- data/lib/stripe/resources/source.rb +1 -30
- data/lib/stripe/resources/subscription.rb +11 -294
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +10 -1007
- data/lib/stripe/resources/tax/calculation.rb +2 -2
- data/lib/stripe/resources/tax/registration.rb +220 -0
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/tax_id.rb +4 -14
- data/lib/stripe/resources/terminal/reader.rb +0 -406
- data/lib/stripe/resources/token.rb +61 -0
- 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/v2/billing/meter_event.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
- data/lib/stripe/resources/v2/event.rb +2 -2
- data/lib/stripe/resources/v2/event_destination.rb +2 -2
- data/lib/stripe/resources.rb +1 -88
- data/lib/stripe/services/account_external_account_service.rb +1 -1
- data/lib/stripe/services/account_person_service.rb +84 -0
- data/lib/stripe/services/account_service.rb +42 -565
- data/lib/stripe/services/account_session_service.rb +1 -269
- data/lib/stripe/services/application_fee_service.rb +1 -1
- data/lib/stripe/services/apps_service.rb +1 -1
- 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/session_service.rb +0 -4
- data/lib/stripe/services/billing_portal_service.rb +1 -1
- data/lib/stripe/services/billing_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +0 -1334
- data/lib/stripe/services/checkout/session_service.rb +5 -175
- data/lib/stripe/services/checkout_service.rb +1 -1
- data/lib/stripe/services/climate_service.rb +1 -1
- data/lib/stripe/services/credit_note_service.rb +1 -5
- data/lib/stripe/services/customer_payment_method_service.rb +1 -1
- data/lib/stripe/services/customer_service.rb +2 -2
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/customer_tax_id_service.rb +1 -1
- data/lib/stripe/services/entitlements_service.rb +1 -1
- data/lib/stripe/services/financial_connections/account_service.rb +3 -8
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +2 -3
- data/lib/stripe/services/forwarding_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/identity_service.rb +1 -1
- 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 +33 -5
- data/lib/stripe/services/invoice_service.rb +18 -1089
- 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 +2 -6
- data/lib/stripe/services/payment_intent_service.rb +290 -4603
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_method_configuration_service.rb +10 -178
- data/lib/stripe/services/payment_method_service.rb +9 -128
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/product_service.rb +1 -39
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +8 -1727
- data/lib/stripe/services/radar_service.rb +1 -1
- data/lib/stripe/services/reporting_service.rb +1 -1
- data/lib/stripe/services/setup_intent_service.rb +21 -559
- data/lib/stripe/services/sigma_service.rb +1 -1
- data/lib/stripe/services/source_service.rb +1 -1
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +10 -911
- data/lib/stripe/services/subscription_service.rb +10 -254
- data/lib/stripe/services/tax/calculation_service.rb +2 -2
- data/lib/stripe/services/tax/registration_service.rb +143 -0
- data/lib/stripe/services/tax/transaction_service.rb +1 -1
- data/lib/stripe/services/tax_id_service.rb +3 -9
- data/lib/stripe/services/tax_service.rb +2 -4
- data/lib/stripe/services/terminal/reader_service.rb +0 -180
- data/lib/stripe/services/terminal_service.rb +2 -3
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +7 -107
- data/lib/stripe/services/test_helpers/issuing_service.rb +1 -1
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- data/lib/stripe/services/test_helpers/terminal_service.rb +1 -1
- 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/test_helpers/treasury_service.rb +1 -1
- data/lib/stripe/services/test_helpers_service.rb +1 -1
- data/lib/stripe/services/token_service.rb +61 -0
- data/lib/stripe/services/transfer_service.rb +1 -1
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +3 -17
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/treasury_service.rb +1 -1
- data/lib/stripe/services/v1_services.rb +3 -12
- data/lib/stripe/services/v2/billing_service.rb +1 -1
- data/lib/stripe/services/v2/core_service.rb +2 -5
- data/lib/stripe/services/v2_services.rb +3 -5
- data/lib/stripe/services.rb +0 -52
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -55
- data/rbi/stripe/resources/account.rbi +4903 -0
- data/rbi/stripe/resources/account_link.rbi +74 -0
- data/rbi/stripe/resources/account_session.rbi +894 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +90 -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 +180 -0
- data/rbi/stripe/resources/balance_transaction.rbi +144 -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 +645 -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 +2057 -0
- data/rbi/stripe/resources/checkout/session.rbi +3988 -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 +1873 -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 +252 -0
- data/rbi/stripe/resources/credit_note.rbi +747 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1009 -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 +149 -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 +351 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +517 -0
- data/rbi/stripe/resources/invoice.rbi +3736 -0
- data/rbi/stripe/resources/invoice_item.rbi +475 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +114 -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 +741 -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 +187 -0
- data/rbi/stripe/resources/payment_intent.rbi +9795 -0
- data/rbi/stripe/resources/payment_link.rbi +1801 -0
- data/rbi/stripe/resources/payment_method.rbi +1831 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3220 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +401 -0
- data/rbi/stripe/resources/plan.rbi +373 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +557 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +261 -0
- data/rbi/stripe/resources/quote.rbi +1126 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +170 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +131 -0
- data/rbi/stripe/resources/refund.rbi +519 -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 +3869 -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 +1964 -0
- data/rbi/stripe/resources/subscription_item.rbi +370 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1495 -0
- data/rbi/stripe/resources/tax/calculation.rbi +474 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
- data/rbi/stripe/resources/tax/registration.rbi +2713 -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 +167 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1388 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +224 -0
- data/rbi/stripe/resources/terminal/reader.rbi +587 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +134 -0
- data/rbi/stripe/resources/token.rbi +1283 -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 +865 -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 +170 -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} +124 -136
- data/rbi/stripe/services/account_link_service.rbi +58 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +1013 -0
- data/rbi/stripe/services/account_service.rbi +4189 -0
- data/rbi/stripe/services/account_session_service.rbi +572 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -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 +511 -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 +2607 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +142 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/climate/product_service.rbi} +25 -36
- 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 +196 -0
- data/{lib/stripe/services/quote_preview_subscription_schedule_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 +416 -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 +651 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +72 -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 +323 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +368 -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 +2920 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +495 -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 +7819 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1352 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2255 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +846 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +284 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +69 -0
- data/rbi/stripe/services/product_service.rbi +479 -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 +686 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +111 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +143 -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 +3605 -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_preview_invoice_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +324 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1192 -0
- data/rbi/stripe/services/subscription_service.rbi +1596 -0
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
- data/rbi/stripe/services/tax/calculation_service.rbi +230 -0
- data/rbi/stripe/services/tax/registration_service.rbi +1845 -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 +112 -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 +1120 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +184 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +344 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +805 -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 +62 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +92 -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 +1257 -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 +562 -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 +20 -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 +200 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +38 -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 +131 -0
- data/stripe.gemspec +1 -4
- metadata +325 -146
- 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_requirements_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_link_completed_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_money_management_financial_account_created_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_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_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/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -101
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- 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 -90
- data/lib/stripe/resources/gift_cards/card.rb +0 -208
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
- 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 -2859
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1078
- data/lib/stripe/resources/payment_record.rb +0 -1607
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -251
- data/lib/stripe/resources/privacy/redaction_job_root_objects.rb +0 -35
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -54
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -337
- data/lib/stripe/resources/tax/association.rb +0 -89
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1715
- data/lib/stripe/resources/v2/core/account_link.rb +0 -54
- data/lib/stripe/resources/v2/core/person.rb +0 -272
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -72
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -37
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -18
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -20
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -49
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -56
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -66
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -92
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -127
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -74
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -43
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -115
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -73
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -47
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -134
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -106
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -76
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -66
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/balance_settings_service.rb +0 -96
- 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/gift_cards/card_service.rb +0 -170
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
- data/lib/stripe/services/gift_cards_service.rb +0 -14
- 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 -2268
- 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 -231
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
- data/lib/stripe/services/v2/core/account_service.rb +0 -4130
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1040
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -135
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -109
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -75
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -44
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -126
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -80
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -202
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -237
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -174
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -95
- 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 -71
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -44
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -74
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -50
- data/rbi/stripe.rbi +0 -190156
@@ -48,26 +48,6 @@ module Stripe
|
|
48
48
|
end
|
49
49
|
|
50
50
|
nested_resource_class_methods :line, operations: %i[list]
|
51
|
-
nested_resource_class_methods :payment, operations: %i[retrieve list]
|
52
|
-
|
53
|
-
class AmountsDue < Stripe::StripeObject
|
54
|
-
# Incremental amount due for this payment in cents (or local equivalent).
|
55
|
-
attr_reader :amount
|
56
|
-
# The amount in cents (or local equivalent) that was paid for this payment.
|
57
|
-
attr_reader :amount_paid
|
58
|
-
# The difference between the payment’s amount and amount_paid, in cents (or local equivalent).
|
59
|
-
attr_reader :amount_remaining
|
60
|
-
# Number of days from when invoice is finalized until the payment is due.
|
61
|
-
attr_reader :days_until_due
|
62
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
63
|
-
attr_reader :description
|
64
|
-
# Date on which a payment plan’s payment is due.
|
65
|
-
attr_reader :due_date
|
66
|
-
# Timestamp when the payment was paid.
|
67
|
-
attr_reader :paid_at
|
68
|
-
# The status of the payment, one of `open`, `paid`, or `past_due`
|
69
|
-
attr_reader :status
|
70
|
-
end
|
71
51
|
|
72
52
|
class AutomaticTax < Stripe::StripeObject
|
73
53
|
class Liability < Stripe::StripeObject
|
@@ -145,7 +125,7 @@ module Stripe
|
|
145
125
|
end
|
146
126
|
|
147
127
|
class CustomerTaxId < Stripe::StripeObject
|
148
|
-
# The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
|
128
|
+
# The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
|
149
129
|
attr_reader :type
|
150
130
|
# The value of the tax ID.
|
151
131
|
attr_reader :value
|
@@ -241,17 +221,9 @@ module Stripe
|
|
241
221
|
end
|
242
222
|
|
243
223
|
class SubscriptionDetails < Stripe::StripeObject
|
244
|
-
class PauseCollection < Stripe::StripeObject
|
245
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
246
|
-
attr_reader :behavior
|
247
|
-
# The time after which the subscription will resume collecting payments.
|
248
|
-
attr_reader :resumes_at
|
249
|
-
end
|
250
224
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
|
251
225
|
# *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
252
226
|
attr_reader :metadata
|
253
|
-
# 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).
|
254
|
-
attr_reader :pause_collection
|
255
227
|
# The subscription that generated this invoice
|
256
228
|
attr_reader :subscription
|
257
229
|
# Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
@@ -311,7 +283,6 @@ module Stripe
|
|
311
283
|
attr_reader :funding_type
|
312
284
|
end
|
313
285
|
|
314
|
-
class IdBankTransfer < Stripe::StripeObject; end
|
315
286
|
class Konbini < Stripe::StripeObject; end
|
316
287
|
class SepaDebit < Stripe::StripeObject; end
|
317
288
|
|
@@ -320,8 +291,6 @@ module Stripe
|
|
320
291
|
class Filters < Stripe::StripeObject
|
321
292
|
# The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
322
293
|
attr_reader :account_subcategories
|
323
|
-
# The institution to use to filter for possible accounts to link.
|
324
|
-
attr_reader :institution
|
325
294
|
end
|
326
295
|
# Attribute for field filters
|
327
296
|
attr_reader :filters
|
@@ -343,8 +312,6 @@ module Stripe
|
|
343
312
|
attr_reader :card
|
344
313
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
345
314
|
attr_reader :customer_balance
|
346
|
-
# 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.
|
347
|
-
attr_reader :id_bank_transfer
|
348
315
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
349
316
|
attr_reader :konbini
|
350
317
|
# 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.
|
@@ -458,13 +425,6 @@ module Stripe
|
|
458
425
|
attr_reader :discount
|
459
426
|
end
|
460
427
|
|
461
|
-
class TotalMarginAmount < Stripe::StripeObject
|
462
|
-
# The amount, in cents (or local equivalent), of the reduction in line item amount.
|
463
|
-
attr_reader :amount
|
464
|
-
# The margin that was applied to get this margin amount.
|
465
|
-
attr_reader :margin
|
466
|
-
end
|
467
|
-
|
468
428
|
class TotalPretaxCreditAmount < Stripe::StripeObject
|
469
429
|
# The amount, in cents (or local equivalent), of the pretax credit amount.
|
470
430
|
attr_reader :amount
|
@@ -472,8 +432,6 @@ module Stripe
|
|
472
432
|
attr_reader :credit_balance_transaction
|
473
433
|
# The discount that was applied to get this pretax credit amount.
|
474
434
|
attr_reader :discount
|
475
|
-
# The margin that was applied to get this pretax credit amount.
|
476
|
-
attr_reader :margin
|
477
435
|
# Type of the pretax credit amount referenced.
|
478
436
|
attr_reader :type
|
479
437
|
end
|
@@ -501,24 +459,6 @@ module Stripe
|
|
501
459
|
end
|
502
460
|
|
503
461
|
class UpdateParams < Stripe::RequestParams
|
504
|
-
class AmountsDue < Stripe::RequestParams
|
505
|
-
# The amount in cents (or local equivalent).
|
506
|
-
attr_accessor :amount
|
507
|
-
# Number of days from when invoice is finalized until the payment is due.
|
508
|
-
attr_accessor :days_until_due
|
509
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
510
|
-
attr_accessor :description
|
511
|
-
# Date on which a payment plan’s payment is due.
|
512
|
-
attr_accessor :due_date
|
513
|
-
|
514
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
515
|
-
@amount = amount
|
516
|
-
@days_until_due = days_until_due
|
517
|
-
@description = description
|
518
|
-
@due_date = due_date
|
519
|
-
end
|
520
|
-
end
|
521
|
-
|
522
462
|
class AutomaticTax < Stripe::RequestParams
|
523
463
|
class Liability < Stripe::RequestParams
|
524
464
|
# The connected account being referenced when `type` is `account`.
|
@@ -555,44 +495,16 @@ module Stripe
|
|
555
495
|
end
|
556
496
|
|
557
497
|
class Discount < Stripe::RequestParams
|
558
|
-
class DiscountEnd < Stripe::RequestParams
|
559
|
-
class Duration < Stripe::RequestParams
|
560
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
561
|
-
attr_accessor :interval
|
562
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
563
|
-
attr_accessor :interval_count
|
564
|
-
|
565
|
-
def initialize(interval: nil, interval_count: nil)
|
566
|
-
@interval = interval
|
567
|
-
@interval_count = interval_count
|
568
|
-
end
|
569
|
-
end
|
570
|
-
# Time span for the redeemed discount.
|
571
|
-
attr_accessor :duration
|
572
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
573
|
-
attr_accessor :timestamp
|
574
|
-
# The type of calculation made to determine when the discount ends.
|
575
|
-
attr_accessor :type
|
576
|
-
|
577
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
578
|
-
@duration = duration
|
579
|
-
@timestamp = timestamp
|
580
|
-
@type = type
|
581
|
-
end
|
582
|
-
end
|
583
498
|
# ID of the coupon to create a new discount for.
|
584
499
|
attr_accessor :coupon
|
585
500
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
586
501
|
attr_accessor :discount
|
587
|
-
# Details to determine how long the discount should be applied for.
|
588
|
-
attr_accessor :discount_end
|
589
502
|
# ID of the promotion code to create a new discount for.
|
590
503
|
attr_accessor :promotion_code
|
591
504
|
|
592
|
-
def initialize(coupon: nil, discount: nil,
|
505
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
593
506
|
@coupon = coupon
|
594
507
|
@discount = discount
|
595
|
-
@discount_end = discount_end
|
596
508
|
@promotion_code = promotion_code
|
597
509
|
end
|
598
510
|
end
|
@@ -712,9 +624,6 @@ module Stripe
|
|
712
624
|
end
|
713
625
|
end
|
714
626
|
|
715
|
-
class IdBankTransfer < Stripe::RequestParams
|
716
|
-
end
|
717
|
-
|
718
627
|
class Konbini < Stripe::RequestParams
|
719
628
|
end
|
720
629
|
|
@@ -726,12 +635,9 @@ module Stripe
|
|
726
635
|
class Filters < Stripe::RequestParams
|
727
636
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
728
637
|
attr_accessor :account_subcategories
|
729
|
-
# ID of the institution to use to filter for selectable accounts.
|
730
|
-
attr_accessor :institution
|
731
638
|
|
732
|
-
def initialize(account_subcategories: nil
|
639
|
+
def initialize(account_subcategories: nil)
|
733
640
|
@account_subcategories = account_subcategories
|
734
|
-
@institution = institution
|
735
641
|
end
|
736
642
|
end
|
737
643
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -765,8 +671,6 @@ module Stripe
|
|
765
671
|
attr_accessor :card
|
766
672
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
767
673
|
attr_accessor :customer_balance
|
768
|
-
# 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.
|
769
|
-
attr_accessor :id_bank_transfer
|
770
674
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
771
675
|
attr_accessor :konbini
|
772
676
|
# 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.
|
@@ -779,7 +683,6 @@ module Stripe
|
|
779
683
|
bancontact: nil,
|
780
684
|
card: nil,
|
781
685
|
customer_balance: nil,
|
782
|
-
id_bank_transfer: nil,
|
783
686
|
konbini: nil,
|
784
687
|
sepa_debit: nil,
|
785
688
|
us_bank_account: nil
|
@@ -788,7 +691,6 @@ module Stripe
|
|
788
691
|
@bancontact = bancontact
|
789
692
|
@card = card
|
790
693
|
@customer_balance = customer_balance
|
791
|
-
@id_bank_transfer = id_bank_transfer
|
792
694
|
@konbini = konbini
|
793
695
|
@sepa_debit = sepa_debit
|
794
696
|
@us_bank_account = us_bank_account
|
@@ -1000,8 +902,6 @@ module Stripe
|
|
1000
902
|
end
|
1001
903
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1002
904
|
attr_accessor :account_tax_ids
|
1003
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1004
|
-
attr_accessor :amounts_due
|
1005
905
|
# 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).
|
1006
906
|
attr_accessor :application_fee_amount
|
1007
907
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -1016,8 +916,6 @@ module Stripe
|
|
1016
916
|
attr_accessor :custom_fields
|
1017
917
|
# 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.
|
1018
918
|
attr_accessor :days_until_due
|
1019
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1020
|
-
attr_accessor :default_margins
|
1021
919
|
# 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.
|
1022
920
|
attr_accessor :default_payment_method
|
1023
921
|
# 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.
|
@@ -1059,7 +957,6 @@ module Stripe
|
|
1059
957
|
|
1060
958
|
def initialize(
|
1061
959
|
account_tax_ids: nil,
|
1062
|
-
amounts_due: nil,
|
1063
960
|
application_fee_amount: nil,
|
1064
961
|
auto_advance: nil,
|
1065
962
|
automatic_tax: nil,
|
@@ -1067,7 +964,6 @@ module Stripe
|
|
1067
964
|
collection_method: nil,
|
1068
965
|
custom_fields: nil,
|
1069
966
|
days_until_due: nil,
|
1070
|
-
default_margins: nil,
|
1071
967
|
default_payment_method: nil,
|
1072
968
|
default_source: nil,
|
1073
969
|
default_tax_rates: nil,
|
@@ -1089,7 +985,6 @@ module Stripe
|
|
1089
985
|
transfer_data: nil
|
1090
986
|
)
|
1091
987
|
@account_tax_ids = account_tax_ids
|
1092
|
-
@amounts_due = amounts_due
|
1093
988
|
@application_fee_amount = application_fee_amount
|
1094
989
|
@auto_advance = auto_advance
|
1095
990
|
@automatic_tax = automatic_tax
|
@@ -1097,7 +992,6 @@ module Stripe
|
|
1097
992
|
@collection_method = collection_method
|
1098
993
|
@custom_fields = custom_fields
|
1099
994
|
@days_until_due = days_until_due
|
1100
|
-
@default_margins = default_margins
|
1101
995
|
@default_payment_method = default_payment_method
|
1102
996
|
@default_source = default_source
|
1103
997
|
@default_tax_rates = default_tax_rates
|
@@ -1162,8 +1056,6 @@ module Stripe
|
|
1162
1056
|
attr_accessor :created
|
1163
1057
|
# Only return invoices for the customer specified by this customer ID.
|
1164
1058
|
attr_accessor :customer
|
1165
|
-
# Only return invoices for the account specified by this account ID.
|
1166
|
-
attr_accessor :customer_account
|
1167
1059
|
# Attribute for param field due_date
|
1168
1060
|
attr_accessor :due_date
|
1169
1061
|
# 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.
|
@@ -1183,7 +1075,6 @@ module Stripe
|
|
1183
1075
|
collection_method: nil,
|
1184
1076
|
created: nil,
|
1185
1077
|
customer: nil,
|
1186
|
-
customer_account: nil,
|
1187
1078
|
due_date: nil,
|
1188
1079
|
ending_before: nil,
|
1189
1080
|
expand: nil,
|
@@ -1195,7 +1086,6 @@ module Stripe
|
|
1195
1086
|
@collection_method = collection_method
|
1196
1087
|
@created = created
|
1197
1088
|
@customer = customer
|
1198
|
-
@customer_account = customer_account
|
1199
1089
|
@due_date = due_date
|
1200
1090
|
@ending_before = ending_before
|
1201
1091
|
@expand = expand
|
@@ -1207,24 +1097,6 @@ module Stripe
|
|
1207
1097
|
end
|
1208
1098
|
|
1209
1099
|
class CreateParams < Stripe::RequestParams
|
1210
|
-
class AmountsDue < Stripe::RequestParams
|
1211
|
-
# The amount in cents (or local equivalent).
|
1212
|
-
attr_accessor :amount
|
1213
|
-
# Number of days from when invoice is finalized until the payment is due.
|
1214
|
-
attr_accessor :days_until_due
|
1215
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
1216
|
-
attr_accessor :description
|
1217
|
-
# Date on which a payment plan’s payment is due.
|
1218
|
-
attr_accessor :due_date
|
1219
|
-
|
1220
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
1221
|
-
@amount = amount
|
1222
|
-
@days_until_due = days_until_due
|
1223
|
-
@description = description
|
1224
|
-
@due_date = due_date
|
1225
|
-
end
|
1226
|
-
end
|
1227
|
-
|
1228
1100
|
class AutomaticTax < Stripe::RequestParams
|
1229
1101
|
class Liability < Stripe::RequestParams
|
1230
1102
|
# The connected account being referenced when `type` is `account`.
|
@@ -1261,44 +1133,16 @@ module Stripe
|
|
1261
1133
|
end
|
1262
1134
|
|
1263
1135
|
class Discount < Stripe::RequestParams
|
1264
|
-
class DiscountEnd < Stripe::RequestParams
|
1265
|
-
class Duration < Stripe::RequestParams
|
1266
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1267
|
-
attr_accessor :interval
|
1268
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1269
|
-
attr_accessor :interval_count
|
1270
|
-
|
1271
|
-
def initialize(interval: nil, interval_count: nil)
|
1272
|
-
@interval = interval
|
1273
|
-
@interval_count = interval_count
|
1274
|
-
end
|
1275
|
-
end
|
1276
|
-
# Time span for the redeemed discount.
|
1277
|
-
attr_accessor :duration
|
1278
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1279
|
-
attr_accessor :timestamp
|
1280
|
-
# The type of calculation made to determine when the discount ends.
|
1281
|
-
attr_accessor :type
|
1282
|
-
|
1283
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1284
|
-
@duration = duration
|
1285
|
-
@timestamp = timestamp
|
1286
|
-
@type = type
|
1287
|
-
end
|
1288
|
-
end
|
1289
1136
|
# ID of the coupon to create a new discount for.
|
1290
1137
|
attr_accessor :coupon
|
1291
1138
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1292
1139
|
attr_accessor :discount
|
1293
|
-
# Details to determine how long the discount should be applied for.
|
1294
|
-
attr_accessor :discount_end
|
1295
1140
|
# ID of the promotion code to create a new discount for.
|
1296
1141
|
attr_accessor :promotion_code
|
1297
1142
|
|
1298
|
-
def initialize(coupon: nil, discount: nil,
|
1143
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1299
1144
|
@coupon = coupon
|
1300
1145
|
@discount = discount
|
1301
|
-
@discount_end = discount_end
|
1302
1146
|
@promotion_code = promotion_code
|
1303
1147
|
end
|
1304
1148
|
end
|
@@ -1430,9 +1274,6 @@ module Stripe
|
|
1430
1274
|
end
|
1431
1275
|
end
|
1432
1276
|
|
1433
|
-
class IdBankTransfer < Stripe::RequestParams
|
1434
|
-
end
|
1435
|
-
|
1436
1277
|
class Konbini < Stripe::RequestParams
|
1437
1278
|
end
|
1438
1279
|
|
@@ -1444,12 +1285,9 @@ module Stripe
|
|
1444
1285
|
class Filters < Stripe::RequestParams
|
1445
1286
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
1446
1287
|
attr_accessor :account_subcategories
|
1447
|
-
# ID of the institution to use to filter for selectable accounts.
|
1448
|
-
attr_accessor :institution
|
1449
1288
|
|
1450
|
-
def initialize(account_subcategories: nil
|
1289
|
+
def initialize(account_subcategories: nil)
|
1451
1290
|
@account_subcategories = account_subcategories
|
1452
|
-
@institution = institution
|
1453
1291
|
end
|
1454
1292
|
end
|
1455
1293
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -1483,8 +1321,6 @@ module Stripe
|
|
1483
1321
|
attr_accessor :card
|
1484
1322
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1485
1323
|
attr_accessor :customer_balance
|
1486
|
-
# 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.
|
1487
|
-
attr_accessor :id_bank_transfer
|
1488
1324
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1489
1325
|
attr_accessor :konbini
|
1490
1326
|
# 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.
|
@@ -1497,7 +1333,6 @@ module Stripe
|
|
1497
1333
|
bancontact: nil,
|
1498
1334
|
card: nil,
|
1499
1335
|
customer_balance: nil,
|
1500
|
-
id_bank_transfer: nil,
|
1501
1336
|
konbini: nil,
|
1502
1337
|
sepa_debit: nil,
|
1503
1338
|
us_bank_account: nil
|
@@ -1506,7 +1341,6 @@ module Stripe
|
|
1506
1341
|
@bancontact = bancontact
|
1507
1342
|
@card = card
|
1508
1343
|
@customer_balance = customer_balance
|
1509
|
-
@id_bank_transfer = id_bank_transfer
|
1510
1344
|
@konbini = konbini
|
1511
1345
|
@sepa_debit = sepa_debit
|
1512
1346
|
@us_bank_account = us_bank_account
|
@@ -1718,8 +1552,6 @@ module Stripe
|
|
1718
1552
|
end
|
1719
1553
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1720
1554
|
attr_accessor :account_tax_ids
|
1721
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1722
|
-
attr_accessor :amounts_due
|
1723
1555
|
# 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).
|
1724
1556
|
attr_accessor :application_fee_amount
|
1725
1557
|
# 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.
|
@@ -1736,12 +1568,8 @@ module Stripe
|
|
1736
1568
|
attr_accessor :custom_fields
|
1737
1569
|
# The ID of the customer who will be billed.
|
1738
1570
|
attr_accessor :customer
|
1739
|
-
# The ID of the account who will be billed.
|
1740
|
-
attr_accessor :customer_account
|
1741
1571
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1742
1572
|
attr_accessor :days_until_due
|
1743
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1744
|
-
attr_accessor :default_margins
|
1745
1573
|
# 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.
|
1746
1574
|
attr_accessor :default_payment_method
|
1747
1575
|
# 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.
|
@@ -1789,7 +1617,6 @@ module Stripe
|
|
1789
1617
|
|
1790
1618
|
def initialize(
|
1791
1619
|
account_tax_ids: nil,
|
1792
|
-
amounts_due: nil,
|
1793
1620
|
application_fee_amount: nil,
|
1794
1621
|
auto_advance: nil,
|
1795
1622
|
automatic_tax: nil,
|
@@ -1798,9 +1625,7 @@ module Stripe
|
|
1798
1625
|
currency: nil,
|
1799
1626
|
custom_fields: nil,
|
1800
1627
|
customer: nil,
|
1801
|
-
customer_account: nil,
|
1802
1628
|
days_until_due: nil,
|
1803
|
-
default_margins: nil,
|
1804
1629
|
default_payment_method: nil,
|
1805
1630
|
default_source: nil,
|
1806
1631
|
default_tax_rates: nil,
|
@@ -1825,7 +1650,6 @@ module Stripe
|
|
1825
1650
|
transfer_data: nil
|
1826
1651
|
)
|
1827
1652
|
@account_tax_ids = account_tax_ids
|
1828
|
-
@amounts_due = amounts_due
|
1829
1653
|
@application_fee_amount = application_fee_amount
|
1830
1654
|
@auto_advance = auto_advance
|
1831
1655
|
@automatic_tax = automatic_tax
|
@@ -1834,9 +1658,7 @@ module Stripe
|
|
1834
1658
|
@currency = currency
|
1835
1659
|
@custom_fields = custom_fields
|
1836
1660
|
@customer = customer
|
1837
|
-
@customer_account = customer_account
|
1838
1661
|
@days_until_due = days_until_due
|
1839
|
-
@default_margins = default_margins
|
1840
1662
|
@default_payment_method = default_payment_method
|
1841
1663
|
@default_source = default_source
|
1842
1664
|
@default_tax_rates = default_tax_rates
|
@@ -1883,44 +1705,16 @@ module Stripe
|
|
1883
1705
|
class AddLinesParams < Stripe::RequestParams
|
1884
1706
|
class Line < Stripe::RequestParams
|
1885
1707
|
class Discount < Stripe::RequestParams
|
1886
|
-
class DiscountEnd < Stripe::RequestParams
|
1887
|
-
class Duration < Stripe::RequestParams
|
1888
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1889
|
-
attr_accessor :interval
|
1890
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1891
|
-
attr_accessor :interval_count
|
1892
|
-
|
1893
|
-
def initialize(interval: nil, interval_count: nil)
|
1894
|
-
@interval = interval
|
1895
|
-
@interval_count = interval_count
|
1896
|
-
end
|
1897
|
-
end
|
1898
|
-
# Time span for the redeemed discount.
|
1899
|
-
attr_accessor :duration
|
1900
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1901
|
-
attr_accessor :timestamp
|
1902
|
-
# The type of calculation made to determine when the discount ends.
|
1903
|
-
attr_accessor :type
|
1904
|
-
|
1905
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1906
|
-
@duration = duration
|
1907
|
-
@timestamp = timestamp
|
1908
|
-
@type = type
|
1909
|
-
end
|
1910
|
-
end
|
1911
1708
|
# ID of the coupon to create a new discount for.
|
1912
1709
|
attr_accessor :coupon
|
1913
1710
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1914
1711
|
attr_accessor :discount
|
1915
|
-
# Details to determine how long the discount should be applied for.
|
1916
|
-
attr_accessor :discount_end
|
1917
1712
|
# ID of the promotion code to create a new discount for.
|
1918
1713
|
attr_accessor :promotion_code
|
1919
1714
|
|
1920
|
-
def initialize(coupon: nil, discount: nil,
|
1715
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1921
1716
|
@coupon = coupon
|
1922
1717
|
@discount = discount
|
1923
|
-
@discount_end = discount_end
|
1924
1718
|
@promotion_code = promotion_code
|
1925
1719
|
end
|
1926
1720
|
end
|
@@ -2073,8 +1867,6 @@ module Stripe
|
|
2073
1867
|
attr_accessor :discounts
|
2074
1868
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
2075
1869
|
attr_accessor :invoice_item
|
2076
|
-
# 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.
|
2077
|
-
attr_accessor :margins
|
2078
1870
|
# 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`.
|
2079
1871
|
attr_accessor :metadata
|
2080
1872
|
# 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.
|
@@ -2096,7 +1888,6 @@ module Stripe
|
|
2096
1888
|
discountable: nil,
|
2097
1889
|
discounts: nil,
|
2098
1890
|
invoice_item: nil,
|
2099
|
-
margins: nil,
|
2100
1891
|
metadata: nil,
|
2101
1892
|
period: nil,
|
2102
1893
|
price_data: nil,
|
@@ -2110,7 +1901,6 @@ module Stripe
|
|
2110
1901
|
@discountable = discountable
|
2111
1902
|
@discounts = discounts
|
2112
1903
|
@invoice_item = invoice_item
|
2113
|
-
@margins = margins
|
2114
1904
|
@metadata = metadata
|
2115
1905
|
@period = period
|
2116
1906
|
@price_data = price_data
|
@@ -2134,78 +1924,6 @@ module Stripe
|
|
2134
1924
|
end
|
2135
1925
|
end
|
2136
1926
|
|
2137
|
-
class AttachPaymentParams < Stripe::RequestParams
|
2138
|
-
class PaymentRecordData < Stripe::RequestParams
|
2139
|
-
# The amount that was paid out of band.
|
2140
|
-
attr_accessor :amount
|
2141
|
-
# The currency that was paid out of band.
|
2142
|
-
attr_accessor :currency
|
2143
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2144
|
-
attr_accessor :metadata
|
2145
|
-
# The type of money movement for this out of band payment record.
|
2146
|
-
attr_accessor :money_movement_type
|
2147
|
-
# The timestamp when this out of band payment was paid.
|
2148
|
-
attr_accessor :paid_at
|
2149
|
-
# The reference for this out of band payment record.
|
2150
|
-
attr_accessor :payment_reference
|
2151
|
-
|
2152
|
-
def initialize(
|
2153
|
-
amount: nil,
|
2154
|
-
currency: nil,
|
2155
|
-
metadata: nil,
|
2156
|
-
money_movement_type: nil,
|
2157
|
-
paid_at: nil,
|
2158
|
-
payment_reference: nil
|
2159
|
-
)
|
2160
|
-
@amount = amount
|
2161
|
-
@currency = currency
|
2162
|
-
@metadata = metadata
|
2163
|
-
@money_movement_type = money_movement_type
|
2164
|
-
@paid_at = paid_at
|
2165
|
-
@payment_reference = payment_reference
|
2166
|
-
end
|
2167
|
-
end
|
2168
|
-
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
2169
|
-
attr_accessor :amount_requested
|
2170
|
-
# Specifies which fields in the response should be expanded.
|
2171
|
-
attr_accessor :expand
|
2172
|
-
# The ID of the PaymentIntent to attach to the invoice.
|
2173
|
-
attr_accessor :payment_intent
|
2174
|
-
# The ID of the PaymentRecord to attach to the invoice.
|
2175
|
-
attr_accessor :payment_record
|
2176
|
-
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
2177
|
-
attr_accessor :payment_record_data
|
2178
|
-
|
2179
|
-
def initialize(
|
2180
|
-
amount_requested: nil,
|
2181
|
-
expand: nil,
|
2182
|
-
payment_intent: nil,
|
2183
|
-
payment_record: nil,
|
2184
|
-
payment_record_data: nil
|
2185
|
-
)
|
2186
|
-
@amount_requested = amount_requested
|
2187
|
-
@expand = expand
|
2188
|
-
@payment_intent = payment_intent
|
2189
|
-
@payment_record = payment_record
|
2190
|
-
@payment_record_data = payment_record_data
|
2191
|
-
end
|
2192
|
-
end
|
2193
|
-
|
2194
|
-
class AttachPaymentIntentParams < Stripe::RequestParams
|
2195
|
-
# The portion of the PaymentIntent’s `amount` that should be applied to thisinvoice. Defaults to the entire amount.
|
2196
|
-
attr_accessor :amount_requested
|
2197
|
-
# Specifies which fields in the response should be expanded.
|
2198
|
-
attr_accessor :expand
|
2199
|
-
# The ID of the PaymentIntent to attach to the invoice.
|
2200
|
-
attr_accessor :payment_intent
|
2201
|
-
|
2202
|
-
def initialize(amount_requested: nil, expand: nil, payment_intent: nil)
|
2203
|
-
@amount_requested = amount_requested
|
2204
|
-
@expand = expand
|
2205
|
-
@payment_intent = payment_intent
|
2206
|
-
end
|
2207
|
-
end
|
2208
|
-
|
2209
1927
|
class FinalizeInvoiceParams < Stripe::RequestParams
|
2210
1928
|
# 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.
|
2211
1929
|
attr_accessor :auto_advance
|
@@ -2302,44 +2020,16 @@ module Stripe
|
|
2302
2020
|
class UpdateLinesParams < Stripe::RequestParams
|
2303
2021
|
class Line < Stripe::RequestParams
|
2304
2022
|
class Discount < Stripe::RequestParams
|
2305
|
-
class DiscountEnd < Stripe::RequestParams
|
2306
|
-
class Duration < Stripe::RequestParams
|
2307
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2308
|
-
attr_accessor :interval
|
2309
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2310
|
-
attr_accessor :interval_count
|
2311
|
-
|
2312
|
-
def initialize(interval: nil, interval_count: nil)
|
2313
|
-
@interval = interval
|
2314
|
-
@interval_count = interval_count
|
2315
|
-
end
|
2316
|
-
end
|
2317
|
-
# Time span for the redeemed discount.
|
2318
|
-
attr_accessor :duration
|
2319
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2320
|
-
attr_accessor :timestamp
|
2321
|
-
# The type of calculation made to determine when the discount ends.
|
2322
|
-
attr_accessor :type
|
2323
|
-
|
2324
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2325
|
-
@duration = duration
|
2326
|
-
@timestamp = timestamp
|
2327
|
-
@type = type
|
2328
|
-
end
|
2329
|
-
end
|
2330
2023
|
# ID of the coupon to create a new discount for.
|
2331
2024
|
attr_accessor :coupon
|
2332
2025
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2333
2026
|
attr_accessor :discount
|
2334
|
-
# Details to determine how long the discount should be applied for.
|
2335
|
-
attr_accessor :discount_end
|
2336
2027
|
# ID of the promotion code to create a new discount for.
|
2337
2028
|
attr_accessor :promotion_code
|
2338
2029
|
|
2339
|
-
def initialize(coupon: nil, discount: nil,
|
2030
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2340
2031
|
@coupon = coupon
|
2341
2032
|
@discount = discount
|
2342
|
-
@discount_end = discount_end
|
2343
2033
|
@promotion_code = promotion_code
|
2344
2034
|
end
|
2345
2035
|
end
|
@@ -2492,8 +2182,6 @@ module Stripe
|
|
2492
2182
|
attr_accessor :discounts
|
2493
2183
|
# ID of an existing line item on the invoice.
|
2494
2184
|
attr_accessor :id
|
2495
|
-
# 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.
|
2496
|
-
attr_accessor :margins
|
2497
2185
|
# 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.
|
2498
2186
|
attr_accessor :metadata
|
2499
2187
|
# 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.
|
@@ -2515,7 +2203,6 @@ module Stripe
|
|
2515
2203
|
discountable: nil,
|
2516
2204
|
discounts: nil,
|
2517
2205
|
id: nil,
|
2518
|
-
margins: nil,
|
2519
2206
|
metadata: nil,
|
2520
2207
|
period: nil,
|
2521
2208
|
price_data: nil,
|
@@ -2529,7 +2216,6 @@ module Stripe
|
|
2529
2216
|
@discountable = discountable
|
2530
2217
|
@discounts = discounts
|
2531
2218
|
@id = id
|
2532
|
-
@margins = margins
|
2533
2219
|
@metadata = metadata
|
2534
2220
|
@period = period
|
2535
2221
|
@price_data = price_data
|
@@ -2673,7 +2359,7 @@ module Stripe
|
|
2673
2359
|
end
|
2674
2360
|
|
2675
2361
|
class TaxId < Stripe::RequestParams
|
2676
|
-
# Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
2362
|
+
# Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
2677
2363
|
attr_accessor :type
|
2678
2364
|
# Value of the tax ID.
|
2679
2365
|
attr_accessor :value
|
@@ -2704,88 +2390,32 @@ module Stripe
|
|
2704
2390
|
end
|
2705
2391
|
|
2706
2392
|
class Discount < Stripe::RequestParams
|
2707
|
-
class DiscountEnd < Stripe::RequestParams
|
2708
|
-
class Duration < Stripe::RequestParams
|
2709
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2710
|
-
attr_accessor :interval
|
2711
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2712
|
-
attr_accessor :interval_count
|
2713
|
-
|
2714
|
-
def initialize(interval: nil, interval_count: nil)
|
2715
|
-
@interval = interval
|
2716
|
-
@interval_count = interval_count
|
2717
|
-
end
|
2718
|
-
end
|
2719
|
-
# Time span for the redeemed discount.
|
2720
|
-
attr_accessor :duration
|
2721
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2722
|
-
attr_accessor :timestamp
|
2723
|
-
# The type of calculation made to determine when the discount ends.
|
2724
|
-
attr_accessor :type
|
2725
|
-
|
2726
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2727
|
-
@duration = duration
|
2728
|
-
@timestamp = timestamp
|
2729
|
-
@type = type
|
2730
|
-
end
|
2731
|
-
end
|
2732
2393
|
# ID of the coupon to create a new discount for.
|
2733
2394
|
attr_accessor :coupon
|
2734
2395
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2735
2396
|
attr_accessor :discount
|
2736
|
-
# Details to determine how long the discount should be applied for.
|
2737
|
-
attr_accessor :discount_end
|
2738
2397
|
# ID of the promotion code to create a new discount for.
|
2739
2398
|
attr_accessor :promotion_code
|
2740
2399
|
|
2741
|
-
def initialize(coupon: nil, discount: nil,
|
2400
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2742
2401
|
@coupon = coupon
|
2743
2402
|
@discount = discount
|
2744
|
-
@discount_end = discount_end
|
2745
2403
|
@promotion_code = promotion_code
|
2746
2404
|
end
|
2747
2405
|
end
|
2748
2406
|
|
2749
2407
|
class InvoiceItem < Stripe::RequestParams
|
2750
2408
|
class Discount < Stripe::RequestParams
|
2751
|
-
class DiscountEnd < Stripe::RequestParams
|
2752
|
-
class Duration < Stripe::RequestParams
|
2753
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2754
|
-
attr_accessor :interval
|
2755
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2756
|
-
attr_accessor :interval_count
|
2757
|
-
|
2758
|
-
def initialize(interval: nil, interval_count: nil)
|
2759
|
-
@interval = interval
|
2760
|
-
@interval_count = interval_count
|
2761
|
-
end
|
2762
|
-
end
|
2763
|
-
# Time span for the redeemed discount.
|
2764
|
-
attr_accessor :duration
|
2765
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2766
|
-
attr_accessor :timestamp
|
2767
|
-
# The type of calculation made to determine when the discount ends.
|
2768
|
-
attr_accessor :type
|
2769
|
-
|
2770
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2771
|
-
@duration = duration
|
2772
|
-
@timestamp = timestamp
|
2773
|
-
@type = type
|
2774
|
-
end
|
2775
|
-
end
|
2776
2409
|
# ID of the coupon to create a new discount for.
|
2777
2410
|
attr_accessor :coupon
|
2778
2411
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2779
2412
|
attr_accessor :discount
|
2780
|
-
# Details to determine how long the discount should be applied for.
|
2781
|
-
attr_accessor :discount_end
|
2782
2413
|
# ID of the promotion code to create a new discount for.
|
2783
2414
|
attr_accessor :promotion_code
|
2784
2415
|
|
2785
|
-
def initialize(coupon: nil, discount: nil,
|
2416
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2786
2417
|
@coupon = coupon
|
2787
2418
|
@discount = discount
|
2788
|
-
@discount_end = discount_end
|
2789
2419
|
@promotion_code = promotion_code
|
2790
2420
|
end
|
2791
2421
|
end
|
@@ -2911,499 +2541,19 @@ module Stripe
|
|
2911
2541
|
end
|
2912
2542
|
|
2913
2543
|
class ScheduleDetails < Stripe::RequestParams
|
2914
|
-
class Amendment < Stripe::RequestParams
|
2915
|
-
class AmendmentEnd < Stripe::RequestParams
|
2916
|
-
class DiscountEnd < Stripe::RequestParams
|
2917
|
-
# The ID of a specific discount.
|
2918
|
-
attr_accessor :discount
|
2919
|
-
|
2920
|
-
def initialize(discount: nil)
|
2921
|
-
@discount = discount
|
2922
|
-
end
|
2923
|
-
end
|
2924
|
-
|
2925
|
-
class Duration < Stripe::RequestParams
|
2926
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2927
|
-
attr_accessor :interval
|
2928
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2929
|
-
attr_accessor :interval_count
|
2930
|
-
|
2931
|
-
def initialize(interval: nil, interval_count: nil)
|
2932
|
-
@interval = interval
|
2933
|
-
@interval_count = interval_count
|
2934
|
-
end
|
2935
|
-
end
|
2936
|
-
# Use the `end` time of a given discount.
|
2937
|
-
attr_accessor :discount_end
|
2938
|
-
# Time span for the amendment starting from the `amendment_start`.
|
2939
|
-
attr_accessor :duration
|
2940
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2941
|
-
attr_accessor :timestamp
|
2942
|
-
# Select one of three ways to pass the `amendment_end`.
|
2943
|
-
attr_accessor :type
|
2944
|
-
|
2945
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2946
|
-
@discount_end = discount_end
|
2947
|
-
@duration = duration
|
2948
|
-
@timestamp = timestamp
|
2949
|
-
@type = type
|
2950
|
-
end
|
2951
|
-
end
|
2952
|
-
|
2953
|
-
class AmendmentStart < Stripe::RequestParams
|
2954
|
-
class AmendmentEnd < Stripe::RequestParams
|
2955
|
-
# 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.
|
2956
|
-
attr_accessor :index
|
2957
|
-
|
2958
|
-
def initialize(index: nil)
|
2959
|
-
@index = index
|
2960
|
-
end
|
2961
|
-
end
|
2962
|
-
|
2963
|
-
class DiscountEnd < Stripe::RequestParams
|
2964
|
-
# The ID of a specific discount.
|
2965
|
-
attr_accessor :discount
|
2966
|
-
|
2967
|
-
def initialize(discount: nil)
|
2968
|
-
@discount = discount
|
2969
|
-
end
|
2970
|
-
end
|
2971
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2972
|
-
attr_accessor :amendment_end
|
2973
|
-
# Use the `end` time of a given discount.
|
2974
|
-
attr_accessor :discount_end
|
2975
|
-
# A precise Unix timestamp for the amendment to start.
|
2976
|
-
attr_accessor :timestamp
|
2977
|
-
# Select one of three ways to pass the `amendment_start`.
|
2978
|
-
attr_accessor :type
|
2979
|
-
|
2980
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2981
|
-
@amendment_end = amendment_end
|
2982
|
-
@discount_end = discount_end
|
2983
|
-
@timestamp = timestamp
|
2984
|
-
@type = type
|
2985
|
-
end
|
2986
|
-
end
|
2987
|
-
|
2988
|
-
class DiscountAction < Stripe::RequestParams
|
2989
|
-
class Add < Stripe::RequestParams
|
2990
|
-
class DiscountEnd < Stripe::RequestParams
|
2991
|
-
# The type of calculation made to determine when the discount ends.
|
2992
|
-
attr_accessor :type
|
2993
|
-
|
2994
|
-
def initialize(type: nil)
|
2995
|
-
@type = type
|
2996
|
-
end
|
2997
|
-
end
|
2998
|
-
# The coupon code to redeem.
|
2999
|
-
attr_accessor :coupon
|
3000
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
3001
|
-
attr_accessor :discount
|
3002
|
-
# Details to determine how long the discount should be applied for.
|
3003
|
-
attr_accessor :discount_end
|
3004
|
-
# 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.
|
3005
|
-
attr_accessor :index
|
3006
|
-
# The promotion code to redeem.
|
3007
|
-
attr_accessor :promotion_code
|
3008
|
-
|
3009
|
-
def initialize(
|
3010
|
-
coupon: nil,
|
3011
|
-
discount: nil,
|
3012
|
-
discount_end: nil,
|
3013
|
-
index: nil,
|
3014
|
-
promotion_code: nil
|
3015
|
-
)
|
3016
|
-
@coupon = coupon
|
3017
|
-
@discount = discount
|
3018
|
-
@discount_end = discount_end
|
3019
|
-
@index = index
|
3020
|
-
@promotion_code = promotion_code
|
3021
|
-
end
|
3022
|
-
end
|
3023
|
-
|
3024
|
-
class Remove < Stripe::RequestParams
|
3025
|
-
# The coupon code to remove from the `discounts` array.
|
3026
|
-
attr_accessor :coupon
|
3027
|
-
# The ID of a discount to remove from the `discounts` array.
|
3028
|
-
attr_accessor :discount
|
3029
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
3030
|
-
attr_accessor :promotion_code
|
3031
|
-
|
3032
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3033
|
-
@coupon = coupon
|
3034
|
-
@discount = discount
|
3035
|
-
@promotion_code = promotion_code
|
3036
|
-
end
|
3037
|
-
end
|
3038
|
-
|
3039
|
-
class Set < Stripe::RequestParams
|
3040
|
-
# The coupon code to replace the `discounts` array with.
|
3041
|
-
attr_accessor :coupon
|
3042
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
3043
|
-
attr_accessor :discount
|
3044
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
3045
|
-
attr_accessor :promotion_code
|
3046
|
-
|
3047
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3048
|
-
@coupon = coupon
|
3049
|
-
@discount = discount
|
3050
|
-
@promotion_code = promotion_code
|
3051
|
-
end
|
3052
|
-
end
|
3053
|
-
# Details of the discount to add.
|
3054
|
-
attr_accessor :add
|
3055
|
-
# Details of the discount to remove.
|
3056
|
-
attr_accessor :remove
|
3057
|
-
# Details of the discount to replace the existing discounts with.
|
3058
|
-
attr_accessor :set
|
3059
|
-
# Determines the type of discount action.
|
3060
|
-
attr_accessor :type
|
3061
|
-
|
3062
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3063
|
-
@add = add
|
3064
|
-
@remove = remove
|
3065
|
-
@set = set
|
3066
|
-
@type = type
|
3067
|
-
end
|
3068
|
-
end
|
3069
|
-
|
3070
|
-
class ItemAction < Stripe::RequestParams
|
3071
|
-
class Add < Stripe::RequestParams
|
3072
|
-
class Discount < Stripe::RequestParams
|
3073
|
-
class DiscountEnd < Stripe::RequestParams
|
3074
|
-
class Duration < Stripe::RequestParams
|
3075
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3076
|
-
attr_accessor :interval
|
3077
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3078
|
-
attr_accessor :interval_count
|
3079
|
-
|
3080
|
-
def initialize(interval: nil, interval_count: nil)
|
3081
|
-
@interval = interval
|
3082
|
-
@interval_count = interval_count
|
3083
|
-
end
|
3084
|
-
end
|
3085
|
-
# Time span for the redeemed discount.
|
3086
|
-
attr_accessor :duration
|
3087
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3088
|
-
attr_accessor :timestamp
|
3089
|
-
# The type of calculation made to determine when the discount ends.
|
3090
|
-
attr_accessor :type
|
3091
|
-
|
3092
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3093
|
-
@duration = duration
|
3094
|
-
@timestamp = timestamp
|
3095
|
-
@type = type
|
3096
|
-
end
|
3097
|
-
end
|
3098
|
-
# ID of the coupon to create a new discount for.
|
3099
|
-
attr_accessor :coupon
|
3100
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3101
|
-
attr_accessor :discount
|
3102
|
-
# Details to determine how long the discount should be applied for.
|
3103
|
-
attr_accessor :discount_end
|
3104
|
-
# ID of the promotion code to create a new discount for.
|
3105
|
-
attr_accessor :promotion_code
|
3106
|
-
|
3107
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3108
|
-
@coupon = coupon
|
3109
|
-
@discount = discount
|
3110
|
-
@discount_end = discount_end
|
3111
|
-
@promotion_code = promotion_code
|
3112
|
-
end
|
3113
|
-
end
|
3114
|
-
|
3115
|
-
class Trial < Stripe::RequestParams
|
3116
|
-
# 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.
|
3117
|
-
attr_accessor :converts_to
|
3118
|
-
# Determines the type of trial for this item.
|
3119
|
-
attr_accessor :type
|
3120
|
-
|
3121
|
-
def initialize(converts_to: nil, type: nil)
|
3122
|
-
@converts_to = converts_to
|
3123
|
-
@type = type
|
3124
|
-
end
|
3125
|
-
end
|
3126
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
3127
|
-
attr_accessor :discounts
|
3128
|
-
# 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`.
|
3129
|
-
attr_accessor :metadata
|
3130
|
-
# The ID of the price object.
|
3131
|
-
attr_accessor :price
|
3132
|
-
# Quantity for this item.
|
3133
|
-
attr_accessor :quantity
|
3134
|
-
# 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`.
|
3135
|
-
attr_accessor :tax_rates
|
3136
|
-
# Options that configure the trial on the subscription item.
|
3137
|
-
attr_accessor :trial
|
3138
|
-
|
3139
|
-
def initialize(
|
3140
|
-
discounts: nil,
|
3141
|
-
metadata: nil,
|
3142
|
-
price: nil,
|
3143
|
-
quantity: nil,
|
3144
|
-
tax_rates: nil,
|
3145
|
-
trial: nil
|
3146
|
-
)
|
3147
|
-
@discounts = discounts
|
3148
|
-
@metadata = metadata
|
3149
|
-
@price = price
|
3150
|
-
@quantity = quantity
|
3151
|
-
@tax_rates = tax_rates
|
3152
|
-
@trial = trial
|
3153
|
-
end
|
3154
|
-
end
|
3155
|
-
|
3156
|
-
class Remove < Stripe::RequestParams
|
3157
|
-
# ID of a price to remove.
|
3158
|
-
attr_accessor :price
|
3159
|
-
|
3160
|
-
def initialize(price: nil)
|
3161
|
-
@price = price
|
3162
|
-
end
|
3163
|
-
end
|
3164
|
-
|
3165
|
-
class Set < Stripe::RequestParams
|
3166
|
-
class Discount < Stripe::RequestParams
|
3167
|
-
class DiscountEnd < Stripe::RequestParams
|
3168
|
-
class Duration < Stripe::RequestParams
|
3169
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3170
|
-
attr_accessor :interval
|
3171
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3172
|
-
attr_accessor :interval_count
|
3173
|
-
|
3174
|
-
def initialize(interval: nil, interval_count: nil)
|
3175
|
-
@interval = interval
|
3176
|
-
@interval_count = interval_count
|
3177
|
-
end
|
3178
|
-
end
|
3179
|
-
# Time span for the redeemed discount.
|
3180
|
-
attr_accessor :duration
|
3181
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3182
|
-
attr_accessor :timestamp
|
3183
|
-
# The type of calculation made to determine when the discount ends.
|
3184
|
-
attr_accessor :type
|
3185
|
-
|
3186
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3187
|
-
@duration = duration
|
3188
|
-
@timestamp = timestamp
|
3189
|
-
@type = type
|
3190
|
-
end
|
3191
|
-
end
|
3192
|
-
# ID of the coupon to create a new discount for.
|
3193
|
-
attr_accessor :coupon
|
3194
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3195
|
-
attr_accessor :discount
|
3196
|
-
# Details to determine how long the discount should be applied for.
|
3197
|
-
attr_accessor :discount_end
|
3198
|
-
# ID of the promotion code to create a new discount for.
|
3199
|
-
attr_accessor :promotion_code
|
3200
|
-
|
3201
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3202
|
-
@coupon = coupon
|
3203
|
-
@discount = discount
|
3204
|
-
@discount_end = discount_end
|
3205
|
-
@promotion_code = promotion_code
|
3206
|
-
end
|
3207
|
-
end
|
3208
|
-
|
3209
|
-
class Trial < Stripe::RequestParams
|
3210
|
-
# 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.
|
3211
|
-
attr_accessor :converts_to
|
3212
|
-
# Determines the type of trial for this item.
|
3213
|
-
attr_accessor :type
|
3214
|
-
|
3215
|
-
def initialize(converts_to: nil, type: nil)
|
3216
|
-
@converts_to = converts_to
|
3217
|
-
@type = type
|
3218
|
-
end
|
3219
|
-
end
|
3220
|
-
# 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`.
|
3221
|
-
attr_accessor :discounts
|
3222
|
-
# 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`.
|
3223
|
-
attr_accessor :metadata
|
3224
|
-
# The ID of the price object.
|
3225
|
-
attr_accessor :price
|
3226
|
-
# 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`.
|
3227
|
-
attr_accessor :quantity
|
3228
|
-
# 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`.
|
3229
|
-
attr_accessor :tax_rates
|
3230
|
-
# 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`.
|
3231
|
-
attr_accessor :trial
|
3232
|
-
|
3233
|
-
def initialize(
|
3234
|
-
discounts: nil,
|
3235
|
-
metadata: nil,
|
3236
|
-
price: nil,
|
3237
|
-
quantity: nil,
|
3238
|
-
tax_rates: nil,
|
3239
|
-
trial: nil
|
3240
|
-
)
|
3241
|
-
@discounts = discounts
|
3242
|
-
@metadata = metadata
|
3243
|
-
@price = price
|
3244
|
-
@quantity = quantity
|
3245
|
-
@tax_rates = tax_rates
|
3246
|
-
@trial = trial
|
3247
|
-
end
|
3248
|
-
end
|
3249
|
-
# 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.
|
3250
|
-
attr_accessor :add
|
3251
|
-
# Details of the subscription item to remove.
|
3252
|
-
attr_accessor :remove
|
3253
|
-
# 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.
|
3254
|
-
attr_accessor :set
|
3255
|
-
# Determines the type of item action.
|
3256
|
-
attr_accessor :type
|
3257
|
-
|
3258
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3259
|
-
@add = add
|
3260
|
-
@remove = remove
|
3261
|
-
@set = set
|
3262
|
-
@type = type
|
3263
|
-
end
|
3264
|
-
end
|
3265
|
-
|
3266
|
-
class MetadataAction < Stripe::RequestParams
|
3267
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
3268
|
-
attr_accessor :add
|
3269
|
-
# Keys to remove from schedule phase metadata.
|
3270
|
-
attr_accessor :remove
|
3271
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
3272
|
-
attr_accessor :set
|
3273
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
3274
|
-
attr_accessor :type
|
3275
|
-
|
3276
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3277
|
-
@add = add
|
3278
|
-
@remove = remove
|
3279
|
-
@set = set
|
3280
|
-
@type = type
|
3281
|
-
end
|
3282
|
-
end
|
3283
|
-
|
3284
|
-
class SetPauseCollection < Stripe::RequestParams
|
3285
|
-
class Set < Stripe::RequestParams
|
3286
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3287
|
-
attr_accessor :behavior
|
3288
|
-
|
3289
|
-
def initialize(behavior: nil)
|
3290
|
-
@behavior = behavior
|
3291
|
-
end
|
3292
|
-
end
|
3293
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
3294
|
-
attr_accessor :set
|
3295
|
-
# Determines the type of the pause_collection amendment.
|
3296
|
-
attr_accessor :type
|
3297
|
-
|
3298
|
-
def initialize(set: nil, type: nil)
|
3299
|
-
@set = set
|
3300
|
-
@type = type
|
3301
|
-
end
|
3302
|
-
end
|
3303
|
-
|
3304
|
-
class TrialSettings < Stripe::RequestParams
|
3305
|
-
class EndBehavior < Stripe::RequestParams
|
3306
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3307
|
-
attr_accessor :prorate_up_front
|
3308
|
-
|
3309
|
-
def initialize(prorate_up_front: nil)
|
3310
|
-
@prorate_up_front = prorate_up_front
|
3311
|
-
end
|
3312
|
-
end
|
3313
|
-
# Defines how the subscription should behave when a trial ends.
|
3314
|
-
attr_accessor :end_behavior
|
3315
|
-
|
3316
|
-
def initialize(end_behavior: nil)
|
3317
|
-
@end_behavior = end_behavior
|
3318
|
-
end
|
3319
|
-
end
|
3320
|
-
# 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.
|
3321
|
-
attr_accessor :amendment_end
|
3322
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
3323
|
-
attr_accessor :amendment_start
|
3324
|
-
# 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.
|
3325
|
-
attr_accessor :billing_cycle_anchor
|
3326
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
3327
|
-
attr_accessor :discount_actions
|
3328
|
-
# Changes to the subscription items during the amendment time span.
|
3329
|
-
attr_accessor :item_actions
|
3330
|
-
# Instructions for how to modify phase metadata
|
3331
|
-
attr_accessor :metadata_actions
|
3332
|
-
# 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`.
|
3333
|
-
attr_accessor :proration_behavior
|
3334
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
3335
|
-
attr_accessor :set_pause_collection
|
3336
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
3337
|
-
attr_accessor :set_schedule_end
|
3338
|
-
# Settings related to subscription trials.
|
3339
|
-
attr_accessor :trial_settings
|
3340
|
-
|
3341
|
-
def initialize(
|
3342
|
-
amendment_end: nil,
|
3343
|
-
amendment_start: nil,
|
3344
|
-
billing_cycle_anchor: nil,
|
3345
|
-
discount_actions: nil,
|
3346
|
-
item_actions: nil,
|
3347
|
-
metadata_actions: nil,
|
3348
|
-
proration_behavior: nil,
|
3349
|
-
set_pause_collection: nil,
|
3350
|
-
set_schedule_end: nil,
|
3351
|
-
trial_settings: nil
|
3352
|
-
)
|
3353
|
-
@amendment_end = amendment_end
|
3354
|
-
@amendment_start = amendment_start
|
3355
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
3356
|
-
@discount_actions = discount_actions
|
3357
|
-
@item_actions = item_actions
|
3358
|
-
@metadata_actions = metadata_actions
|
3359
|
-
@proration_behavior = proration_behavior
|
3360
|
-
@set_pause_collection = set_pause_collection
|
3361
|
-
@set_schedule_end = set_schedule_end
|
3362
|
-
@trial_settings = trial_settings
|
3363
|
-
end
|
3364
|
-
end
|
3365
|
-
|
3366
2544
|
class Phase < Stripe::RequestParams
|
3367
2545
|
class AddInvoiceItem < Stripe::RequestParams
|
3368
2546
|
class Discount < Stripe::RequestParams
|
3369
|
-
class DiscountEnd < Stripe::RequestParams
|
3370
|
-
class Duration < Stripe::RequestParams
|
3371
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3372
|
-
attr_accessor :interval
|
3373
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3374
|
-
attr_accessor :interval_count
|
3375
|
-
|
3376
|
-
def initialize(interval: nil, interval_count: nil)
|
3377
|
-
@interval = interval
|
3378
|
-
@interval_count = interval_count
|
3379
|
-
end
|
3380
|
-
end
|
3381
|
-
# Time span for the redeemed discount.
|
3382
|
-
attr_accessor :duration
|
3383
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3384
|
-
attr_accessor :timestamp
|
3385
|
-
# The type of calculation made to determine when the discount ends.
|
3386
|
-
attr_accessor :type
|
3387
|
-
|
3388
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3389
|
-
@duration = duration
|
3390
|
-
@timestamp = timestamp
|
3391
|
-
@type = type
|
3392
|
-
end
|
3393
|
-
end
|
3394
2547
|
# ID of the coupon to create a new discount for.
|
3395
2548
|
attr_accessor :coupon
|
3396
2549
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3397
2550
|
attr_accessor :discount
|
3398
|
-
# Details to determine how long the discount should be applied for.
|
3399
|
-
attr_accessor :discount_end
|
3400
2551
|
# ID of the promotion code to create a new discount for.
|
3401
2552
|
attr_accessor :promotion_code
|
3402
2553
|
|
3403
|
-
def initialize(coupon: nil, discount: nil,
|
2554
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3404
2555
|
@coupon = coupon
|
3405
2556
|
@discount = discount
|
3406
|
-
@discount_end = discount_end
|
3407
2557
|
@promotion_code = promotion_code
|
3408
2558
|
end
|
3409
2559
|
end
|
@@ -3484,44 +2634,16 @@ module Stripe
|
|
3484
2634
|
end
|
3485
2635
|
|
3486
2636
|
class Discount < Stripe::RequestParams
|
3487
|
-
class DiscountEnd < Stripe::RequestParams
|
3488
|
-
class Duration < Stripe::RequestParams
|
3489
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3490
|
-
attr_accessor :interval
|
3491
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3492
|
-
attr_accessor :interval_count
|
3493
|
-
|
3494
|
-
def initialize(interval: nil, interval_count: nil)
|
3495
|
-
@interval = interval
|
3496
|
-
@interval_count = interval_count
|
3497
|
-
end
|
3498
|
-
end
|
3499
|
-
# Time span for the redeemed discount.
|
3500
|
-
attr_accessor :duration
|
3501
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3502
|
-
attr_accessor :timestamp
|
3503
|
-
# The type of calculation made to determine when the discount ends.
|
3504
|
-
attr_accessor :type
|
3505
|
-
|
3506
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3507
|
-
@duration = duration
|
3508
|
-
@timestamp = timestamp
|
3509
|
-
@type = type
|
3510
|
-
end
|
3511
|
-
end
|
3512
2637
|
# ID of the coupon to create a new discount for.
|
3513
2638
|
attr_accessor :coupon
|
3514
2639
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3515
2640
|
attr_accessor :discount
|
3516
|
-
# Details to determine how long the discount should be applied for.
|
3517
|
-
attr_accessor :discount_end
|
3518
2641
|
# ID of the promotion code to create a new discount for.
|
3519
2642
|
attr_accessor :promotion_code
|
3520
2643
|
|
3521
|
-
def initialize(coupon: nil, discount: nil,
|
2644
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3522
2645
|
@coupon = coupon
|
3523
2646
|
@discount = discount
|
3524
|
-
@discount_end = discount_end
|
3525
2647
|
@promotion_code = promotion_code
|
3526
2648
|
end
|
3527
2649
|
end
|
@@ -3554,44 +2676,16 @@ module Stripe
|
|
3554
2676
|
|
3555
2677
|
class Item < Stripe::RequestParams
|
3556
2678
|
class Discount < Stripe::RequestParams
|
3557
|
-
class DiscountEnd < Stripe::RequestParams
|
3558
|
-
class Duration < Stripe::RequestParams
|
3559
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3560
|
-
attr_accessor :interval
|
3561
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3562
|
-
attr_accessor :interval_count
|
3563
|
-
|
3564
|
-
def initialize(interval: nil, interval_count: nil)
|
3565
|
-
@interval = interval
|
3566
|
-
@interval_count = interval_count
|
3567
|
-
end
|
3568
|
-
end
|
3569
|
-
# Time span for the redeemed discount.
|
3570
|
-
attr_accessor :duration
|
3571
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3572
|
-
attr_accessor :timestamp
|
3573
|
-
# The type of calculation made to determine when the discount ends.
|
3574
|
-
attr_accessor :type
|
3575
|
-
|
3576
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3577
|
-
@duration = duration
|
3578
|
-
@timestamp = timestamp
|
3579
|
-
@type = type
|
3580
|
-
end
|
3581
|
-
end
|
3582
2679
|
# ID of the coupon to create a new discount for.
|
3583
2680
|
attr_accessor :coupon
|
3584
2681
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3585
2682
|
attr_accessor :discount
|
3586
|
-
# Details to determine how long the discount should be applied for.
|
3587
|
-
attr_accessor :discount_end
|
3588
2683
|
# ID of the promotion code to create a new discount for.
|
3589
2684
|
attr_accessor :promotion_code
|
3590
2685
|
|
3591
|
-
def initialize(coupon: nil, discount: nil,
|
2686
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3592
2687
|
@coupon = coupon
|
3593
2688
|
@discount = discount
|
3594
|
-
@discount_end = discount_end
|
3595
2689
|
@promotion_code = promotion_code
|
3596
2690
|
end
|
3597
2691
|
end
|
@@ -3637,18 +2731,6 @@ module Stripe
|
|
3637
2731
|
@unit_amount_decimal = unit_amount_decimal
|
3638
2732
|
end
|
3639
2733
|
end
|
3640
|
-
|
3641
|
-
class Trial < Stripe::RequestParams
|
3642
|
-
# 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.
|
3643
|
-
attr_accessor :converts_to
|
3644
|
-
# Determines the type of trial for this item.
|
3645
|
-
attr_accessor :type
|
3646
|
-
|
3647
|
-
def initialize(converts_to: nil, type: nil)
|
3648
|
-
@converts_to = converts_to
|
3649
|
-
@type = type
|
3650
|
-
end
|
3651
|
-
end
|
3652
2734
|
# The coupons to redeem into discounts for the subscription item.
|
3653
2735
|
attr_accessor :discounts
|
3654
2736
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
@@ -3663,8 +2745,6 @@ module Stripe
|
|
3663
2745
|
attr_accessor :quantity
|
3664
2746
|
# 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.
|
3665
2747
|
attr_accessor :tax_rates
|
3666
|
-
# Options that configure the trial on the subscription item.
|
3667
|
-
attr_accessor :trial
|
3668
2748
|
|
3669
2749
|
def initialize(
|
3670
2750
|
discounts: nil,
|
@@ -3673,8 +2753,7 @@ module Stripe
|
|
3673
2753
|
price: nil,
|
3674
2754
|
price_data: nil,
|
3675
2755
|
quantity: nil,
|
3676
|
-
tax_rates: nil
|
3677
|
-
trial: nil
|
2756
|
+
tax_rates: nil
|
3678
2757
|
)
|
3679
2758
|
@discounts = discounts
|
3680
2759
|
@metadata = metadata
|
@@ -3683,16 +2762,6 @@ module Stripe
|
|
3683
2762
|
@price_data = price_data
|
3684
2763
|
@quantity = quantity
|
3685
2764
|
@tax_rates = tax_rates
|
3686
|
-
@trial = trial
|
3687
|
-
end
|
3688
|
-
end
|
3689
|
-
|
3690
|
-
class PauseCollection < Stripe::RequestParams
|
3691
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3692
|
-
attr_accessor :behavior
|
3693
|
-
|
3694
|
-
def initialize(behavior: nil)
|
3695
|
-
@behavior = behavior
|
3696
2765
|
end
|
3697
2766
|
end
|
3698
2767
|
|
@@ -3707,23 +2776,6 @@ module Stripe
|
|
3707
2776
|
@destination = destination
|
3708
2777
|
end
|
3709
2778
|
end
|
3710
|
-
|
3711
|
-
class TrialSettings < Stripe::RequestParams
|
3712
|
-
class EndBehavior < Stripe::RequestParams
|
3713
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3714
|
-
attr_accessor :prorate_up_front
|
3715
|
-
|
3716
|
-
def initialize(prorate_up_front: nil)
|
3717
|
-
@prorate_up_front = prorate_up_front
|
3718
|
-
end
|
3719
|
-
end
|
3720
|
-
# Defines how the subscription should behave when a trial ends.
|
3721
|
-
attr_accessor :end_behavior
|
3722
|
-
|
3723
|
-
def initialize(end_behavior: nil)
|
3724
|
-
@end_behavior = end_behavior
|
3725
|
-
end
|
3726
|
-
end
|
3727
2779
|
# 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.
|
3728
2780
|
attr_accessor :add_invoice_items
|
3729
2781
|
# 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).
|
@@ -3756,8 +2808,6 @@ module Stripe
|
|
3756
2808
|
attr_accessor :metadata
|
3757
2809
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3758
2810
|
attr_accessor :on_behalf_of
|
3759
|
-
# 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).
|
3760
|
-
attr_accessor :pause_collection
|
3761
2811
|
# Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. 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 of the current phase.
|
3762
2812
|
attr_accessor :proration_behavior
|
3763
2813
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -3766,12 +2816,8 @@ module Stripe
|
|
3766
2816
|
attr_accessor :transfer_data
|
3767
2817
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
3768
2818
|
attr_accessor :trial
|
3769
|
-
# Specify trial behavior when crossing phase boundaries
|
3770
|
-
attr_accessor :trial_continuation
|
3771
2819
|
# 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`
|
3772
2820
|
attr_accessor :trial_end
|
3773
|
-
# Settings related to subscription trials.
|
3774
|
-
attr_accessor :trial_settings
|
3775
2821
|
|
3776
2822
|
def initialize(
|
3777
2823
|
add_invoice_items: nil,
|
@@ -3790,14 +2836,11 @@ module Stripe
|
|
3790
2836
|
iterations: nil,
|
3791
2837
|
metadata: nil,
|
3792
2838
|
on_behalf_of: nil,
|
3793
|
-
pause_collection: nil,
|
3794
2839
|
proration_behavior: nil,
|
3795
2840
|
start_date: nil,
|
3796
2841
|
transfer_data: nil,
|
3797
2842
|
trial: nil,
|
3798
|
-
|
3799
|
-
trial_end: nil,
|
3800
|
-
trial_settings: nil
|
2843
|
+
trial_end: nil
|
3801
2844
|
)
|
3802
2845
|
@add_invoice_items = add_invoice_items
|
3803
2846
|
@application_fee_percent = application_fee_percent
|
@@ -3815,91 +2858,23 @@ module Stripe
|
|
3815
2858
|
@iterations = iterations
|
3816
2859
|
@metadata = metadata
|
3817
2860
|
@on_behalf_of = on_behalf_of
|
3818
|
-
@pause_collection = pause_collection
|
3819
2861
|
@proration_behavior = proration_behavior
|
3820
2862
|
@start_date = start_date
|
3821
2863
|
@transfer_data = transfer_data
|
3822
2864
|
@trial = trial
|
3823
|
-
@trial_continuation = trial_continuation
|
3824
2865
|
@trial_end = trial_end
|
3825
|
-
@trial_settings = trial_settings
|
3826
|
-
end
|
3827
|
-
end
|
3828
|
-
|
3829
|
-
class Prebilling < Stripe::RequestParams
|
3830
|
-
class BillUntil < Stripe::RequestParams
|
3831
|
-
class AmendmentEnd < Stripe::RequestParams
|
3832
|
-
# 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.
|
3833
|
-
attr_accessor :index
|
3834
|
-
|
3835
|
-
def initialize(index: nil)
|
3836
|
-
@index = index
|
3837
|
-
end
|
3838
|
-
end
|
3839
|
-
|
3840
|
-
class Duration < Stripe::RequestParams
|
3841
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3842
|
-
attr_accessor :interval
|
3843
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3844
|
-
attr_accessor :interval_count
|
3845
|
-
|
3846
|
-
def initialize(interval: nil, interval_count: nil)
|
3847
|
-
@interval = interval
|
3848
|
-
@interval_count = interval_count
|
3849
|
-
end
|
3850
|
-
end
|
3851
|
-
# End the prebilled period when a specified amendment ends.
|
3852
|
-
attr_accessor :amendment_end
|
3853
|
-
# Time span for prebilling, starting from `bill_from`.
|
3854
|
-
attr_accessor :duration
|
3855
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3856
|
-
attr_accessor :timestamp
|
3857
|
-
# Select one of several ways to pass the `bill_until` value.
|
3858
|
-
attr_accessor :type
|
3859
|
-
|
3860
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3861
|
-
@amendment_end = amendment_end
|
3862
|
-
@duration = duration
|
3863
|
-
@timestamp = timestamp
|
3864
|
-
@type = type
|
3865
|
-
end
|
3866
|
-
end
|
3867
|
-
# The end of the prebilled time period.
|
3868
|
-
attr_accessor :bill_until
|
3869
|
-
# This is used to determine the number of billing cycles to prebill.
|
3870
|
-
attr_accessor :iterations
|
3871
|
-
|
3872
|
-
def initialize(bill_until: nil, iterations: nil)
|
3873
|
-
@bill_until = bill_until
|
3874
|
-
@iterations = iterations
|
3875
2866
|
end
|
3876
2867
|
end
|
3877
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3878
|
-
attr_accessor :amendments
|
3879
|
-
# 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.
|
3880
|
-
attr_accessor :billing_behavior
|
3881
2868
|
# 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.
|
3882
2869
|
attr_accessor :end_behavior
|
3883
2870
|
# 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.
|
3884
2871
|
attr_accessor :phases
|
3885
|
-
# Provide any time periods to bill in advance.
|
3886
|
-
attr_accessor :prebilling
|
3887
2872
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
3888
2873
|
attr_accessor :proration_behavior
|
3889
2874
|
|
3890
|
-
def initialize(
|
3891
|
-
amendments: nil,
|
3892
|
-
billing_behavior: nil,
|
3893
|
-
end_behavior: nil,
|
3894
|
-
phases: nil,
|
3895
|
-
prebilling: nil,
|
3896
|
-
proration_behavior: nil
|
3897
|
-
)
|
3898
|
-
@amendments = amendments
|
3899
|
-
@billing_behavior = billing_behavior
|
2875
|
+
def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
|
3900
2876
|
@end_behavior = end_behavior
|
3901
2877
|
@phases = phases
|
3902
|
-
@prebilling = prebilling
|
3903
2878
|
@proration_behavior = proration_behavior
|
3904
2879
|
end
|
3905
2880
|
end
|
@@ -3907,44 +2882,16 @@ module Stripe
|
|
3907
2882
|
class SubscriptionDetails < Stripe::RequestParams
|
3908
2883
|
class Item < Stripe::RequestParams
|
3909
2884
|
class Discount < Stripe::RequestParams
|
3910
|
-
class DiscountEnd < Stripe::RequestParams
|
3911
|
-
class Duration < Stripe::RequestParams
|
3912
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3913
|
-
attr_accessor :interval
|
3914
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3915
|
-
attr_accessor :interval_count
|
3916
|
-
|
3917
|
-
def initialize(interval: nil, interval_count: nil)
|
3918
|
-
@interval = interval
|
3919
|
-
@interval_count = interval_count
|
3920
|
-
end
|
3921
|
-
end
|
3922
|
-
# Time span for the redeemed discount.
|
3923
|
-
attr_accessor :duration
|
3924
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3925
|
-
attr_accessor :timestamp
|
3926
|
-
# The type of calculation made to determine when the discount ends.
|
3927
|
-
attr_accessor :type
|
3928
|
-
|
3929
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3930
|
-
@duration = duration
|
3931
|
-
@timestamp = timestamp
|
3932
|
-
@type = type
|
3933
|
-
end
|
3934
|
-
end
|
3935
2885
|
# ID of the coupon to create a new discount for.
|
3936
2886
|
attr_accessor :coupon
|
3937
2887
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3938
2888
|
attr_accessor :discount
|
3939
|
-
# Details to determine how long the discount should be applied for.
|
3940
|
-
attr_accessor :discount_end
|
3941
2889
|
# ID of the promotion code to create a new discount for.
|
3942
2890
|
attr_accessor :promotion_code
|
3943
2891
|
|
3944
|
-
def initialize(coupon: nil, discount: nil,
|
2892
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3945
2893
|
@coupon = coupon
|
3946
2894
|
@discount = discount
|
3947
|
-
@discount_end = discount_end
|
3948
2895
|
@promotion_code = promotion_code
|
3949
2896
|
end
|
3950
2897
|
end
|
@@ -4035,15 +2982,6 @@ module Stripe
|
|
4035
2982
|
@tax_rates = tax_rates
|
4036
2983
|
end
|
4037
2984
|
end
|
4038
|
-
|
4039
|
-
class Prebilling < Stripe::RequestParams
|
4040
|
-
# This is used to determine the number of billing cycles to prebill.
|
4041
|
-
attr_accessor :iterations
|
4042
|
-
|
4043
|
-
def initialize(iterations: nil)
|
4044
|
-
@iterations = iterations
|
4045
|
-
end
|
4046
|
-
end
|
4047
2985
|
# 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`.
|
4048
2986
|
attr_accessor :billing_cycle_anchor
|
4049
2987
|
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
@@ -4056,8 +2994,6 @@ module Stripe
|
|
4056
2994
|
attr_accessor :default_tax_rates
|
4057
2995
|
# A list of up to 20 subscription items, each with an attached price.
|
4058
2996
|
attr_accessor :items
|
4059
|
-
# The pre-billing to apply to the subscription as a preview.
|
4060
|
-
attr_accessor :prebilling
|
4061
2997
|
# 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`.
|
4062
2998
|
attr_accessor :proration_behavior
|
4063
2999
|
# 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'.
|
@@ -4076,7 +3012,6 @@ module Stripe
|
|
4076
3012
|
cancel_now: nil,
|
4077
3013
|
default_tax_rates: nil,
|
4078
3014
|
items: nil,
|
4079
|
-
prebilling: nil,
|
4080
3015
|
proration_behavior: nil,
|
4081
3016
|
proration_date: nil,
|
4082
3017
|
resume_at: nil,
|
@@ -4089,7 +3024,6 @@ module Stripe
|
|
4089
3024
|
@cancel_now = cancel_now
|
4090
3025
|
@default_tax_rates = default_tax_rates
|
4091
3026
|
@items = items
|
4092
|
-
@prebilling = prebilling
|
4093
3027
|
@proration_behavior = proration_behavior
|
4094
3028
|
@proration_date = proration_date
|
4095
3029
|
@resume_at = resume_at
|
@@ -4103,8 +3037,6 @@ module Stripe
|
|
4103
3037
|
attr_accessor :currency
|
4104
3038
|
# 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.
|
4105
3039
|
attr_accessor :customer
|
4106
|
-
# 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.
|
4107
|
-
attr_accessor :customer_account
|
4108
3040
|
# 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.
|
4109
3041
|
attr_accessor :customer_details
|
4110
3042
|
# 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.
|
@@ -4132,7 +3064,6 @@ module Stripe
|
|
4132
3064
|
automatic_tax: nil,
|
4133
3065
|
currency: nil,
|
4134
3066
|
customer: nil,
|
4135
|
-
customer_account: nil,
|
4136
3067
|
customer_details: nil,
|
4137
3068
|
discounts: nil,
|
4138
3069
|
expand: nil,
|
@@ -4148,7 +3079,6 @@ module Stripe
|
|
4148
3079
|
@automatic_tax = automatic_tax
|
4149
3080
|
@currency = currency
|
4150
3081
|
@customer = customer
|
4151
|
-
@customer_account = customer_account
|
4152
3082
|
@customer_details = customer_details
|
4153
3083
|
@discounts = discounts
|
4154
3084
|
@expand = expand
|
@@ -4178,8 +3108,6 @@ module Stripe
|
|
4178
3108
|
attr_reader :amount_remaining
|
4179
3109
|
# This is the sum of all the shipping amounts.
|
4180
3110
|
attr_reader :amount_shipping
|
4181
|
-
# List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
|
4182
|
-
attr_reader :amounts_due
|
4183
3111
|
# ID of the Connect Application that created the invoice.
|
4184
3112
|
attr_reader :application
|
4185
3113
|
# Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
|
@@ -4214,8 +3142,6 @@ module Stripe
|
|
4214
3142
|
attr_reader :custom_fields
|
4215
3143
|
# The ID of the customer who will be billed.
|
4216
3144
|
attr_reader :customer
|
4217
|
-
# The ID of the account who will be billed.
|
4218
|
-
attr_reader :customer_account
|
4219
3145
|
# The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
|
4220
3146
|
attr_reader :customer_address
|
4221
3147
|
# The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
|
@@ -4230,8 +3156,6 @@ module Stripe
|
|
4230
3156
|
attr_reader :customer_tax_exempt
|
4231
3157
|
# The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
|
4232
3158
|
attr_reader :customer_tax_ids
|
4233
|
-
# The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
|
4234
|
-
attr_reader :default_margins
|
4235
3159
|
# 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.
|
4236
3160
|
attr_reader :default_payment_method
|
4237
3161
|
# 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.
|
@@ -4322,8 +3246,6 @@ module Stripe
|
|
4322
3246
|
attr_reader :total_discount_amounts
|
4323
3247
|
# The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
|
4324
3248
|
attr_reader :total_excluding_tax
|
4325
|
-
# The aggregate amounts calculated per margin across all line items.
|
4326
|
-
attr_reader :total_margin_amounts
|
4327
3249
|
# Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
|
4328
3250
|
attr_reader :total_pretax_credit_amounts
|
4329
3251
|
# The aggregate tax information of all line items.
|
@@ -4353,86 +3275,6 @@ module Stripe
|
|
4353
3275
|
)
|
4354
3276
|
end
|
4355
3277
|
|
4356
|
-
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
4357
|
-
#
|
4358
|
-
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
|
4359
|
-
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
|
4360
|
-
#
|
4361
|
-
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
4362
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
4363
|
-
# invoice's status becomes paid.
|
4364
|
-
#
|
4365
|
-
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
4366
|
-
# credited to the invoice immediately.
|
4367
|
-
#
|
4368
|
-
# See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
|
4369
|
-
def attach_payment(params = {}, opts = {})
|
4370
|
-
request_stripe_object(
|
4371
|
-
method: :post,
|
4372
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(self["id"]) }),
|
4373
|
-
params: params,
|
4374
|
-
opts: opts
|
4375
|
-
)
|
4376
|
-
end
|
4377
|
-
|
4378
|
-
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
4379
|
-
#
|
4380
|
-
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
|
4381
|
-
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
|
4382
|
-
#
|
4383
|
-
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
4384
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
4385
|
-
# invoice's status becomes paid.
|
4386
|
-
#
|
4387
|
-
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
4388
|
-
# credited to the invoice immediately.
|
4389
|
-
#
|
4390
|
-
# See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
|
4391
|
-
def self.attach_payment(invoice, params = {}, opts = {})
|
4392
|
-
request_stripe_object(
|
4393
|
-
method: :post,
|
4394
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(invoice) }),
|
4395
|
-
params: params,
|
4396
|
-
opts: opts
|
4397
|
-
)
|
4398
|
-
end
|
4399
|
-
|
4400
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
4401
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
4402
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
4403
|
-
# invoice's status becomes paid.
|
4404
|
-
#
|
4405
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
4406
|
-
# credited to the invoice immediately.
|
4407
|
-
#
|
4408
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
4409
|
-
def attach_payment_intent(params = {}, opts = {})
|
4410
|
-
request_stripe_object(
|
4411
|
-
method: :post,
|
4412
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(self["id"]) }),
|
4413
|
-
params: params,
|
4414
|
-
opts: opts
|
4415
|
-
)
|
4416
|
-
end
|
4417
|
-
|
4418
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
4419
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
4420
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
4421
|
-
# invoice's status becomes paid.
|
4422
|
-
#
|
4423
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
4424
|
-
# credited to the invoice immediately.
|
4425
|
-
#
|
4426
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
4427
|
-
def self.attach_payment_intent(invoice, params = {}, opts = {})
|
4428
|
-
request_stripe_object(
|
4429
|
-
method: :post,
|
4430
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
|
4431
|
-
params: params,
|
4432
|
-
opts: opts
|
4433
|
-
)
|
4434
|
-
end
|
4435
|
-
|
4436
3278
|
# This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
|
4437
3279
|
def self.create(params = {}, opts = {})
|
4438
3280
|
request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
|