stripe 15.1.0.pre.beta.2 → 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 +696 -1554
- data/OPENAPI_VERSION +1 -1
- data/README.md +6 -0
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -28
- data/lib/stripe/api_version.rb +1 -1
- 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/object_types.rb +0 -53
- data/lib/stripe/resources/account.rb +3 -655
- 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 +0 -1470
- data/lib/stripe/resources/checkout/session.rb +3 -327
- data/lib/stripe/resources/confirmation_token.rb +3 -177
- data/lib/stripe/resources/coupon.rb +1 -30
- 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/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +17 -1123
- 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 +331 -5153
- data/lib/stripe/resources/payment_method.rb +1 -196
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/payout.rb +0 -6
- 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 +0 -9
- data/lib/stripe/resources/setup_attempt.rb +0 -21
- data/lib/stripe/resources/setup_intent.rb +9 -596
- data/lib/stripe/resources/source.rb +0 -29
- 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 +60 -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/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_payment.rb +1 -4
- 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 -90
- data/lib/stripe/services/account_external_account_service.rb +1 -1
- data/lib/stripe/services/account_service.rb +3 -564
- data/lib/stripe/services/account_session_service.rb +1 -269
- 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_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +0 -1350
- data/lib/stripe/services/checkout/session_service.rb +2 -243
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_service.rb +0 -4
- data/lib/stripe/services/customer_payment_method_service.rb +1 -1
- data/lib/stripe/services/customer_service.rb +1 -1
- 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/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/invoice_item_service.rb +2 -74
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +83 -0
- data/lib/stripe/services/invoice_service.rb +16 -1052
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +283 -4656
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +1 -126
- 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 +0 -38
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +7 -1726
- data/lib/stripe/services/setup_intent_service.rb +9 -556
- 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 +1 -1
- data/lib/stripe/services/tax/registration_service.rb +39 -0
- data/lib/stripe/services/tax_id_service.rb +3 -9
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/reader_service.rb +0 -180
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +3 -106
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/transfer_service.rb +0 -4
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
- data/lib/stripe/services/treasury/outbound_payment_service.rb +1 -4
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -12
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +2 -4
- data/lib/stripe/services.rb +1 -54
- 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 -53
- 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/financial_connections/institution_service.rb → rbi/stripe/services/climate/product_service.rbi} +25 -36
- data/{lib/stripe/services/privacy/redaction_job_validation_error_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_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +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/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +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_line_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 +326 -149
- 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/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -105
- 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/fx_quote.rb +0 -184
- 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_intent_amount_details_line_item.rb +0 -65
- data/lib/stripe/resources/payment_record.rb +0 -1607
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -254
- data/lib/stripe/resources/privacy/redaction_job_root_objects.rb +0 -35
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -25
- 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/fx_quote_service.rb +0 -123
- 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/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/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 -191592
@@ -23,24 +23,6 @@ module Stripe
|
|
23
23
|
end
|
24
24
|
|
25
25
|
class UpdateParams < Stripe::RequestParams
|
26
|
-
class AmountsDue < Stripe::RequestParams
|
27
|
-
# The amount in cents (or local equivalent).
|
28
|
-
attr_accessor :amount
|
29
|
-
# Number of days from when invoice is finalized until the payment is due.
|
30
|
-
attr_accessor :days_until_due
|
31
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
32
|
-
attr_accessor :description
|
33
|
-
# Date on which a payment plan’s payment is due.
|
34
|
-
attr_accessor :due_date
|
35
|
-
|
36
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
37
|
-
@amount = amount
|
38
|
-
@days_until_due = days_until_due
|
39
|
-
@description = description
|
40
|
-
@due_date = due_date
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
26
|
class AutomaticTax < Stripe::RequestParams
|
45
27
|
class Liability < Stripe::RequestParams
|
46
28
|
# The connected account being referenced when `type` is `account`.
|
@@ -77,44 +59,16 @@ module Stripe
|
|
77
59
|
end
|
78
60
|
|
79
61
|
class Discount < Stripe::RequestParams
|
80
|
-
class DiscountEnd < Stripe::RequestParams
|
81
|
-
class Duration < Stripe::RequestParams
|
82
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
83
|
-
attr_accessor :interval
|
84
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
85
|
-
attr_accessor :interval_count
|
86
|
-
|
87
|
-
def initialize(interval: nil, interval_count: nil)
|
88
|
-
@interval = interval
|
89
|
-
@interval_count = interval_count
|
90
|
-
end
|
91
|
-
end
|
92
|
-
# Time span for the redeemed discount.
|
93
|
-
attr_accessor :duration
|
94
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
95
|
-
attr_accessor :timestamp
|
96
|
-
# The type of calculation made to determine when the discount ends.
|
97
|
-
attr_accessor :type
|
98
|
-
|
99
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
100
|
-
@duration = duration
|
101
|
-
@timestamp = timestamp
|
102
|
-
@type = type
|
103
|
-
end
|
104
|
-
end
|
105
62
|
# ID of the coupon to create a new discount for.
|
106
63
|
attr_accessor :coupon
|
107
64
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
108
65
|
attr_accessor :discount
|
109
|
-
# Details to determine how long the discount should be applied for.
|
110
|
-
attr_accessor :discount_end
|
111
66
|
# ID of the promotion code to create a new discount for.
|
112
67
|
attr_accessor :promotion_code
|
113
68
|
|
114
|
-
def initialize(coupon: nil, discount: nil,
|
69
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
115
70
|
@coupon = coupon
|
116
71
|
@discount = discount
|
117
|
-
@discount_end = discount_end
|
118
72
|
@promotion_code = promotion_code
|
119
73
|
end
|
120
74
|
end
|
@@ -234,9 +188,6 @@ module Stripe
|
|
234
188
|
end
|
235
189
|
end
|
236
190
|
|
237
|
-
class IdBankTransfer < Stripe::RequestParams
|
238
|
-
end
|
239
|
-
|
240
191
|
class Konbini < Stripe::RequestParams
|
241
192
|
end
|
242
193
|
|
@@ -248,12 +199,9 @@ module Stripe
|
|
248
199
|
class Filters < Stripe::RequestParams
|
249
200
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
250
201
|
attr_accessor :account_subcategories
|
251
|
-
# ID of the institution to use to filter for selectable accounts.
|
252
|
-
attr_accessor :institution
|
253
202
|
|
254
|
-
def initialize(account_subcategories: nil
|
203
|
+
def initialize(account_subcategories: nil)
|
255
204
|
@account_subcategories = account_subcategories
|
256
|
-
@institution = institution
|
257
205
|
end
|
258
206
|
end
|
259
207
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -287,8 +235,6 @@ module Stripe
|
|
287
235
|
attr_accessor :card
|
288
236
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
289
237
|
attr_accessor :customer_balance
|
290
|
-
# 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.
|
291
|
-
attr_accessor :id_bank_transfer
|
292
238
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
293
239
|
attr_accessor :konbini
|
294
240
|
# 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.
|
@@ -301,7 +247,6 @@ module Stripe
|
|
301
247
|
bancontact: nil,
|
302
248
|
card: nil,
|
303
249
|
customer_balance: nil,
|
304
|
-
id_bank_transfer: nil,
|
305
250
|
konbini: nil,
|
306
251
|
sepa_debit: nil,
|
307
252
|
us_bank_account: nil
|
@@ -310,7 +255,6 @@ module Stripe
|
|
310
255
|
@bancontact = bancontact
|
311
256
|
@card = card
|
312
257
|
@customer_balance = customer_balance
|
313
|
-
@id_bank_transfer = id_bank_transfer
|
314
258
|
@konbini = konbini
|
315
259
|
@sepa_debit = sepa_debit
|
316
260
|
@us_bank_account = us_bank_account
|
@@ -522,8 +466,6 @@ module Stripe
|
|
522
466
|
end
|
523
467
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
524
468
|
attr_accessor :account_tax_ids
|
525
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
526
|
-
attr_accessor :amounts_due
|
527
469
|
# 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).
|
528
470
|
attr_accessor :application_fee_amount
|
529
471
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -538,8 +480,6 @@ module Stripe
|
|
538
480
|
attr_accessor :custom_fields
|
539
481
|
# 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.
|
540
482
|
attr_accessor :days_until_due
|
541
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
542
|
-
attr_accessor :default_margins
|
543
483
|
# 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.
|
544
484
|
attr_accessor :default_payment_method
|
545
485
|
# 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.
|
@@ -581,7 +521,6 @@ module Stripe
|
|
581
521
|
|
582
522
|
def initialize(
|
583
523
|
account_tax_ids: nil,
|
584
|
-
amounts_due: nil,
|
585
524
|
application_fee_amount: nil,
|
586
525
|
auto_advance: nil,
|
587
526
|
automatic_tax: nil,
|
@@ -589,7 +528,6 @@ module Stripe
|
|
589
528
|
collection_method: nil,
|
590
529
|
custom_fields: nil,
|
591
530
|
days_until_due: nil,
|
592
|
-
default_margins: nil,
|
593
531
|
default_payment_method: nil,
|
594
532
|
default_source: nil,
|
595
533
|
default_tax_rates: nil,
|
@@ -611,7 +549,6 @@ module Stripe
|
|
611
549
|
transfer_data: nil
|
612
550
|
)
|
613
551
|
@account_tax_ids = account_tax_ids
|
614
|
-
@amounts_due = amounts_due
|
615
552
|
@application_fee_amount = application_fee_amount
|
616
553
|
@auto_advance = auto_advance
|
617
554
|
@automatic_tax = automatic_tax
|
@@ -619,7 +556,6 @@ module Stripe
|
|
619
556
|
@collection_method = collection_method
|
620
557
|
@custom_fields = custom_fields
|
621
558
|
@days_until_due = days_until_due
|
622
|
-
@default_margins = default_margins
|
623
559
|
@default_payment_method = default_payment_method
|
624
560
|
@default_source = default_source
|
625
561
|
@default_tax_rates = default_tax_rates
|
@@ -684,8 +620,6 @@ module Stripe
|
|
684
620
|
attr_accessor :created
|
685
621
|
# Only return invoices for the customer specified by this customer ID.
|
686
622
|
attr_accessor :customer
|
687
|
-
# Only return invoices for the account specified by this account ID.
|
688
|
-
attr_accessor :customer_account
|
689
623
|
# Attribute for param field due_date
|
690
624
|
attr_accessor :due_date
|
691
625
|
# 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.
|
@@ -705,7 +639,6 @@ module Stripe
|
|
705
639
|
collection_method: nil,
|
706
640
|
created: nil,
|
707
641
|
customer: nil,
|
708
|
-
customer_account: nil,
|
709
642
|
due_date: nil,
|
710
643
|
ending_before: nil,
|
711
644
|
expand: nil,
|
@@ -717,7 +650,6 @@ module Stripe
|
|
717
650
|
@collection_method = collection_method
|
718
651
|
@created = created
|
719
652
|
@customer = customer
|
720
|
-
@customer_account = customer_account
|
721
653
|
@due_date = due_date
|
722
654
|
@ending_before = ending_before
|
723
655
|
@expand = expand
|
@@ -729,24 +661,6 @@ module Stripe
|
|
729
661
|
end
|
730
662
|
|
731
663
|
class CreateParams < Stripe::RequestParams
|
732
|
-
class AmountsDue < Stripe::RequestParams
|
733
|
-
# The amount in cents (or local equivalent).
|
734
|
-
attr_accessor :amount
|
735
|
-
# Number of days from when invoice is finalized until the payment is due.
|
736
|
-
attr_accessor :days_until_due
|
737
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
738
|
-
attr_accessor :description
|
739
|
-
# Date on which a payment plan’s payment is due.
|
740
|
-
attr_accessor :due_date
|
741
|
-
|
742
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
743
|
-
@amount = amount
|
744
|
-
@days_until_due = days_until_due
|
745
|
-
@description = description
|
746
|
-
@due_date = due_date
|
747
|
-
end
|
748
|
-
end
|
749
|
-
|
750
664
|
class AutomaticTax < Stripe::RequestParams
|
751
665
|
class Liability < Stripe::RequestParams
|
752
666
|
# The connected account being referenced when `type` is `account`.
|
@@ -783,44 +697,16 @@ module Stripe
|
|
783
697
|
end
|
784
698
|
|
785
699
|
class Discount < Stripe::RequestParams
|
786
|
-
class DiscountEnd < Stripe::RequestParams
|
787
|
-
class Duration < Stripe::RequestParams
|
788
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
789
|
-
attr_accessor :interval
|
790
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
791
|
-
attr_accessor :interval_count
|
792
|
-
|
793
|
-
def initialize(interval: nil, interval_count: nil)
|
794
|
-
@interval = interval
|
795
|
-
@interval_count = interval_count
|
796
|
-
end
|
797
|
-
end
|
798
|
-
# Time span for the redeemed discount.
|
799
|
-
attr_accessor :duration
|
800
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
801
|
-
attr_accessor :timestamp
|
802
|
-
# The type of calculation made to determine when the discount ends.
|
803
|
-
attr_accessor :type
|
804
|
-
|
805
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
806
|
-
@duration = duration
|
807
|
-
@timestamp = timestamp
|
808
|
-
@type = type
|
809
|
-
end
|
810
|
-
end
|
811
700
|
# ID of the coupon to create a new discount for.
|
812
701
|
attr_accessor :coupon
|
813
702
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
814
703
|
attr_accessor :discount
|
815
|
-
# Details to determine how long the discount should be applied for.
|
816
|
-
attr_accessor :discount_end
|
817
704
|
# ID of the promotion code to create a new discount for.
|
818
705
|
attr_accessor :promotion_code
|
819
706
|
|
820
|
-
def initialize(coupon: nil, discount: nil,
|
707
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
821
708
|
@coupon = coupon
|
822
709
|
@discount = discount
|
823
|
-
@discount_end = discount_end
|
824
710
|
@promotion_code = promotion_code
|
825
711
|
end
|
826
712
|
end
|
@@ -952,9 +838,6 @@ module Stripe
|
|
952
838
|
end
|
953
839
|
end
|
954
840
|
|
955
|
-
class IdBankTransfer < Stripe::RequestParams
|
956
|
-
end
|
957
|
-
|
958
841
|
class Konbini < Stripe::RequestParams
|
959
842
|
end
|
960
843
|
|
@@ -966,12 +849,9 @@ module Stripe
|
|
966
849
|
class Filters < Stripe::RequestParams
|
967
850
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
968
851
|
attr_accessor :account_subcategories
|
969
|
-
# ID of the institution to use to filter for selectable accounts.
|
970
|
-
attr_accessor :institution
|
971
852
|
|
972
|
-
def initialize(account_subcategories: nil
|
853
|
+
def initialize(account_subcategories: nil)
|
973
854
|
@account_subcategories = account_subcategories
|
974
|
-
@institution = institution
|
975
855
|
end
|
976
856
|
end
|
977
857
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -1005,8 +885,6 @@ module Stripe
|
|
1005
885
|
attr_accessor :card
|
1006
886
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1007
887
|
attr_accessor :customer_balance
|
1008
|
-
# 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.
|
1009
|
-
attr_accessor :id_bank_transfer
|
1010
888
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1011
889
|
attr_accessor :konbini
|
1012
890
|
# 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.
|
@@ -1019,7 +897,6 @@ module Stripe
|
|
1019
897
|
bancontact: nil,
|
1020
898
|
card: nil,
|
1021
899
|
customer_balance: nil,
|
1022
|
-
id_bank_transfer: nil,
|
1023
900
|
konbini: nil,
|
1024
901
|
sepa_debit: nil,
|
1025
902
|
us_bank_account: nil
|
@@ -1028,7 +905,6 @@ module Stripe
|
|
1028
905
|
@bancontact = bancontact
|
1029
906
|
@card = card
|
1030
907
|
@customer_balance = customer_balance
|
1031
|
-
@id_bank_transfer = id_bank_transfer
|
1032
908
|
@konbini = konbini
|
1033
909
|
@sepa_debit = sepa_debit
|
1034
910
|
@us_bank_account = us_bank_account
|
@@ -1240,8 +1116,6 @@ module Stripe
|
|
1240
1116
|
end
|
1241
1117
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1242
1118
|
attr_accessor :account_tax_ids
|
1243
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1244
|
-
attr_accessor :amounts_due
|
1245
1119
|
# 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).
|
1246
1120
|
attr_accessor :application_fee_amount
|
1247
1121
|
# 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.
|
@@ -1258,12 +1132,8 @@ module Stripe
|
|
1258
1132
|
attr_accessor :custom_fields
|
1259
1133
|
# The ID of the customer who will be billed.
|
1260
1134
|
attr_accessor :customer
|
1261
|
-
# The ID of the account who will be billed.
|
1262
|
-
attr_accessor :customer_account
|
1263
1135
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1264
1136
|
attr_accessor :days_until_due
|
1265
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1266
|
-
attr_accessor :default_margins
|
1267
1137
|
# 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.
|
1268
1138
|
attr_accessor :default_payment_method
|
1269
1139
|
# 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.
|
@@ -1311,7 +1181,6 @@ module Stripe
|
|
1311
1181
|
|
1312
1182
|
def initialize(
|
1313
1183
|
account_tax_ids: nil,
|
1314
|
-
amounts_due: nil,
|
1315
1184
|
application_fee_amount: nil,
|
1316
1185
|
auto_advance: nil,
|
1317
1186
|
automatic_tax: nil,
|
@@ -1320,9 +1189,7 @@ module Stripe
|
|
1320
1189
|
currency: nil,
|
1321
1190
|
custom_fields: nil,
|
1322
1191
|
customer: nil,
|
1323
|
-
customer_account: nil,
|
1324
1192
|
days_until_due: nil,
|
1325
|
-
default_margins: nil,
|
1326
1193
|
default_payment_method: nil,
|
1327
1194
|
default_source: nil,
|
1328
1195
|
default_tax_rates: nil,
|
@@ -1347,7 +1214,6 @@ module Stripe
|
|
1347
1214
|
transfer_data: nil
|
1348
1215
|
)
|
1349
1216
|
@account_tax_ids = account_tax_ids
|
1350
|
-
@amounts_due = amounts_due
|
1351
1217
|
@application_fee_amount = application_fee_amount
|
1352
1218
|
@auto_advance = auto_advance
|
1353
1219
|
@automatic_tax = automatic_tax
|
@@ -1356,9 +1222,7 @@ module Stripe
|
|
1356
1222
|
@currency = currency
|
1357
1223
|
@custom_fields = custom_fields
|
1358
1224
|
@customer = customer
|
1359
|
-
@customer_account = customer_account
|
1360
1225
|
@days_until_due = days_until_due
|
1361
|
-
@default_margins = default_margins
|
1362
1226
|
@default_payment_method = default_payment_method
|
1363
1227
|
@default_source = default_source
|
1364
1228
|
@default_tax_rates = default_tax_rates
|
@@ -1405,44 +1269,16 @@ module Stripe
|
|
1405
1269
|
class AddLinesParams < Stripe::RequestParams
|
1406
1270
|
class Line < Stripe::RequestParams
|
1407
1271
|
class Discount < Stripe::RequestParams
|
1408
|
-
class DiscountEnd < Stripe::RequestParams
|
1409
|
-
class Duration < Stripe::RequestParams
|
1410
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1411
|
-
attr_accessor :interval
|
1412
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1413
|
-
attr_accessor :interval_count
|
1414
|
-
|
1415
|
-
def initialize(interval: nil, interval_count: nil)
|
1416
|
-
@interval = interval
|
1417
|
-
@interval_count = interval_count
|
1418
|
-
end
|
1419
|
-
end
|
1420
|
-
# Time span for the redeemed discount.
|
1421
|
-
attr_accessor :duration
|
1422
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1423
|
-
attr_accessor :timestamp
|
1424
|
-
# The type of calculation made to determine when the discount ends.
|
1425
|
-
attr_accessor :type
|
1426
|
-
|
1427
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1428
|
-
@duration = duration
|
1429
|
-
@timestamp = timestamp
|
1430
|
-
@type = type
|
1431
|
-
end
|
1432
|
-
end
|
1433
1272
|
# ID of the coupon to create a new discount for.
|
1434
1273
|
attr_accessor :coupon
|
1435
1274
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1436
1275
|
attr_accessor :discount
|
1437
|
-
# Details to determine how long the discount should be applied for.
|
1438
|
-
attr_accessor :discount_end
|
1439
1276
|
# ID of the promotion code to create a new discount for.
|
1440
1277
|
attr_accessor :promotion_code
|
1441
1278
|
|
1442
|
-
def initialize(coupon: nil, discount: nil,
|
1279
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1443
1280
|
@coupon = coupon
|
1444
1281
|
@discount = discount
|
1445
|
-
@discount_end = discount_end
|
1446
1282
|
@promotion_code = promotion_code
|
1447
1283
|
end
|
1448
1284
|
end
|
@@ -1595,8 +1431,6 @@ module Stripe
|
|
1595
1431
|
attr_accessor :discounts
|
1596
1432
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1597
1433
|
attr_accessor :invoice_item
|
1598
|
-
# 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.
|
1599
|
-
attr_accessor :margins
|
1600
1434
|
# 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`.
|
1601
1435
|
attr_accessor :metadata
|
1602
1436
|
# 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.
|
@@ -1618,7 +1452,6 @@ module Stripe
|
|
1618
1452
|
discountable: nil,
|
1619
1453
|
discounts: nil,
|
1620
1454
|
invoice_item: nil,
|
1621
|
-
margins: nil,
|
1622
1455
|
metadata: nil,
|
1623
1456
|
period: nil,
|
1624
1457
|
price_data: nil,
|
@@ -1632,7 +1465,6 @@ module Stripe
|
|
1632
1465
|
@discountable = discountable
|
1633
1466
|
@discounts = discounts
|
1634
1467
|
@invoice_item = invoice_item
|
1635
|
-
@margins = margins
|
1636
1468
|
@metadata = metadata
|
1637
1469
|
@period = period
|
1638
1470
|
@price_data = price_data
|
@@ -1656,63 +1488,6 @@ module Stripe
|
|
1656
1488
|
end
|
1657
1489
|
end
|
1658
1490
|
|
1659
|
-
class AttachPaymentParams < Stripe::RequestParams
|
1660
|
-
class PaymentRecordData < Stripe::RequestParams
|
1661
|
-
# The amount that was paid out of band.
|
1662
|
-
attr_accessor :amount
|
1663
|
-
# The currency that was paid out of band.
|
1664
|
-
attr_accessor :currency
|
1665
|
-
# 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`.
|
1666
|
-
attr_accessor :metadata
|
1667
|
-
# The type of money movement for this out of band payment record.
|
1668
|
-
attr_accessor :money_movement_type
|
1669
|
-
# The timestamp when this out of band payment was paid.
|
1670
|
-
attr_accessor :paid_at
|
1671
|
-
# The reference for this out of band payment record.
|
1672
|
-
attr_accessor :payment_reference
|
1673
|
-
|
1674
|
-
def initialize(
|
1675
|
-
amount: nil,
|
1676
|
-
currency: nil,
|
1677
|
-
metadata: nil,
|
1678
|
-
money_movement_type: nil,
|
1679
|
-
paid_at: nil,
|
1680
|
-
payment_reference: nil
|
1681
|
-
)
|
1682
|
-
@amount = amount
|
1683
|
-
@currency = currency
|
1684
|
-
@metadata = metadata
|
1685
|
-
@money_movement_type = money_movement_type
|
1686
|
-
@paid_at = paid_at
|
1687
|
-
@payment_reference = payment_reference
|
1688
|
-
end
|
1689
|
-
end
|
1690
|
-
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
1691
|
-
attr_accessor :amount_requested
|
1692
|
-
# Specifies which fields in the response should be expanded.
|
1693
|
-
attr_accessor :expand
|
1694
|
-
# The ID of the PaymentIntent to attach to the invoice.
|
1695
|
-
attr_accessor :payment_intent
|
1696
|
-
# The ID of the PaymentRecord to attach to the invoice.
|
1697
|
-
attr_accessor :payment_record
|
1698
|
-
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
1699
|
-
attr_accessor :payment_record_data
|
1700
|
-
|
1701
|
-
def initialize(
|
1702
|
-
amount_requested: nil,
|
1703
|
-
expand: nil,
|
1704
|
-
payment_intent: nil,
|
1705
|
-
payment_record: nil,
|
1706
|
-
payment_record_data: nil
|
1707
|
-
)
|
1708
|
-
@amount_requested = amount_requested
|
1709
|
-
@expand = expand
|
1710
|
-
@payment_intent = payment_intent
|
1711
|
-
@payment_record = payment_record
|
1712
|
-
@payment_record_data = payment_record_data
|
1713
|
-
end
|
1714
|
-
end
|
1715
|
-
|
1716
1491
|
class FinalizeInvoiceParams < Stripe::RequestParams
|
1717
1492
|
# 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.
|
1718
1493
|
attr_accessor :auto_advance
|
@@ -1809,44 +1584,16 @@ module Stripe
|
|
1809
1584
|
class UpdateLinesParams < Stripe::RequestParams
|
1810
1585
|
class Line < Stripe::RequestParams
|
1811
1586
|
class Discount < Stripe::RequestParams
|
1812
|
-
class DiscountEnd < Stripe::RequestParams
|
1813
|
-
class Duration < Stripe::RequestParams
|
1814
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1815
|
-
attr_accessor :interval
|
1816
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1817
|
-
attr_accessor :interval_count
|
1818
|
-
|
1819
|
-
def initialize(interval: nil, interval_count: nil)
|
1820
|
-
@interval = interval
|
1821
|
-
@interval_count = interval_count
|
1822
|
-
end
|
1823
|
-
end
|
1824
|
-
# Time span for the redeemed discount.
|
1825
|
-
attr_accessor :duration
|
1826
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1827
|
-
attr_accessor :timestamp
|
1828
|
-
# The type of calculation made to determine when the discount ends.
|
1829
|
-
attr_accessor :type
|
1830
|
-
|
1831
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1832
|
-
@duration = duration
|
1833
|
-
@timestamp = timestamp
|
1834
|
-
@type = type
|
1835
|
-
end
|
1836
|
-
end
|
1837
1587
|
# ID of the coupon to create a new discount for.
|
1838
1588
|
attr_accessor :coupon
|
1839
1589
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1840
1590
|
attr_accessor :discount
|
1841
|
-
# Details to determine how long the discount should be applied for.
|
1842
|
-
attr_accessor :discount_end
|
1843
1591
|
# ID of the promotion code to create a new discount for.
|
1844
1592
|
attr_accessor :promotion_code
|
1845
1593
|
|
1846
|
-
def initialize(coupon: nil, discount: nil,
|
1594
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1847
1595
|
@coupon = coupon
|
1848
1596
|
@discount = discount
|
1849
|
-
@discount_end = discount_end
|
1850
1597
|
@promotion_code = promotion_code
|
1851
1598
|
end
|
1852
1599
|
end
|
@@ -1999,8 +1746,6 @@ module Stripe
|
|
1999
1746
|
attr_accessor :discounts
|
2000
1747
|
# ID of an existing line item on the invoice.
|
2001
1748
|
attr_accessor :id
|
2002
|
-
# 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.
|
2003
|
-
attr_accessor :margins
|
2004
1749
|
# 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.
|
2005
1750
|
attr_accessor :metadata
|
2006
1751
|
# 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.
|
@@ -2022,7 +1767,6 @@ module Stripe
|
|
2022
1767
|
discountable: nil,
|
2023
1768
|
discounts: nil,
|
2024
1769
|
id: nil,
|
2025
|
-
margins: nil,
|
2026
1770
|
metadata: nil,
|
2027
1771
|
period: nil,
|
2028
1772
|
price_data: nil,
|
@@ -2036,7 +1780,6 @@ module Stripe
|
|
2036
1780
|
@discountable = discountable
|
2037
1781
|
@discounts = discounts
|
2038
1782
|
@id = id
|
2039
|
-
@margins = margins
|
2040
1783
|
@metadata = metadata
|
2041
1784
|
@period = period
|
2042
1785
|
@price_data = price_data
|
@@ -2180,7 +1923,7 @@ module Stripe
|
|
2180
1923
|
end
|
2181
1924
|
|
2182
1925
|
class TaxId < Stripe::RequestParams
|
2183
|
-
# 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`
|
1926
|
+
# 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`
|
2184
1927
|
attr_accessor :type
|
2185
1928
|
# Value of the tax ID.
|
2186
1929
|
attr_accessor :value
|
@@ -2211,88 +1954,32 @@ module Stripe
|
|
2211
1954
|
end
|
2212
1955
|
|
2213
1956
|
class Discount < Stripe::RequestParams
|
2214
|
-
class DiscountEnd < Stripe::RequestParams
|
2215
|
-
class Duration < Stripe::RequestParams
|
2216
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2217
|
-
attr_accessor :interval
|
2218
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2219
|
-
attr_accessor :interval_count
|
2220
|
-
|
2221
|
-
def initialize(interval: nil, interval_count: nil)
|
2222
|
-
@interval = interval
|
2223
|
-
@interval_count = interval_count
|
2224
|
-
end
|
2225
|
-
end
|
2226
|
-
# Time span for the redeemed discount.
|
2227
|
-
attr_accessor :duration
|
2228
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2229
|
-
attr_accessor :timestamp
|
2230
|
-
# The type of calculation made to determine when the discount ends.
|
2231
|
-
attr_accessor :type
|
2232
|
-
|
2233
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2234
|
-
@duration = duration
|
2235
|
-
@timestamp = timestamp
|
2236
|
-
@type = type
|
2237
|
-
end
|
2238
|
-
end
|
2239
1957
|
# ID of the coupon to create a new discount for.
|
2240
1958
|
attr_accessor :coupon
|
2241
1959
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2242
1960
|
attr_accessor :discount
|
2243
|
-
# Details to determine how long the discount should be applied for.
|
2244
|
-
attr_accessor :discount_end
|
2245
1961
|
# ID of the promotion code to create a new discount for.
|
2246
1962
|
attr_accessor :promotion_code
|
2247
1963
|
|
2248
|
-
def initialize(coupon: nil, discount: nil,
|
1964
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2249
1965
|
@coupon = coupon
|
2250
1966
|
@discount = discount
|
2251
|
-
@discount_end = discount_end
|
2252
1967
|
@promotion_code = promotion_code
|
2253
1968
|
end
|
2254
1969
|
end
|
2255
1970
|
|
2256
1971
|
class InvoiceItem < Stripe::RequestParams
|
2257
1972
|
class Discount < Stripe::RequestParams
|
2258
|
-
class DiscountEnd < Stripe::RequestParams
|
2259
|
-
class Duration < Stripe::RequestParams
|
2260
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2261
|
-
attr_accessor :interval
|
2262
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2263
|
-
attr_accessor :interval_count
|
2264
|
-
|
2265
|
-
def initialize(interval: nil, interval_count: nil)
|
2266
|
-
@interval = interval
|
2267
|
-
@interval_count = interval_count
|
2268
|
-
end
|
2269
|
-
end
|
2270
|
-
# Time span for the redeemed discount.
|
2271
|
-
attr_accessor :duration
|
2272
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2273
|
-
attr_accessor :timestamp
|
2274
|
-
# The type of calculation made to determine when the discount ends.
|
2275
|
-
attr_accessor :type
|
2276
|
-
|
2277
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2278
|
-
@duration = duration
|
2279
|
-
@timestamp = timestamp
|
2280
|
-
@type = type
|
2281
|
-
end
|
2282
|
-
end
|
2283
1973
|
# ID of the coupon to create a new discount for.
|
2284
1974
|
attr_accessor :coupon
|
2285
1975
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2286
1976
|
attr_accessor :discount
|
2287
|
-
# Details to determine how long the discount should be applied for.
|
2288
|
-
attr_accessor :discount_end
|
2289
1977
|
# ID of the promotion code to create a new discount for.
|
2290
1978
|
attr_accessor :promotion_code
|
2291
1979
|
|
2292
|
-
def initialize(coupon: nil, discount: nil,
|
1980
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2293
1981
|
@coupon = coupon
|
2294
1982
|
@discount = discount
|
2295
|
-
@discount_end = discount_end
|
2296
1983
|
@promotion_code = promotion_code
|
2297
1984
|
end
|
2298
1985
|
end
|
@@ -2418,499 +2105,19 @@ module Stripe
|
|
2418
2105
|
end
|
2419
2106
|
|
2420
2107
|
class ScheduleDetails < Stripe::RequestParams
|
2421
|
-
class Amendment < Stripe::RequestParams
|
2422
|
-
class AmendmentEnd < Stripe::RequestParams
|
2423
|
-
class DiscountEnd < Stripe::RequestParams
|
2424
|
-
# The ID of a specific discount.
|
2425
|
-
attr_accessor :discount
|
2426
|
-
|
2427
|
-
def initialize(discount: nil)
|
2428
|
-
@discount = discount
|
2429
|
-
end
|
2430
|
-
end
|
2431
|
-
|
2432
|
-
class Duration < Stripe::RequestParams
|
2433
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2434
|
-
attr_accessor :interval
|
2435
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2436
|
-
attr_accessor :interval_count
|
2437
|
-
|
2438
|
-
def initialize(interval: nil, interval_count: nil)
|
2439
|
-
@interval = interval
|
2440
|
-
@interval_count = interval_count
|
2441
|
-
end
|
2442
|
-
end
|
2443
|
-
# Use the `end` time of a given discount.
|
2444
|
-
attr_accessor :discount_end
|
2445
|
-
# Time span for the amendment starting from the `amendment_start`.
|
2446
|
-
attr_accessor :duration
|
2447
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2448
|
-
attr_accessor :timestamp
|
2449
|
-
# Select one of three ways to pass the `amendment_end`.
|
2450
|
-
attr_accessor :type
|
2451
|
-
|
2452
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2453
|
-
@discount_end = discount_end
|
2454
|
-
@duration = duration
|
2455
|
-
@timestamp = timestamp
|
2456
|
-
@type = type
|
2457
|
-
end
|
2458
|
-
end
|
2459
|
-
|
2460
|
-
class AmendmentStart < Stripe::RequestParams
|
2461
|
-
class AmendmentEnd < Stripe::RequestParams
|
2462
|
-
# 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.
|
2463
|
-
attr_accessor :index
|
2464
|
-
|
2465
|
-
def initialize(index: nil)
|
2466
|
-
@index = index
|
2467
|
-
end
|
2468
|
-
end
|
2469
|
-
|
2470
|
-
class DiscountEnd < Stripe::RequestParams
|
2471
|
-
# The ID of a specific discount.
|
2472
|
-
attr_accessor :discount
|
2473
|
-
|
2474
|
-
def initialize(discount: nil)
|
2475
|
-
@discount = discount
|
2476
|
-
end
|
2477
|
-
end
|
2478
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2479
|
-
attr_accessor :amendment_end
|
2480
|
-
# Use the `end` time of a given discount.
|
2481
|
-
attr_accessor :discount_end
|
2482
|
-
# A precise Unix timestamp for the amendment to start.
|
2483
|
-
attr_accessor :timestamp
|
2484
|
-
# Select one of three ways to pass the `amendment_start`.
|
2485
|
-
attr_accessor :type
|
2486
|
-
|
2487
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2488
|
-
@amendment_end = amendment_end
|
2489
|
-
@discount_end = discount_end
|
2490
|
-
@timestamp = timestamp
|
2491
|
-
@type = type
|
2492
|
-
end
|
2493
|
-
end
|
2494
|
-
|
2495
|
-
class DiscountAction < Stripe::RequestParams
|
2496
|
-
class Add < Stripe::RequestParams
|
2497
|
-
class DiscountEnd < Stripe::RequestParams
|
2498
|
-
# The type of calculation made to determine when the discount ends.
|
2499
|
-
attr_accessor :type
|
2500
|
-
|
2501
|
-
def initialize(type: nil)
|
2502
|
-
@type = type
|
2503
|
-
end
|
2504
|
-
end
|
2505
|
-
# The coupon code to redeem.
|
2506
|
-
attr_accessor :coupon
|
2507
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
2508
|
-
attr_accessor :discount
|
2509
|
-
# Details to determine how long the discount should be applied for.
|
2510
|
-
attr_accessor :discount_end
|
2511
|
-
# 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.
|
2512
|
-
attr_accessor :index
|
2513
|
-
# The promotion code to redeem.
|
2514
|
-
attr_accessor :promotion_code
|
2515
|
-
|
2516
|
-
def initialize(
|
2517
|
-
coupon: nil,
|
2518
|
-
discount: nil,
|
2519
|
-
discount_end: nil,
|
2520
|
-
index: nil,
|
2521
|
-
promotion_code: nil
|
2522
|
-
)
|
2523
|
-
@coupon = coupon
|
2524
|
-
@discount = discount
|
2525
|
-
@discount_end = discount_end
|
2526
|
-
@index = index
|
2527
|
-
@promotion_code = promotion_code
|
2528
|
-
end
|
2529
|
-
end
|
2530
|
-
|
2531
|
-
class Remove < Stripe::RequestParams
|
2532
|
-
# The coupon code to remove from the `discounts` array.
|
2533
|
-
attr_accessor :coupon
|
2534
|
-
# The ID of a discount to remove from the `discounts` array.
|
2535
|
-
attr_accessor :discount
|
2536
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
2537
|
-
attr_accessor :promotion_code
|
2538
|
-
|
2539
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2540
|
-
@coupon = coupon
|
2541
|
-
@discount = discount
|
2542
|
-
@promotion_code = promotion_code
|
2543
|
-
end
|
2544
|
-
end
|
2545
|
-
|
2546
|
-
class Set < Stripe::RequestParams
|
2547
|
-
# The coupon code to replace the `discounts` array with.
|
2548
|
-
attr_accessor :coupon
|
2549
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
2550
|
-
attr_accessor :discount
|
2551
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
2552
|
-
attr_accessor :promotion_code
|
2553
|
-
|
2554
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2555
|
-
@coupon = coupon
|
2556
|
-
@discount = discount
|
2557
|
-
@promotion_code = promotion_code
|
2558
|
-
end
|
2559
|
-
end
|
2560
|
-
# Details of the discount to add.
|
2561
|
-
attr_accessor :add
|
2562
|
-
# Details of the discount to remove.
|
2563
|
-
attr_accessor :remove
|
2564
|
-
# Details of the discount to replace the existing discounts with.
|
2565
|
-
attr_accessor :set
|
2566
|
-
# Determines the type of discount action.
|
2567
|
-
attr_accessor :type
|
2568
|
-
|
2569
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2570
|
-
@add = add
|
2571
|
-
@remove = remove
|
2572
|
-
@set = set
|
2573
|
-
@type = type
|
2574
|
-
end
|
2575
|
-
end
|
2576
|
-
|
2577
|
-
class ItemAction < Stripe::RequestParams
|
2578
|
-
class Add < Stripe::RequestParams
|
2579
|
-
class Discount < Stripe::RequestParams
|
2580
|
-
class DiscountEnd < Stripe::RequestParams
|
2581
|
-
class Duration < Stripe::RequestParams
|
2582
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2583
|
-
attr_accessor :interval
|
2584
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2585
|
-
attr_accessor :interval_count
|
2586
|
-
|
2587
|
-
def initialize(interval: nil, interval_count: nil)
|
2588
|
-
@interval = interval
|
2589
|
-
@interval_count = interval_count
|
2590
|
-
end
|
2591
|
-
end
|
2592
|
-
# Time span for the redeemed discount.
|
2593
|
-
attr_accessor :duration
|
2594
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2595
|
-
attr_accessor :timestamp
|
2596
|
-
# The type of calculation made to determine when the discount ends.
|
2597
|
-
attr_accessor :type
|
2598
|
-
|
2599
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2600
|
-
@duration = duration
|
2601
|
-
@timestamp = timestamp
|
2602
|
-
@type = type
|
2603
|
-
end
|
2604
|
-
end
|
2605
|
-
# ID of the coupon to create a new discount for.
|
2606
|
-
attr_accessor :coupon
|
2607
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2608
|
-
attr_accessor :discount
|
2609
|
-
# Details to determine how long the discount should be applied for.
|
2610
|
-
attr_accessor :discount_end
|
2611
|
-
# ID of the promotion code to create a new discount for.
|
2612
|
-
attr_accessor :promotion_code
|
2613
|
-
|
2614
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2615
|
-
@coupon = coupon
|
2616
|
-
@discount = discount
|
2617
|
-
@discount_end = discount_end
|
2618
|
-
@promotion_code = promotion_code
|
2619
|
-
end
|
2620
|
-
end
|
2621
|
-
|
2622
|
-
class Trial < Stripe::RequestParams
|
2623
|
-
# 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.
|
2624
|
-
attr_accessor :converts_to
|
2625
|
-
# Determines the type of trial for this item.
|
2626
|
-
attr_accessor :type
|
2627
|
-
|
2628
|
-
def initialize(converts_to: nil, type: nil)
|
2629
|
-
@converts_to = converts_to
|
2630
|
-
@type = type
|
2631
|
-
end
|
2632
|
-
end
|
2633
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2634
|
-
attr_accessor :discounts
|
2635
|
-
# 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`.
|
2636
|
-
attr_accessor :metadata
|
2637
|
-
# The ID of the price object.
|
2638
|
-
attr_accessor :price
|
2639
|
-
# Quantity for this item.
|
2640
|
-
attr_accessor :quantity
|
2641
|
-
# 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`.
|
2642
|
-
attr_accessor :tax_rates
|
2643
|
-
# Options that configure the trial on the subscription item.
|
2644
|
-
attr_accessor :trial
|
2645
|
-
|
2646
|
-
def initialize(
|
2647
|
-
discounts: nil,
|
2648
|
-
metadata: nil,
|
2649
|
-
price: nil,
|
2650
|
-
quantity: nil,
|
2651
|
-
tax_rates: nil,
|
2652
|
-
trial: nil
|
2653
|
-
)
|
2654
|
-
@discounts = discounts
|
2655
|
-
@metadata = metadata
|
2656
|
-
@price = price
|
2657
|
-
@quantity = quantity
|
2658
|
-
@tax_rates = tax_rates
|
2659
|
-
@trial = trial
|
2660
|
-
end
|
2661
|
-
end
|
2662
|
-
|
2663
|
-
class Remove < Stripe::RequestParams
|
2664
|
-
# ID of a price to remove.
|
2665
|
-
attr_accessor :price
|
2666
|
-
|
2667
|
-
def initialize(price: nil)
|
2668
|
-
@price = price
|
2669
|
-
end
|
2670
|
-
end
|
2671
|
-
|
2672
|
-
class Set < Stripe::RequestParams
|
2673
|
-
class Discount < Stripe::RequestParams
|
2674
|
-
class DiscountEnd < Stripe::RequestParams
|
2675
|
-
class Duration < Stripe::RequestParams
|
2676
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2677
|
-
attr_accessor :interval
|
2678
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2679
|
-
attr_accessor :interval_count
|
2680
|
-
|
2681
|
-
def initialize(interval: nil, interval_count: nil)
|
2682
|
-
@interval = interval
|
2683
|
-
@interval_count = interval_count
|
2684
|
-
end
|
2685
|
-
end
|
2686
|
-
# Time span for the redeemed discount.
|
2687
|
-
attr_accessor :duration
|
2688
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2689
|
-
attr_accessor :timestamp
|
2690
|
-
# The type of calculation made to determine when the discount ends.
|
2691
|
-
attr_accessor :type
|
2692
|
-
|
2693
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2694
|
-
@duration = duration
|
2695
|
-
@timestamp = timestamp
|
2696
|
-
@type = type
|
2697
|
-
end
|
2698
|
-
end
|
2699
|
-
# ID of the coupon to create a new discount for.
|
2700
|
-
attr_accessor :coupon
|
2701
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2702
|
-
attr_accessor :discount
|
2703
|
-
# Details to determine how long the discount should be applied for.
|
2704
|
-
attr_accessor :discount_end
|
2705
|
-
# ID of the promotion code to create a new discount for.
|
2706
|
-
attr_accessor :promotion_code
|
2707
|
-
|
2708
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2709
|
-
@coupon = coupon
|
2710
|
-
@discount = discount
|
2711
|
-
@discount_end = discount_end
|
2712
|
-
@promotion_code = promotion_code
|
2713
|
-
end
|
2714
|
-
end
|
2715
|
-
|
2716
|
-
class Trial < Stripe::RequestParams
|
2717
|
-
# 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.
|
2718
|
-
attr_accessor :converts_to
|
2719
|
-
# Determines the type of trial for this item.
|
2720
|
-
attr_accessor :type
|
2721
|
-
|
2722
|
-
def initialize(converts_to: nil, type: nil)
|
2723
|
-
@converts_to = converts_to
|
2724
|
-
@type = type
|
2725
|
-
end
|
2726
|
-
end
|
2727
|
-
# 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`.
|
2728
|
-
attr_accessor :discounts
|
2729
|
-
# 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`.
|
2730
|
-
attr_accessor :metadata
|
2731
|
-
# The ID of the price object.
|
2732
|
-
attr_accessor :price
|
2733
|
-
# 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`.
|
2734
|
-
attr_accessor :quantity
|
2735
|
-
# 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`.
|
2736
|
-
attr_accessor :tax_rates
|
2737
|
-
# 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`.
|
2738
|
-
attr_accessor :trial
|
2739
|
-
|
2740
|
-
def initialize(
|
2741
|
-
discounts: nil,
|
2742
|
-
metadata: nil,
|
2743
|
-
price: nil,
|
2744
|
-
quantity: nil,
|
2745
|
-
tax_rates: nil,
|
2746
|
-
trial: nil
|
2747
|
-
)
|
2748
|
-
@discounts = discounts
|
2749
|
-
@metadata = metadata
|
2750
|
-
@price = price
|
2751
|
-
@quantity = quantity
|
2752
|
-
@tax_rates = tax_rates
|
2753
|
-
@trial = trial
|
2754
|
-
end
|
2755
|
-
end
|
2756
|
-
# 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.
|
2757
|
-
attr_accessor :add
|
2758
|
-
# Details of the subscription item to remove.
|
2759
|
-
attr_accessor :remove
|
2760
|
-
# 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.
|
2761
|
-
attr_accessor :set
|
2762
|
-
# Determines the type of item action.
|
2763
|
-
attr_accessor :type
|
2764
|
-
|
2765
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2766
|
-
@add = add
|
2767
|
-
@remove = remove
|
2768
|
-
@set = set
|
2769
|
-
@type = type
|
2770
|
-
end
|
2771
|
-
end
|
2772
|
-
|
2773
|
-
class MetadataAction < Stripe::RequestParams
|
2774
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2775
|
-
attr_accessor :add
|
2776
|
-
# Keys to remove from schedule phase metadata.
|
2777
|
-
attr_accessor :remove
|
2778
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2779
|
-
attr_accessor :set
|
2780
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2781
|
-
attr_accessor :type
|
2782
|
-
|
2783
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2784
|
-
@add = add
|
2785
|
-
@remove = remove
|
2786
|
-
@set = set
|
2787
|
-
@type = type
|
2788
|
-
end
|
2789
|
-
end
|
2790
|
-
|
2791
|
-
class SetPauseCollection < Stripe::RequestParams
|
2792
|
-
class Set < Stripe::RequestParams
|
2793
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2794
|
-
attr_accessor :behavior
|
2795
|
-
|
2796
|
-
def initialize(behavior: nil)
|
2797
|
-
@behavior = behavior
|
2798
|
-
end
|
2799
|
-
end
|
2800
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2801
|
-
attr_accessor :set
|
2802
|
-
# Determines the type of the pause_collection amendment.
|
2803
|
-
attr_accessor :type
|
2804
|
-
|
2805
|
-
def initialize(set: nil, type: nil)
|
2806
|
-
@set = set
|
2807
|
-
@type = type
|
2808
|
-
end
|
2809
|
-
end
|
2810
|
-
|
2811
|
-
class TrialSettings < Stripe::RequestParams
|
2812
|
-
class EndBehavior < Stripe::RequestParams
|
2813
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2814
|
-
attr_accessor :prorate_up_front
|
2815
|
-
|
2816
|
-
def initialize(prorate_up_front: nil)
|
2817
|
-
@prorate_up_front = prorate_up_front
|
2818
|
-
end
|
2819
|
-
end
|
2820
|
-
# Defines how the subscription should behave when a trial ends.
|
2821
|
-
attr_accessor :end_behavior
|
2822
|
-
|
2823
|
-
def initialize(end_behavior: nil)
|
2824
|
-
@end_behavior = end_behavior
|
2825
|
-
end
|
2826
|
-
end
|
2827
|
-
# 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.
|
2828
|
-
attr_accessor :amendment_end
|
2829
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2830
|
-
attr_accessor :amendment_start
|
2831
|
-
# 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.
|
2832
|
-
attr_accessor :billing_cycle_anchor
|
2833
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2834
|
-
attr_accessor :discount_actions
|
2835
|
-
# Changes to the subscription items during the amendment time span.
|
2836
|
-
attr_accessor :item_actions
|
2837
|
-
# Instructions for how to modify phase metadata
|
2838
|
-
attr_accessor :metadata_actions
|
2839
|
-
# 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`.
|
2840
|
-
attr_accessor :proration_behavior
|
2841
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2842
|
-
attr_accessor :set_pause_collection
|
2843
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2844
|
-
attr_accessor :set_schedule_end
|
2845
|
-
# Settings related to subscription trials.
|
2846
|
-
attr_accessor :trial_settings
|
2847
|
-
|
2848
|
-
def initialize(
|
2849
|
-
amendment_end: nil,
|
2850
|
-
amendment_start: nil,
|
2851
|
-
billing_cycle_anchor: nil,
|
2852
|
-
discount_actions: nil,
|
2853
|
-
item_actions: nil,
|
2854
|
-
metadata_actions: nil,
|
2855
|
-
proration_behavior: nil,
|
2856
|
-
set_pause_collection: nil,
|
2857
|
-
set_schedule_end: nil,
|
2858
|
-
trial_settings: nil
|
2859
|
-
)
|
2860
|
-
@amendment_end = amendment_end
|
2861
|
-
@amendment_start = amendment_start
|
2862
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2863
|
-
@discount_actions = discount_actions
|
2864
|
-
@item_actions = item_actions
|
2865
|
-
@metadata_actions = metadata_actions
|
2866
|
-
@proration_behavior = proration_behavior
|
2867
|
-
@set_pause_collection = set_pause_collection
|
2868
|
-
@set_schedule_end = set_schedule_end
|
2869
|
-
@trial_settings = trial_settings
|
2870
|
-
end
|
2871
|
-
end
|
2872
|
-
|
2873
2108
|
class Phase < Stripe::RequestParams
|
2874
2109
|
class AddInvoiceItem < Stripe::RequestParams
|
2875
2110
|
class Discount < Stripe::RequestParams
|
2876
|
-
class DiscountEnd < Stripe::RequestParams
|
2877
|
-
class Duration < Stripe::RequestParams
|
2878
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2879
|
-
attr_accessor :interval
|
2880
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2881
|
-
attr_accessor :interval_count
|
2882
|
-
|
2883
|
-
def initialize(interval: nil, interval_count: nil)
|
2884
|
-
@interval = interval
|
2885
|
-
@interval_count = interval_count
|
2886
|
-
end
|
2887
|
-
end
|
2888
|
-
# Time span for the redeemed discount.
|
2889
|
-
attr_accessor :duration
|
2890
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2891
|
-
attr_accessor :timestamp
|
2892
|
-
# The type of calculation made to determine when the discount ends.
|
2893
|
-
attr_accessor :type
|
2894
|
-
|
2895
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2896
|
-
@duration = duration
|
2897
|
-
@timestamp = timestamp
|
2898
|
-
@type = type
|
2899
|
-
end
|
2900
|
-
end
|
2901
2111
|
# ID of the coupon to create a new discount for.
|
2902
2112
|
attr_accessor :coupon
|
2903
2113
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2904
2114
|
attr_accessor :discount
|
2905
|
-
# Details to determine how long the discount should be applied for.
|
2906
|
-
attr_accessor :discount_end
|
2907
2115
|
# ID of the promotion code to create a new discount for.
|
2908
2116
|
attr_accessor :promotion_code
|
2909
2117
|
|
2910
|
-
def initialize(coupon: nil, discount: nil,
|
2118
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2911
2119
|
@coupon = coupon
|
2912
2120
|
@discount = discount
|
2913
|
-
@discount_end = discount_end
|
2914
2121
|
@promotion_code = promotion_code
|
2915
2122
|
end
|
2916
2123
|
end
|
@@ -2991,44 +2198,16 @@ module Stripe
|
|
2991
2198
|
end
|
2992
2199
|
|
2993
2200
|
class Discount < Stripe::RequestParams
|
2994
|
-
class DiscountEnd < Stripe::RequestParams
|
2995
|
-
class Duration < Stripe::RequestParams
|
2996
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2997
|
-
attr_accessor :interval
|
2998
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2999
|
-
attr_accessor :interval_count
|
3000
|
-
|
3001
|
-
def initialize(interval: nil, interval_count: nil)
|
3002
|
-
@interval = interval
|
3003
|
-
@interval_count = interval_count
|
3004
|
-
end
|
3005
|
-
end
|
3006
|
-
# Time span for the redeemed discount.
|
3007
|
-
attr_accessor :duration
|
3008
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3009
|
-
attr_accessor :timestamp
|
3010
|
-
# The type of calculation made to determine when the discount ends.
|
3011
|
-
attr_accessor :type
|
3012
|
-
|
3013
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3014
|
-
@duration = duration
|
3015
|
-
@timestamp = timestamp
|
3016
|
-
@type = type
|
3017
|
-
end
|
3018
|
-
end
|
3019
2201
|
# ID of the coupon to create a new discount for.
|
3020
2202
|
attr_accessor :coupon
|
3021
2203
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3022
2204
|
attr_accessor :discount
|
3023
|
-
# Details to determine how long the discount should be applied for.
|
3024
|
-
attr_accessor :discount_end
|
3025
2205
|
# ID of the promotion code to create a new discount for.
|
3026
2206
|
attr_accessor :promotion_code
|
3027
2207
|
|
3028
|
-
def initialize(coupon: nil, discount: nil,
|
2208
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3029
2209
|
@coupon = coupon
|
3030
2210
|
@discount = discount
|
3031
|
-
@discount_end = discount_end
|
3032
2211
|
@promotion_code = promotion_code
|
3033
2212
|
end
|
3034
2213
|
end
|
@@ -3061,44 +2240,16 @@ module Stripe
|
|
3061
2240
|
|
3062
2241
|
class Item < Stripe::RequestParams
|
3063
2242
|
class Discount < Stripe::RequestParams
|
3064
|
-
class DiscountEnd < Stripe::RequestParams
|
3065
|
-
class Duration < Stripe::RequestParams
|
3066
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3067
|
-
attr_accessor :interval
|
3068
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3069
|
-
attr_accessor :interval_count
|
3070
|
-
|
3071
|
-
def initialize(interval: nil, interval_count: nil)
|
3072
|
-
@interval = interval
|
3073
|
-
@interval_count = interval_count
|
3074
|
-
end
|
3075
|
-
end
|
3076
|
-
# Time span for the redeemed discount.
|
3077
|
-
attr_accessor :duration
|
3078
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3079
|
-
attr_accessor :timestamp
|
3080
|
-
# The type of calculation made to determine when the discount ends.
|
3081
|
-
attr_accessor :type
|
3082
|
-
|
3083
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3084
|
-
@duration = duration
|
3085
|
-
@timestamp = timestamp
|
3086
|
-
@type = type
|
3087
|
-
end
|
3088
|
-
end
|
3089
2243
|
# ID of the coupon to create a new discount for.
|
3090
2244
|
attr_accessor :coupon
|
3091
2245
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3092
2246
|
attr_accessor :discount
|
3093
|
-
# Details to determine how long the discount should be applied for.
|
3094
|
-
attr_accessor :discount_end
|
3095
2247
|
# ID of the promotion code to create a new discount for.
|
3096
2248
|
attr_accessor :promotion_code
|
3097
2249
|
|
3098
|
-
def initialize(coupon: nil, discount: nil,
|
2250
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3099
2251
|
@coupon = coupon
|
3100
2252
|
@discount = discount
|
3101
|
-
@discount_end = discount_end
|
3102
2253
|
@promotion_code = promotion_code
|
3103
2254
|
end
|
3104
2255
|
end
|
@@ -3144,18 +2295,6 @@ module Stripe
|
|
3144
2295
|
@unit_amount_decimal = unit_amount_decimal
|
3145
2296
|
end
|
3146
2297
|
end
|
3147
|
-
|
3148
|
-
class Trial < Stripe::RequestParams
|
3149
|
-
# 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.
|
3150
|
-
attr_accessor :converts_to
|
3151
|
-
# Determines the type of trial for this item.
|
3152
|
-
attr_accessor :type
|
3153
|
-
|
3154
|
-
def initialize(converts_to: nil, type: nil)
|
3155
|
-
@converts_to = converts_to
|
3156
|
-
@type = type
|
3157
|
-
end
|
3158
|
-
end
|
3159
2298
|
# The coupons to redeem into discounts for the subscription item.
|
3160
2299
|
attr_accessor :discounts
|
3161
2300
|
# 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`.
|
@@ -3170,8 +2309,6 @@ module Stripe
|
|
3170
2309
|
attr_accessor :quantity
|
3171
2310
|
# 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.
|
3172
2311
|
attr_accessor :tax_rates
|
3173
|
-
# Options that configure the trial on the subscription item.
|
3174
|
-
attr_accessor :trial
|
3175
2312
|
|
3176
2313
|
def initialize(
|
3177
2314
|
discounts: nil,
|
@@ -3180,8 +2317,7 @@ module Stripe
|
|
3180
2317
|
price: nil,
|
3181
2318
|
price_data: nil,
|
3182
2319
|
quantity: nil,
|
3183
|
-
tax_rates: nil
|
3184
|
-
trial: nil
|
2320
|
+
tax_rates: nil
|
3185
2321
|
)
|
3186
2322
|
@discounts = discounts
|
3187
2323
|
@metadata = metadata
|
@@ -3190,16 +2326,6 @@ module Stripe
|
|
3190
2326
|
@price_data = price_data
|
3191
2327
|
@quantity = quantity
|
3192
2328
|
@tax_rates = tax_rates
|
3193
|
-
@trial = trial
|
3194
|
-
end
|
3195
|
-
end
|
3196
|
-
|
3197
|
-
class PauseCollection < Stripe::RequestParams
|
3198
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3199
|
-
attr_accessor :behavior
|
3200
|
-
|
3201
|
-
def initialize(behavior: nil)
|
3202
|
-
@behavior = behavior
|
3203
2329
|
end
|
3204
2330
|
end
|
3205
2331
|
|
@@ -3214,23 +2340,6 @@ module Stripe
|
|
3214
2340
|
@destination = destination
|
3215
2341
|
end
|
3216
2342
|
end
|
3217
|
-
|
3218
|
-
class TrialSettings < Stripe::RequestParams
|
3219
|
-
class EndBehavior < Stripe::RequestParams
|
3220
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3221
|
-
attr_accessor :prorate_up_front
|
3222
|
-
|
3223
|
-
def initialize(prorate_up_front: nil)
|
3224
|
-
@prorate_up_front = prorate_up_front
|
3225
|
-
end
|
3226
|
-
end
|
3227
|
-
# Defines how the subscription should behave when a trial ends.
|
3228
|
-
attr_accessor :end_behavior
|
3229
|
-
|
3230
|
-
def initialize(end_behavior: nil)
|
3231
|
-
@end_behavior = end_behavior
|
3232
|
-
end
|
3233
|
-
end
|
3234
2343
|
# 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.
|
3235
2344
|
attr_accessor :add_invoice_items
|
3236
2345
|
# 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).
|
@@ -3263,8 +2372,6 @@ module Stripe
|
|
3263
2372
|
attr_accessor :metadata
|
3264
2373
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3265
2374
|
attr_accessor :on_behalf_of
|
3266
|
-
# 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).
|
3267
|
-
attr_accessor :pause_collection
|
3268
2375
|
# 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.
|
3269
2376
|
attr_accessor :proration_behavior
|
3270
2377
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -3273,12 +2380,8 @@ module Stripe
|
|
3273
2380
|
attr_accessor :transfer_data
|
3274
2381
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
3275
2382
|
attr_accessor :trial
|
3276
|
-
# Specify trial behavior when crossing phase boundaries
|
3277
|
-
attr_accessor :trial_continuation
|
3278
2383
|
# 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`
|
3279
2384
|
attr_accessor :trial_end
|
3280
|
-
# Settings related to subscription trials.
|
3281
|
-
attr_accessor :trial_settings
|
3282
2385
|
|
3283
2386
|
def initialize(
|
3284
2387
|
add_invoice_items: nil,
|
@@ -3297,14 +2400,11 @@ module Stripe
|
|
3297
2400
|
iterations: nil,
|
3298
2401
|
metadata: nil,
|
3299
2402
|
on_behalf_of: nil,
|
3300
|
-
pause_collection: nil,
|
3301
2403
|
proration_behavior: nil,
|
3302
2404
|
start_date: nil,
|
3303
2405
|
transfer_data: nil,
|
3304
2406
|
trial: nil,
|
3305
|
-
|
3306
|
-
trial_end: nil,
|
3307
|
-
trial_settings: nil
|
2407
|
+
trial_end: nil
|
3308
2408
|
)
|
3309
2409
|
@add_invoice_items = add_invoice_items
|
3310
2410
|
@application_fee_percent = application_fee_percent
|
@@ -3322,91 +2422,23 @@ module Stripe
|
|
3322
2422
|
@iterations = iterations
|
3323
2423
|
@metadata = metadata
|
3324
2424
|
@on_behalf_of = on_behalf_of
|
3325
|
-
@pause_collection = pause_collection
|
3326
2425
|
@proration_behavior = proration_behavior
|
3327
2426
|
@start_date = start_date
|
3328
2427
|
@transfer_data = transfer_data
|
3329
2428
|
@trial = trial
|
3330
|
-
@trial_continuation = trial_continuation
|
3331
2429
|
@trial_end = trial_end
|
3332
|
-
@trial_settings = trial_settings
|
3333
2430
|
end
|
3334
2431
|
end
|
3335
|
-
|
3336
|
-
class Prebilling < Stripe::RequestParams
|
3337
|
-
class BillUntil < Stripe::RequestParams
|
3338
|
-
class AmendmentEnd < Stripe::RequestParams
|
3339
|
-
# 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.
|
3340
|
-
attr_accessor :index
|
3341
|
-
|
3342
|
-
def initialize(index: nil)
|
3343
|
-
@index = index
|
3344
|
-
end
|
3345
|
-
end
|
3346
|
-
|
3347
|
-
class Duration < Stripe::RequestParams
|
3348
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3349
|
-
attr_accessor :interval
|
3350
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3351
|
-
attr_accessor :interval_count
|
3352
|
-
|
3353
|
-
def initialize(interval: nil, interval_count: nil)
|
3354
|
-
@interval = interval
|
3355
|
-
@interval_count = interval_count
|
3356
|
-
end
|
3357
|
-
end
|
3358
|
-
# End the prebilled period when a specified amendment ends.
|
3359
|
-
attr_accessor :amendment_end
|
3360
|
-
# Time span for prebilling, starting from `bill_from`.
|
3361
|
-
attr_accessor :duration
|
3362
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3363
|
-
attr_accessor :timestamp
|
3364
|
-
# Select one of several ways to pass the `bill_until` value.
|
3365
|
-
attr_accessor :type
|
3366
|
-
|
3367
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3368
|
-
@amendment_end = amendment_end
|
3369
|
-
@duration = duration
|
3370
|
-
@timestamp = timestamp
|
3371
|
-
@type = type
|
3372
|
-
end
|
3373
|
-
end
|
3374
|
-
# The end of the prebilled time period.
|
3375
|
-
attr_accessor :bill_until
|
3376
|
-
# This is used to determine the number of billing cycles to prebill.
|
3377
|
-
attr_accessor :iterations
|
3378
|
-
|
3379
|
-
def initialize(bill_until: nil, iterations: nil)
|
3380
|
-
@bill_until = bill_until
|
3381
|
-
@iterations = iterations
|
3382
|
-
end
|
3383
|
-
end
|
3384
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3385
|
-
attr_accessor :amendments
|
3386
|
-
# 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.
|
3387
|
-
attr_accessor :billing_behavior
|
3388
2432
|
# 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.
|
3389
2433
|
attr_accessor :end_behavior
|
3390
2434
|
# 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.
|
3391
2435
|
attr_accessor :phases
|
3392
|
-
# Provide any time periods to bill in advance.
|
3393
|
-
attr_accessor :prebilling
|
3394
2436
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
3395
2437
|
attr_accessor :proration_behavior
|
3396
2438
|
|
3397
|
-
def initialize(
|
3398
|
-
amendments: nil,
|
3399
|
-
billing_behavior: nil,
|
3400
|
-
end_behavior: nil,
|
3401
|
-
phases: nil,
|
3402
|
-
prebilling: nil,
|
3403
|
-
proration_behavior: nil
|
3404
|
-
)
|
3405
|
-
@amendments = amendments
|
3406
|
-
@billing_behavior = billing_behavior
|
2439
|
+
def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
|
3407
2440
|
@end_behavior = end_behavior
|
3408
2441
|
@phases = phases
|
3409
|
-
@prebilling = prebilling
|
3410
2442
|
@proration_behavior = proration_behavior
|
3411
2443
|
end
|
3412
2444
|
end
|
@@ -3414,44 +2446,16 @@ module Stripe
|
|
3414
2446
|
class SubscriptionDetails < Stripe::RequestParams
|
3415
2447
|
class Item < Stripe::RequestParams
|
3416
2448
|
class Discount < Stripe::RequestParams
|
3417
|
-
class DiscountEnd < Stripe::RequestParams
|
3418
|
-
class Duration < Stripe::RequestParams
|
3419
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3420
|
-
attr_accessor :interval
|
3421
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3422
|
-
attr_accessor :interval_count
|
3423
|
-
|
3424
|
-
def initialize(interval: nil, interval_count: nil)
|
3425
|
-
@interval = interval
|
3426
|
-
@interval_count = interval_count
|
3427
|
-
end
|
3428
|
-
end
|
3429
|
-
# Time span for the redeemed discount.
|
3430
|
-
attr_accessor :duration
|
3431
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3432
|
-
attr_accessor :timestamp
|
3433
|
-
# The type of calculation made to determine when the discount ends.
|
3434
|
-
attr_accessor :type
|
3435
|
-
|
3436
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3437
|
-
@duration = duration
|
3438
|
-
@timestamp = timestamp
|
3439
|
-
@type = type
|
3440
|
-
end
|
3441
|
-
end
|
3442
2449
|
# ID of the coupon to create a new discount for.
|
3443
2450
|
attr_accessor :coupon
|
3444
2451
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3445
2452
|
attr_accessor :discount
|
3446
|
-
# Details to determine how long the discount should be applied for.
|
3447
|
-
attr_accessor :discount_end
|
3448
2453
|
# ID of the promotion code to create a new discount for.
|
3449
2454
|
attr_accessor :promotion_code
|
3450
2455
|
|
3451
|
-
def initialize(coupon: nil, discount: nil,
|
2456
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3452
2457
|
@coupon = coupon
|
3453
2458
|
@discount = discount
|
3454
|
-
@discount_end = discount_end
|
3455
2459
|
@promotion_code = promotion_code
|
3456
2460
|
end
|
3457
2461
|
end
|
@@ -3542,15 +2546,6 @@ module Stripe
|
|
3542
2546
|
@tax_rates = tax_rates
|
3543
2547
|
end
|
3544
2548
|
end
|
3545
|
-
|
3546
|
-
class Prebilling < Stripe::RequestParams
|
3547
|
-
# This is used to determine the number of billing cycles to prebill.
|
3548
|
-
attr_accessor :iterations
|
3549
|
-
|
3550
|
-
def initialize(iterations: nil)
|
3551
|
-
@iterations = iterations
|
3552
|
-
end
|
3553
|
-
end
|
3554
2549
|
# 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`.
|
3555
2550
|
attr_accessor :billing_cycle_anchor
|
3556
2551
|
# 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.
|
@@ -3563,8 +2558,6 @@ module Stripe
|
|
3563
2558
|
attr_accessor :default_tax_rates
|
3564
2559
|
# A list of up to 20 subscription items, each with an attached price.
|
3565
2560
|
attr_accessor :items
|
3566
|
-
# The pre-billing to apply to the subscription as a preview.
|
3567
|
-
attr_accessor :prebilling
|
3568
2561
|
# 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`.
|
3569
2562
|
attr_accessor :proration_behavior
|
3570
2563
|
# 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'.
|
@@ -3583,7 +2576,6 @@ module Stripe
|
|
3583
2576
|
cancel_now: nil,
|
3584
2577
|
default_tax_rates: nil,
|
3585
2578
|
items: nil,
|
3586
|
-
prebilling: nil,
|
3587
2579
|
proration_behavior: nil,
|
3588
2580
|
proration_date: nil,
|
3589
2581
|
resume_at: nil,
|
@@ -3596,7 +2588,6 @@ module Stripe
|
|
3596
2588
|
@cancel_now = cancel_now
|
3597
2589
|
@default_tax_rates = default_tax_rates
|
3598
2590
|
@items = items
|
3599
|
-
@prebilling = prebilling
|
3600
2591
|
@proration_behavior = proration_behavior
|
3601
2592
|
@proration_date = proration_date
|
3602
2593
|
@resume_at = resume_at
|
@@ -3610,8 +2601,6 @@ module Stripe
|
|
3610
2601
|
attr_accessor :currency
|
3611
2602
|
# 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.
|
3612
2603
|
attr_accessor :customer
|
3613
|
-
# 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.
|
3614
|
-
attr_accessor :customer_account
|
3615
2604
|
# 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.
|
3616
2605
|
attr_accessor :customer_details
|
3617
2606
|
# 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.
|
@@ -3639,7 +2628,6 @@ module Stripe
|
|
3639
2628
|
automatic_tax: nil,
|
3640
2629
|
currency: nil,
|
3641
2630
|
customer: nil,
|
3642
|
-
customer_account: nil,
|
3643
2631
|
customer_details: nil,
|
3644
2632
|
discounts: nil,
|
3645
2633
|
expand: nil,
|
@@ -3655,7 +2643,6 @@ module Stripe
|
|
3655
2643
|
@automatic_tax = automatic_tax
|
3656
2644
|
@currency = currency
|
3657
2645
|
@customer = customer
|
3658
|
-
@customer_account = customer_account
|
3659
2646
|
@customer_details = customer_details
|
3660
2647
|
@discounts = discounts
|
3661
2648
|
@expand = expand
|
@@ -3681,29 +2668,6 @@ module Stripe
|
|
3681
2668
|
)
|
3682
2669
|
end
|
3683
2670
|
|
3684
|
-
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
3685
|
-
#
|
3686
|
-
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
|
3687
|
-
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
|
3688
|
-
#
|
3689
|
-
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
3690
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
3691
|
-
# invoice's status becomes paid.
|
3692
|
-
#
|
3693
|
-
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
3694
|
-
# credited to the invoice immediately.
|
3695
|
-
#
|
3696
|
-
# See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
|
3697
|
-
def attach_payment(invoice, params = {}, opts = {})
|
3698
|
-
request(
|
3699
|
-
method: :post,
|
3700
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(invoice) }),
|
3701
|
-
params: params,
|
3702
|
-
opts: opts,
|
3703
|
-
base_address: :api
|
3704
|
-
)
|
3705
|
-
end
|
3706
|
-
|
3707
2671
|
# 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.
|
3708
2672
|
def create(params = {}, opts = {})
|
3709
2673
|
request(method: :post, path: "/v1/invoices", params: params, opts: opts, base_address: :api)
|