stripe 14.1.0.pre.beta.1 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +689 -1512
- data/OPENAPI_VERSION +1 -1
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/stripe/api_operations/save.rb +2 -1
- data/lib/stripe/api_operations/singleton_save.rb +2 -1
- data/lib/stripe/api_requestor.rb +3 -29
- data/lib/stripe/api_resource.rb +10 -3
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +0 -54
- data/lib/stripe/event_types.rb +0 -75
- data/lib/stripe/object_types.rb +0 -48
- data/lib/stripe/request_options.rb +2 -1
- data/lib/stripe/resources/account.rb +1 -653
- data/lib/stripe/resources/account_session.rb +1 -247
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +0 -10
- data/lib/stripe/resources/billing_portal/session.rb +0 -6
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +0 -1454
- data/lib/stripe/resources/checkout/session.rb +4 -260
- data/lib/stripe/resources/confirmation_token.rb +0 -234
- data/lib/stripe/resources/coupon.rb +1 -1
- data/lib/stripe/resources/credit_note.rb +0 -10
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +0 -2
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +1 -6
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/event.rb +0 -33
- data/lib/stripe/resources/financial_connections/account.rb +1 -20
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +16 -1176
- data/lib/stripe/resources/invoice_item.rb +2 -78
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/transaction.rb +0 -6
- data/lib/stripe/resources/line_item.rb +0 -37
- data/lib/stripe/resources/mandate.rb +0 -24
- data/lib/stripe/resources/payment_intent.rb +307 -5109
- data/lib/stripe/resources/payment_method.rb +1 -196
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/payout.rb +0 -6
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/product.rb +0 -59
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +6 -2042
- data/lib/stripe/resources/refund.rb +0 -9
- data/lib/stripe/resources/setup_attempt.rb +0 -21
- data/lib/stripe/resources/setup_intent.rb +9 -596
- data/lib/stripe/resources/source.rb +1 -30
- data/lib/stripe/resources/subscription.rb +9 -292
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +10 -1007
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/reader.rb +0 -406
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources.rb +0 -85
- data/lib/stripe/services/account_service.rb +1 -562
- data/lib/stripe/services/account_session_service.rb +1 -217
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +0 -1334
- data/lib/stripe/services/checkout/session_service.rb +2 -172
- data/lib/stripe/services/credit_note_service.rb +0 -4
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/invoice_item_service.rb +2 -74
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +33 -5
- data/lib/stripe/services/invoice_service.rb +17 -1088
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +264 -4637
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +1 -126
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/product_service.rb +0 -38
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +7 -1726
- data/lib/stripe/services/setup_intent_service.rb +9 -556
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +10 -911
- data/lib/stripe/services/subscription_service.rb +9 -253
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/reader_service.rb +0 -180
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -148
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/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 -10
- data/lib/stripe/services/v2/core/event_service.rb +5 -3
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +2 -4
- data/lib/stripe/services.rb +0 -49
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +14 -4
- data/lib/stripe/util.rb +12 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -55
- data/rbi/stripe/resources/account.rbi +4840 -0
- data/rbi/stripe/resources/account_link.rbi +74 -0
- data/rbi/stripe/resources/account_session.rbi +894 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +90 -0
- data/rbi/stripe/resources/application.rbi +20 -0
- data/rbi/stripe/resources/application_fee.rbi +118 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
- data/rbi/stripe/resources/apps/secret.rbi +195 -0
- data/rbi/stripe/resources/balance.rbi +180 -0
- data/rbi/stripe/resources/balance_transaction.rbi +144 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2054 -0
- data/rbi/stripe/resources/checkout/session.rbi +3951 -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 +1793 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
- data/rbi/stripe/resources/country_spec.rbi +85 -0
- data/rbi/stripe/resources/coupon.rbi +252 -0
- data/rbi/stripe/resources/credit_note.rbi +747 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1009 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
- data/rbi/stripe/resources/customer_session.rbi +200 -0
- data/rbi/stripe/resources/discount.rbi +53 -0
- data/rbi/stripe/resources/dispute.rbi +761 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
- data/rbi/stripe/resources/event.rbi +146 -0
- data/rbi/stripe/resources/exchange_rate.rbi +66 -0
- data/rbi/stripe/resources/file.rbi +143 -0
- data/rbi/stripe/resources/file_link.rbi +141 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
- data/rbi/stripe/resources/forwarding/request.rbi +216 -0
- data/rbi/stripe/resources/funding_instructions.rbi +437 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +351 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +517 -0
- data/rbi/stripe/resources/invoice.rbi +3733 -0
- data/rbi/stripe/resources/invoice_item.rbi +475 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +114 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
- data/rbi/stripe/resources/issuing/card.rbi +741 -0
- data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
- data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
- data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
- data/rbi/stripe/resources/issuing/token.rbi +226 -0
- data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
- data/rbi/stripe/resources/line_item.rbi +72 -0
- data/rbi/stripe/resources/login_link.rbi +18 -0
- data/rbi/stripe/resources/mandate.rbi +187 -0
- data/rbi/stripe/resources/payment_intent.rbi +9731 -0
- data/rbi/stripe/resources/payment_link.rbi +1801 -0
- data/rbi/stripe/resources/payment_method.rbi +1822 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3154 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +212 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +371 -0
- data/rbi/stripe/resources/plan.rbi +373 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +557 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +261 -0
- data/rbi/stripe/resources/quote.rbi +1123 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +170 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +131 -0
- data/rbi/stripe/resources/refund.rbi +516 -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 +3860 -0
- data/rbi/stripe/resources/shipping_rate.rbi +305 -0
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
- data/rbi/stripe/resources/source.rbi +1496 -0
- data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
- data/rbi/stripe/resources/source_transaction.rbi +127 -0
- data/rbi/stripe/resources/subscription.rbi +1964 -0
- data/rbi/stripe/resources/subscription_item.rbi +370 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1495 -0
- data/rbi/stripe/resources/tax/calculation.rbi +474 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
- data/rbi/stripe/resources/tax/registration.rbi +2485 -0
- data/rbi/stripe/resources/tax/settings.rbi +141 -0
- data/rbi/stripe/resources/tax/transaction.rbi +351 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
- data/rbi/stripe/resources/tax_code.rbi +44 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
- data/rbi/stripe/resources/tax_id.rbi +167 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1388 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +224 -0
- data/rbi/stripe/resources/terminal/reader.rbi +587 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +134 -0
- data/rbi/stripe/resources/token.rbi +1217 -0
- data/rbi/stripe/resources/topup.rbi +222 -0
- data/rbi/stripe/resources/transfer.rbi +199 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
- data/rbi/stripe/resources/v2/event.rbi +48 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +170 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/rbi/stripe/services/account_external_account_service.rbi +306 -0
- 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 +923 -0
- data/rbi/stripe/services/account_service.rbi +4143 -0
- data/rbi/stripe/services/account_session_service.rbi +572 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2585 -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 +196 -0
- data/{lib/stripe/services/quote_preview_subscription_schedule_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +416 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
- data/rbi/stripe/services/customer_service.rbi +651 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
- data/rbi/stripe/services/dispute_service.rbi +424 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
- data/rbi/stripe/services/event_service.rbi +83 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
- data/rbi/stripe/services/file_link_service.rbi +124 -0
- data/rbi/stripe/services/file_service.rbi +116 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
- data/rbi/stripe/services/financial_connections_service.rbi +11 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +368 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
- data/rbi/stripe/services/invoice_service.rbi +2920 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +495 -0
- data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
- data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
- data/rbi/stripe/services/issuing/token_service.rbi +99 -0
- data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
- data/rbi/stripe/services/issuing_service.rbi +16 -0
- data/rbi/stripe/services/mandate_service.rbi +20 -0
- data/rbi/stripe/services/payment_intent_service.rbi +7759 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1352 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2211 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +840 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +284 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +69 -0
- data/rbi/stripe/services/product_service.rbi +479 -0
- data/rbi/stripe/services/promotion_code_service.rbi +214 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
- data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/quote_service.rbi +686 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +111 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +143 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +185 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +84 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
- data/rbi/stripe/services/setup_intent_service.rbi +3596 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +663 -0
- data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +324 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1192 -0
- data/rbi/stripe/services/subscription_service.rbi +1596 -0
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
- data/rbi/stripe/services/tax/calculation_service.rbi +230 -0
- data/rbi/stripe/services/tax/registration_service.rbi +1689 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +112 -0
- data/rbi/stripe/services/tax_rate_service.rbi +185 -0
- data/rbi/stripe/services/tax_service.rbi +12 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +1120 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +184 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +344 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
- data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
- data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +62 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +92 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
- data/rbi/stripe/services/test_helpers_service.rbi +15 -0
- data/rbi/stripe/services/token_service.rbi +1189 -0
- data/rbi/stripe/services/topup_service.rbi +176 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
- data/rbi/stripe/services/transfer_service.rbi +152 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +77 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +200 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +38 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
- data/stripe.gemspec +1 -4
- metadata +324 -140
- 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_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_money_management_financial_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -101
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- data/lib/stripe/resources/capital/financing_offer.rb +0 -179
- data/lib/stripe/resources/capital/financing_summary.rb +0 -55
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -90
- data/lib/stripe/resources/gift_cards/card.rb +0 -208
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
- data/lib/stripe/resources/issuing/settlement.rb +0 -53
- data/lib/stripe/resources/margin.rb +0 -115
- data/lib/stripe/resources/order.rb +0 -2859
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1078
- data/lib/stripe/resources/payment_record.rb +0 -1607
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -337
- data/lib/stripe/resources/tax/association.rb +0 -89
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1715
- data/lib/stripe/resources/v2/core/account_link.rb +0 -54
- data/lib/stripe/resources/v2/core/person.rb +0 -272
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -72
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -37
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -18
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -20
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -49
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -56
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -66
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -92
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -127
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -74
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -43
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -115
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -73
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -47
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -134
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -106
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -76
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -66
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/balance_settings_service.rb +0 -96
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/external_account_service.rb +0 -206
- 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/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
- data/lib/stripe/services/v2/core/account_service.rb +0 -4130
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1040
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -135
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -109
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -75
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -44
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -126
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -80
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -202
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -237
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -174
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -71
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -44
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -74
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -50
- data/rbi/stripe.rbi +0 -189274
@@ -3,11 +3,10 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class InvoiceService < StripeService
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :line_items
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super(requestor)
|
10
|
-
@payments = Stripe::InvoicePaymentService.new(@requestor)
|
11
10
|
@line_items = Stripe::InvoiceLineItemService.new(@requestor)
|
12
11
|
end
|
13
12
|
|
@@ -24,24 +23,6 @@ module Stripe
|
|
24
23
|
end
|
25
24
|
|
26
25
|
class UpdateParams < Stripe::RequestParams
|
27
|
-
class AmountsDue < Stripe::RequestParams
|
28
|
-
# The amount in cents (or local equivalent).
|
29
|
-
attr_accessor :amount
|
30
|
-
# Number of days from when invoice is finalized until the payment is due.
|
31
|
-
attr_accessor :days_until_due
|
32
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
33
|
-
attr_accessor :description
|
34
|
-
# Date on which a payment plan’s payment is due.
|
35
|
-
attr_accessor :due_date
|
36
|
-
|
37
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
38
|
-
@amount = amount
|
39
|
-
@days_until_due = days_until_due
|
40
|
-
@description = description
|
41
|
-
@due_date = due_date
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
26
|
class AutomaticTax < Stripe::RequestParams
|
46
27
|
class Liability < Stripe::RequestParams
|
47
28
|
# The connected account being referenced when `type` is `account`.
|
@@ -78,44 +59,16 @@ module Stripe
|
|
78
59
|
end
|
79
60
|
|
80
61
|
class Discount < Stripe::RequestParams
|
81
|
-
class DiscountEnd < Stripe::RequestParams
|
82
|
-
class Duration < Stripe::RequestParams
|
83
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
84
|
-
attr_accessor :interval
|
85
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
86
|
-
attr_accessor :interval_count
|
87
|
-
|
88
|
-
def initialize(interval: nil, interval_count: nil)
|
89
|
-
@interval = interval
|
90
|
-
@interval_count = interval_count
|
91
|
-
end
|
92
|
-
end
|
93
|
-
# Time span for the redeemed discount.
|
94
|
-
attr_accessor :duration
|
95
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
96
|
-
attr_accessor :timestamp
|
97
|
-
# The type of calculation made to determine when the discount ends.
|
98
|
-
attr_accessor :type
|
99
|
-
|
100
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
101
|
-
@duration = duration
|
102
|
-
@timestamp = timestamp
|
103
|
-
@type = type
|
104
|
-
end
|
105
|
-
end
|
106
62
|
# ID of the coupon to create a new discount for.
|
107
63
|
attr_accessor :coupon
|
108
64
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
109
65
|
attr_accessor :discount
|
110
|
-
# Details to determine how long the discount should be applied for.
|
111
|
-
attr_accessor :discount_end
|
112
66
|
# ID of the promotion code to create a new discount for.
|
113
67
|
attr_accessor :promotion_code
|
114
68
|
|
115
|
-
def initialize(coupon: nil, discount: nil,
|
69
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
116
70
|
@coupon = coupon
|
117
71
|
@discount = discount
|
118
|
-
@discount_end = discount_end
|
119
72
|
@promotion_code = promotion_code
|
120
73
|
end
|
121
74
|
end
|
@@ -235,9 +188,6 @@ module Stripe
|
|
235
188
|
end
|
236
189
|
end
|
237
190
|
|
238
|
-
class IdBankTransfer < Stripe::RequestParams
|
239
|
-
end
|
240
|
-
|
241
191
|
class Konbini < Stripe::RequestParams
|
242
192
|
end
|
243
193
|
|
@@ -249,12 +199,9 @@ module Stripe
|
|
249
199
|
class Filters < Stripe::RequestParams
|
250
200
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
251
201
|
attr_accessor :account_subcategories
|
252
|
-
# ID of the institution to use to filter for selectable accounts.
|
253
|
-
attr_accessor :institution
|
254
202
|
|
255
|
-
def initialize(account_subcategories: nil
|
203
|
+
def initialize(account_subcategories: nil)
|
256
204
|
@account_subcategories = account_subcategories
|
257
|
-
@institution = institution
|
258
205
|
end
|
259
206
|
end
|
260
207
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -288,8 +235,6 @@ module Stripe
|
|
288
235
|
attr_accessor :card
|
289
236
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
290
237
|
attr_accessor :customer_balance
|
291
|
-
# 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.
|
292
|
-
attr_accessor :id_bank_transfer
|
293
238
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
294
239
|
attr_accessor :konbini
|
295
240
|
# If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
@@ -302,7 +247,6 @@ module Stripe
|
|
302
247
|
bancontact: nil,
|
303
248
|
card: nil,
|
304
249
|
customer_balance: nil,
|
305
|
-
id_bank_transfer: nil,
|
306
250
|
konbini: nil,
|
307
251
|
sepa_debit: nil,
|
308
252
|
us_bank_account: nil
|
@@ -311,7 +255,6 @@ module Stripe
|
|
311
255
|
@bancontact = bancontact
|
312
256
|
@card = card
|
313
257
|
@customer_balance = customer_balance
|
314
|
-
@id_bank_transfer = id_bank_transfer
|
315
258
|
@konbini = konbini
|
316
259
|
@sepa_debit = sepa_debit
|
317
260
|
@us_bank_account = us_bank_account
|
@@ -523,8 +466,6 @@ module Stripe
|
|
523
466
|
end
|
524
467
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
525
468
|
attr_accessor :account_tax_ids
|
526
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
527
|
-
attr_accessor :amounts_due
|
528
469
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
529
470
|
attr_accessor :application_fee_amount
|
530
471
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -539,8 +480,6 @@ module Stripe
|
|
539
480
|
attr_accessor :custom_fields
|
540
481
|
# The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
|
541
482
|
attr_accessor :days_until_due
|
542
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
543
|
-
attr_accessor :default_margins
|
544
483
|
# ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
545
484
|
attr_accessor :default_payment_method
|
546
485
|
# ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
@@ -582,7 +521,6 @@ module Stripe
|
|
582
521
|
|
583
522
|
def initialize(
|
584
523
|
account_tax_ids: nil,
|
585
|
-
amounts_due: nil,
|
586
524
|
application_fee_amount: nil,
|
587
525
|
auto_advance: nil,
|
588
526
|
automatic_tax: nil,
|
@@ -590,7 +528,6 @@ module Stripe
|
|
590
528
|
collection_method: nil,
|
591
529
|
custom_fields: nil,
|
592
530
|
days_until_due: nil,
|
593
|
-
default_margins: nil,
|
594
531
|
default_payment_method: nil,
|
595
532
|
default_source: nil,
|
596
533
|
default_tax_rates: nil,
|
@@ -612,7 +549,6 @@ module Stripe
|
|
612
549
|
transfer_data: nil
|
613
550
|
)
|
614
551
|
@account_tax_ids = account_tax_ids
|
615
|
-
@amounts_due = amounts_due
|
616
552
|
@application_fee_amount = application_fee_amount
|
617
553
|
@auto_advance = auto_advance
|
618
554
|
@automatic_tax = automatic_tax
|
@@ -620,7 +556,6 @@ module Stripe
|
|
620
556
|
@collection_method = collection_method
|
621
557
|
@custom_fields = custom_fields
|
622
558
|
@days_until_due = days_until_due
|
623
|
-
@default_margins = default_margins
|
624
559
|
@default_payment_method = default_payment_method
|
625
560
|
@default_source = default_source
|
626
561
|
@default_tax_rates = default_tax_rates
|
@@ -685,8 +620,6 @@ module Stripe
|
|
685
620
|
attr_accessor :created
|
686
621
|
# Only return invoices for the customer specified by this customer ID.
|
687
622
|
attr_accessor :customer
|
688
|
-
# Attribute for param field customer_account
|
689
|
-
attr_accessor :customer_account
|
690
623
|
# Attribute for param field due_date
|
691
624
|
attr_accessor :due_date
|
692
625
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
@@ -706,7 +639,6 @@ module Stripe
|
|
706
639
|
collection_method: nil,
|
707
640
|
created: nil,
|
708
641
|
customer: nil,
|
709
|
-
customer_account: nil,
|
710
642
|
due_date: nil,
|
711
643
|
ending_before: nil,
|
712
644
|
expand: nil,
|
@@ -718,7 +650,6 @@ module Stripe
|
|
718
650
|
@collection_method = collection_method
|
719
651
|
@created = created
|
720
652
|
@customer = customer
|
721
|
-
@customer_account = customer_account
|
722
653
|
@due_date = due_date
|
723
654
|
@ending_before = ending_before
|
724
655
|
@expand = expand
|
@@ -730,24 +661,6 @@ module Stripe
|
|
730
661
|
end
|
731
662
|
|
732
663
|
class CreateParams < Stripe::RequestParams
|
733
|
-
class AmountsDue < Stripe::RequestParams
|
734
|
-
# The amount in cents (or local equivalent).
|
735
|
-
attr_accessor :amount
|
736
|
-
# Number of days from when invoice is finalized until the payment is due.
|
737
|
-
attr_accessor :days_until_due
|
738
|
-
# An arbitrary string attached to the object. Often useful for displaying to users.
|
739
|
-
attr_accessor :description
|
740
|
-
# Date on which a payment plan’s payment is due.
|
741
|
-
attr_accessor :due_date
|
742
|
-
|
743
|
-
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
744
|
-
@amount = amount
|
745
|
-
@days_until_due = days_until_due
|
746
|
-
@description = description
|
747
|
-
@due_date = due_date
|
748
|
-
end
|
749
|
-
end
|
750
|
-
|
751
664
|
class AutomaticTax < Stripe::RequestParams
|
752
665
|
class Liability < Stripe::RequestParams
|
753
666
|
# The connected account being referenced when `type` is `account`.
|
@@ -784,44 +697,16 @@ module Stripe
|
|
784
697
|
end
|
785
698
|
|
786
699
|
class Discount < Stripe::RequestParams
|
787
|
-
class DiscountEnd < Stripe::RequestParams
|
788
|
-
class Duration < Stripe::RequestParams
|
789
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
790
|
-
attr_accessor :interval
|
791
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
792
|
-
attr_accessor :interval_count
|
793
|
-
|
794
|
-
def initialize(interval: nil, interval_count: nil)
|
795
|
-
@interval = interval
|
796
|
-
@interval_count = interval_count
|
797
|
-
end
|
798
|
-
end
|
799
|
-
# Time span for the redeemed discount.
|
800
|
-
attr_accessor :duration
|
801
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
802
|
-
attr_accessor :timestamp
|
803
|
-
# The type of calculation made to determine when the discount ends.
|
804
|
-
attr_accessor :type
|
805
|
-
|
806
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
807
|
-
@duration = duration
|
808
|
-
@timestamp = timestamp
|
809
|
-
@type = type
|
810
|
-
end
|
811
|
-
end
|
812
700
|
# ID of the coupon to create a new discount for.
|
813
701
|
attr_accessor :coupon
|
814
702
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
815
703
|
attr_accessor :discount
|
816
|
-
# Details to determine how long the discount should be applied for.
|
817
|
-
attr_accessor :discount_end
|
818
704
|
# ID of the promotion code to create a new discount for.
|
819
705
|
attr_accessor :promotion_code
|
820
706
|
|
821
|
-
def initialize(coupon: nil, discount: nil,
|
707
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
822
708
|
@coupon = coupon
|
823
709
|
@discount = discount
|
824
|
-
@discount_end = discount_end
|
825
710
|
@promotion_code = promotion_code
|
826
711
|
end
|
827
712
|
end
|
@@ -953,9 +838,6 @@ module Stripe
|
|
953
838
|
end
|
954
839
|
end
|
955
840
|
|
956
|
-
class IdBankTransfer < Stripe::RequestParams
|
957
|
-
end
|
958
|
-
|
959
841
|
class Konbini < Stripe::RequestParams
|
960
842
|
end
|
961
843
|
|
@@ -967,12 +849,9 @@ module Stripe
|
|
967
849
|
class Filters < Stripe::RequestParams
|
968
850
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
969
851
|
attr_accessor :account_subcategories
|
970
|
-
# ID of the institution to use to filter for selectable accounts.
|
971
|
-
attr_accessor :institution
|
972
852
|
|
973
|
-
def initialize(account_subcategories: nil
|
853
|
+
def initialize(account_subcategories: nil)
|
974
854
|
@account_subcategories = account_subcategories
|
975
|
-
@institution = institution
|
976
855
|
end
|
977
856
|
end
|
978
857
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -1006,8 +885,6 @@ module Stripe
|
|
1006
885
|
attr_accessor :card
|
1007
886
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1008
887
|
attr_accessor :customer_balance
|
1009
|
-
# 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.
|
1010
|
-
attr_accessor :id_bank_transfer
|
1011
888
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1012
889
|
attr_accessor :konbini
|
1013
890
|
# If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
@@ -1020,7 +897,6 @@ module Stripe
|
|
1020
897
|
bancontact: nil,
|
1021
898
|
card: nil,
|
1022
899
|
customer_balance: nil,
|
1023
|
-
id_bank_transfer: nil,
|
1024
900
|
konbini: nil,
|
1025
901
|
sepa_debit: nil,
|
1026
902
|
us_bank_account: nil
|
@@ -1029,7 +905,6 @@ module Stripe
|
|
1029
905
|
@bancontact = bancontact
|
1030
906
|
@card = card
|
1031
907
|
@customer_balance = customer_balance
|
1032
|
-
@id_bank_transfer = id_bank_transfer
|
1033
908
|
@konbini = konbini
|
1034
909
|
@sepa_debit = sepa_debit
|
1035
910
|
@us_bank_account = us_bank_account
|
@@ -1241,8 +1116,6 @@ module Stripe
|
|
1241
1116
|
end
|
1242
1117
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1243
1118
|
attr_accessor :account_tax_ids
|
1244
|
-
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1245
|
-
attr_accessor :amounts_due
|
1246
1119
|
# A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
|
1247
1120
|
attr_accessor :application_fee_amount
|
1248
1121
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
@@ -1259,12 +1132,8 @@ module Stripe
|
|
1259
1132
|
attr_accessor :custom_fields
|
1260
1133
|
# The ID of the customer who will be billed.
|
1261
1134
|
attr_accessor :customer
|
1262
|
-
# The ID of the account who will be billed.
|
1263
|
-
attr_accessor :customer_account
|
1264
1135
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1265
1136
|
attr_accessor :days_until_due
|
1266
|
-
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1267
|
-
attr_accessor :default_margins
|
1268
1137
|
# ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
|
1269
1138
|
attr_accessor :default_payment_method
|
1270
1139
|
# ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
|
@@ -1312,7 +1181,6 @@ module Stripe
|
|
1312
1181
|
|
1313
1182
|
def initialize(
|
1314
1183
|
account_tax_ids: nil,
|
1315
|
-
amounts_due: nil,
|
1316
1184
|
application_fee_amount: nil,
|
1317
1185
|
auto_advance: nil,
|
1318
1186
|
automatic_tax: nil,
|
@@ -1321,9 +1189,7 @@ module Stripe
|
|
1321
1189
|
currency: nil,
|
1322
1190
|
custom_fields: nil,
|
1323
1191
|
customer: nil,
|
1324
|
-
customer_account: nil,
|
1325
1192
|
days_until_due: nil,
|
1326
|
-
default_margins: nil,
|
1327
1193
|
default_payment_method: nil,
|
1328
1194
|
default_source: nil,
|
1329
1195
|
default_tax_rates: nil,
|
@@ -1348,7 +1214,6 @@ module Stripe
|
|
1348
1214
|
transfer_data: nil
|
1349
1215
|
)
|
1350
1216
|
@account_tax_ids = account_tax_ids
|
1351
|
-
@amounts_due = amounts_due
|
1352
1217
|
@application_fee_amount = application_fee_amount
|
1353
1218
|
@auto_advance = auto_advance
|
1354
1219
|
@automatic_tax = automatic_tax
|
@@ -1357,9 +1222,7 @@ module Stripe
|
|
1357
1222
|
@currency = currency
|
1358
1223
|
@custom_fields = custom_fields
|
1359
1224
|
@customer = customer
|
1360
|
-
@customer_account = customer_account
|
1361
1225
|
@days_until_due = days_until_due
|
1362
|
-
@default_margins = default_margins
|
1363
1226
|
@default_payment_method = default_payment_method
|
1364
1227
|
@default_source = default_source
|
1365
1228
|
@default_tax_rates = default_tax_rates
|
@@ -1406,44 +1269,16 @@ module Stripe
|
|
1406
1269
|
class AddLinesParams < Stripe::RequestParams
|
1407
1270
|
class Line < Stripe::RequestParams
|
1408
1271
|
class Discount < Stripe::RequestParams
|
1409
|
-
class DiscountEnd < Stripe::RequestParams
|
1410
|
-
class Duration < Stripe::RequestParams
|
1411
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1412
|
-
attr_accessor :interval
|
1413
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1414
|
-
attr_accessor :interval_count
|
1415
|
-
|
1416
|
-
def initialize(interval: nil, interval_count: nil)
|
1417
|
-
@interval = interval
|
1418
|
-
@interval_count = interval_count
|
1419
|
-
end
|
1420
|
-
end
|
1421
|
-
# Time span for the redeemed discount.
|
1422
|
-
attr_accessor :duration
|
1423
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1424
|
-
attr_accessor :timestamp
|
1425
|
-
# The type of calculation made to determine when the discount ends.
|
1426
|
-
attr_accessor :type
|
1427
|
-
|
1428
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1429
|
-
@duration = duration
|
1430
|
-
@timestamp = timestamp
|
1431
|
-
@type = type
|
1432
|
-
end
|
1433
|
-
end
|
1434
1272
|
# ID of the coupon to create a new discount for.
|
1435
1273
|
attr_accessor :coupon
|
1436
1274
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1437
1275
|
attr_accessor :discount
|
1438
|
-
# Details to determine how long the discount should be applied for.
|
1439
|
-
attr_accessor :discount_end
|
1440
1276
|
# ID of the promotion code to create a new discount for.
|
1441
1277
|
attr_accessor :promotion_code
|
1442
1278
|
|
1443
|
-
def initialize(coupon: nil, discount: nil,
|
1279
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1444
1280
|
@coupon = coupon
|
1445
1281
|
@discount = discount
|
1446
|
-
@discount_end = discount_end
|
1447
1282
|
@promotion_code = promotion_code
|
1448
1283
|
end
|
1449
1284
|
end
|
@@ -1596,8 +1431,6 @@ module Stripe
|
|
1596
1431
|
attr_accessor :discounts
|
1597
1432
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1598
1433
|
attr_accessor :invoice_item
|
1599
|
-
# 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.
|
1600
|
-
attr_accessor :margins
|
1601
1434
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1602
1435
|
attr_accessor :metadata
|
1603
1436
|
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
@@ -1619,7 +1452,6 @@ module Stripe
|
|
1619
1452
|
discountable: nil,
|
1620
1453
|
discounts: nil,
|
1621
1454
|
invoice_item: nil,
|
1622
|
-
margins: nil,
|
1623
1455
|
metadata: nil,
|
1624
1456
|
period: nil,
|
1625
1457
|
price_data: nil,
|
@@ -1633,7 +1465,6 @@ module Stripe
|
|
1633
1465
|
@discountable = discountable
|
1634
1466
|
@discounts = discounts
|
1635
1467
|
@invoice_item = invoice_item
|
1636
|
-
@margins = margins
|
1637
1468
|
@metadata = metadata
|
1638
1469
|
@period = period
|
1639
1470
|
@price_data = price_data
|
@@ -1657,78 +1488,6 @@ module Stripe
|
|
1657
1488
|
end
|
1658
1489
|
end
|
1659
1490
|
|
1660
|
-
class AttachPaymentParams < Stripe::RequestParams
|
1661
|
-
class PaymentRecordData < Stripe::RequestParams
|
1662
|
-
# The amount that was paid out of band.
|
1663
|
-
attr_accessor :amount
|
1664
|
-
# The currency that was paid out of band.
|
1665
|
-
attr_accessor :currency
|
1666
|
-
# 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`.
|
1667
|
-
attr_accessor :metadata
|
1668
|
-
# The type of money movement for this out of band payment record.
|
1669
|
-
attr_accessor :money_movement_type
|
1670
|
-
# The timestamp when this out of band payment was paid.
|
1671
|
-
attr_accessor :paid_at
|
1672
|
-
# The reference for this out of band payment record.
|
1673
|
-
attr_accessor :payment_reference
|
1674
|
-
|
1675
|
-
def initialize(
|
1676
|
-
amount: nil,
|
1677
|
-
currency: nil,
|
1678
|
-
metadata: nil,
|
1679
|
-
money_movement_type: nil,
|
1680
|
-
paid_at: nil,
|
1681
|
-
payment_reference: nil
|
1682
|
-
)
|
1683
|
-
@amount = amount
|
1684
|
-
@currency = currency
|
1685
|
-
@metadata = metadata
|
1686
|
-
@money_movement_type = money_movement_type
|
1687
|
-
@paid_at = paid_at
|
1688
|
-
@payment_reference = payment_reference
|
1689
|
-
end
|
1690
|
-
end
|
1691
|
-
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
1692
|
-
attr_accessor :amount_requested
|
1693
|
-
# Specifies which fields in the response should be expanded.
|
1694
|
-
attr_accessor :expand
|
1695
|
-
# The ID of the PaymentIntent to attach to the invoice.
|
1696
|
-
attr_accessor :payment_intent
|
1697
|
-
# The ID of the PaymentRecord to attach to the invoice.
|
1698
|
-
attr_accessor :payment_record
|
1699
|
-
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
1700
|
-
attr_accessor :payment_record_data
|
1701
|
-
|
1702
|
-
def initialize(
|
1703
|
-
amount_requested: nil,
|
1704
|
-
expand: nil,
|
1705
|
-
payment_intent: nil,
|
1706
|
-
payment_record: nil,
|
1707
|
-
payment_record_data: nil
|
1708
|
-
)
|
1709
|
-
@amount_requested = amount_requested
|
1710
|
-
@expand = expand
|
1711
|
-
@payment_intent = payment_intent
|
1712
|
-
@payment_record = payment_record
|
1713
|
-
@payment_record_data = payment_record_data
|
1714
|
-
end
|
1715
|
-
end
|
1716
|
-
|
1717
|
-
class AttachPaymentIntentParams < Stripe::RequestParams
|
1718
|
-
# The portion of the PaymentIntent’s `amount` that should be applied to thisinvoice. Defaults to the entire amount.
|
1719
|
-
attr_accessor :amount_requested
|
1720
|
-
# Specifies which fields in the response should be expanded.
|
1721
|
-
attr_accessor :expand
|
1722
|
-
# The ID of the PaymentIntent to attach to the invoice.
|
1723
|
-
attr_accessor :payment_intent
|
1724
|
-
|
1725
|
-
def initialize(amount_requested: nil, expand: nil, payment_intent: nil)
|
1726
|
-
@amount_requested = amount_requested
|
1727
|
-
@expand = expand
|
1728
|
-
@payment_intent = payment_intent
|
1729
|
-
end
|
1730
|
-
end
|
1731
|
-
|
1732
1491
|
class FinalizeInvoiceParams < Stripe::RequestParams
|
1733
1492
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
1734
1493
|
attr_accessor :auto_advance
|
@@ -1825,44 +1584,16 @@ module Stripe
|
|
1825
1584
|
class UpdateLinesParams < Stripe::RequestParams
|
1826
1585
|
class Line < Stripe::RequestParams
|
1827
1586
|
class Discount < Stripe::RequestParams
|
1828
|
-
class DiscountEnd < Stripe::RequestParams
|
1829
|
-
class Duration < Stripe::RequestParams
|
1830
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1831
|
-
attr_accessor :interval
|
1832
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1833
|
-
attr_accessor :interval_count
|
1834
|
-
|
1835
|
-
def initialize(interval: nil, interval_count: nil)
|
1836
|
-
@interval = interval
|
1837
|
-
@interval_count = interval_count
|
1838
|
-
end
|
1839
|
-
end
|
1840
|
-
# Time span for the redeemed discount.
|
1841
|
-
attr_accessor :duration
|
1842
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1843
|
-
attr_accessor :timestamp
|
1844
|
-
# The type of calculation made to determine when the discount ends.
|
1845
|
-
attr_accessor :type
|
1846
|
-
|
1847
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1848
|
-
@duration = duration
|
1849
|
-
@timestamp = timestamp
|
1850
|
-
@type = type
|
1851
|
-
end
|
1852
|
-
end
|
1853
1587
|
# ID of the coupon to create a new discount for.
|
1854
1588
|
attr_accessor :coupon
|
1855
1589
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1856
1590
|
attr_accessor :discount
|
1857
|
-
# Details to determine how long the discount should be applied for.
|
1858
|
-
attr_accessor :discount_end
|
1859
1591
|
# ID of the promotion code to create a new discount for.
|
1860
1592
|
attr_accessor :promotion_code
|
1861
1593
|
|
1862
|
-
def initialize(coupon: nil, discount: nil,
|
1594
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1863
1595
|
@coupon = coupon
|
1864
1596
|
@discount = discount
|
1865
|
-
@discount_end = discount_end
|
1866
1597
|
@promotion_code = promotion_code
|
1867
1598
|
end
|
1868
1599
|
end
|
@@ -2015,8 +1746,6 @@ module Stripe
|
|
2015
1746
|
attr_accessor :discounts
|
2016
1747
|
# ID of an existing line item on the invoice.
|
2017
1748
|
attr_accessor :id
|
2018
|
-
# 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.
|
2019
|
-
attr_accessor :margins
|
2020
1749
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
2021
1750
|
attr_accessor :metadata
|
2022
1751
|
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
@@ -2038,7 +1767,6 @@ module Stripe
|
|
2038
1767
|
discountable: nil,
|
2039
1768
|
discounts: nil,
|
2040
1769
|
id: nil,
|
2041
|
-
margins: nil,
|
2042
1770
|
metadata: nil,
|
2043
1771
|
period: nil,
|
2044
1772
|
price_data: nil,
|
@@ -2052,7 +1780,6 @@ module Stripe
|
|
2052
1780
|
@discountable = discountable
|
2053
1781
|
@discounts = discounts
|
2054
1782
|
@id = id
|
2055
|
-
@margins = margins
|
2056
1783
|
@metadata = metadata
|
2057
1784
|
@period = period
|
2058
1785
|
@price_data = price_data
|
@@ -2227,88 +1954,32 @@ module Stripe
|
|
2227
1954
|
end
|
2228
1955
|
|
2229
1956
|
class Discount < Stripe::RequestParams
|
2230
|
-
class DiscountEnd < Stripe::RequestParams
|
2231
|
-
class Duration < Stripe::RequestParams
|
2232
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2233
|
-
attr_accessor :interval
|
2234
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2235
|
-
attr_accessor :interval_count
|
2236
|
-
|
2237
|
-
def initialize(interval: nil, interval_count: nil)
|
2238
|
-
@interval = interval
|
2239
|
-
@interval_count = interval_count
|
2240
|
-
end
|
2241
|
-
end
|
2242
|
-
# Time span for the redeemed discount.
|
2243
|
-
attr_accessor :duration
|
2244
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2245
|
-
attr_accessor :timestamp
|
2246
|
-
# The type of calculation made to determine when the discount ends.
|
2247
|
-
attr_accessor :type
|
2248
|
-
|
2249
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2250
|
-
@duration = duration
|
2251
|
-
@timestamp = timestamp
|
2252
|
-
@type = type
|
2253
|
-
end
|
2254
|
-
end
|
2255
1957
|
# ID of the coupon to create a new discount for.
|
2256
1958
|
attr_accessor :coupon
|
2257
1959
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2258
1960
|
attr_accessor :discount
|
2259
|
-
# Details to determine how long the discount should be applied for.
|
2260
|
-
attr_accessor :discount_end
|
2261
1961
|
# ID of the promotion code to create a new discount for.
|
2262
1962
|
attr_accessor :promotion_code
|
2263
1963
|
|
2264
|
-
def initialize(coupon: nil, discount: nil,
|
1964
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2265
1965
|
@coupon = coupon
|
2266
1966
|
@discount = discount
|
2267
|
-
@discount_end = discount_end
|
2268
1967
|
@promotion_code = promotion_code
|
2269
1968
|
end
|
2270
1969
|
end
|
2271
1970
|
|
2272
1971
|
class InvoiceItem < Stripe::RequestParams
|
2273
1972
|
class Discount < Stripe::RequestParams
|
2274
|
-
class DiscountEnd < Stripe::RequestParams
|
2275
|
-
class Duration < Stripe::RequestParams
|
2276
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2277
|
-
attr_accessor :interval
|
2278
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2279
|
-
attr_accessor :interval_count
|
2280
|
-
|
2281
|
-
def initialize(interval: nil, interval_count: nil)
|
2282
|
-
@interval = interval
|
2283
|
-
@interval_count = interval_count
|
2284
|
-
end
|
2285
|
-
end
|
2286
|
-
# Time span for the redeemed discount.
|
2287
|
-
attr_accessor :duration
|
2288
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2289
|
-
attr_accessor :timestamp
|
2290
|
-
# The type of calculation made to determine when the discount ends.
|
2291
|
-
attr_accessor :type
|
2292
|
-
|
2293
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2294
|
-
@duration = duration
|
2295
|
-
@timestamp = timestamp
|
2296
|
-
@type = type
|
2297
|
-
end
|
2298
|
-
end
|
2299
1973
|
# ID of the coupon to create a new discount for.
|
2300
1974
|
attr_accessor :coupon
|
2301
1975
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2302
1976
|
attr_accessor :discount
|
2303
|
-
# Details to determine how long the discount should be applied for.
|
2304
|
-
attr_accessor :discount_end
|
2305
1977
|
# ID of the promotion code to create a new discount for.
|
2306
1978
|
attr_accessor :promotion_code
|
2307
1979
|
|
2308
|
-
def initialize(coupon: nil, discount: nil,
|
1980
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2309
1981
|
@coupon = coupon
|
2310
1982
|
@discount = discount
|
2311
|
-
@discount_end = discount_end
|
2312
1983
|
@promotion_code = promotion_code
|
2313
1984
|
end
|
2314
1985
|
end
|
@@ -2434,499 +2105,19 @@ module Stripe
|
|
2434
2105
|
end
|
2435
2106
|
|
2436
2107
|
class ScheduleDetails < Stripe::RequestParams
|
2437
|
-
class Amendment < Stripe::RequestParams
|
2438
|
-
class AmendmentEnd < Stripe::RequestParams
|
2439
|
-
class DiscountEnd < Stripe::RequestParams
|
2440
|
-
# The ID of a specific discount.
|
2441
|
-
attr_accessor :discount
|
2442
|
-
|
2443
|
-
def initialize(discount: nil)
|
2444
|
-
@discount = discount
|
2445
|
-
end
|
2446
|
-
end
|
2447
|
-
|
2448
|
-
class Duration < Stripe::RequestParams
|
2449
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2450
|
-
attr_accessor :interval
|
2451
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2452
|
-
attr_accessor :interval_count
|
2453
|
-
|
2454
|
-
def initialize(interval: nil, interval_count: nil)
|
2455
|
-
@interval = interval
|
2456
|
-
@interval_count = interval_count
|
2457
|
-
end
|
2458
|
-
end
|
2459
|
-
# Use the `end` time of a given discount.
|
2460
|
-
attr_accessor :discount_end
|
2461
|
-
# Time span for the amendment starting from the `amendment_start`.
|
2462
|
-
attr_accessor :duration
|
2463
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2464
|
-
attr_accessor :timestamp
|
2465
|
-
# Select one of three ways to pass the `amendment_end`.
|
2466
|
-
attr_accessor :type
|
2467
|
-
|
2468
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2469
|
-
@discount_end = discount_end
|
2470
|
-
@duration = duration
|
2471
|
-
@timestamp = timestamp
|
2472
|
-
@type = type
|
2473
|
-
end
|
2474
|
-
end
|
2475
|
-
|
2476
|
-
class AmendmentStart < Stripe::RequestParams
|
2477
|
-
class AmendmentEnd < Stripe::RequestParams
|
2478
|
-
# 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.
|
2479
|
-
attr_accessor :index
|
2480
|
-
|
2481
|
-
def initialize(index: nil)
|
2482
|
-
@index = index
|
2483
|
-
end
|
2484
|
-
end
|
2485
|
-
|
2486
|
-
class DiscountEnd < Stripe::RequestParams
|
2487
|
-
# The ID of a specific discount.
|
2488
|
-
attr_accessor :discount
|
2489
|
-
|
2490
|
-
def initialize(discount: nil)
|
2491
|
-
@discount = discount
|
2492
|
-
end
|
2493
|
-
end
|
2494
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2495
|
-
attr_accessor :amendment_end
|
2496
|
-
# Use the `end` time of a given discount.
|
2497
|
-
attr_accessor :discount_end
|
2498
|
-
# A precise Unix timestamp for the amendment to start.
|
2499
|
-
attr_accessor :timestamp
|
2500
|
-
# Select one of three ways to pass the `amendment_start`.
|
2501
|
-
attr_accessor :type
|
2502
|
-
|
2503
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2504
|
-
@amendment_end = amendment_end
|
2505
|
-
@discount_end = discount_end
|
2506
|
-
@timestamp = timestamp
|
2507
|
-
@type = type
|
2508
|
-
end
|
2509
|
-
end
|
2510
|
-
|
2511
|
-
class DiscountAction < Stripe::RequestParams
|
2512
|
-
class Add < Stripe::RequestParams
|
2513
|
-
class DiscountEnd < Stripe::RequestParams
|
2514
|
-
# The type of calculation made to determine when the discount ends.
|
2515
|
-
attr_accessor :type
|
2516
|
-
|
2517
|
-
def initialize(type: nil)
|
2518
|
-
@type = type
|
2519
|
-
end
|
2520
|
-
end
|
2521
|
-
# The coupon code to redeem.
|
2522
|
-
attr_accessor :coupon
|
2523
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
2524
|
-
attr_accessor :discount
|
2525
|
-
# Details to determine how long the discount should be applied for.
|
2526
|
-
attr_accessor :discount_end
|
2527
|
-
# 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.
|
2528
|
-
attr_accessor :index
|
2529
|
-
# The promotion code to redeem.
|
2530
|
-
attr_accessor :promotion_code
|
2531
|
-
|
2532
|
-
def initialize(
|
2533
|
-
coupon: nil,
|
2534
|
-
discount: nil,
|
2535
|
-
discount_end: nil,
|
2536
|
-
index: nil,
|
2537
|
-
promotion_code: nil
|
2538
|
-
)
|
2539
|
-
@coupon = coupon
|
2540
|
-
@discount = discount
|
2541
|
-
@discount_end = discount_end
|
2542
|
-
@index = index
|
2543
|
-
@promotion_code = promotion_code
|
2544
|
-
end
|
2545
|
-
end
|
2546
|
-
|
2547
|
-
class Remove < Stripe::RequestParams
|
2548
|
-
# The coupon code to remove from the `discounts` array.
|
2549
|
-
attr_accessor :coupon
|
2550
|
-
# The ID of a discount to remove from the `discounts` array.
|
2551
|
-
attr_accessor :discount
|
2552
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
2553
|
-
attr_accessor :promotion_code
|
2554
|
-
|
2555
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2556
|
-
@coupon = coupon
|
2557
|
-
@discount = discount
|
2558
|
-
@promotion_code = promotion_code
|
2559
|
-
end
|
2560
|
-
end
|
2561
|
-
|
2562
|
-
class Set < Stripe::RequestParams
|
2563
|
-
# The coupon code to replace the `discounts` array with.
|
2564
|
-
attr_accessor :coupon
|
2565
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
2566
|
-
attr_accessor :discount
|
2567
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
2568
|
-
attr_accessor :promotion_code
|
2569
|
-
|
2570
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2571
|
-
@coupon = coupon
|
2572
|
-
@discount = discount
|
2573
|
-
@promotion_code = promotion_code
|
2574
|
-
end
|
2575
|
-
end
|
2576
|
-
# Details of the discount to add.
|
2577
|
-
attr_accessor :add
|
2578
|
-
# Details of the discount to remove.
|
2579
|
-
attr_accessor :remove
|
2580
|
-
# Details of the discount to replace the existing discounts with.
|
2581
|
-
attr_accessor :set
|
2582
|
-
# Determines the type of discount action.
|
2583
|
-
attr_accessor :type
|
2584
|
-
|
2585
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2586
|
-
@add = add
|
2587
|
-
@remove = remove
|
2588
|
-
@set = set
|
2589
|
-
@type = type
|
2590
|
-
end
|
2591
|
-
end
|
2592
|
-
|
2593
|
-
class ItemAction < Stripe::RequestParams
|
2594
|
-
class Add < Stripe::RequestParams
|
2595
|
-
class Discount < Stripe::RequestParams
|
2596
|
-
class DiscountEnd < Stripe::RequestParams
|
2597
|
-
class Duration < Stripe::RequestParams
|
2598
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2599
|
-
attr_accessor :interval
|
2600
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2601
|
-
attr_accessor :interval_count
|
2602
|
-
|
2603
|
-
def initialize(interval: nil, interval_count: nil)
|
2604
|
-
@interval = interval
|
2605
|
-
@interval_count = interval_count
|
2606
|
-
end
|
2607
|
-
end
|
2608
|
-
# Time span for the redeemed discount.
|
2609
|
-
attr_accessor :duration
|
2610
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2611
|
-
attr_accessor :timestamp
|
2612
|
-
# The type of calculation made to determine when the discount ends.
|
2613
|
-
attr_accessor :type
|
2614
|
-
|
2615
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2616
|
-
@duration = duration
|
2617
|
-
@timestamp = timestamp
|
2618
|
-
@type = type
|
2619
|
-
end
|
2620
|
-
end
|
2621
|
-
# ID of the coupon to create a new discount for.
|
2622
|
-
attr_accessor :coupon
|
2623
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2624
|
-
attr_accessor :discount
|
2625
|
-
# Details to determine how long the discount should be applied for.
|
2626
|
-
attr_accessor :discount_end
|
2627
|
-
# ID of the promotion code to create a new discount for.
|
2628
|
-
attr_accessor :promotion_code
|
2629
|
-
|
2630
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2631
|
-
@coupon = coupon
|
2632
|
-
@discount = discount
|
2633
|
-
@discount_end = discount_end
|
2634
|
-
@promotion_code = promotion_code
|
2635
|
-
end
|
2636
|
-
end
|
2637
|
-
|
2638
|
-
class Trial < Stripe::RequestParams
|
2639
|
-
# 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.
|
2640
|
-
attr_accessor :converts_to
|
2641
|
-
# Determines the type of trial for this item.
|
2642
|
-
attr_accessor :type
|
2643
|
-
|
2644
|
-
def initialize(converts_to: nil, type: nil)
|
2645
|
-
@converts_to = converts_to
|
2646
|
-
@type = type
|
2647
|
-
end
|
2648
|
-
end
|
2649
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2650
|
-
attr_accessor :discounts
|
2651
|
-
# 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`.
|
2652
|
-
attr_accessor :metadata
|
2653
|
-
# The ID of the price object.
|
2654
|
-
attr_accessor :price
|
2655
|
-
# Quantity for this item.
|
2656
|
-
attr_accessor :quantity
|
2657
|
-
# 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`.
|
2658
|
-
attr_accessor :tax_rates
|
2659
|
-
# Options that configure the trial on the subscription item.
|
2660
|
-
attr_accessor :trial
|
2661
|
-
|
2662
|
-
def initialize(
|
2663
|
-
discounts: nil,
|
2664
|
-
metadata: nil,
|
2665
|
-
price: nil,
|
2666
|
-
quantity: nil,
|
2667
|
-
tax_rates: nil,
|
2668
|
-
trial: nil
|
2669
|
-
)
|
2670
|
-
@discounts = discounts
|
2671
|
-
@metadata = metadata
|
2672
|
-
@price = price
|
2673
|
-
@quantity = quantity
|
2674
|
-
@tax_rates = tax_rates
|
2675
|
-
@trial = trial
|
2676
|
-
end
|
2677
|
-
end
|
2678
|
-
|
2679
|
-
class Remove < Stripe::RequestParams
|
2680
|
-
# ID of a price to remove.
|
2681
|
-
attr_accessor :price
|
2682
|
-
|
2683
|
-
def initialize(price: nil)
|
2684
|
-
@price = price
|
2685
|
-
end
|
2686
|
-
end
|
2687
|
-
|
2688
|
-
class Set < Stripe::RequestParams
|
2689
|
-
class Discount < Stripe::RequestParams
|
2690
|
-
class DiscountEnd < Stripe::RequestParams
|
2691
|
-
class Duration < Stripe::RequestParams
|
2692
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2693
|
-
attr_accessor :interval
|
2694
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2695
|
-
attr_accessor :interval_count
|
2696
|
-
|
2697
|
-
def initialize(interval: nil, interval_count: nil)
|
2698
|
-
@interval = interval
|
2699
|
-
@interval_count = interval_count
|
2700
|
-
end
|
2701
|
-
end
|
2702
|
-
# Time span for the redeemed discount.
|
2703
|
-
attr_accessor :duration
|
2704
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2705
|
-
attr_accessor :timestamp
|
2706
|
-
# The type of calculation made to determine when the discount ends.
|
2707
|
-
attr_accessor :type
|
2708
|
-
|
2709
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2710
|
-
@duration = duration
|
2711
|
-
@timestamp = timestamp
|
2712
|
-
@type = type
|
2713
|
-
end
|
2714
|
-
end
|
2715
|
-
# ID of the coupon to create a new discount for.
|
2716
|
-
attr_accessor :coupon
|
2717
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2718
|
-
attr_accessor :discount
|
2719
|
-
# Details to determine how long the discount should be applied for.
|
2720
|
-
attr_accessor :discount_end
|
2721
|
-
# ID of the promotion code to create a new discount for.
|
2722
|
-
attr_accessor :promotion_code
|
2723
|
-
|
2724
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2725
|
-
@coupon = coupon
|
2726
|
-
@discount = discount
|
2727
|
-
@discount_end = discount_end
|
2728
|
-
@promotion_code = promotion_code
|
2729
|
-
end
|
2730
|
-
end
|
2731
|
-
|
2732
|
-
class Trial < Stripe::RequestParams
|
2733
|
-
# 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.
|
2734
|
-
attr_accessor :converts_to
|
2735
|
-
# Determines the type of trial for this item.
|
2736
|
-
attr_accessor :type
|
2737
|
-
|
2738
|
-
def initialize(converts_to: nil, type: nil)
|
2739
|
-
@converts_to = converts_to
|
2740
|
-
@type = type
|
2741
|
-
end
|
2742
|
-
end
|
2743
|
-
# 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`.
|
2744
|
-
attr_accessor :discounts
|
2745
|
-
# 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`.
|
2746
|
-
attr_accessor :metadata
|
2747
|
-
# The ID of the price object.
|
2748
|
-
attr_accessor :price
|
2749
|
-
# 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`.
|
2750
|
-
attr_accessor :quantity
|
2751
|
-
# 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`.
|
2752
|
-
attr_accessor :tax_rates
|
2753
|
-
# 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`.
|
2754
|
-
attr_accessor :trial
|
2755
|
-
|
2756
|
-
def initialize(
|
2757
|
-
discounts: nil,
|
2758
|
-
metadata: nil,
|
2759
|
-
price: nil,
|
2760
|
-
quantity: nil,
|
2761
|
-
tax_rates: nil,
|
2762
|
-
trial: nil
|
2763
|
-
)
|
2764
|
-
@discounts = discounts
|
2765
|
-
@metadata = metadata
|
2766
|
-
@price = price
|
2767
|
-
@quantity = quantity
|
2768
|
-
@tax_rates = tax_rates
|
2769
|
-
@trial = trial
|
2770
|
-
end
|
2771
|
-
end
|
2772
|
-
# 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.
|
2773
|
-
attr_accessor :add
|
2774
|
-
# Details of the subscription item to remove.
|
2775
|
-
attr_accessor :remove
|
2776
|
-
# 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.
|
2777
|
-
attr_accessor :set
|
2778
|
-
# Determines the type of item action.
|
2779
|
-
attr_accessor :type
|
2780
|
-
|
2781
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2782
|
-
@add = add
|
2783
|
-
@remove = remove
|
2784
|
-
@set = set
|
2785
|
-
@type = type
|
2786
|
-
end
|
2787
|
-
end
|
2788
|
-
|
2789
|
-
class MetadataAction < Stripe::RequestParams
|
2790
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2791
|
-
attr_accessor :add
|
2792
|
-
# Keys to remove from schedule phase metadata.
|
2793
|
-
attr_accessor :remove
|
2794
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2795
|
-
attr_accessor :set
|
2796
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2797
|
-
attr_accessor :type
|
2798
|
-
|
2799
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2800
|
-
@add = add
|
2801
|
-
@remove = remove
|
2802
|
-
@set = set
|
2803
|
-
@type = type
|
2804
|
-
end
|
2805
|
-
end
|
2806
|
-
|
2807
|
-
class SetPauseCollection < Stripe::RequestParams
|
2808
|
-
class Set < Stripe::RequestParams
|
2809
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2810
|
-
attr_accessor :behavior
|
2811
|
-
|
2812
|
-
def initialize(behavior: nil)
|
2813
|
-
@behavior = behavior
|
2814
|
-
end
|
2815
|
-
end
|
2816
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2817
|
-
attr_accessor :set
|
2818
|
-
# Determines the type of the pause_collection amendment.
|
2819
|
-
attr_accessor :type
|
2820
|
-
|
2821
|
-
def initialize(set: nil, type: nil)
|
2822
|
-
@set = set
|
2823
|
-
@type = type
|
2824
|
-
end
|
2825
|
-
end
|
2826
|
-
|
2827
|
-
class TrialSettings < Stripe::RequestParams
|
2828
|
-
class EndBehavior < Stripe::RequestParams
|
2829
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2830
|
-
attr_accessor :prorate_up_front
|
2831
|
-
|
2832
|
-
def initialize(prorate_up_front: nil)
|
2833
|
-
@prorate_up_front = prorate_up_front
|
2834
|
-
end
|
2835
|
-
end
|
2836
|
-
# Defines how the subscription should behave when a trial ends.
|
2837
|
-
attr_accessor :end_behavior
|
2838
|
-
|
2839
|
-
def initialize(end_behavior: nil)
|
2840
|
-
@end_behavior = end_behavior
|
2841
|
-
end
|
2842
|
-
end
|
2843
|
-
# 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.
|
2844
|
-
attr_accessor :amendment_end
|
2845
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2846
|
-
attr_accessor :amendment_start
|
2847
|
-
# 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.
|
2848
|
-
attr_accessor :billing_cycle_anchor
|
2849
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2850
|
-
attr_accessor :discount_actions
|
2851
|
-
# Changes to the subscription items during the amendment time span.
|
2852
|
-
attr_accessor :item_actions
|
2853
|
-
# Instructions for how to modify phase metadata
|
2854
|
-
attr_accessor :metadata_actions
|
2855
|
-
# 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`.
|
2856
|
-
attr_accessor :proration_behavior
|
2857
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2858
|
-
attr_accessor :set_pause_collection
|
2859
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2860
|
-
attr_accessor :set_schedule_end
|
2861
|
-
# Settings related to subscription trials.
|
2862
|
-
attr_accessor :trial_settings
|
2863
|
-
|
2864
|
-
def initialize(
|
2865
|
-
amendment_end: nil,
|
2866
|
-
amendment_start: nil,
|
2867
|
-
billing_cycle_anchor: nil,
|
2868
|
-
discount_actions: nil,
|
2869
|
-
item_actions: nil,
|
2870
|
-
metadata_actions: nil,
|
2871
|
-
proration_behavior: nil,
|
2872
|
-
set_pause_collection: nil,
|
2873
|
-
set_schedule_end: nil,
|
2874
|
-
trial_settings: nil
|
2875
|
-
)
|
2876
|
-
@amendment_end = amendment_end
|
2877
|
-
@amendment_start = amendment_start
|
2878
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2879
|
-
@discount_actions = discount_actions
|
2880
|
-
@item_actions = item_actions
|
2881
|
-
@metadata_actions = metadata_actions
|
2882
|
-
@proration_behavior = proration_behavior
|
2883
|
-
@set_pause_collection = set_pause_collection
|
2884
|
-
@set_schedule_end = set_schedule_end
|
2885
|
-
@trial_settings = trial_settings
|
2886
|
-
end
|
2887
|
-
end
|
2888
|
-
|
2889
2108
|
class Phase < Stripe::RequestParams
|
2890
2109
|
class AddInvoiceItem < Stripe::RequestParams
|
2891
2110
|
class Discount < Stripe::RequestParams
|
2892
|
-
class DiscountEnd < Stripe::RequestParams
|
2893
|
-
class Duration < Stripe::RequestParams
|
2894
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2895
|
-
attr_accessor :interval
|
2896
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2897
|
-
attr_accessor :interval_count
|
2898
|
-
|
2899
|
-
def initialize(interval: nil, interval_count: nil)
|
2900
|
-
@interval = interval
|
2901
|
-
@interval_count = interval_count
|
2902
|
-
end
|
2903
|
-
end
|
2904
|
-
# Time span for the redeemed discount.
|
2905
|
-
attr_accessor :duration
|
2906
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2907
|
-
attr_accessor :timestamp
|
2908
|
-
# The type of calculation made to determine when the discount ends.
|
2909
|
-
attr_accessor :type
|
2910
|
-
|
2911
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2912
|
-
@duration = duration
|
2913
|
-
@timestamp = timestamp
|
2914
|
-
@type = type
|
2915
|
-
end
|
2916
|
-
end
|
2917
2111
|
# ID of the coupon to create a new discount for.
|
2918
2112
|
attr_accessor :coupon
|
2919
2113
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2920
2114
|
attr_accessor :discount
|
2921
|
-
# Details to determine how long the discount should be applied for.
|
2922
|
-
attr_accessor :discount_end
|
2923
2115
|
# ID of the promotion code to create a new discount for.
|
2924
2116
|
attr_accessor :promotion_code
|
2925
2117
|
|
2926
|
-
def initialize(coupon: nil, discount: nil,
|
2118
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2927
2119
|
@coupon = coupon
|
2928
2120
|
@discount = discount
|
2929
|
-
@discount_end = discount_end
|
2930
2121
|
@promotion_code = promotion_code
|
2931
2122
|
end
|
2932
2123
|
end
|
@@ -3007,44 +2198,16 @@ module Stripe
|
|
3007
2198
|
end
|
3008
2199
|
|
3009
2200
|
class Discount < Stripe::RequestParams
|
3010
|
-
class DiscountEnd < Stripe::RequestParams
|
3011
|
-
class Duration < Stripe::RequestParams
|
3012
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3013
|
-
attr_accessor :interval
|
3014
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3015
|
-
attr_accessor :interval_count
|
3016
|
-
|
3017
|
-
def initialize(interval: nil, interval_count: nil)
|
3018
|
-
@interval = interval
|
3019
|
-
@interval_count = interval_count
|
3020
|
-
end
|
3021
|
-
end
|
3022
|
-
# Time span for the redeemed discount.
|
3023
|
-
attr_accessor :duration
|
3024
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3025
|
-
attr_accessor :timestamp
|
3026
|
-
# The type of calculation made to determine when the discount ends.
|
3027
|
-
attr_accessor :type
|
3028
|
-
|
3029
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3030
|
-
@duration = duration
|
3031
|
-
@timestamp = timestamp
|
3032
|
-
@type = type
|
3033
|
-
end
|
3034
|
-
end
|
3035
2201
|
# ID of the coupon to create a new discount for.
|
3036
2202
|
attr_accessor :coupon
|
3037
2203
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3038
2204
|
attr_accessor :discount
|
3039
|
-
# Details to determine how long the discount should be applied for.
|
3040
|
-
attr_accessor :discount_end
|
3041
2205
|
# ID of the promotion code to create a new discount for.
|
3042
2206
|
attr_accessor :promotion_code
|
3043
2207
|
|
3044
|
-
def initialize(coupon: nil, discount: nil,
|
2208
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3045
2209
|
@coupon = coupon
|
3046
2210
|
@discount = discount
|
3047
|
-
@discount_end = discount_end
|
3048
2211
|
@promotion_code = promotion_code
|
3049
2212
|
end
|
3050
2213
|
end
|
@@ -3077,44 +2240,16 @@ module Stripe
|
|
3077
2240
|
|
3078
2241
|
class Item < Stripe::RequestParams
|
3079
2242
|
class Discount < Stripe::RequestParams
|
3080
|
-
class DiscountEnd < Stripe::RequestParams
|
3081
|
-
class Duration < Stripe::RequestParams
|
3082
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3083
|
-
attr_accessor :interval
|
3084
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3085
|
-
attr_accessor :interval_count
|
3086
|
-
|
3087
|
-
def initialize(interval: nil, interval_count: nil)
|
3088
|
-
@interval = interval
|
3089
|
-
@interval_count = interval_count
|
3090
|
-
end
|
3091
|
-
end
|
3092
|
-
# Time span for the redeemed discount.
|
3093
|
-
attr_accessor :duration
|
3094
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3095
|
-
attr_accessor :timestamp
|
3096
|
-
# The type of calculation made to determine when the discount ends.
|
3097
|
-
attr_accessor :type
|
3098
|
-
|
3099
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3100
|
-
@duration = duration
|
3101
|
-
@timestamp = timestamp
|
3102
|
-
@type = type
|
3103
|
-
end
|
3104
|
-
end
|
3105
2243
|
# ID of the coupon to create a new discount for.
|
3106
2244
|
attr_accessor :coupon
|
3107
2245
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3108
2246
|
attr_accessor :discount
|
3109
|
-
# Details to determine how long the discount should be applied for.
|
3110
|
-
attr_accessor :discount_end
|
3111
2247
|
# ID of the promotion code to create a new discount for.
|
3112
2248
|
attr_accessor :promotion_code
|
3113
2249
|
|
3114
|
-
def initialize(coupon: nil, discount: nil,
|
2250
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3115
2251
|
@coupon = coupon
|
3116
2252
|
@discount = discount
|
3117
|
-
@discount_end = discount_end
|
3118
2253
|
@promotion_code = promotion_code
|
3119
2254
|
end
|
3120
2255
|
end
|
@@ -3160,18 +2295,6 @@ module Stripe
|
|
3160
2295
|
@unit_amount_decimal = unit_amount_decimal
|
3161
2296
|
end
|
3162
2297
|
end
|
3163
|
-
|
3164
|
-
class Trial < Stripe::RequestParams
|
3165
|
-
# 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.
|
3166
|
-
attr_accessor :converts_to
|
3167
|
-
# Determines the type of trial for this item.
|
3168
|
-
attr_accessor :type
|
3169
|
-
|
3170
|
-
def initialize(converts_to: nil, type: nil)
|
3171
|
-
@converts_to = converts_to
|
3172
|
-
@type = type
|
3173
|
-
end
|
3174
|
-
end
|
3175
2298
|
# The coupons to redeem into discounts for the subscription item.
|
3176
2299
|
attr_accessor :discounts
|
3177
2300
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
@@ -3186,8 +2309,6 @@ module Stripe
|
|
3186
2309
|
attr_accessor :quantity
|
3187
2310
|
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
3188
2311
|
attr_accessor :tax_rates
|
3189
|
-
# Options that configure the trial on the subscription item.
|
3190
|
-
attr_accessor :trial
|
3191
2312
|
|
3192
2313
|
def initialize(
|
3193
2314
|
discounts: nil,
|
@@ -3196,8 +2317,7 @@ module Stripe
|
|
3196
2317
|
price: nil,
|
3197
2318
|
price_data: nil,
|
3198
2319
|
quantity: nil,
|
3199
|
-
tax_rates: nil
|
3200
|
-
trial: nil
|
2320
|
+
tax_rates: nil
|
3201
2321
|
)
|
3202
2322
|
@discounts = discounts
|
3203
2323
|
@metadata = metadata
|
@@ -3206,16 +2326,6 @@ module Stripe
|
|
3206
2326
|
@price_data = price_data
|
3207
2327
|
@quantity = quantity
|
3208
2328
|
@tax_rates = tax_rates
|
3209
|
-
@trial = trial
|
3210
|
-
end
|
3211
|
-
end
|
3212
|
-
|
3213
|
-
class PauseCollection < Stripe::RequestParams
|
3214
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3215
|
-
attr_accessor :behavior
|
3216
|
-
|
3217
|
-
def initialize(behavior: nil)
|
3218
|
-
@behavior = behavior
|
3219
2329
|
end
|
3220
2330
|
end
|
3221
2331
|
|
@@ -3230,23 +2340,6 @@ module Stripe
|
|
3230
2340
|
@destination = destination
|
3231
2341
|
end
|
3232
2342
|
end
|
3233
|
-
|
3234
|
-
class TrialSettings < Stripe::RequestParams
|
3235
|
-
class EndBehavior < Stripe::RequestParams
|
3236
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3237
|
-
attr_accessor :prorate_up_front
|
3238
|
-
|
3239
|
-
def initialize(prorate_up_front: nil)
|
3240
|
-
@prorate_up_front = prorate_up_front
|
3241
|
-
end
|
3242
|
-
end
|
3243
|
-
# Defines how the subscription should behave when a trial ends.
|
3244
|
-
attr_accessor :end_behavior
|
3245
|
-
|
3246
|
-
def initialize(end_behavior: nil)
|
3247
|
-
@end_behavior = end_behavior
|
3248
|
-
end
|
3249
|
-
end
|
3250
2343
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
|
3251
2344
|
attr_accessor :add_invoice_items
|
3252
2345
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
@@ -3279,8 +2372,6 @@ module Stripe
|
|
3279
2372
|
attr_accessor :metadata
|
3280
2373
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
3281
2374
|
attr_accessor :on_behalf_of
|
3282
|
-
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
3283
|
-
attr_accessor :pause_collection
|
3284
2375
|
# Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
|
3285
2376
|
attr_accessor :proration_behavior
|
3286
2377
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -3289,12 +2380,8 @@ module Stripe
|
|
3289
2380
|
attr_accessor :transfer_data
|
3290
2381
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
3291
2382
|
attr_accessor :trial
|
3292
|
-
# Specify trial behavior when crossing phase boundaries
|
3293
|
-
attr_accessor :trial_continuation
|
3294
2383
|
# Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
|
3295
2384
|
attr_accessor :trial_end
|
3296
|
-
# Settings related to subscription trials.
|
3297
|
-
attr_accessor :trial_settings
|
3298
2385
|
|
3299
2386
|
def initialize(
|
3300
2387
|
add_invoice_items: nil,
|
@@ -3313,14 +2400,11 @@ module Stripe
|
|
3313
2400
|
iterations: nil,
|
3314
2401
|
metadata: nil,
|
3315
2402
|
on_behalf_of: nil,
|
3316
|
-
pause_collection: nil,
|
3317
2403
|
proration_behavior: nil,
|
3318
2404
|
start_date: nil,
|
3319
2405
|
transfer_data: nil,
|
3320
2406
|
trial: nil,
|
3321
|
-
|
3322
|
-
trial_end: nil,
|
3323
|
-
trial_settings: nil
|
2407
|
+
trial_end: nil
|
3324
2408
|
)
|
3325
2409
|
@add_invoice_items = add_invoice_items
|
3326
2410
|
@application_fee_percent = application_fee_percent
|
@@ -3338,91 +2422,23 @@ module Stripe
|
|
3338
2422
|
@iterations = iterations
|
3339
2423
|
@metadata = metadata
|
3340
2424
|
@on_behalf_of = on_behalf_of
|
3341
|
-
@pause_collection = pause_collection
|
3342
2425
|
@proration_behavior = proration_behavior
|
3343
2426
|
@start_date = start_date
|
3344
2427
|
@transfer_data = transfer_data
|
3345
2428
|
@trial = trial
|
3346
|
-
@trial_continuation = trial_continuation
|
3347
2429
|
@trial_end = trial_end
|
3348
|
-
@trial_settings = trial_settings
|
3349
|
-
end
|
3350
|
-
end
|
3351
|
-
|
3352
|
-
class Prebilling < Stripe::RequestParams
|
3353
|
-
class BillUntil < Stripe::RequestParams
|
3354
|
-
class AmendmentEnd < Stripe::RequestParams
|
3355
|
-
# 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.
|
3356
|
-
attr_accessor :index
|
3357
|
-
|
3358
|
-
def initialize(index: nil)
|
3359
|
-
@index = index
|
3360
|
-
end
|
3361
|
-
end
|
3362
|
-
|
3363
|
-
class Duration < Stripe::RequestParams
|
3364
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3365
|
-
attr_accessor :interval
|
3366
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3367
|
-
attr_accessor :interval_count
|
3368
|
-
|
3369
|
-
def initialize(interval: nil, interval_count: nil)
|
3370
|
-
@interval = interval
|
3371
|
-
@interval_count = interval_count
|
3372
|
-
end
|
3373
|
-
end
|
3374
|
-
# End the prebilled period when a specified amendment ends.
|
3375
|
-
attr_accessor :amendment_end
|
3376
|
-
# Time span for prebilling, starting from `bill_from`.
|
3377
|
-
attr_accessor :duration
|
3378
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3379
|
-
attr_accessor :timestamp
|
3380
|
-
# Select one of several ways to pass the `bill_until` value.
|
3381
|
-
attr_accessor :type
|
3382
|
-
|
3383
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3384
|
-
@amendment_end = amendment_end
|
3385
|
-
@duration = duration
|
3386
|
-
@timestamp = timestamp
|
3387
|
-
@type = type
|
3388
|
-
end
|
3389
|
-
end
|
3390
|
-
# The end of the prebilled time period.
|
3391
|
-
attr_accessor :bill_until
|
3392
|
-
# This is used to determine the number of billing cycles to prebill.
|
3393
|
-
attr_accessor :iterations
|
3394
|
-
|
3395
|
-
def initialize(bill_until: nil, iterations: nil)
|
3396
|
-
@bill_until = bill_until
|
3397
|
-
@iterations = iterations
|
3398
2430
|
end
|
3399
2431
|
end
|
3400
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3401
|
-
attr_accessor :amendments
|
3402
|
-
# 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.
|
3403
|
-
attr_accessor :billing_behavior
|
3404
2432
|
# Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
3405
2433
|
attr_accessor :end_behavior
|
3406
2434
|
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
3407
2435
|
attr_accessor :phases
|
3408
|
-
# Provide any time periods to bill in advance.
|
3409
|
-
attr_accessor :prebilling
|
3410
2436
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
3411
2437
|
attr_accessor :proration_behavior
|
3412
2438
|
|
3413
|
-
def initialize(
|
3414
|
-
amendments: nil,
|
3415
|
-
billing_behavior: nil,
|
3416
|
-
end_behavior: nil,
|
3417
|
-
phases: nil,
|
3418
|
-
prebilling: nil,
|
3419
|
-
proration_behavior: nil
|
3420
|
-
)
|
3421
|
-
@amendments = amendments
|
3422
|
-
@billing_behavior = billing_behavior
|
2439
|
+
def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
|
3423
2440
|
@end_behavior = end_behavior
|
3424
2441
|
@phases = phases
|
3425
|
-
@prebilling = prebilling
|
3426
2442
|
@proration_behavior = proration_behavior
|
3427
2443
|
end
|
3428
2444
|
end
|
@@ -3430,44 +2446,16 @@ module Stripe
|
|
3430
2446
|
class SubscriptionDetails < Stripe::RequestParams
|
3431
2447
|
class Item < Stripe::RequestParams
|
3432
2448
|
class Discount < Stripe::RequestParams
|
3433
|
-
class DiscountEnd < Stripe::RequestParams
|
3434
|
-
class Duration < Stripe::RequestParams
|
3435
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3436
|
-
attr_accessor :interval
|
3437
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3438
|
-
attr_accessor :interval_count
|
3439
|
-
|
3440
|
-
def initialize(interval: nil, interval_count: nil)
|
3441
|
-
@interval = interval
|
3442
|
-
@interval_count = interval_count
|
3443
|
-
end
|
3444
|
-
end
|
3445
|
-
# Time span for the redeemed discount.
|
3446
|
-
attr_accessor :duration
|
3447
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3448
|
-
attr_accessor :timestamp
|
3449
|
-
# The type of calculation made to determine when the discount ends.
|
3450
|
-
attr_accessor :type
|
3451
|
-
|
3452
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
3453
|
-
@duration = duration
|
3454
|
-
@timestamp = timestamp
|
3455
|
-
@type = type
|
3456
|
-
end
|
3457
|
-
end
|
3458
2449
|
# ID of the coupon to create a new discount for.
|
3459
2450
|
attr_accessor :coupon
|
3460
2451
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3461
2452
|
attr_accessor :discount
|
3462
|
-
# Details to determine how long the discount should be applied for.
|
3463
|
-
attr_accessor :discount_end
|
3464
2453
|
# ID of the promotion code to create a new discount for.
|
3465
2454
|
attr_accessor :promotion_code
|
3466
2455
|
|
3467
|
-
def initialize(coupon: nil, discount: nil,
|
2456
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3468
2457
|
@coupon = coupon
|
3469
2458
|
@discount = discount
|
3470
|
-
@discount_end = discount_end
|
3471
2459
|
@promotion_code = promotion_code
|
3472
2460
|
end
|
3473
2461
|
end
|
@@ -3558,15 +2546,6 @@ module Stripe
|
|
3558
2546
|
@tax_rates = tax_rates
|
3559
2547
|
end
|
3560
2548
|
end
|
3561
|
-
|
3562
|
-
class Prebilling < Stripe::RequestParams
|
3563
|
-
# This is used to determine the number of billing cycles to prebill.
|
3564
|
-
attr_accessor :iterations
|
3565
|
-
|
3566
|
-
def initialize(iterations: nil)
|
3567
|
-
@iterations = iterations
|
3568
|
-
end
|
3569
|
-
end
|
3570
2549
|
# For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
3571
2550
|
attr_accessor :billing_cycle_anchor
|
3572
2551
|
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
@@ -3579,8 +2558,6 @@ module Stripe
|
|
3579
2558
|
attr_accessor :default_tax_rates
|
3580
2559
|
# A list of up to 20 subscription items, each with an attached price.
|
3581
2560
|
attr_accessor :items
|
3582
|
-
# The pre-billing to apply to the subscription as a preview.
|
3583
|
-
attr_accessor :prebilling
|
3584
2561
|
# Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
3585
2562
|
attr_accessor :proration_behavior
|
3586
2563
|
# If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
|
@@ -3599,7 +2576,6 @@ module Stripe
|
|
3599
2576
|
cancel_now: nil,
|
3600
2577
|
default_tax_rates: nil,
|
3601
2578
|
items: nil,
|
3602
|
-
prebilling: nil,
|
3603
2579
|
proration_behavior: nil,
|
3604
2580
|
proration_date: nil,
|
3605
2581
|
resume_at: nil,
|
@@ -3612,7 +2588,6 @@ module Stripe
|
|
3612
2588
|
@cancel_now = cancel_now
|
3613
2589
|
@default_tax_rates = default_tax_rates
|
3614
2590
|
@items = items
|
3615
|
-
@prebilling = prebilling
|
3616
2591
|
@proration_behavior = proration_behavior
|
3617
2592
|
@proration_date = proration_date
|
3618
2593
|
@resume_at = resume_at
|
@@ -3626,8 +2601,6 @@ module Stripe
|
|
3626
2601
|
attr_accessor :currency
|
3627
2602
|
# The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
3628
2603
|
attr_accessor :customer
|
3629
|
-
# 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.
|
3630
|
-
attr_accessor :customer_account
|
3631
2604
|
# Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
3632
2605
|
attr_accessor :customer_details
|
3633
2606
|
# The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
|
@@ -3655,7 +2628,6 @@ module Stripe
|
|
3655
2628
|
automatic_tax: nil,
|
3656
2629
|
currency: nil,
|
3657
2630
|
customer: nil,
|
3658
|
-
customer_account: nil,
|
3659
2631
|
customer_details: nil,
|
3660
2632
|
discounts: nil,
|
3661
2633
|
expand: nil,
|
@@ -3671,7 +2643,6 @@ module Stripe
|
|
3671
2643
|
@automatic_tax = automatic_tax
|
3672
2644
|
@currency = currency
|
3673
2645
|
@customer = customer
|
3674
|
-
@customer_account = customer_account
|
3675
2646
|
@customer_details = customer_details
|
3676
2647
|
@discounts = discounts
|
3677
2648
|
@expand = expand
|
@@ -3697,54 +2668,12 @@ module Stripe
|
|
3697
2668
|
)
|
3698
2669
|
end
|
3699
2670
|
|
3700
|
-
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
3701
|
-
#
|
3702
|
-
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
|
3703
|
-
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
|
3704
|
-
#
|
3705
|
-
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
3706
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
3707
|
-
# invoice's status becomes paid.
|
3708
|
-
#
|
3709
|
-
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
3710
|
-
# credited to the invoice immediately.
|
3711
|
-
#
|
3712
|
-
# See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
|
3713
|
-
def attach_payment(invoice, params = {}, opts = {})
|
3714
|
-
request(
|
3715
|
-
method: :post,
|
3716
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(invoice) }),
|
3717
|
-
params: params,
|
3718
|
-
opts: opts,
|
3719
|
-
base_address: :api
|
3720
|
-
)
|
3721
|
-
end
|
3722
|
-
|
3723
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
3724
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
3725
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
3726
|
-
# invoice's status becomes paid.
|
3727
|
-
#
|
3728
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
3729
|
-
# credited to the invoice immediately.
|
3730
|
-
#
|
3731
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
3732
|
-
def attach_payment_intent(invoice, params = {}, opts = {})
|
3733
|
-
request(
|
3734
|
-
method: :post,
|
3735
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
|
3736
|
-
params: params,
|
3737
|
-
opts: opts,
|
3738
|
-
base_address: :api
|
3739
|
-
)
|
3740
|
-
end
|
3741
|
-
|
3742
2671
|
# This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
|
3743
2672
|
def create(params = {}, opts = {})
|
3744
2673
|
request(method: :post, path: "/v1/invoices", params: params, opts: opts, base_address: :api)
|
3745
2674
|
end
|
3746
2675
|
|
3747
|
-
# At any time, you can preview the upcoming invoice for a
|
2676
|
+
# At any time, you can preview the upcoming invoice for a customer. 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.
|
3748
2677
|
#
|
3749
2678
|
# 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.
|
3750
2679
|
#
|