stripe 15.2.0.pre.beta.1 → 15.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +718 -1556
- data/CONTRIBUTING.md +25 -0
- data/OPENAPI_VERSION +1 -1
- data/README.md +10 -7
- 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 +0 -89
- data/lib/stripe/object_types.rb +0 -52
- data/lib/stripe/resources/account.rb +32 -657
- data/lib/stripe/resources/account_session.rb +59 -253
- data/lib/stripe/resources/apple_pay_domain.rb +1 -2
- data/lib/stripe/resources/balance.rb +42 -0
- data/lib/stripe/resources/balance_transaction.rb +2 -0
- data/lib/stripe/resources/bank_account.rb +2 -2
- 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 +1 -7
- data/lib/stripe/resources/capability.rb +1 -1
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +13 -1475
- data/lib/stripe/resources/checkout/session.rb +21 -333
- data/lib/stripe/resources/confirmation_token.rb +33 -263
- data/lib/stripe/resources/country_spec.rb +1 -1
- data/lib/stripe/resources/coupon.rb +2 -32
- data/lib/stripe/resources/credit_note.rb +10 -17
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +2 -6
- 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 +4 -9
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/dispute.rb +2 -2
- data/lib/stripe/resources/event.rb +1 -32
- data/lib/stripe/resources/file.rb +1 -1
- 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_report.rb +6 -0
- data/lib/stripe/resources/identity/verification_session.rb +17 -21
- data/lib/stripe/resources/invoice.rb +79 -1106
- data/lib/stripe/resources/invoice_item.rb +4 -81
- data/lib/stripe/resources/invoice_line_item.rb +2 -56
- data/lib/stripe/resources/invoice_payment.rb +62 -4
- data/lib/stripe/resources/issuing/authorization.rb +8 -8
- data/lib/stripe/resources/issuing/card.rb +1 -1
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/dispute.rb +3 -3
- 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 +1912 -6840
- data/lib/stripe/resources/payment_method.rb +47 -301
- data/lib/stripe/resources/payment_method_configuration.rb +112 -112
- data/lib/stripe/resources/payment_method_domain.rb +2 -2
- data/lib/stripe/resources/payout.rb +4 -10
- data/lib/stripe/resources/person.rb +2 -2
- data/lib/stripe/resources/plan.rb +2 -3
- data/lib/stripe/resources/price.rb +1 -31
- data/lib/stripe/resources/product.rb +1 -61
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +6 -2046
- data/lib/stripe/resources/radar/value_list.rb +1 -2
- data/lib/stripe/resources/radar/value_list_item.rb +1 -2
- data/lib/stripe/resources/refund.rb +6 -10
- data/lib/stripe/resources/reversal.rb +1 -1
- data/lib/stripe/resources/review.rb +1 -1
- data/lib/stripe/resources/setup_attempt.rb +0 -21
- data/lib/stripe/resources/setup_intent.rb +120 -877
- data/lib/stripe/resources/source.rb +1 -30
- data/lib/stripe/resources/subscription.rb +97 -326
- data/lib/stripe/resources/subscription_item.rb +32 -80
- data/lib/stripe/resources/subscription_schedule.rb +127 -1015
- data/lib/stripe/resources/tax/calculation.rb +4 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/registration.rb +1 -1
- data/lib/stripe/resources/tax_id.rb +3 -14
- data/lib/stripe/resources/tax_rate.rb +2 -2
- data/lib/stripe/resources/terminal/configuration.rb +1 -2
- data/lib/stripe/resources/terminal/location.rb +2 -3
- data/lib/stripe/resources/terminal/reader.rb +8 -142
- data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
- data/lib/stripe/resources/token.rb +2 -2
- data/lib/stripe/resources/transfer.rb +1 -7
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources/webhook_endpoint.rb +1 -2
- data/lib/stripe/resources.rb +0 -99
- data/lib/stripe/services/account_external_account_service.rb +2 -3
- data/lib/stripe/services/account_login_link_service.rb +1 -1
- data/lib/stripe/services/account_person_service.rb +1 -2
- data/lib/stripe/services/account_service.rb +23 -559
- data/lib/stripe/services/account_session_service.rb +29 -229
- data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
- data/lib/stripe/services/balance_service.rb +1 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +4 -1354
- data/lib/stripe/services/checkout/session_service.rb +13 -250
- data/lib/stripe/services/coupon_service.rb +2 -19
- data/lib/stripe/services/credit_note_service.rb +7 -12
- data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
- data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
- data/lib/stripe/services/customer_payment_source_service.rb +1 -1
- data/lib/stripe/services/customer_service.rb +3 -5
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/customer_tax_id_service.rb +1 -2
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +5 -13
- data/lib/stripe/services/invoice_item_service.rb +3 -76
- 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 +74 -1049
- data/lib/stripe/services/issuing/authorization_service.rb +4 -4
- data/lib/stripe/services/issuing/card_service.rb +1 -1
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/dispute_service.rb +2 -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 +439 -4928
- data/lib/stripe/services/payment_method_configuration_service.rb +82 -82
- data/lib/stripe/services/payment_method_domain_service.rb +1 -1
- data/lib/stripe/services/payment_method_service.rb +44 -226
- data/lib/stripe/services/payout_service.rb +2 -6
- data/lib/stripe/services/plan_service.rb +2 -3
- data/lib/stripe/services/price_service.rb +2 -21
- data/lib/stripe/services/product_feature_service.rb +1 -2
- data/lib/stripe/services/product_service.rb +2 -41
- data/lib/stripe/services/promotion_code_service.rb +1 -9
- data/lib/stripe/services/quote_service.rb +7 -1730
- data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
- data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
- data/lib/stripe/services/radar/value_list_service.rb +1 -2
- data/lib/stripe/services/setup_intent_service.rb +119 -836
- data/lib/stripe/services/source_service.rb +1 -1
- data/lib/stripe/services/subscription_item_service.rb +27 -73
- data/lib/stripe/services/subscription_schedule_service.rb +101 -916
- data/lib/stripe/services/subscription_service.rb +85 -282
- data/lib/stripe/services/tax/calculation_service.rb +4 -0
- data/lib/stripe/services/tax/registration_service.rb +1 -1
- data/lib/stripe/services/tax_id_service.rb +3 -10
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +1 -2
- data/lib/stripe/services/terminal/location_service.rb +2 -3
- data/lib/stripe/services/terminal/reader_service.rb +5 -81
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +33 -190
- data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
- 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/token_service.rb +1 -1
- data/lib/stripe/services/transfer_service.rb +1 -5
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -12
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
- data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
- data/lib/stripe/services/v2/core/event_service.rb +1 -2
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +2 -4
- data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
- 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 +4926 -0
- data/rbi/stripe/resources/account_link.rbi +74 -0
- data/rbi/stripe/resources/account_session.rbi +1013 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
- data/rbi/stripe/resources/application.rbi +20 -0
- data/rbi/stripe/resources/application_fee.rbi +118 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
- data/rbi/stripe/resources/apps/secret.rbi +195 -0
- data/rbi/stripe/resources/balance.rbi +235 -0
- data/rbi/stripe/resources/balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +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 +2069 -0
- data/rbi/stripe/resources/checkout/session.rbi +4004 -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 +1807 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
- data/rbi/stripe/resources/country_spec.rbi +85 -0
- data/rbi/stripe/resources/coupon.rbi +250 -0
- data/rbi/stripe/resources/credit_note.rbi +752 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1005 -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 +360 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +526 -0
- data/rbi/stripe/resources/invoice.rbi +3812 -0
- data/rbi/stripe/resources/invoice_item.rbi +473 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +121 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
- data/rbi/stripe/resources/issuing/card.rbi +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 +9647 -0
- data/rbi/stripe/resources/payment_link.rbi +1801 -0
- data/rbi/stripe/resources/payment_method.rbi +1761 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +401 -0
- data/rbi/stripe/resources/plan.rbi +371 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +555 -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 +168 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
- data/rbi/stripe/resources/refund.rbi +523 -0
- data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
- data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
- data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
- data/rbi/stripe/resources/reversal.rbi +51 -0
- data/rbi/stripe/resources/review.rbi +154 -0
- data/rbi/stripe/resources/setup_attempt.rbi +477 -0
- data/rbi/stripe/resources/setup_intent.rbi +3655 -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 +2027 -0
- data/rbi/stripe/resources/subscription_item.rbi +404 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1623 -0
- data/rbi/stripe/resources/tax/calculation.rbi +478 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
- data/rbi/stripe/resources/tax/registration.rbi +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 +165 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1386 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +222 -0
- data/rbi/stripe/resources/terminal/reader.rbi +847 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -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 +168 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +124 -138
- 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 +1011 -0
- data/rbi/stripe/services/account_service.rbi +4213 -0
- data/rbi/stripe/services/account_session_service.rbi +646 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +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 +2614 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +142 -0
- data/rbi/stripe/services/climate/product_service.rbi +46 -0
- data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
- data/rbi/stripe/services/climate_service.rbi +11 -0
- data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
- data/rbi/stripe/services/country_spec_service.rbi +44 -0
- data/rbi/stripe/services/coupon_service.rbi +194 -0
- data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +415 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
- data/rbi/stripe/services/customer_service.rbi +647 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
- data/rbi/stripe/services/dispute_service.rbi +424 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
- data/rbi/stripe/services/event_service.rbi +83 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
- data/rbi/stripe/services/file_link_service.rbi +124 -0
- data/rbi/stripe/services/file_service.rbi +116 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
- data/rbi/stripe/services/financial_connections_service.rbi +11 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +366 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
- data/rbi/stripe/services/invoice_service.rbi +2981 -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 +7659 -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 +2487 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +776 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +282 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +67 -0
- data/rbi/stripe/services/product_service.rbi +477 -0
- data/rbi/stripe/services/promotion_code_service.rbi +214 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
- data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/quote_service.rbi +686 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +185 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +84 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
- data/rbi/stripe/services/setup_intent_service.rbi +3391 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +663 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +350 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1290 -0
- data/rbi/stripe/services/subscription_service.rbi +1648 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
- data/rbi/stripe/services/tax/registration_service.rbi +1845 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +110 -0
- data/rbi/stripe/services/tax_rate_service.rbi +185 -0
- data/rbi/stripe/services/tax_service.rbi +12 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +1118 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +182 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +455 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +739 -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 +93 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
- data/rbi/stripe/services/test_helpers_service.rbi +15 -0
- data/rbi/stripe/services/token_service.rbi +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 +18 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
- data/stripe.gemspec +1 -4
- metadata +326 -158
- data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_link_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_core_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
- data/lib/stripe/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 -275
- 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 -339
- 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 -1746
- data/lib/stripe/resources/v2/core/account_link.rb +0 -56
- data/lib/stripe/resources/v2/core/person.rb +0 -276
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -58
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -136
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -108
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
- data/lib/stripe/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 -4138
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1048
- 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 -96
- 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 -191867
@@ -10,8 +10,7 @@ module Stripe
|
|
10
10
|
@line_items = Stripe::InvoiceLineItemService.new(@requestor)
|
11
11
|
end
|
12
12
|
|
13
|
-
class DeleteParams < Stripe::RequestParams
|
14
|
-
end
|
13
|
+
class DeleteParams < Stripe::RequestParams; end
|
15
14
|
|
16
15
|
class RetrieveParams < Stripe::RequestParams
|
17
16
|
# Specifies which fields in the response should be expanded.
|
@@ -23,24 +22,6 @@ module Stripe
|
|
23
22
|
end
|
24
23
|
|
25
24
|
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
25
|
class AutomaticTax < Stripe::RequestParams
|
45
26
|
class Liability < Stripe::RequestParams
|
46
27
|
# The connected account being referenced when `type` is `account`.
|
@@ -77,44 +58,16 @@ module Stripe
|
|
77
58
|
end
|
78
59
|
|
79
60
|
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
61
|
# ID of the coupon to create a new discount for.
|
106
62
|
attr_accessor :coupon
|
107
63
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
108
64
|
attr_accessor :discount
|
109
|
-
# Details to determine how long the discount should be applied for.
|
110
|
-
attr_accessor :discount_end
|
111
65
|
# ID of the promotion code to create a new discount for.
|
112
66
|
attr_accessor :promotion_code
|
113
67
|
|
114
|
-
def initialize(coupon: nil, discount: nil,
|
68
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
115
69
|
@coupon = coupon
|
116
70
|
@discount = discount
|
117
|
-
@discount_end = discount_end
|
118
71
|
@promotion_code = promotion_code
|
119
72
|
end
|
120
73
|
end
|
@@ -234,26 +187,17 @@ module Stripe
|
|
234
187
|
end
|
235
188
|
end
|
236
189
|
|
237
|
-
class
|
238
|
-
end
|
239
|
-
|
240
|
-
class Konbini < Stripe::RequestParams
|
241
|
-
end
|
242
|
-
|
243
|
-
class SepaDebit < Stripe::RequestParams
|
244
|
-
end
|
190
|
+
class Konbini < Stripe::RequestParams; end
|
191
|
+
class SepaDebit < Stripe::RequestParams; end
|
245
192
|
|
246
193
|
class UsBankAccount < Stripe::RequestParams
|
247
194
|
class FinancialConnections < Stripe::RequestParams
|
248
195
|
class Filters < Stripe::RequestParams
|
249
196
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
250
197
|
attr_accessor :account_subcategories
|
251
|
-
# ID of the institution to use to filter for selectable accounts.
|
252
|
-
attr_accessor :institution
|
253
198
|
|
254
|
-
def initialize(account_subcategories: nil
|
199
|
+
def initialize(account_subcategories: nil)
|
255
200
|
@account_subcategories = account_subcategories
|
256
|
-
@institution = institution
|
257
201
|
end
|
258
202
|
end
|
259
203
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -287,8 +231,6 @@ module Stripe
|
|
287
231
|
attr_accessor :card
|
288
232
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
289
233
|
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
234
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
293
235
|
attr_accessor :konbini
|
294
236
|
# If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
@@ -301,7 +243,6 @@ module Stripe
|
|
301
243
|
bancontact: nil,
|
302
244
|
card: nil,
|
303
245
|
customer_balance: nil,
|
304
|
-
id_bank_transfer: nil,
|
305
246
|
konbini: nil,
|
306
247
|
sepa_debit: nil,
|
307
248
|
us_bank_account: nil
|
@@ -310,7 +251,6 @@ module Stripe
|
|
310
251
|
@bancontact = bancontact
|
311
252
|
@card = card
|
312
253
|
@customer_balance = customer_balance
|
313
|
-
@id_bank_transfer = id_bank_transfer
|
314
254
|
@konbini = konbini
|
315
255
|
@sepa_debit = sepa_debit
|
316
256
|
@us_bank_account = us_bank_account
|
@@ -522,8 +462,6 @@ module Stripe
|
|
522
462
|
end
|
523
463
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
524
464
|
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
465
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
528
466
|
attr_accessor :application_fee_amount
|
529
467
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -538,8 +476,6 @@ module Stripe
|
|
538
476
|
attr_accessor :custom_fields
|
539
477
|
# The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
|
540
478
|
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
479
|
# ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
544
480
|
attr_accessor :default_payment_method
|
545
481
|
# ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
@@ -581,7 +517,6 @@ module Stripe
|
|
581
517
|
|
582
518
|
def initialize(
|
583
519
|
account_tax_ids: nil,
|
584
|
-
amounts_due: nil,
|
585
520
|
application_fee_amount: nil,
|
586
521
|
auto_advance: nil,
|
587
522
|
automatic_tax: nil,
|
@@ -589,7 +524,6 @@ module Stripe
|
|
589
524
|
collection_method: nil,
|
590
525
|
custom_fields: nil,
|
591
526
|
days_until_due: nil,
|
592
|
-
default_margins: nil,
|
593
527
|
default_payment_method: nil,
|
594
528
|
default_source: nil,
|
595
529
|
default_tax_rates: nil,
|
@@ -611,7 +545,6 @@ module Stripe
|
|
611
545
|
transfer_data: nil
|
612
546
|
)
|
613
547
|
@account_tax_ids = account_tax_ids
|
614
|
-
@amounts_due = amounts_due
|
615
548
|
@application_fee_amount = application_fee_amount
|
616
549
|
@auto_advance = auto_advance
|
617
550
|
@automatic_tax = automatic_tax
|
@@ -619,7 +552,6 @@ module Stripe
|
|
619
552
|
@collection_method = collection_method
|
620
553
|
@custom_fields = custom_fields
|
621
554
|
@days_until_due = days_until_due
|
622
|
-
@default_margins = default_margins
|
623
555
|
@default_payment_method = default_payment_method
|
624
556
|
@default_source = default_source
|
625
557
|
@default_tax_rates = default_tax_rates
|
@@ -684,8 +616,6 @@ module Stripe
|
|
684
616
|
attr_accessor :created
|
685
617
|
# Only return invoices for the customer specified by this customer ID.
|
686
618
|
attr_accessor :customer
|
687
|
-
# Only return invoices for the account specified by this account ID.
|
688
|
-
attr_accessor :customer_account
|
689
619
|
# Attribute for param field due_date
|
690
620
|
attr_accessor :due_date
|
691
621
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
@@ -705,7 +635,6 @@ module Stripe
|
|
705
635
|
collection_method: nil,
|
706
636
|
created: nil,
|
707
637
|
customer: nil,
|
708
|
-
customer_account: nil,
|
709
638
|
due_date: nil,
|
710
639
|
ending_before: nil,
|
711
640
|
expand: nil,
|
@@ -717,7 +646,6 @@ module Stripe
|
|
717
646
|
@collection_method = collection_method
|
718
647
|
@created = created
|
719
648
|
@customer = customer
|
720
|
-
@customer_account = customer_account
|
721
649
|
@due_date = due_date
|
722
650
|
@ending_before = ending_before
|
723
651
|
@expand = expand
|
@@ -729,24 +657,6 @@ module Stripe
|
|
729
657
|
end
|
730
658
|
|
731
659
|
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
660
|
class AutomaticTax < Stripe::RequestParams
|
751
661
|
class Liability < Stripe::RequestParams
|
752
662
|
# The connected account being referenced when `type` is `account`.
|
@@ -783,44 +693,16 @@ module Stripe
|
|
783
693
|
end
|
784
694
|
|
785
695
|
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
696
|
# ID of the coupon to create a new discount for.
|
812
697
|
attr_accessor :coupon
|
813
698
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
814
699
|
attr_accessor :discount
|
815
|
-
# Details to determine how long the discount should be applied for.
|
816
|
-
attr_accessor :discount_end
|
817
700
|
# ID of the promotion code to create a new discount for.
|
818
701
|
attr_accessor :promotion_code
|
819
702
|
|
820
|
-
def initialize(coupon: nil, discount: nil,
|
703
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
821
704
|
@coupon = coupon
|
822
705
|
@discount = discount
|
823
|
-
@discount_end = discount_end
|
824
706
|
@promotion_code = promotion_code
|
825
707
|
end
|
826
708
|
end
|
@@ -952,26 +834,17 @@ module Stripe
|
|
952
834
|
end
|
953
835
|
end
|
954
836
|
|
955
|
-
class
|
956
|
-
end
|
957
|
-
|
958
|
-
class Konbini < Stripe::RequestParams
|
959
|
-
end
|
960
|
-
|
961
|
-
class SepaDebit < Stripe::RequestParams
|
962
|
-
end
|
837
|
+
class Konbini < Stripe::RequestParams; end
|
838
|
+
class SepaDebit < Stripe::RequestParams; end
|
963
839
|
|
964
840
|
class UsBankAccount < Stripe::RequestParams
|
965
841
|
class FinancialConnections < Stripe::RequestParams
|
966
842
|
class Filters < Stripe::RequestParams
|
967
843
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
968
844
|
attr_accessor :account_subcategories
|
969
|
-
# ID of the institution to use to filter for selectable accounts.
|
970
|
-
attr_accessor :institution
|
971
845
|
|
972
|
-
def initialize(account_subcategories: nil
|
846
|
+
def initialize(account_subcategories: nil)
|
973
847
|
@account_subcategories = account_subcategories
|
974
|
-
@institution = institution
|
975
848
|
end
|
976
849
|
end
|
977
850
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -1005,8 +878,6 @@ module Stripe
|
|
1005
878
|
attr_accessor :card
|
1006
879
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1007
880
|
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
881
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1011
882
|
attr_accessor :konbini
|
1012
883
|
# If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
@@ -1019,7 +890,6 @@ module Stripe
|
|
1019
890
|
bancontact: nil,
|
1020
891
|
card: nil,
|
1021
892
|
customer_balance: nil,
|
1022
|
-
id_bank_transfer: nil,
|
1023
893
|
konbini: nil,
|
1024
894
|
sepa_debit: nil,
|
1025
895
|
us_bank_account: nil
|
@@ -1028,7 +898,6 @@ module Stripe
|
|
1028
898
|
@bancontact = bancontact
|
1029
899
|
@card = card
|
1030
900
|
@customer_balance = customer_balance
|
1031
|
-
@id_bank_transfer = id_bank_transfer
|
1032
901
|
@konbini = konbini
|
1033
902
|
@sepa_debit = sepa_debit
|
1034
903
|
@us_bank_account = us_bank_account
|
@@ -1240,8 +1109,6 @@ module Stripe
|
|
1240
1109
|
end
|
1241
1110
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1242
1111
|
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
1112
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
1246
1113
|
attr_accessor :application_fee_amount
|
1247
1114
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
@@ -1258,12 +1125,8 @@ module Stripe
|
|
1258
1125
|
attr_accessor :custom_fields
|
1259
1126
|
# The ID of the customer who will be billed.
|
1260
1127
|
attr_accessor :customer
|
1261
|
-
# The ID of the account who will be billed.
|
1262
|
-
attr_accessor :customer_account
|
1263
1128
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1264
1129
|
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
1130
|
# ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
1268
1131
|
attr_accessor :default_payment_method
|
1269
1132
|
# ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
@@ -1311,7 +1174,6 @@ module Stripe
|
|
1311
1174
|
|
1312
1175
|
def initialize(
|
1313
1176
|
account_tax_ids: nil,
|
1314
|
-
amounts_due: nil,
|
1315
1177
|
application_fee_amount: nil,
|
1316
1178
|
auto_advance: nil,
|
1317
1179
|
automatic_tax: nil,
|
@@ -1320,9 +1182,7 @@ module Stripe
|
|
1320
1182
|
currency: nil,
|
1321
1183
|
custom_fields: nil,
|
1322
1184
|
customer: nil,
|
1323
|
-
customer_account: nil,
|
1324
1185
|
days_until_due: nil,
|
1325
|
-
default_margins: nil,
|
1326
1186
|
default_payment_method: nil,
|
1327
1187
|
default_source: nil,
|
1328
1188
|
default_tax_rates: nil,
|
@@ -1347,7 +1207,6 @@ module Stripe
|
|
1347
1207
|
transfer_data: nil
|
1348
1208
|
)
|
1349
1209
|
@account_tax_ids = account_tax_ids
|
1350
|
-
@amounts_due = amounts_due
|
1351
1210
|
@application_fee_amount = application_fee_amount
|
1352
1211
|
@auto_advance = auto_advance
|
1353
1212
|
@automatic_tax = automatic_tax
|
@@ -1356,9 +1215,7 @@ module Stripe
|
|
1356
1215
|
@currency = currency
|
1357
1216
|
@custom_fields = custom_fields
|
1358
1217
|
@customer = customer
|
1359
|
-
@customer_account = customer_account
|
1360
1218
|
@days_until_due = days_until_due
|
1361
|
-
@default_margins = default_margins
|
1362
1219
|
@default_payment_method = default_payment_method
|
1363
1220
|
@default_source = default_source
|
1364
1221
|
@default_tax_rates = default_tax_rates
|
@@ -1405,44 +1262,16 @@ module Stripe
|
|
1405
1262
|
class AddLinesParams < Stripe::RequestParams
|
1406
1263
|
class Line < Stripe::RequestParams
|
1407
1264
|
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
1265
|
# ID of the coupon to create a new discount for.
|
1434
1266
|
attr_accessor :coupon
|
1435
1267
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1436
1268
|
attr_accessor :discount
|
1437
|
-
# Details to determine how long the discount should be applied for.
|
1438
|
-
attr_accessor :discount_end
|
1439
1269
|
# ID of the promotion code to create a new discount for.
|
1440
1270
|
attr_accessor :promotion_code
|
1441
1271
|
|
1442
|
-
def initialize(coupon: nil, discount: nil,
|
1272
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1443
1273
|
@coupon = coupon
|
1444
1274
|
@discount = discount
|
1445
|
-
@discount_end = discount_end
|
1446
1275
|
@promotion_code = promotion_code
|
1447
1276
|
end
|
1448
1277
|
end
|
@@ -1595,8 +1424,6 @@ module Stripe
|
|
1595
1424
|
attr_accessor :discounts
|
1596
1425
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1597
1426
|
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
1427
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1601
1428
|
attr_accessor :metadata
|
1602
1429
|
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
@@ -1618,7 +1445,6 @@ module Stripe
|
|
1618
1445
|
discountable: nil,
|
1619
1446
|
discounts: nil,
|
1620
1447
|
invoice_item: nil,
|
1621
|
-
margins: nil,
|
1622
1448
|
metadata: nil,
|
1623
1449
|
period: nil,
|
1624
1450
|
price_data: nil,
|
@@ -1632,7 +1458,6 @@ module Stripe
|
|
1632
1458
|
@discountable = discountable
|
1633
1459
|
@discounts = discounts
|
1634
1460
|
@invoice_item = invoice_item
|
1635
|
-
@margins = margins
|
1636
1461
|
@metadata = metadata
|
1637
1462
|
@period = period
|
1638
1463
|
@price_data = price_data
|
@@ -1657,59 +1482,14 @@ module Stripe
|
|
1657
1482
|
end
|
1658
1483
|
|
1659
1484
|
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
1485
|
# Specifies which fields in the response should be expanded.
|
1693
1486
|
attr_accessor :expand
|
1694
1487
|
# The ID of the PaymentIntent to attach to the invoice.
|
1695
1488
|
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
1489
|
|
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
|
1490
|
+
def initialize(expand: nil, payment_intent: nil)
|
1709
1491
|
@expand = expand
|
1710
1492
|
@payment_intent = payment_intent
|
1711
|
-
@payment_record = payment_record
|
1712
|
-
@payment_record_data = payment_record_data
|
1713
1493
|
end
|
1714
1494
|
end
|
1715
1495
|
|
@@ -1809,44 +1589,16 @@ module Stripe
|
|
1809
1589
|
class UpdateLinesParams < Stripe::RequestParams
|
1810
1590
|
class Line < Stripe::RequestParams
|
1811
1591
|
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
1592
|
# ID of the coupon to create a new discount for.
|
1838
1593
|
attr_accessor :coupon
|
1839
1594
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1840
1595
|
attr_accessor :discount
|
1841
|
-
# Details to determine how long the discount should be applied for.
|
1842
|
-
attr_accessor :discount_end
|
1843
1596
|
# ID of the promotion code to create a new discount for.
|
1844
1597
|
attr_accessor :promotion_code
|
1845
1598
|
|
1846
|
-
def initialize(coupon: nil, discount: nil,
|
1599
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1847
1600
|
@coupon = coupon
|
1848
1601
|
@discount = discount
|
1849
|
-
@discount_end = discount_end
|
1850
1602
|
@promotion_code = promotion_code
|
1851
1603
|
end
|
1852
1604
|
end
|
@@ -1999,8 +1751,6 @@ module Stripe
|
|
1999
1751
|
attr_accessor :discounts
|
2000
1752
|
# ID of an existing line item on the invoice.
|
2001
1753
|
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
1754
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
2005
1755
|
attr_accessor :metadata
|
2006
1756
|
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
@@ -2022,7 +1772,6 @@ module Stripe
|
|
2022
1772
|
discountable: nil,
|
2023
1773
|
discounts: nil,
|
2024
1774
|
id: nil,
|
2025
|
-
margins: nil,
|
2026
1775
|
metadata: nil,
|
2027
1776
|
period: nil,
|
2028
1777
|
price_data: nil,
|
@@ -2036,7 +1785,6 @@ module Stripe
|
|
2036
1785
|
@discountable = discountable
|
2037
1786
|
@discounts = discounts
|
2038
1787
|
@id = id
|
2039
|
-
@margins = margins
|
2040
1788
|
@metadata = metadata
|
2041
1789
|
@period = period
|
2042
1790
|
@price_data = price_data
|
@@ -2211,88 +1959,32 @@ module Stripe
|
|
2211
1959
|
end
|
2212
1960
|
|
2213
1961
|
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
1962
|
# ID of the coupon to create a new discount for.
|
2240
1963
|
attr_accessor :coupon
|
2241
1964
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2242
1965
|
attr_accessor :discount
|
2243
|
-
# Details to determine how long the discount should be applied for.
|
2244
|
-
attr_accessor :discount_end
|
2245
1966
|
# ID of the promotion code to create a new discount for.
|
2246
1967
|
attr_accessor :promotion_code
|
2247
1968
|
|
2248
|
-
def initialize(coupon: nil, discount: nil,
|
1969
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2249
1970
|
@coupon = coupon
|
2250
1971
|
@discount = discount
|
2251
|
-
@discount_end = discount_end
|
2252
1972
|
@promotion_code = promotion_code
|
2253
1973
|
end
|
2254
1974
|
end
|
2255
1975
|
|
2256
1976
|
class InvoiceItem < Stripe::RequestParams
|
2257
1977
|
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
1978
|
# ID of the coupon to create a new discount for.
|
2284
1979
|
attr_accessor :coupon
|
2285
1980
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2286
1981
|
attr_accessor :discount
|
2287
|
-
# Details to determine how long the discount should be applied for.
|
2288
|
-
attr_accessor :discount_end
|
2289
1982
|
# ID of the promotion code to create a new discount for.
|
2290
1983
|
attr_accessor :promotion_code
|
2291
1984
|
|
2292
|
-
def initialize(coupon: nil, discount: nil,
|
1985
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2293
1986
|
@coupon = coupon
|
2294
1987
|
@discount = discount
|
2295
|
-
@discount_end = discount_end
|
2296
1988
|
@promotion_code = promotion_code
|
2297
1989
|
end
|
2298
1990
|
end
|
@@ -2418,499 +2110,19 @@ module Stripe
|
|
2418
2110
|
end
|
2419
2111
|
|
2420
2112
|
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
2113
|
class Phase < Stripe::RequestParams
|
2874
2114
|
class AddInvoiceItem < Stripe::RequestParams
|
2875
2115
|
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
2116
|
# ID of the coupon to create a new discount for.
|
2902
2117
|
attr_accessor :coupon
|
2903
2118
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2904
2119
|
attr_accessor :discount
|
2905
|
-
# Details to determine how long the discount should be applied for.
|
2906
|
-
attr_accessor :discount_end
|
2907
2120
|
# ID of the promotion code to create a new discount for.
|
2908
2121
|
attr_accessor :promotion_code
|
2909
2122
|
|
2910
|
-
def initialize(coupon: nil, discount: nil,
|
2123
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2911
2124
|
@coupon = coupon
|
2912
2125
|
@discount = discount
|
2913
|
-
@discount_end = discount_end
|
2914
2126
|
@promotion_code = promotion_code
|
2915
2127
|
end
|
2916
2128
|
end
|
@@ -2990,45 +2202,29 @@ module Stripe
|
|
2990
2202
|
end
|
2991
2203
|
end
|
2992
2204
|
|
2993
|
-
class
|
2994
|
-
|
2995
|
-
|
2996
|
-
|
2997
|
-
|
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
|
2205
|
+
class BillingThresholds < Stripe::RequestParams
|
2206
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
2207
|
+
attr_accessor :amount_gte
|
2208
|
+
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
2209
|
+
attr_accessor :reset_billing_cycle_anchor
|
3012
2210
|
|
3013
|
-
|
3014
|
-
|
3015
|
-
|
3016
|
-
@type = type
|
3017
|
-
end
|
2211
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
2212
|
+
@amount_gte = amount_gte
|
2213
|
+
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
3018
2214
|
end
|
2215
|
+
end
|
2216
|
+
|
2217
|
+
class Discount < Stripe::RequestParams
|
3019
2218
|
# ID of the coupon to create a new discount for.
|
3020
2219
|
attr_accessor :coupon
|
3021
2220
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3022
2221
|
attr_accessor :discount
|
3023
|
-
# Details to determine how long the discount should be applied for.
|
3024
|
-
attr_accessor :discount_end
|
3025
2222
|
# ID of the promotion code to create a new discount for.
|
3026
2223
|
attr_accessor :promotion_code
|
3027
2224
|
|
3028
|
-
def initialize(coupon: nil, discount: nil,
|
2225
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3029
2226
|
@coupon = coupon
|
3030
2227
|
@discount = discount
|
3031
|
-
@discount_end = discount_end
|
3032
2228
|
@promotion_code = promotion_code
|
3033
2229
|
end
|
3034
2230
|
end
|
@@ -3060,45 +2256,26 @@ module Stripe
|
|
3060
2256
|
end
|
3061
2257
|
|
3062
2258
|
class Item < Stripe::RequestParams
|
3063
|
-
class
|
3064
|
-
|
3065
|
-
|
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
|
2259
|
+
class BillingThresholds < Stripe::RequestParams
|
2260
|
+
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
2261
|
+
attr_accessor :usage_gte
|
3082
2262
|
|
3083
|
-
|
3084
|
-
|
3085
|
-
@timestamp = timestamp
|
3086
|
-
@type = type
|
3087
|
-
end
|
2263
|
+
def initialize(usage_gte: nil)
|
2264
|
+
@usage_gte = usage_gte
|
3088
2265
|
end
|
2266
|
+
end
|
2267
|
+
|
2268
|
+
class Discount < Stripe::RequestParams
|
3089
2269
|
# ID of the coupon to create a new discount for.
|
3090
2270
|
attr_accessor :coupon
|
3091
2271
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3092
2272
|
attr_accessor :discount
|
3093
|
-
# Details to determine how long the discount should be applied for.
|
3094
|
-
attr_accessor :discount_end
|
3095
2273
|
# ID of the promotion code to create a new discount for.
|
3096
2274
|
attr_accessor :promotion_code
|
3097
2275
|
|
3098
|
-
def initialize(coupon: nil, discount: nil,
|
2276
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3099
2277
|
@coupon = coupon
|
3100
2278
|
@discount = discount
|
3101
|
-
@discount_end = discount_end
|
3102
2279
|
@promotion_code = promotion_code
|
3103
2280
|
end
|
3104
2281
|
end
|
@@ -3144,18 +2321,8 @@ module Stripe
|
|
3144
2321
|
@unit_amount_decimal = unit_amount_decimal
|
3145
2322
|
end
|
3146
2323
|
end
|
3147
|
-
|
3148
|
-
|
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
|
2324
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
2325
|
+
attr_accessor :billing_thresholds
|
3159
2326
|
# The coupons to redeem into discounts for the subscription item.
|
3160
2327
|
attr_accessor :discounts
|
3161
2328
|
# 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,19 +2337,18 @@ module Stripe
|
|
3170
2337
|
attr_accessor :quantity
|
3171
2338
|
# 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
2339
|
attr_accessor :tax_rates
|
3173
|
-
# Options that configure the trial on the subscription item.
|
3174
|
-
attr_accessor :trial
|
3175
2340
|
|
3176
2341
|
def initialize(
|
2342
|
+
billing_thresholds: nil,
|
3177
2343
|
discounts: nil,
|
3178
2344
|
metadata: nil,
|
3179
2345
|
plan: nil,
|
3180
2346
|
price: nil,
|
3181
2347
|
price_data: nil,
|
3182
2348
|
quantity: nil,
|
3183
|
-
tax_rates: nil
|
3184
|
-
trial: nil
|
2349
|
+
tax_rates: nil
|
3185
2350
|
)
|
2351
|
+
@billing_thresholds = billing_thresholds
|
3186
2352
|
@discounts = discounts
|
3187
2353
|
@metadata = metadata
|
3188
2354
|
@plan = plan
|
@@ -3190,16 +2356,6 @@ module Stripe
|
|
3190
2356
|
@price_data = price_data
|
3191
2357
|
@quantity = quantity
|
3192
2358
|
@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
2359
|
end
|
3204
2360
|
end
|
3205
2361
|
|
@@ -3214,23 +2370,6 @@ module Stripe
|
|
3214
2370
|
@destination = destination
|
3215
2371
|
end
|
3216
2372
|
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
2373
|
# 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
2374
|
attr_accessor :add_invoice_items
|
3236
2375
|
# 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).
|
@@ -3239,6 +2378,8 @@ module Stripe
|
|
3239
2378
|
attr_accessor :automatic_tax
|
3240
2379
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
3241
2380
|
attr_accessor :billing_cycle_anchor
|
2381
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
2382
|
+
attr_accessor :billing_thresholds
|
3242
2383
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
3243
2384
|
attr_accessor :collection_method
|
3244
2385
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
@@ -3263,9 +2404,7 @@ module Stripe
|
|
3263
2404
|
attr_accessor :metadata
|
3264
2405
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3265
2406
|
attr_accessor :on_behalf_of
|
3266
|
-
#
|
3267
|
-
attr_accessor :pause_collection
|
3268
|
-
# 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.
|
2407
|
+
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
3269
2408
|
attr_accessor :proration_behavior
|
3270
2409
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
3271
2410
|
attr_accessor :start_date
|
@@ -3273,18 +2412,15 @@ module Stripe
|
|
3273
2412
|
attr_accessor :transfer_data
|
3274
2413
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
3275
2414
|
attr_accessor :trial
|
3276
|
-
# Specify trial behavior when crossing phase boundaries
|
3277
|
-
attr_accessor :trial_continuation
|
3278
2415
|
# 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
2416
|
attr_accessor :trial_end
|
3280
|
-
# Settings related to subscription trials.
|
3281
|
-
attr_accessor :trial_settings
|
3282
2417
|
|
3283
2418
|
def initialize(
|
3284
2419
|
add_invoice_items: nil,
|
3285
2420
|
application_fee_percent: nil,
|
3286
2421
|
automatic_tax: nil,
|
3287
2422
|
billing_cycle_anchor: nil,
|
2423
|
+
billing_thresholds: nil,
|
3288
2424
|
collection_method: nil,
|
3289
2425
|
currency: nil,
|
3290
2426
|
default_payment_method: nil,
|
@@ -3297,19 +2433,17 @@ module Stripe
|
|
3297
2433
|
iterations: nil,
|
3298
2434
|
metadata: nil,
|
3299
2435
|
on_behalf_of: nil,
|
3300
|
-
pause_collection: nil,
|
3301
2436
|
proration_behavior: nil,
|
3302
2437
|
start_date: nil,
|
3303
2438
|
transfer_data: nil,
|
3304
2439
|
trial: nil,
|
3305
|
-
|
3306
|
-
trial_end: nil,
|
3307
|
-
trial_settings: nil
|
2440
|
+
trial_end: nil
|
3308
2441
|
)
|
3309
2442
|
@add_invoice_items = add_invoice_items
|
3310
2443
|
@application_fee_percent = application_fee_percent
|
3311
2444
|
@automatic_tax = automatic_tax
|
3312
2445
|
@billing_cycle_anchor = billing_cycle_anchor
|
2446
|
+
@billing_thresholds = billing_thresholds
|
3313
2447
|
@collection_method = collection_method
|
3314
2448
|
@currency = currency
|
3315
2449
|
@default_payment_method = default_payment_method
|
@@ -3322,140 +2456,49 @@ module Stripe
|
|
3322
2456
|
@iterations = iterations
|
3323
2457
|
@metadata = metadata
|
3324
2458
|
@on_behalf_of = on_behalf_of
|
3325
|
-
@pause_collection = pause_collection
|
3326
2459
|
@proration_behavior = proration_behavior
|
3327
2460
|
@start_date = start_date
|
3328
2461
|
@transfer_data = transfer_data
|
3329
2462
|
@trial = trial
|
3330
|
-
@trial_continuation = trial_continuation
|
3331
2463
|
@trial_end = trial_end
|
3332
|
-
@trial_settings = trial_settings
|
3333
2464
|
end
|
3334
2465
|
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
|
-
# Configure billing_mode to opt in improved credit proration behavior.When the schedule creates a subscription, the subscription's `billing_mode` will be set to the same value as the schedule's `billing_mode`.
|
3389
|
-
attr_accessor :billing_mode
|
3390
2466
|
# 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.
|
3391
2467
|
attr_accessor :end_behavior
|
3392
2468
|
# 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.
|
3393
2469
|
attr_accessor :phases
|
3394
|
-
# Provide any time periods to bill in advance.
|
3395
|
-
attr_accessor :prebilling
|
3396
2470
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
3397
2471
|
attr_accessor :proration_behavior
|
3398
2472
|
|
3399
|
-
def initialize(
|
3400
|
-
amendments: nil,
|
3401
|
-
billing_behavior: nil,
|
3402
|
-
billing_mode: nil,
|
3403
|
-
end_behavior: nil,
|
3404
|
-
phases: nil,
|
3405
|
-
prebilling: nil,
|
3406
|
-
proration_behavior: nil
|
3407
|
-
)
|
3408
|
-
@amendments = amendments
|
3409
|
-
@billing_behavior = billing_behavior
|
3410
|
-
@billing_mode = billing_mode
|
2473
|
+
def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
|
3411
2474
|
@end_behavior = end_behavior
|
3412
2475
|
@phases = phases
|
3413
|
-
@prebilling = prebilling
|
3414
2476
|
@proration_behavior = proration_behavior
|
3415
2477
|
end
|
3416
2478
|
end
|
3417
2479
|
|
3418
2480
|
class SubscriptionDetails < Stripe::RequestParams
|
3419
2481
|
class Item < Stripe::RequestParams
|
3420
|
-
class
|
3421
|
-
|
3422
|
-
|
3423
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3424
|
-
attr_accessor :interval
|
3425
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3426
|
-
attr_accessor :interval_count
|
3427
|
-
|
3428
|
-
def initialize(interval: nil, interval_count: nil)
|
3429
|
-
@interval = interval
|
3430
|
-
@interval_count = interval_count
|
3431
|
-
end
|
3432
|
-
end
|
3433
|
-
# Time span for the redeemed discount.
|
3434
|
-
attr_accessor :duration
|
3435
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3436
|
-
attr_accessor :timestamp
|
3437
|
-
# The type of calculation made to determine when the discount ends.
|
3438
|
-
attr_accessor :type
|
2482
|
+
class BillingThresholds < Stripe::RequestParams
|
2483
|
+
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
2484
|
+
attr_accessor :usage_gte
|
3439
2485
|
|
3440
|
-
|
3441
|
-
|
3442
|
-
@timestamp = timestamp
|
3443
|
-
@type = type
|
3444
|
-
end
|
2486
|
+
def initialize(usage_gte: nil)
|
2487
|
+
@usage_gte = usage_gte
|
3445
2488
|
end
|
2489
|
+
end
|
2490
|
+
|
2491
|
+
class Discount < Stripe::RequestParams
|
3446
2492
|
# ID of the coupon to create a new discount for.
|
3447
2493
|
attr_accessor :coupon
|
3448
2494
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3449
2495
|
attr_accessor :discount
|
3450
|
-
# Details to determine how long the discount should be applied for.
|
3451
|
-
attr_accessor :discount_end
|
3452
2496
|
# ID of the promotion code to create a new discount for.
|
3453
2497
|
attr_accessor :promotion_code
|
3454
2498
|
|
3455
|
-
def initialize(coupon: nil, discount: nil,
|
2499
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3456
2500
|
@coupon = coupon
|
3457
2501
|
@discount = discount
|
3458
|
-
@discount_end = discount_end
|
3459
2502
|
@promotion_code = promotion_code
|
3460
2503
|
end
|
3461
2504
|
end
|
@@ -3501,6 +2544,8 @@ module Stripe
|
|
3501
2544
|
@unit_amount_decimal = unit_amount_decimal
|
3502
2545
|
end
|
3503
2546
|
end
|
2547
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
2548
|
+
attr_accessor :billing_thresholds
|
3504
2549
|
# Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
3505
2550
|
attr_accessor :clear_usage
|
3506
2551
|
# A flag that, if set to `true`, will delete the specified item.
|
@@ -3523,6 +2568,7 @@ module Stripe
|
|
3523
2568
|
attr_accessor :tax_rates
|
3524
2569
|
|
3525
2570
|
def initialize(
|
2571
|
+
billing_thresholds: nil,
|
3526
2572
|
clear_usage: nil,
|
3527
2573
|
deleted: nil,
|
3528
2574
|
discounts: nil,
|
@@ -3534,6 +2580,7 @@ module Stripe
|
|
3534
2580
|
quantity: nil,
|
3535
2581
|
tax_rates: nil
|
3536
2582
|
)
|
2583
|
+
@billing_thresholds = billing_thresholds
|
3537
2584
|
@clear_usage = clear_usage
|
3538
2585
|
@deleted = deleted
|
3539
2586
|
@discounts = discounts
|
@@ -3546,22 +2593,11 @@ module Stripe
|
|
3546
2593
|
@tax_rates = tax_rates
|
3547
2594
|
end
|
3548
2595
|
end
|
3549
|
-
|
3550
|
-
class Prebilling < Stripe::RequestParams
|
3551
|
-
# This is used to determine the number of billing cycles to prebill.
|
3552
|
-
attr_accessor :iterations
|
3553
|
-
|
3554
|
-
def initialize(iterations: nil)
|
3555
|
-
@iterations = iterations
|
3556
|
-
end
|
3557
|
-
end
|
3558
2596
|
# 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`.
|
3559
2597
|
attr_accessor :billing_cycle_anchor
|
3560
|
-
# Configure billing_mode in each subscription to opt in improved credit proration behavior.
|
3561
|
-
attr_accessor :billing_mode
|
3562
2598
|
# 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
2599
|
attr_accessor :cancel_at
|
3564
|
-
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
2600
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
|
3565
2601
|
attr_accessor :cancel_at_period_end
|
3566
2602
|
# This simulates the subscription being canceled or expired immediately.
|
3567
2603
|
attr_accessor :cancel_now
|
@@ -3569,8 +2605,6 @@ module Stripe
|
|
3569
2605
|
attr_accessor :default_tax_rates
|
3570
2606
|
# A list of up to 20 subscription items, each with an attached price.
|
3571
2607
|
attr_accessor :items
|
3572
|
-
# The pre-billing to apply to the subscription as a preview.
|
3573
|
-
attr_accessor :prebilling
|
3574
2608
|
# 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`.
|
3575
2609
|
attr_accessor :proration_behavior
|
3576
2610
|
# 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'.
|
@@ -3584,13 +2618,11 @@ module Stripe
|
|
3584
2618
|
|
3585
2619
|
def initialize(
|
3586
2620
|
billing_cycle_anchor: nil,
|
3587
|
-
billing_mode: nil,
|
3588
2621
|
cancel_at: nil,
|
3589
2622
|
cancel_at_period_end: nil,
|
3590
2623
|
cancel_now: nil,
|
3591
2624
|
default_tax_rates: nil,
|
3592
2625
|
items: nil,
|
3593
|
-
prebilling: nil,
|
3594
2626
|
proration_behavior: nil,
|
3595
2627
|
proration_date: nil,
|
3596
2628
|
resume_at: nil,
|
@@ -3598,13 +2630,11 @@ module Stripe
|
|
3598
2630
|
trial_end: nil
|
3599
2631
|
)
|
3600
2632
|
@billing_cycle_anchor = billing_cycle_anchor
|
3601
|
-
@billing_mode = billing_mode
|
3602
2633
|
@cancel_at = cancel_at
|
3603
2634
|
@cancel_at_period_end = cancel_at_period_end
|
3604
2635
|
@cancel_now = cancel_now
|
3605
2636
|
@default_tax_rates = default_tax_rates
|
3606
2637
|
@items = items
|
3607
|
-
@prebilling = prebilling
|
3608
2638
|
@proration_behavior = proration_behavior
|
3609
2639
|
@proration_date = proration_date
|
3610
2640
|
@resume_at = resume_at
|
@@ -3618,8 +2648,6 @@ module Stripe
|
|
3618
2648
|
attr_accessor :currency
|
3619
2649
|
# 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.
|
3620
2650
|
attr_accessor :customer
|
3621
|
-
# 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.
|
3622
|
-
attr_accessor :customer_account
|
3623
2651
|
# 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.
|
3624
2652
|
attr_accessor :customer_details
|
3625
2653
|
# 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.
|
@@ -3647,7 +2675,6 @@ module Stripe
|
|
3647
2675
|
automatic_tax: nil,
|
3648
2676
|
currency: nil,
|
3649
2677
|
customer: nil,
|
3650
|
-
customer_account: nil,
|
3651
2678
|
customer_details: nil,
|
3652
2679
|
discounts: nil,
|
3653
2680
|
expand: nil,
|
@@ -3663,7 +2690,6 @@ module Stripe
|
|
3663
2690
|
@automatic_tax = automatic_tax
|
3664
2691
|
@currency = currency
|
3665
2692
|
@customer = customer
|
3666
|
-
@customer_account = customer_account
|
3667
2693
|
@customer_details = customer_details
|
3668
2694
|
@discounts = discounts
|
3669
2695
|
@expand = expand
|
@@ -3691,9 +2717,6 @@ module Stripe
|
|
3691
2717
|
|
3692
2718
|
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
3693
2719
|
#
|
3694
|
-
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
|
3695
|
-
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
|
3696
|
-
#
|
3697
2720
|
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
3698
2721
|
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
3699
2722
|
# invoice's status becomes paid.
|
@@ -3701,7 +2724,7 @@ module Stripe
|
|
3701
2724
|
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
3702
2725
|
# credited to the invoice immediately.
|
3703
2726
|
#
|
3704
|
-
# See: [
|
2727
|
+
# See: [Partial payments](https://docs.stripe.com/docs/invoicing/partial-payments) to learn more.
|
3705
2728
|
def attach_payment(invoice, params = {}, opts = {})
|
3706
2729
|
request(
|
3707
2730
|
method: :post,
|
@@ -3712,16 +2735,18 @@ module Stripe
|
|
3712
2735
|
)
|
3713
2736
|
end
|
3714
2737
|
|
3715
|
-
# 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/
|
2738
|
+
# 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://docs.stripe.com/api#finalize_invoice) the invoice to your customers.
|
3716
2739
|
def create(params = {}, opts = {})
|
3717
2740
|
request(method: :post, path: "/v1/invoices", params: params, opts: opts, base_address: :api)
|
3718
2741
|
end
|
3719
2742
|
|
3720
2743
|
# At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
|
3721
2744
|
#
|
3722
|
-
#
|
2745
|
+
# You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update.
|
3723
2746
|
#
|
3724
|
-
#
|
2747
|
+
# The recommended way to get only the prorations being previewed on the invoice is to consider line items where parent.subscription_item_details.proration is true.
|
2748
|
+
#
|
2749
|
+
# Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
|
3725
2750
|
#
|
3726
2751
|
# Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
|
3727
2752
|
def create_preview(params = {}, opts = {})
|
@@ -3734,7 +2759,7 @@ module Stripe
|
|
3734
2759
|
)
|
3735
2760
|
end
|
3736
2761
|
|
3737
|
-
# Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/
|
2762
|
+
# Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice).
|
3738
2763
|
def delete(invoice, params = {}, opts = {})
|
3739
2764
|
request(
|
3740
2765
|
method: :delete,
|
@@ -3805,7 +2830,7 @@ module Stripe
|
|
3805
2830
|
)
|
3806
2831
|
end
|
3807
2832
|
|
3808
|
-
# Search for invoices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
|
2833
|
+
# Search for invoices you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
|
3809
2834
|
# Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
|
3810
2835
|
# conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
|
3811
2836
|
# to an hour behind during outages. Search functionality is not available to merchants in India.
|
@@ -3832,11 +2857,11 @@ module Stripe
|
|
3832
2857
|
)
|
3833
2858
|
end
|
3834
2859
|
|
3835
|
-
# Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
|
2860
|
+
# Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized),
|
3836
2861
|
# monetary values, as well as collection_method, become uneditable.
|
3837
2862
|
#
|
3838
2863
|
# If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
|
3839
|
-
# sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
2864
|
+
# sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
3840
2865
|
# auto_advance=false.
|
3841
2866
|
def update(invoice, params = {}, opts = {})
|
3842
2867
|
request(
|
@@ -3859,9 +2884,9 @@ module Stripe
|
|
3859
2884
|
)
|
3860
2885
|
end
|
3861
2886
|
|
3862
|
-
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/
|
2887
|
+
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
|
3863
2888
|
#
|
3864
|
-
# Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://stripe.com/
|
2889
|
+
# Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or <a href="#create_credit_note">credit note](https://docs.stripe.com/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
|
3865
2890
|
def void_invoice(invoice, params = {}, opts = {})
|
3866
2891
|
request(
|
3867
2892
|
method: :post,
|