stripe 15.5.0 → 15.6.0.pre.alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +1723 -642
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +34 -0
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +63 -0
- data/lib/stripe/event_types.rb +185 -0
- data/lib/stripe/events/v2_billing_cadence_billed_event.rb +21 -0
- data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_cadence_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_cadence_errored_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_metered_item_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +23 -0
- data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_link_returned_event.rb +13 -0
- data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +22 -0
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_created_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +21 -0
- data/lib/stripe/object_types.rb +80 -0
- data/lib/stripe/resources/account.rb +1137 -42
- data/lib/stripe/resources/account_link.rb +8 -0
- data/lib/stripe/resources/account_notice.rb +147 -0
- data/lib/stripe/resources/account_session.rb +688 -8
- data/lib/stripe/resources/apple_pay_domain.rb +8 -0
- data/lib/stripe/resources/application.rb +8 -0
- data/lib/stripe/resources/application_fee.rb +16 -0
- data/lib/stripe/resources/application_fee_refund.rb +8 -0
- data/lib/stripe/resources/apps/secret.rb +16 -0
- data/lib/stripe/resources/balance.rb +159 -0
- data/lib/stripe/resources/balance_settings.rb +152 -0
- data/lib/stripe/resources/balance_transaction.rb +16 -0
- data/lib/stripe/resources/bank_account.rb +40 -0
- data/lib/stripe/resources/billing/alert.rb +203 -1
- data/lib/stripe/resources/billing/alert_triggered.rb +14 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +132 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +161 -0
- data/lib/stripe/resources/billing/credit_grant.rb +143 -2
- data/lib/stripe/resources/billing/meter.rb +45 -0
- data/lib/stripe/resources/billing/meter_event.rb +8 -0
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +16 -0
- data/lib/stripe/resources/billing/meter_event_summary.rb +8 -0
- data/lib/stripe/resources/billing/meter_usage.rb +31 -0
- data/lib/stripe/resources/billing/meter_usage_row.rb +36 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +122 -0
- data/lib/stripe/resources/billing_portal/session.rb +107 -0
- data/lib/stripe/resources/capability.rb +56 -0
- data/lib/stripe/resources/capital/financing_offer.rb +203 -0
- data/lib/stripe/resources/capital/financing_summary.rb +79 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +138 -0
- data/lib/stripe/resources/card.rb +18 -0
- data/lib/stripe/resources/cash_balance.rb +18 -0
- data/lib/stripe/resources/charge.rb +2587 -15
- data/lib/stripe/resources/checkout/session.rb +1583 -15
- data/lib/stripe/resources/climate/order.rb +32 -0
- data/lib/stripe/resources/climate/product.rb +16 -0
- data/lib/stripe/resources/climate/supplier.rb +16 -0
- data/lib/stripe/resources/confirmation_token.rb +1126 -34
- data/lib/stripe/resources/connect_collection_transfer.rb +8 -0
- data/lib/stripe/resources/country_spec.rb +32 -0
- data/lib/stripe/resources/coupon.rb +66 -1
- data/lib/stripe/resources/credit_note.rb +76 -0
- data/lib/stripe/resources/credit_note_line_item.rb +62 -0
- data/lib/stripe/resources/customer.rb +79 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +10 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +110 -0
- data/lib/stripe/resources/customer_session.rb +58 -1
- data/lib/stripe/resources/discount.rb +10 -0
- data/lib/stripe/resources/dispute.rb +177 -0
- data/lib/stripe/resources/entitlements/active_entitlement.rb +8 -0
- data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +8 -0
- data/lib/stripe/resources/entitlements/feature.rb +8 -0
- data/lib/stripe/resources/ephemeral_key.rb +8 -0
- data/lib/stripe/resources/event.rb +87 -0
- data/lib/stripe/resources/exchange_rate.rb +8 -0
- data/lib/stripe/resources/file.rb +8 -0
- data/lib/stripe/resources/file_link.rb +8 -0
- data/lib/stripe/resources/financial_connections/account.rb +101 -1
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +8 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +8 -0
- data/lib/stripe/resources/financial_connections/institution.rb +145 -0
- data/lib/stripe/resources/financial_connections/session.rb +124 -2
- data/lib/stripe/resources/financial_connections/transaction.rb +16 -0
- data/lib/stripe/resources/forwarding/request.rb +52 -0
- data/lib/stripe/resources/funding_instructions.rb +193 -0
- data/lib/stripe/resources/fx_quote.rb +234 -0
- data/lib/stripe/resources/identity/verification_report.rb +166 -1
- data/lib/stripe/resources/identity/verification_session.rb +136 -1
- data/lib/stripe/resources/invoice.rb +1591 -18
- data/lib/stripe/resources/invoice_item.rb +214 -2
- data/lib/stripe/resources/invoice_line_item.rb +293 -1
- data/lib/stripe/resources/invoice_payment.rb +30 -1
- data/lib/stripe/resources/invoice_rendering_template.rb +8 -0
- data/lib/stripe/resources/issuing/authorization.rb +177 -0
- data/lib/stripe/resources/issuing/card.rb +96 -8
- data/lib/stripe/resources/issuing/cardholder.rb +112 -1
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +684 -0
- data/lib/stripe/resources/issuing/dispute.rb +97 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +98 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +94 -0
- data/lib/stripe/resources/issuing/personalization_design.rb +36 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +16 -0
- data/lib/stripe/resources/issuing/settlement.rb +61 -0
- data/lib/stripe/resources/issuing/token.rb +61 -0
- data/lib/stripe/resources/issuing/transaction.rb +157 -0
- data/lib/stripe/resources/line_item.rb +91 -0
- data/lib/stripe/resources/login_link.rb +8 -0
- data/lib/stripe/resources/mandate.rb +331 -12
- data/lib/stripe/resources/margin.rb +123 -0
- data/lib/stripe/resources/order.rb +3306 -0
- data/lib/stripe/resources/payment_attempt_record.rb +2056 -0
- data/lib/stripe/resources/payment_intent.rb +11019 -3714
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +128 -0
- data/lib/stripe/resources/payment_link.rb +337 -0
- data/lib/stripe/resources/payment_method.rb +1074 -35
- data/lib/stripe/resources/payment_method_configuration.rb +1260 -4
- data/lib/stripe/resources/payment_method_domain.rb +111 -0
- data/lib/stripe/resources/payment_record.rb +2602 -0
- data/lib/stripe/resources/payout.rb +16 -0
- data/lib/stripe/resources/person.rb +180 -0
- data/lib/stripe/resources/plan.rb +24 -0
- data/lib/stripe/resources/price.rb +109 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +314 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
- data/lib/stripe/resources/product.rb +27 -0
- data/lib/stripe/resources/product_feature.rb +8 -0
- data/lib/stripe/resources/promotion_code.rb +34 -0
- data/lib/stripe/resources/quote.rb +2512 -49
- data/lib/stripe/resources/quote_line.rb +521 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +1134 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +718 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +8 -0
- data/lib/stripe/resources/radar/value_list.rb +8 -0
- data/lib/stripe/resources/radar/value_list_item.rb +8 -0
- data/lib/stripe/resources/refund.rb +389 -19
- data/lib/stripe/resources/reporting/report_run.rb +16 -0
- data/lib/stripe/resources/reporting/report_type.rb +8 -0
- data/lib/stripe/resources/reserve_transaction.rb +8 -0
- data/lib/stripe/resources/reversal.rb +8 -0
- data/lib/stripe/resources/review.rb +24 -0
- data/lib/stripe/resources/setup_attempt.rb +352 -17
- data/lib/stripe/resources/setup_intent.rb +1065 -12
- data/lib/stripe/resources/shipping_rate.rb +48 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +16 -0
- data/lib/stripe/resources/source.rb +303 -0
- data/lib/stripe/resources/source_mandate_notification.rb +32 -0
- data/lib/stripe/resources/source_transaction.rb +54 -0
- data/lib/stripe/resources/subscription.rb +720 -11
- data/lib/stripe/resources/subscription_item.rb +108 -3
- data/lib/stripe/resources/subscription_schedule.rb +1321 -10
- data/lib/stripe/resources/tax/association.rb +98 -0
- data/lib/stripe/resources/tax/calculation.rb +109 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +32 -0
- data/lib/stripe/resources/tax/form.rb +318 -0
- data/lib/stripe/resources/tax/registration.rb +1232 -0
- data/lib/stripe/resources/tax/settings.rb +61 -1
- data/lib/stripe/resources/tax/transaction.rb +93 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +16 -0
- data/lib/stripe/resources/tax_code.rb +8 -0
- data/lib/stripe/resources/tax_deducted_at_source.rb +8 -0
- data/lib/stripe/resources/tax_id.rb +36 -2
- data/lib/stripe/resources/tax_rate.rb +16 -0
- data/lib/stripe/resources/terminal/configuration.rb +332 -0
- data/lib/stripe/resources/terminal/connection_token.rb +8 -0
- data/lib/stripe/resources/terminal/location.rb +16 -0
- data/lib/stripe/resources/terminal/onboarding_link.rb +108 -0
- data/lib/stripe/resources/terminal/reader.rb +249 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +24 -0
- data/lib/stripe/resources/token.rb +8 -0
- data/lib/stripe/resources/topup.rb +8 -0
- data/lib/stripe/resources/transfer.rb +14 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +16 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +24 -0
- data/lib/stripe/resources/treasury/financial_account.rb +83 -3
- data/lib/stripe/resources/treasury/financial_account_features.rb +194 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +69 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +106 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +151 -0
- data/lib/stripe/resources/treasury/received_credit.rb +135 -1
- data/lib/stripe/resources/treasury/received_debit.rb +129 -1
- data/lib/stripe/resources/treasury/transaction.rb +36 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +24 -0
- data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +90 -0
- data/lib/stripe/resources/v2/billing/cadence.rb +323 -0
- data/lib/stripe/resources/v2/billing/collection_setting.rb +296 -0
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +284 -0
- data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +43 -0
- data/lib/stripe/resources/v2/billing/intent.rb +86 -0
- data/lib/stripe/resources/v2/billing/intent_action.rb +395 -0
- data/lib/stripe/resources/v2/billing/license_fee.rb +103 -0
- data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +44 -0
- data/lib/stripe/resources/v2/billing/license_fee_version.rb +80 -0
- data/lib/stripe/resources/v2/billing/licensed_item.rb +60 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +8 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +16 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +8 -0
- data/lib/stripe/resources/v2/billing/metered_item.rb +85 -0
- data/lib/stripe/resources/v2/billing/pricing_plan.rb +51 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +94 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +90 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +38 -0
- data/lib/stripe/resources/v2/billing/profile.rb +46 -0
- data/lib/stripe/resources/v2/billing/rate_card.rb +61 -0
- data/lib/stripe/resources/v2/billing/rate_card_rate.rb +107 -0
- data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +90 -0
- data/lib/stripe/resources/v2/billing/rate_card_version.rb +34 -0
- data/lib/stripe/resources/v2/billing/service_action.rb +232 -0
- data/lib/stripe/resources/v2/core/account.rb +3838 -0
- data/lib/stripe/resources/v2/core/account_link.rb +123 -0
- data/lib/stripe/resources/v2/core/claimable_sandbox.rb +81 -0
- data/lib/stripe/resources/v2/core/person.rb +477 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +114 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +47 -0
- data/lib/stripe/resources/v2/event.rb +26 -0
- data/lib/stripe/resources/v2/event_destination.rb +44 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +28 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +30 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +67 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +140 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +100 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +181 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +217 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +144 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +196 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +109 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +81 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +199 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +136 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +116 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +105 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +113 -0
- data/lib/stripe/resources/v2/reporting/report.rb +116 -0
- data/lib/stripe/resources/v2/reporting/report_run.rb +158 -0
- data/lib/stripe/resources/v2/tax/automatic_rule.rb +39 -0
- data/lib/stripe/resources/webhook_endpoint.rb +8 -0
- data/lib/stripe/resources.rb +194 -0
- data/lib/stripe/services/account_notice_service.rb +101 -0
- data/lib/stripe/services/account_service.rb +562 -1
- data/lib/stripe/services/account_session_service.rb +226 -1
- data/lib/stripe/services/balance_settings_service.rb +99 -0
- data/lib/stripe/services/billing/alert_service.rb +75 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +17 -2
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +37 -2
- data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
- data/lib/stripe/services/billing_portal/session_service.rb +4 -0
- data/lib/stripe/services/billing_service.rb +2 -1
- data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/charge_service.rb +1418 -0
- data/lib/stripe/services/checkout/session_service.rb +472 -5
- data/lib/stripe/services/coupon_service.rb +17 -1
- data/lib/stripe/services/credit_note_service.rb +4 -0
- data/lib/stripe/services/customer_session_service.rb +4 -1
- data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
- data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
- data/lib/stripe/services/financial_connections/account_service.rb +7 -2
- data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
- data/lib/stripe/services/financial_connections/session_service.rb +34 -2
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/fx_quote_service.rb +123 -0
- data/lib/stripe/services/identity/verification_session_service.rb +8 -0
- data/lib/stripe/services/invoice_item_service.rb +74 -2
- data/lib/stripe/services/invoice_line_item_service.rb +33 -1
- data/lib/stripe/services/invoice_payment_service.rb +4 -1
- data/lib/stripe/services/invoice_service.rb +1078 -16
- data/lib/stripe/services/issuing/card_service.rb +0 -8
- data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
- data/lib/stripe/services/issuing/transaction_service.rb +4 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/mandate_service.rb +40 -0
- data/lib/stripe/services/margin_service.rb +119 -0
- data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
- data/lib/stripe/services/order_service.rb +2388 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +52 -0
- data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
- data/lib/stripe/services/payment_intent_service.rb +7630 -2215
- data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
- data/lib/stripe/services/payment_method_service.rb +120 -1
- data/lib/stripe/services/payment_record_service.rb +562 -0
- data/lib/stripe/services/price_service.rb +19 -0
- data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
- data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
- data/lib/stripe/services/privacy_service.rb +13 -0
- data/lib/stripe/services/promotion_code_service.rb +8 -0
- data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
- data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
- data/lib/stripe/services/quote_service.rb +1723 -8
- data/lib/stripe/services/setup_intent_service.rb +691 -9
- data/lib/stripe/services/subscription_item_service.rb +75 -3
- data/lib/stripe/services/subscription_schedule_service.rb +911 -10
- data/lib/stripe/services/subscription_service.rb +336 -9
- data/lib/stripe/services/tax/association_service.rb +31 -0
- data/lib/stripe/services/tax/form_service.rb +100 -0
- data/lib/stripe/services/tax_id_service.rb +8 -2
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/configuration_service.rb +26 -0
- data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
- data/lib/stripe/services/terminal_service.rb +3 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
- data/lib/stripe/services/transfer_service.rb +4 -0
- data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
- data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
- data/lib/stripe/services/v1_services.rb +11 -1
- data/lib/stripe/services/v2/billing/bill_setting_service.rb +214 -0
- data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/cadence_service.rb +428 -0
- data/lib/stripe/services/v2/billing/collection_setting_service.rb +518 -0
- data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/custom_pricing_unit_service.rb +108 -0
- data/lib/stripe/services/v2/billing/intent_service.rb +465 -0
- data/lib/stripe/services/v2/billing/intents/action_service.rb +45 -0
- data/lib/stripe/services/v2/billing/license_fee_service.rb +250 -0
- data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +23 -0
- data/lib/stripe/services/v2/billing/license_fees/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/licensed_item_service.rb +149 -0
- data/lib/stripe/services/v2/billing/metered_item_service.rb +176 -0
- data/lib/stripe/services/v2/billing/pricing_plan_service.rb +142 -0
- data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +76 -0
- data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +162 -0
- data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/profile_service.rb +144 -0
- data/lib/stripe/services/v2/billing/rate_card_service.rb +151 -0
- data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +144 -0
- data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +161 -0
- data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/service_action_service.rb +259 -0
- data/lib/stripe/services/v2/billing_service.rb +18 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +114 -0
- data/lib/stripe/services/v2/core/account_service.rb +4536 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
- data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +50 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +5 -1
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +119 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
- data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
- data/lib/stripe/services/v2/money_management_service.rb +31 -0
- data/lib/stripe/services/v2/payment_service.rb +15 -0
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +152 -0
- data/lib/stripe/services/v2/reporting/report_run_service.rb +88 -0
- data/lib/stripe/services/v2/reporting/report_service.rb +25 -0
- data/lib/stripe/services/v2/reporting_service.rb +16 -0
- data/lib/stripe/services/v2/tax/automatic_rule_service.rb +99 -0
- data/lib/stripe/services/v2/tax_service.rb +15 -0
- data/lib/stripe/services/v2/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +53 -0
- data/lib/stripe/services/v2_services.rb +6 -1
- data/lib/stripe/services.rb +84 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +26 -2
- data/lib/stripe/util.rb +16 -6
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +53 -0
- data/rbi/stripe.rbi +280174 -0
- data/stripe.gemspec +4 -1
- metadata +283 -324
- data/rbi/stripe/resources/account.rbi +0 -4991
- data/rbi/stripe/resources/account_link.rbi +0 -76
- data/rbi/stripe/resources/account_session.rbi +0 -1173
- data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
- data/rbi/stripe/resources/application.rbi +0 -20
- data/rbi/stripe/resources/application_fee.rbi +0 -118
- data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
- data/rbi/stripe/resources/apps/secret.rbi +0 -195
- data/rbi/stripe/resources/balance.rbi +0 -230
- data/rbi/stripe/resources/balance_transaction.rbi +0 -147
- data/rbi/stripe/resources/bank_account.rbi +0 -127
- data/rbi/stripe/resources/billing/alert.rbi +0 -201
- data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
- data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
- data/rbi/stripe/resources/billing/meter.rbi +0 -226
- data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
- data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -712
- data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
- data/rbi/stripe/resources/capability.rbi +0 -125
- data/rbi/stripe/resources/card.rbi +0 -125
- data/rbi/stripe/resources/cash_balance.rbi +0 -32
- data/rbi/stripe/resources/charge.rbi +0 -2136
- data/rbi/stripe/resources/checkout/session.rbi +0 -4105
- data/rbi/stripe/resources/climate/order.rbi +0 -245
- data/rbi/stripe/resources/climate/product.rbi +0 -75
- data/rbi/stripe/resources/climate/supplier.rbi +0 -72
- data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
- data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
- data/rbi/stripe/resources/country_spec.rbi +0 -85
- data/rbi/stripe/resources/coupon.rbi +0 -250
- data/rbi/stripe/resources/credit_note.rbi +0 -752
- data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
- data/rbi/stripe/resources/customer.rbi +0 -993
- data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
- data/rbi/stripe/resources/customer_session.rbi +0 -200
- data/rbi/stripe/resources/discount.rbi +0 -53
- data/rbi/stripe/resources/dispute.rbi +0 -761
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
- data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
- data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
- data/rbi/stripe/resources/event.rbi +0 -137
- data/rbi/stripe/resources/exchange_rate.rbi +0 -66
- data/rbi/stripe/resources/file.rbi +0 -143
- data/rbi/stripe/resources/file_link.rbi +0 -141
- data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
- data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
- data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
- data/rbi/stripe/resources/forwarding/request.rbi +0 -216
- data/rbi/stripe/resources/funding_instructions.rbi +0 -437
- data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
- data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
- data/rbi/stripe/resources/invoice.rbi +0 -3894
- data/rbi/stripe/resources/invoice_item.rbi +0 -470
- data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
- data/rbi/stripe/resources/invoice_payment.rbi +0 -121
- data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
- data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
- data/rbi/stripe/resources/issuing/card.rbi +0 -749
- data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
- data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
- data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
- data/rbi/stripe/resources/issuing/token.rbi +0 -226
- data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
- data/rbi/stripe/resources/line_item.rbi +0 -72
- data/rbi/stripe/resources/login_link.rbi +0 -19
- data/rbi/stripe/resources/mandate.rbi +0 -191
- data/rbi/stripe/resources/payment_intent.rbi +0 -10011
- data/rbi/stripe/resources/payment_link.rbi +0 -1891
- data/rbi/stripe/resources/payment_method.rbi +0 -1770
- data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
- data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
- data/rbi/stripe/resources/payout.rbi +0 -307
- data/rbi/stripe/resources/person.rbi +0 -401
- data/rbi/stripe/resources/plan.rbi +0 -371
- data/rbi/stripe/resources/price.rbi +0 -694
- data/rbi/stripe/resources/product.rbi +0 -553
- data/rbi/stripe/resources/product_feature.rbi +0 -26
- data/rbi/stripe/resources/promotion_code.rbi +0 -264
- data/rbi/stripe/resources/quote.rbi +0 -1137
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
- data/rbi/stripe/resources/radar/value_list.rbi +0 -168
- data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
- data/rbi/stripe/resources/refund.rbi +0 -523
- data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
- data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
- data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
- data/rbi/stripe/resources/reversal.rbi +0 -51
- data/rbi/stripe/resources/review.rbi +0 -154
- data/rbi/stripe/resources/setup_attempt.rbi +0 -477
- data/rbi/stripe/resources/setup_intent.rbi +0 -3974
- data/rbi/stripe/resources/shipping_rate.rbi +0 -305
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
- data/rbi/stripe/resources/source.rbi +0 -1496
- data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
- data/rbi/stripe/resources/source_transaction.rbi +0 -127
- data/rbi/stripe/resources/subscription.rbi +0 -2154
- data/rbi/stripe/resources/subscription_item.rbi +0 -404
- data/rbi/stripe/resources/subscription_schedule.rbi +0 -1795
- data/rbi/stripe/resources/tax/calculation.rbi +0 -478
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
- data/rbi/stripe/resources/tax/registration.rbi +0 -3216
- data/rbi/stripe/resources/tax/settings.rbi +0 -141
- data/rbi/stripe/resources/tax/transaction.rbi +0 -351
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
- data/rbi/stripe/resources/tax_code.rbi +0 -44
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
- data/rbi/stripe/resources/tax_id.rbi +0 -165
- data/rbi/stripe/resources/tax_rate.rbi +0 -239
- data/rbi/stripe/resources/terminal/configuration.rbi +0 -1647
- data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
- data/rbi/stripe/resources/terminal/location.rbi +0 -222
- data/rbi/stripe/resources/terminal/reader.rbi +0 -1016
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
- data/rbi/stripe/resources/token.rbi +0 -1281
- data/rbi/stripe/resources/topup.rbi +0 -222
- data/rbi/stripe/resources/transfer.rbi +0 -199
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
- data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
- data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
- data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
- data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
- data/rbi/stripe/resources/v2/amount.rbi +0 -14
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
- data/rbi/stripe/resources/v2/event.rbi +0 -48
- data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
- data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
- data/rbi/stripe/services/account_capability_service.rbi +0 -51
- data/rbi/stripe/services/account_link_service.rbi +0 -60
- data/rbi/stripe/services/account_login_link_service.rbi +0 -22
- data/rbi/stripe/services/account_person_service.rbi +0 -1007
- data/rbi/stripe/services/account_service.rbi +0 -4281
- data/rbi/stripe/services/account_session_service.rbi +0 -748
- data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
- data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
- data/rbi/stripe/services/application_fee_service.rbi +0 -78
- data/rbi/stripe/services/apps/secret_service.rbi +0 -151
- data/rbi/stripe/services/apps_service.rbi +0 -9
- data/rbi/stripe/services/balance_service.rbi +0 -21
- data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
- data/rbi/stripe/services/billing/alert_service.rbi +0 -152
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
- data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
- data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
- data/rbi/stripe/services/billing/meter_service.rbi +0 -163
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -561
- data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
- data/rbi/stripe/services/billing_portal_service.rbi +0 -10
- data/rbi/stripe/services/billing_service.rbi +0 -15
- data/rbi/stripe/services/charge_service.rbi +0 -448
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
- data/rbi/stripe/services/checkout/session_service.rbi +0 -2697
- data/rbi/stripe/services/checkout_service.rbi +0 -9
- data/rbi/stripe/services/climate/order_service.rbi +0 -142
- data/rbi/stripe/services/climate/product_service.rbi +0 -46
- data/rbi/stripe/services/climate_service.rbi +0 -11
- data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
- data/rbi/stripe/services/country_spec_service.rbi +0 -44
- data/rbi/stripe/services/coupon_service.rbi +0 -194
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
- data/rbi/stripe/services/credit_note_service.rbi +0 -415
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
- data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
- data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
- data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
- data/rbi/stripe/services/customer_service.rbi +0 -635
- data/rbi/stripe/services/customer_session_service.rbi +0 -116
- data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
- data/rbi/stripe/services/dispute_service.rbi +0 -424
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
- data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
- data/rbi/stripe/services/entitlements_service.rbi +0 -10
- data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
- data/rbi/stripe/services/event_service.rbi +0 -83
- data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
- data/rbi/stripe/services/file_link_service.rbi +0 -124
- data/rbi/stripe/services/file_service.rbi +0 -116
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
- data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
- data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
- data/rbi/stripe/services/financial_connections_service.rbi +0 -11
- data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
- data/rbi/stripe/services/forwarding_service.rbi +0 -9
- data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
- data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
- data/rbi/stripe/services/identity_service.rbi +0 -10
- data/rbi/stripe/services/invoice_item_service.rbi +0 -366
- data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
- data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
- data/rbi/stripe/services/invoice_service.rbi +0 -3073
- data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
- data/rbi/stripe/services/issuing/card_service.rbi +0 -503
- data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
- data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
- data/rbi/stripe/services/issuing/token_service.rbi +0 -99
- data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
- data/rbi/stripe/services/issuing_service.rbi +0 -16
- data/rbi/stripe/services/mandate_service.rbi +0 -20
- data/rbi/stripe/services/payment_intent_service.rbi +0 -8010
- data/rbi/stripe/services/payment_link_service.rbi +0 -1441
- data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
- data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
- data/rbi/stripe/services/payment_method_service.rbi +0 -781
- data/rbi/stripe/services/payout_service.rbi +0 -209
- data/rbi/stripe/services/plan_service.rbi +0 -282
- data/rbi/stripe/services/price_service.rbi +0 -546
- data/rbi/stripe/services/product_feature_service.rbi +0 -67
- data/rbi/stripe/services/product_service.rbi +0 -477
- data/rbi/stripe/services/promotion_code_service.rbi +0 -214
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
- data/rbi/stripe/services/quote_service.rbi +0 -695
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
- data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
- data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
- data/rbi/stripe/services/radar_service.rbi +0 -11
- data/rbi/stripe/services/refund_service.rbi +0 -185
- data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
- data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
- data/rbi/stripe/services/reporting_service.rbi +0 -10
- data/rbi/stripe/services/review_service.rbi +0 -84
- data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
- data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
- data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
- data/rbi/stripe/services/sigma_service.rbi +0 -9
- data/rbi/stripe/services/source_service.rbi +0 -663
- data/rbi/stripe/services/subscription_item_service.rbi +0 -350
- data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1425
- data/rbi/stripe/services/subscription_service.rbi +0 -1768
- data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
- data/rbi/stripe/services/tax/registration_service.rbi +0 -2278
- data/rbi/stripe/services/tax/settings_service.rbi +0 -93
- data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
- data/rbi/stripe/services/tax_code_service.rbi +0 -44
- data/rbi/stripe/services/tax_id_service.rbi +0 -110
- data/rbi/stripe/services/tax_rate_service.rbi +0 -185
- data/rbi/stripe/services/tax_service.rbi +0 -12
- data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1328
- data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
- data/rbi/stripe/services/terminal/location_service.rbi +0 -182
- data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
- data/rbi/stripe/services/terminal_service.rbi +0 -12
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
- data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
- data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -117
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
- data/rbi/stripe/services/test_helpers_service.rbi +0 -15
- data/rbi/stripe/services/token_service.rbi +0 -1255
- data/rbi/stripe/services/topup_service.rbi +0 -176
- data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
- data/rbi/stripe/services/transfer_service.rbi +0 -152
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
- data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
- data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
- data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
- data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
- data/rbi/stripe/services/treasury_service.rbi +0 -18
- data/rbi/stripe/services/v1_services.rbi +0 -77
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
- data/rbi/stripe/services/v2/billing_service.rbi +0 -14
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
- data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
- data/rbi/stripe/services/v2/core_service.rbi +0 -12
- data/rbi/stripe/services/v2_services.rbi +0 -10
- data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -49,12 +49,47 @@ module Stripe
|
|
49
49
|
|
50
50
|
nested_resource_class_methods :line, operations: %i[list]
|
51
51
|
|
52
|
+
class AmountsDue < Stripe::StripeObject
|
53
|
+
# Incremental amount due for this payment in cents (or local equivalent).
|
54
|
+
attr_reader :amount
|
55
|
+
# The amount in cents (or local equivalent) that was paid for this payment.
|
56
|
+
attr_reader :amount_paid
|
57
|
+
# The difference between the payment’s amount and amount_paid, in cents (or local equivalent).
|
58
|
+
attr_reader :amount_remaining
|
59
|
+
# Number of days from when invoice is finalized until the payment is due.
|
60
|
+
attr_reader :days_until_due
|
61
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
62
|
+
attr_reader :description
|
63
|
+
# Date on which a payment plan’s payment is due.
|
64
|
+
attr_reader :due_date
|
65
|
+
# Timestamp when the payment was paid.
|
66
|
+
attr_reader :paid_at
|
67
|
+
# The status of the payment, one of `open`, `paid`, or `past_due`
|
68
|
+
attr_reader :status
|
69
|
+
|
70
|
+
def self.inner_class_types
|
71
|
+
@inner_class_types = {}
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.field_remappings
|
75
|
+
@field_remappings = {}
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
52
79
|
class AutomaticTax < Stripe::StripeObject
|
53
80
|
class Liability < Stripe::StripeObject
|
54
81
|
# The connected account being referenced when `type` is `account`.
|
55
82
|
attr_reader :account
|
56
83
|
# Type of the account referenced.
|
57
84
|
attr_reader :type
|
85
|
+
|
86
|
+
def self.inner_class_types
|
87
|
+
@inner_class_types = {}
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.field_remappings
|
91
|
+
@field_remappings = {}
|
92
|
+
end
|
58
93
|
end
|
59
94
|
# If Stripe disabled automatic tax, this enum describes why.
|
60
95
|
attr_reader :disabled_reason
|
@@ -66,6 +101,14 @@ module Stripe
|
|
66
101
|
attr_reader :provider
|
67
102
|
# The status of the most recent automated tax calculation for this invoice.
|
68
103
|
attr_reader :status
|
104
|
+
|
105
|
+
def self.inner_class_types
|
106
|
+
@inner_class_types = { liability: Liability }
|
107
|
+
end
|
108
|
+
|
109
|
+
def self.field_remappings
|
110
|
+
@field_remappings = {}
|
111
|
+
end
|
69
112
|
end
|
70
113
|
|
71
114
|
class ConfirmationSecret < Stripe::StripeObject
|
@@ -73,6 +116,14 @@ module Stripe
|
|
73
116
|
attr_reader :client_secret
|
74
117
|
# The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization
|
75
118
|
attr_reader :type
|
119
|
+
|
120
|
+
def self.inner_class_types
|
121
|
+
@inner_class_types = {}
|
122
|
+
end
|
123
|
+
|
124
|
+
def self.field_remappings
|
125
|
+
@field_remappings = {}
|
126
|
+
end
|
76
127
|
end
|
77
128
|
|
78
129
|
class CustomField < Stripe::StripeObject
|
@@ -80,6 +131,14 @@ module Stripe
|
|
80
131
|
attr_reader :name
|
81
132
|
# The value of the custom field.
|
82
133
|
attr_reader :value
|
134
|
+
|
135
|
+
def self.inner_class_types
|
136
|
+
@inner_class_types = {}
|
137
|
+
end
|
138
|
+
|
139
|
+
def self.field_remappings
|
140
|
+
@field_remappings = {}
|
141
|
+
end
|
83
142
|
end
|
84
143
|
|
85
144
|
class CustomerAddress < Stripe::StripeObject
|
@@ -95,6 +154,14 @@ module Stripe
|
|
95
154
|
attr_reader :postal_code
|
96
155
|
# State, county, province, or region.
|
97
156
|
attr_reader :state
|
157
|
+
|
158
|
+
def self.inner_class_types
|
159
|
+
@inner_class_types = {}
|
160
|
+
end
|
161
|
+
|
162
|
+
def self.field_remappings
|
163
|
+
@field_remappings = {}
|
164
|
+
end
|
98
165
|
end
|
99
166
|
|
100
167
|
class CustomerShipping < Stripe::StripeObject
|
@@ -111,6 +178,14 @@ module Stripe
|
|
111
178
|
attr_reader :postal_code
|
112
179
|
# State, county, province, or region.
|
113
180
|
attr_reader :state
|
181
|
+
|
182
|
+
def self.inner_class_types
|
183
|
+
@inner_class_types = {}
|
184
|
+
end
|
185
|
+
|
186
|
+
def self.field_remappings
|
187
|
+
@field_remappings = {}
|
188
|
+
end
|
114
189
|
end
|
115
190
|
# Attribute for field address
|
116
191
|
attr_reader :address
|
@@ -122,6 +197,14 @@ module Stripe
|
|
122
197
|
attr_reader :phone
|
123
198
|
# The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
|
124
199
|
attr_reader :tracking_number
|
200
|
+
|
201
|
+
def self.inner_class_types
|
202
|
+
@inner_class_types = { address: Address }
|
203
|
+
end
|
204
|
+
|
205
|
+
def self.field_remappings
|
206
|
+
@field_remappings = {}
|
207
|
+
end
|
125
208
|
end
|
126
209
|
|
127
210
|
class CustomerTaxId < Stripe::StripeObject
|
@@ -129,6 +212,14 @@ module Stripe
|
|
129
212
|
attr_reader :type
|
130
213
|
# The value of the tax ID.
|
131
214
|
attr_reader :value
|
215
|
+
|
216
|
+
def self.inner_class_types
|
217
|
+
@inner_class_types = {}
|
218
|
+
end
|
219
|
+
|
220
|
+
def self.field_remappings
|
221
|
+
@field_remappings = {}
|
222
|
+
end
|
132
223
|
end
|
133
224
|
|
134
225
|
class FromInvoice < Stripe::StripeObject
|
@@ -136,6 +227,14 @@ module Stripe
|
|
136
227
|
attr_reader :action
|
137
228
|
# The invoice that was cloned.
|
138
229
|
attr_reader :invoice
|
230
|
+
|
231
|
+
def self.inner_class_types
|
232
|
+
@inner_class_types = {}
|
233
|
+
end
|
234
|
+
|
235
|
+
def self.field_remappings
|
236
|
+
@field_remappings = {}
|
237
|
+
end
|
139
238
|
end
|
140
239
|
|
141
240
|
class Issuer < Stripe::StripeObject
|
@@ -143,6 +242,14 @@ module Stripe
|
|
143
242
|
attr_reader :account
|
144
243
|
# Type of the account referenced.
|
145
244
|
attr_reader :type
|
245
|
+
|
246
|
+
def self.inner_class_types
|
247
|
+
@inner_class_types = {}
|
248
|
+
end
|
249
|
+
|
250
|
+
def self.field_remappings
|
251
|
+
@field_remappings = {}
|
252
|
+
end
|
146
253
|
end
|
147
254
|
|
148
255
|
class LastFinalizationError < Stripe::StripeObject
|
@@ -212,29 +319,96 @@ module Stripe
|
|
212
319
|
attr_reader :source
|
213
320
|
# The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
|
214
321
|
attr_reader :type
|
322
|
+
|
323
|
+
def self.inner_class_types
|
324
|
+
@inner_class_types = {}
|
325
|
+
end
|
326
|
+
|
327
|
+
def self.field_remappings
|
328
|
+
@field_remappings = {}
|
329
|
+
end
|
215
330
|
end
|
216
331
|
|
217
332
|
class Parent < Stripe::StripeObject
|
333
|
+
class BillingCadenceDetails < Stripe::StripeObject
|
334
|
+
# The billing cadence that generated this invoice
|
335
|
+
attr_reader :billing_cadence
|
336
|
+
|
337
|
+
def self.inner_class_types
|
338
|
+
@inner_class_types = {}
|
339
|
+
end
|
340
|
+
|
341
|
+
def self.field_remappings
|
342
|
+
@field_remappings = {}
|
343
|
+
end
|
344
|
+
end
|
345
|
+
|
218
346
|
class QuoteDetails < Stripe::StripeObject
|
219
347
|
# The quote that generated this invoice
|
220
348
|
attr_reader :quote
|
349
|
+
|
350
|
+
def self.inner_class_types
|
351
|
+
@inner_class_types = {}
|
352
|
+
end
|
353
|
+
|
354
|
+
def self.field_remappings
|
355
|
+
@field_remappings = {}
|
356
|
+
end
|
221
357
|
end
|
222
358
|
|
223
359
|
class SubscriptionDetails < Stripe::StripeObject
|
360
|
+
class PauseCollection < Stripe::StripeObject
|
361
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
362
|
+
attr_reader :behavior
|
363
|
+
# The time after which the subscription will resume collecting payments.
|
364
|
+
attr_reader :resumes_at
|
365
|
+
|
366
|
+
def self.inner_class_types
|
367
|
+
@inner_class_types = {}
|
368
|
+
end
|
369
|
+
|
370
|
+
def self.field_remappings
|
371
|
+
@field_remappings = {}
|
372
|
+
end
|
373
|
+
end
|
224
374
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
|
225
375
|
# *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
226
376
|
attr_reader :metadata
|
377
|
+
# 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).
|
378
|
+
attr_reader :pause_collection
|
227
379
|
# The subscription that generated this invoice
|
228
380
|
attr_reader :subscription
|
229
381
|
# Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
230
382
|
attr_reader :subscription_proration_date
|
383
|
+
|
384
|
+
def self.inner_class_types
|
385
|
+
@inner_class_types = { pause_collection: PauseCollection }
|
386
|
+
end
|
387
|
+
|
388
|
+
def self.field_remappings
|
389
|
+
@field_remappings = {}
|
390
|
+
end
|
231
391
|
end
|
392
|
+
# Details about the billing cadence that generated this invoice
|
393
|
+
attr_reader :billing_cadence_details
|
232
394
|
# Details about the quote that generated this invoice
|
233
395
|
attr_reader :quote_details
|
234
396
|
# Details about the subscription that generated this invoice
|
235
397
|
attr_reader :subscription_details
|
236
398
|
# The type of parent that generated this invoice
|
237
399
|
attr_reader :type
|
400
|
+
|
401
|
+
def self.inner_class_types
|
402
|
+
@inner_class_types = {
|
403
|
+
billing_cadence_details: BillingCadenceDetails,
|
404
|
+
quote_details: QuoteDetails,
|
405
|
+
subscription_details: SubscriptionDetails,
|
406
|
+
}
|
407
|
+
end
|
408
|
+
|
409
|
+
def self.field_remappings
|
410
|
+
@field_remappings = {}
|
411
|
+
end
|
238
412
|
end
|
239
413
|
|
240
414
|
class PaymentSettings < Stripe::StripeObject
|
@@ -243,27 +417,67 @@ module Stripe
|
|
243
417
|
class MandateOptions < Stripe::StripeObject
|
244
418
|
# Transaction type of the mandate.
|
245
419
|
attr_reader :transaction_type
|
420
|
+
|
421
|
+
def self.inner_class_types
|
422
|
+
@inner_class_types = {}
|
423
|
+
end
|
424
|
+
|
425
|
+
def self.field_remappings
|
426
|
+
@field_remappings = {}
|
427
|
+
end
|
246
428
|
end
|
247
429
|
# Attribute for field mandate_options
|
248
430
|
attr_reader :mandate_options
|
249
431
|
# Bank account verification method.
|
250
432
|
attr_reader :verification_method
|
433
|
+
|
434
|
+
def self.inner_class_types
|
435
|
+
@inner_class_types = { mandate_options: MandateOptions }
|
436
|
+
end
|
437
|
+
|
438
|
+
def self.field_remappings
|
439
|
+
@field_remappings = {}
|
440
|
+
end
|
251
441
|
end
|
252
442
|
|
253
443
|
class Bancontact < Stripe::StripeObject
|
254
444
|
# Preferred language of the Bancontact authorization page that the customer is redirected to.
|
255
445
|
attr_reader :preferred_language
|
446
|
+
|
447
|
+
def self.inner_class_types
|
448
|
+
@inner_class_types = {}
|
449
|
+
end
|
450
|
+
|
451
|
+
def self.field_remappings
|
452
|
+
@field_remappings = {}
|
453
|
+
end
|
256
454
|
end
|
257
455
|
|
258
456
|
class Card < Stripe::StripeObject
|
259
457
|
class Installments < Stripe::StripeObject
|
260
458
|
# Whether Installments are enabled for this Invoice.
|
261
459
|
attr_reader :enabled
|
460
|
+
|
461
|
+
def self.inner_class_types
|
462
|
+
@inner_class_types = {}
|
463
|
+
end
|
464
|
+
|
465
|
+
def self.field_remappings
|
466
|
+
@field_remappings = {}
|
467
|
+
end
|
262
468
|
end
|
263
469
|
# Attribute for field installments
|
264
470
|
attr_reader :installments
|
265
471
|
# We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
|
266
472
|
attr_reader :request_three_d_secure
|
473
|
+
|
474
|
+
def self.inner_class_types
|
475
|
+
@inner_class_types = { installments: Installments }
|
476
|
+
end
|
477
|
+
|
478
|
+
def self.field_remappings
|
479
|
+
@field_remappings = {}
|
480
|
+
end
|
267
481
|
end
|
268
482
|
|
269
483
|
class CustomerBalance < Stripe::StripeObject
|
@@ -271,26 +485,118 @@ module Stripe
|
|
271
485
|
class EuBankTransfer < Stripe::StripeObject
|
272
486
|
# The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
|
273
487
|
attr_reader :country
|
488
|
+
|
489
|
+
def self.inner_class_types
|
490
|
+
@inner_class_types = {}
|
491
|
+
end
|
492
|
+
|
493
|
+
def self.field_remappings
|
494
|
+
@field_remappings = {}
|
495
|
+
end
|
274
496
|
end
|
275
497
|
# Attribute for field eu_bank_transfer
|
276
498
|
attr_reader :eu_bank_transfer
|
277
499
|
# The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
|
278
500
|
attr_reader :type
|
501
|
+
|
502
|
+
def self.inner_class_types
|
503
|
+
@inner_class_types = { eu_bank_transfer: EuBankTransfer }
|
504
|
+
end
|
505
|
+
|
506
|
+
def self.field_remappings
|
507
|
+
@field_remappings = {}
|
508
|
+
end
|
279
509
|
end
|
280
510
|
# Attribute for field bank_transfer
|
281
511
|
attr_reader :bank_transfer
|
282
512
|
# The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
|
283
513
|
attr_reader :funding_type
|
514
|
+
|
515
|
+
def self.inner_class_types
|
516
|
+
@inner_class_types = { bank_transfer: BankTransfer }
|
517
|
+
end
|
518
|
+
|
519
|
+
def self.field_remappings
|
520
|
+
@field_remappings = {}
|
521
|
+
end
|
522
|
+
end
|
523
|
+
|
524
|
+
class IdBankTransfer < Stripe::StripeObject
|
525
|
+
def self.inner_class_types
|
526
|
+
@inner_class_types = {}
|
527
|
+
end
|
528
|
+
|
529
|
+
def self.field_remappings
|
530
|
+
@field_remappings = {}
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
class Konbini < Stripe::StripeObject
|
535
|
+
def self.inner_class_types
|
536
|
+
@inner_class_types = {}
|
537
|
+
end
|
538
|
+
|
539
|
+
def self.field_remappings
|
540
|
+
@field_remappings = {}
|
541
|
+
end
|
542
|
+
end
|
543
|
+
|
544
|
+
class SepaDebit < Stripe::StripeObject
|
545
|
+
def self.inner_class_types
|
546
|
+
@inner_class_types = {}
|
547
|
+
end
|
548
|
+
|
549
|
+
def self.field_remappings
|
550
|
+
@field_remappings = {}
|
551
|
+
end
|
284
552
|
end
|
285
553
|
|
286
|
-
class
|
287
|
-
|
554
|
+
class Upi < Stripe::StripeObject
|
555
|
+
class MandateOptions < Stripe::StripeObject
|
556
|
+
# Amount to be charged for future payments.
|
557
|
+
attr_reader :amount
|
558
|
+
# One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
559
|
+
attr_reader :amount_type
|
560
|
+
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
561
|
+
attr_reader :description
|
562
|
+
# End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
563
|
+
attr_reader :end_date
|
564
|
+
|
565
|
+
def self.inner_class_types
|
566
|
+
@inner_class_types = {}
|
567
|
+
end
|
568
|
+
|
569
|
+
def self.field_remappings
|
570
|
+
@field_remappings = {}
|
571
|
+
end
|
572
|
+
end
|
573
|
+
# Attribute for field mandate_options
|
574
|
+
attr_reader :mandate_options
|
575
|
+
|
576
|
+
def self.inner_class_types
|
577
|
+
@inner_class_types = { mandate_options: MandateOptions }
|
578
|
+
end
|
579
|
+
|
580
|
+
def self.field_remappings
|
581
|
+
@field_remappings = {}
|
582
|
+
end
|
583
|
+
end
|
288
584
|
|
289
585
|
class UsBankAccount < Stripe::StripeObject
|
290
586
|
class FinancialConnections < Stripe::StripeObject
|
291
587
|
class Filters < Stripe::StripeObject
|
292
588
|
# The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
293
589
|
attr_reader :account_subcategories
|
590
|
+
# The institution to use to filter for possible accounts to link.
|
591
|
+
attr_reader :institution
|
592
|
+
|
593
|
+
def self.inner_class_types
|
594
|
+
@inner_class_types = {}
|
595
|
+
end
|
596
|
+
|
597
|
+
def self.field_remappings
|
598
|
+
@field_remappings = {}
|
599
|
+
end
|
294
600
|
end
|
295
601
|
# Attribute for field filters
|
296
602
|
attr_reader :filters
|
@@ -298,11 +604,27 @@ module Stripe
|
|
298
604
|
attr_reader :permissions
|
299
605
|
# Data features requested to be retrieved upon account creation.
|
300
606
|
attr_reader :prefetch
|
607
|
+
|
608
|
+
def self.inner_class_types
|
609
|
+
@inner_class_types = { filters: Filters }
|
610
|
+
end
|
611
|
+
|
612
|
+
def self.field_remappings
|
613
|
+
@field_remappings = {}
|
614
|
+
end
|
301
615
|
end
|
302
616
|
# Attribute for field financial_connections
|
303
617
|
attr_reader :financial_connections
|
304
618
|
# Bank account verification method.
|
305
619
|
attr_reader :verification_method
|
620
|
+
|
621
|
+
def self.inner_class_types
|
622
|
+
@inner_class_types = { financial_connections: FinancialConnections }
|
623
|
+
end
|
624
|
+
|
625
|
+
def self.field_remappings
|
626
|
+
@field_remappings = {}
|
627
|
+
end
|
306
628
|
end
|
307
629
|
# If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
|
308
630
|
attr_reader :acss_debit
|
@@ -312,12 +634,34 @@ module Stripe
|
|
312
634
|
attr_reader :card
|
313
635
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
314
636
|
attr_reader :customer_balance
|
637
|
+
# 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.
|
638
|
+
attr_reader :id_bank_transfer
|
315
639
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
316
640
|
attr_reader :konbini
|
317
641
|
# 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.
|
318
642
|
attr_reader :sepa_debit
|
643
|
+
# If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
|
644
|
+
attr_reader :upi
|
319
645
|
# If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
320
646
|
attr_reader :us_bank_account
|
647
|
+
|
648
|
+
def self.inner_class_types
|
649
|
+
@inner_class_types = {
|
650
|
+
acss_debit: AcssDebit,
|
651
|
+
bancontact: Bancontact,
|
652
|
+
card: Card,
|
653
|
+
customer_balance: CustomerBalance,
|
654
|
+
id_bank_transfer: IdBankTransfer,
|
655
|
+
konbini: Konbini,
|
656
|
+
sepa_debit: SepaDebit,
|
657
|
+
upi: Upi,
|
658
|
+
us_bank_account: UsBankAccount,
|
659
|
+
}
|
660
|
+
end
|
661
|
+
|
662
|
+
def self.field_remappings
|
663
|
+
@field_remappings = {}
|
664
|
+
end
|
321
665
|
end
|
322
666
|
# ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
|
323
667
|
attr_reader :default_mandate
|
@@ -325,12 +669,28 @@ module Stripe
|
|
325
669
|
attr_reader :payment_method_options
|
326
670
|
# The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
|
327
671
|
attr_reader :payment_method_types
|
672
|
+
|
673
|
+
def self.inner_class_types
|
674
|
+
@inner_class_types = { payment_method_options: PaymentMethodOptions }
|
675
|
+
end
|
676
|
+
|
677
|
+
def self.field_remappings
|
678
|
+
@field_remappings = {}
|
679
|
+
end
|
328
680
|
end
|
329
681
|
|
330
682
|
class Rendering < Stripe::StripeObject
|
331
683
|
class Pdf < Stripe::StripeObject
|
332
684
|
# Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
|
333
685
|
attr_reader :page_size
|
686
|
+
|
687
|
+
def self.inner_class_types
|
688
|
+
@inner_class_types = {}
|
689
|
+
end
|
690
|
+
|
691
|
+
def self.field_remappings
|
692
|
+
@field_remappings = {}
|
693
|
+
end
|
334
694
|
end
|
335
695
|
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
|
336
696
|
attr_reader :amount_tax_display
|
@@ -340,6 +700,14 @@ module Stripe
|
|
340
700
|
attr_reader :template
|
341
701
|
# Version of the rendering template that the invoice is using.
|
342
702
|
attr_reader :template_version
|
703
|
+
|
704
|
+
def self.inner_class_types
|
705
|
+
@inner_class_types = { pdf: Pdf }
|
706
|
+
end
|
707
|
+
|
708
|
+
def self.field_remappings
|
709
|
+
@field_remappings = {}
|
710
|
+
end
|
343
711
|
end
|
344
712
|
|
345
713
|
class ShippingCost < Stripe::StripeObject
|
@@ -354,6 +722,14 @@ module Stripe
|
|
354
722
|
attr_reader :taxability_reason
|
355
723
|
# The amount on which tax is calculated, in cents (or local equivalent).
|
356
724
|
attr_reader :taxable_amount
|
725
|
+
|
726
|
+
def self.inner_class_types
|
727
|
+
@inner_class_types = {}
|
728
|
+
end
|
729
|
+
|
730
|
+
def self.field_remappings
|
731
|
+
@field_remappings = {}
|
732
|
+
end
|
357
733
|
end
|
358
734
|
# Total shipping cost before any taxes are applied.
|
359
735
|
attr_reader :amount_subtotal
|
@@ -365,6 +741,14 @@ module Stripe
|
|
365
741
|
attr_reader :shipping_rate
|
366
742
|
# The taxes applied to the shipping rate.
|
367
743
|
attr_reader :taxes
|
744
|
+
|
745
|
+
def self.inner_class_types
|
746
|
+
@inner_class_types = { taxes: Tax }
|
747
|
+
end
|
748
|
+
|
749
|
+
def self.field_remappings
|
750
|
+
@field_remappings = {}
|
751
|
+
end
|
368
752
|
end
|
369
753
|
|
370
754
|
class ShippingDetails < Stripe::StripeObject
|
@@ -381,6 +765,14 @@ module Stripe
|
|
381
765
|
attr_reader :postal_code
|
382
766
|
# State, county, province, or region.
|
383
767
|
attr_reader :state
|
768
|
+
|
769
|
+
def self.inner_class_types
|
770
|
+
@inner_class_types = {}
|
771
|
+
end
|
772
|
+
|
773
|
+
def self.field_remappings
|
774
|
+
@field_remappings = {}
|
775
|
+
end
|
384
776
|
end
|
385
777
|
# Attribute for field address
|
386
778
|
attr_reader :address
|
@@ -392,6 +784,14 @@ module Stripe
|
|
392
784
|
attr_reader :phone
|
393
785
|
# The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
|
394
786
|
attr_reader :tracking_number
|
787
|
+
|
788
|
+
def self.inner_class_types
|
789
|
+
@inner_class_types = { address: Address }
|
790
|
+
end
|
791
|
+
|
792
|
+
def self.field_remappings
|
793
|
+
@field_remappings = {}
|
794
|
+
end
|
395
795
|
end
|
396
796
|
|
397
797
|
class StatusTransitions < Stripe::StripeObject
|
@@ -403,6 +803,14 @@ module Stripe
|
|
403
803
|
attr_reader :paid_at
|
404
804
|
# The time that the invoice was voided.
|
405
805
|
attr_reader :voided_at
|
806
|
+
|
807
|
+
def self.inner_class_types
|
808
|
+
@inner_class_types = {}
|
809
|
+
end
|
810
|
+
|
811
|
+
def self.field_remappings
|
812
|
+
@field_remappings = {}
|
813
|
+
end
|
406
814
|
end
|
407
815
|
|
408
816
|
class ThresholdReason < Stripe::StripeObject
|
@@ -411,11 +819,27 @@ module Stripe
|
|
411
819
|
attr_reader :line_item_ids
|
412
820
|
# The quantity threshold boundary that applied to the given line item.
|
413
821
|
attr_reader :usage_gte
|
822
|
+
|
823
|
+
def self.inner_class_types
|
824
|
+
@inner_class_types = {}
|
825
|
+
end
|
826
|
+
|
827
|
+
def self.field_remappings
|
828
|
+
@field_remappings = {}
|
829
|
+
end
|
414
830
|
end
|
415
831
|
# The total invoice amount threshold boundary if it triggered the threshold invoice.
|
416
832
|
attr_reader :amount_gte
|
417
833
|
# Indicates which line items triggered a threshold invoice.
|
418
834
|
attr_reader :item_reasons
|
835
|
+
|
836
|
+
def self.inner_class_types
|
837
|
+
@inner_class_types = { item_reasons: ItemReason }
|
838
|
+
end
|
839
|
+
|
840
|
+
def self.field_remappings
|
841
|
+
@field_remappings = {}
|
842
|
+
end
|
419
843
|
end
|
420
844
|
|
421
845
|
class TotalDiscountAmount < Stripe::StripeObject
|
@@ -423,6 +847,29 @@ module Stripe
|
|
423
847
|
attr_reader :amount
|
424
848
|
# The discount that was applied to get this discount amount.
|
425
849
|
attr_reader :discount
|
850
|
+
|
851
|
+
def self.inner_class_types
|
852
|
+
@inner_class_types = {}
|
853
|
+
end
|
854
|
+
|
855
|
+
def self.field_remappings
|
856
|
+
@field_remappings = {}
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
class TotalMarginAmount < Stripe::StripeObject
|
861
|
+
# The amount, in cents (or local equivalent), of the reduction in line item amount.
|
862
|
+
attr_reader :amount
|
863
|
+
# The margin that was applied to get this margin amount.
|
864
|
+
attr_reader :margin
|
865
|
+
|
866
|
+
def self.inner_class_types
|
867
|
+
@inner_class_types = {}
|
868
|
+
end
|
869
|
+
|
870
|
+
def self.field_remappings
|
871
|
+
@field_remappings = {}
|
872
|
+
end
|
426
873
|
end
|
427
874
|
|
428
875
|
class TotalPretaxCreditAmount < Stripe::StripeObject
|
@@ -432,14 +879,32 @@ module Stripe
|
|
432
879
|
attr_reader :credit_balance_transaction
|
433
880
|
# The discount that was applied to get this pretax credit amount.
|
434
881
|
attr_reader :discount
|
882
|
+
# The margin that was applied to get this pretax credit amount.
|
883
|
+
attr_reader :margin
|
435
884
|
# Type of the pretax credit amount referenced.
|
436
885
|
attr_reader :type
|
886
|
+
|
887
|
+
def self.inner_class_types
|
888
|
+
@inner_class_types = {}
|
889
|
+
end
|
890
|
+
|
891
|
+
def self.field_remappings
|
892
|
+
@field_remappings = {}
|
893
|
+
end
|
437
894
|
end
|
438
895
|
|
439
896
|
class TotalTax < Stripe::StripeObject
|
440
897
|
class TaxRateDetails < Stripe::StripeObject
|
441
898
|
# Attribute for field tax_rate
|
442
899
|
attr_reader :tax_rate
|
900
|
+
|
901
|
+
def self.inner_class_types
|
902
|
+
@inner_class_types = {}
|
903
|
+
end
|
904
|
+
|
905
|
+
def self.field_remappings
|
906
|
+
@field_remappings = {}
|
907
|
+
end
|
443
908
|
end
|
444
909
|
# The amount of the tax, in cents (or local equivalent).
|
445
910
|
attr_reader :amount
|
@@ -453,11 +918,37 @@ module Stripe
|
|
453
918
|
attr_reader :taxable_amount
|
454
919
|
# The type of tax information.
|
455
920
|
attr_reader :type
|
921
|
+
|
922
|
+
def self.inner_class_types
|
923
|
+
@inner_class_types = { tax_rate_details: TaxRateDetails }
|
924
|
+
end
|
925
|
+
|
926
|
+
def self.field_remappings
|
927
|
+
@field_remappings = {}
|
928
|
+
end
|
456
929
|
end
|
457
930
|
|
458
931
|
class DeleteParams < Stripe::RequestParams; end
|
459
932
|
|
460
933
|
class UpdateParams < Stripe::RequestParams
|
934
|
+
class AmountsDue < Stripe::RequestParams
|
935
|
+
# The amount in cents (or local equivalent).
|
936
|
+
attr_accessor :amount
|
937
|
+
# Number of days from when invoice is finalized until the payment is due.
|
938
|
+
attr_accessor :days_until_due
|
939
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
940
|
+
attr_accessor :description
|
941
|
+
# Date on which a payment plan’s payment is due.
|
942
|
+
attr_accessor :due_date
|
943
|
+
|
944
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
945
|
+
@amount = amount
|
946
|
+
@days_until_due = days_until_due
|
947
|
+
@description = description
|
948
|
+
@due_date = due_date
|
949
|
+
end
|
950
|
+
end
|
951
|
+
|
461
952
|
class AutomaticTax < Stripe::RequestParams
|
462
953
|
class Liability < Stripe::RequestParams
|
463
954
|
# The connected account being referenced when `type` is `account`.
|
@@ -494,16 +985,44 @@ module Stripe
|
|
494
985
|
end
|
495
986
|
|
496
987
|
class Discount < Stripe::RequestParams
|
988
|
+
class DiscountEnd < Stripe::RequestParams
|
989
|
+
class Duration < Stripe::RequestParams
|
990
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
991
|
+
attr_accessor :interval
|
992
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
993
|
+
attr_accessor :interval_count
|
994
|
+
|
995
|
+
def initialize(interval: nil, interval_count: nil)
|
996
|
+
@interval = interval
|
997
|
+
@interval_count = interval_count
|
998
|
+
end
|
999
|
+
end
|
1000
|
+
# Time span for the redeemed discount.
|
1001
|
+
attr_accessor :duration
|
1002
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1003
|
+
attr_accessor :timestamp
|
1004
|
+
# The type of calculation made to determine when the discount ends.
|
1005
|
+
attr_accessor :type
|
1006
|
+
|
1007
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1008
|
+
@duration = duration
|
1009
|
+
@timestamp = timestamp
|
1010
|
+
@type = type
|
1011
|
+
end
|
1012
|
+
end
|
497
1013
|
# ID of the coupon to create a new discount for.
|
498
1014
|
attr_accessor :coupon
|
499
1015
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
500
1016
|
attr_accessor :discount
|
1017
|
+
# Details to determine how long the discount should be applied for.
|
1018
|
+
attr_accessor :discount_end
|
501
1019
|
# ID of the promotion code to create a new discount for.
|
502
1020
|
attr_accessor :promotion_code
|
503
1021
|
|
504
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1022
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
505
1023
|
@coupon = coupon
|
506
1024
|
@discount = discount
|
1025
|
+
@discount_end = discount_end
|
507
1026
|
@promotion_code = promotion_code
|
508
1027
|
end
|
509
1028
|
end
|
@@ -623,17 +1142,47 @@ module Stripe
|
|
623
1142
|
end
|
624
1143
|
end
|
625
1144
|
|
1145
|
+
class IdBankTransfer < Stripe::RequestParams; end
|
626
1146
|
class Konbini < Stripe::RequestParams; end
|
627
1147
|
class SepaDebit < Stripe::RequestParams; end
|
628
1148
|
|
1149
|
+
class Upi < Stripe::RequestParams
|
1150
|
+
class MandateOptions < Stripe::RequestParams
|
1151
|
+
# Amount to be charged for future payments.
|
1152
|
+
attr_accessor :amount
|
1153
|
+
# One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
1154
|
+
attr_accessor :amount_type
|
1155
|
+
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
1156
|
+
attr_accessor :description
|
1157
|
+
# End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
1158
|
+
attr_accessor :end_date
|
1159
|
+
|
1160
|
+
def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
|
1161
|
+
@amount = amount
|
1162
|
+
@amount_type = amount_type
|
1163
|
+
@description = description
|
1164
|
+
@end_date = end_date
|
1165
|
+
end
|
1166
|
+
end
|
1167
|
+
# Configuration options for setting up an eMandate
|
1168
|
+
attr_accessor :mandate_options
|
1169
|
+
|
1170
|
+
def initialize(mandate_options: nil)
|
1171
|
+
@mandate_options = mandate_options
|
1172
|
+
end
|
1173
|
+
end
|
1174
|
+
|
629
1175
|
class UsBankAccount < Stripe::RequestParams
|
630
1176
|
class FinancialConnections < Stripe::RequestParams
|
631
1177
|
class Filters < Stripe::RequestParams
|
632
1178
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
633
1179
|
attr_accessor :account_subcategories
|
1180
|
+
# ID of the institution to use to filter for selectable accounts.
|
1181
|
+
attr_accessor :institution
|
634
1182
|
|
635
|
-
def initialize(account_subcategories: nil)
|
1183
|
+
def initialize(account_subcategories: nil, institution: nil)
|
636
1184
|
@account_subcategories = account_subcategories
|
1185
|
+
@institution = institution
|
637
1186
|
end
|
638
1187
|
end
|
639
1188
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -667,10 +1216,14 @@ module Stripe
|
|
667
1216
|
attr_accessor :card
|
668
1217
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
669
1218
|
attr_accessor :customer_balance
|
1219
|
+
# 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.
|
1220
|
+
attr_accessor :id_bank_transfer
|
670
1221
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
671
1222
|
attr_accessor :konbini
|
672
1223
|
# 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.
|
673
1224
|
attr_accessor :sepa_debit
|
1225
|
+
# If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
|
1226
|
+
attr_accessor :upi
|
674
1227
|
# If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
675
1228
|
attr_accessor :us_bank_account
|
676
1229
|
|
@@ -679,16 +1232,20 @@ module Stripe
|
|
679
1232
|
bancontact: nil,
|
680
1233
|
card: nil,
|
681
1234
|
customer_balance: nil,
|
1235
|
+
id_bank_transfer: nil,
|
682
1236
|
konbini: nil,
|
683
1237
|
sepa_debit: nil,
|
1238
|
+
upi: nil,
|
684
1239
|
us_bank_account: nil
|
685
1240
|
)
|
686
1241
|
@acss_debit = acss_debit
|
687
1242
|
@bancontact = bancontact
|
688
1243
|
@card = card
|
689
1244
|
@customer_balance = customer_balance
|
1245
|
+
@id_bank_transfer = id_bank_transfer
|
690
1246
|
@konbini = konbini
|
691
1247
|
@sepa_debit = sepa_debit
|
1248
|
+
@upi = upi
|
692
1249
|
@us_bank_account = us_bank_account
|
693
1250
|
end
|
694
1251
|
end
|
@@ -898,6 +1455,8 @@ module Stripe
|
|
898
1455
|
end
|
899
1456
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
900
1457
|
attr_accessor :account_tax_ids
|
1458
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1459
|
+
attr_accessor :amounts_due
|
901
1460
|
# 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).
|
902
1461
|
attr_accessor :application_fee_amount
|
903
1462
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -912,6 +1471,8 @@ module Stripe
|
|
912
1471
|
attr_accessor :custom_fields
|
913
1472
|
# 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.
|
914
1473
|
attr_accessor :days_until_due
|
1474
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1475
|
+
attr_accessor :default_margins
|
915
1476
|
# 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.
|
916
1477
|
attr_accessor :default_payment_method
|
917
1478
|
# 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.
|
@@ -953,6 +1514,7 @@ module Stripe
|
|
953
1514
|
|
954
1515
|
def initialize(
|
955
1516
|
account_tax_ids: nil,
|
1517
|
+
amounts_due: nil,
|
956
1518
|
application_fee_amount: nil,
|
957
1519
|
auto_advance: nil,
|
958
1520
|
automatic_tax: nil,
|
@@ -960,6 +1522,7 @@ module Stripe
|
|
960
1522
|
collection_method: nil,
|
961
1523
|
custom_fields: nil,
|
962
1524
|
days_until_due: nil,
|
1525
|
+
default_margins: nil,
|
963
1526
|
default_payment_method: nil,
|
964
1527
|
default_source: nil,
|
965
1528
|
default_tax_rates: nil,
|
@@ -981,6 +1544,7 @@ module Stripe
|
|
981
1544
|
transfer_data: nil
|
982
1545
|
)
|
983
1546
|
@account_tax_ids = account_tax_ids
|
1547
|
+
@amounts_due = amounts_due
|
984
1548
|
@application_fee_amount = application_fee_amount
|
985
1549
|
@auto_advance = auto_advance
|
986
1550
|
@automatic_tax = automatic_tax
|
@@ -988,6 +1552,7 @@ module Stripe
|
|
988
1552
|
@collection_method = collection_method
|
989
1553
|
@custom_fields = custom_fields
|
990
1554
|
@days_until_due = days_until_due
|
1555
|
+
@default_margins = default_margins
|
991
1556
|
@default_payment_method = default_payment_method
|
992
1557
|
@default_source = default_source
|
993
1558
|
@default_tax_rates = default_tax_rates
|
@@ -1052,6 +1617,8 @@ module Stripe
|
|
1052
1617
|
attr_accessor :created
|
1053
1618
|
# Only return invoices for the customer specified by this customer ID.
|
1054
1619
|
attr_accessor :customer
|
1620
|
+
# Only return invoices for the account specified by this account ID.
|
1621
|
+
attr_accessor :customer_account
|
1055
1622
|
# Attribute for param field due_date
|
1056
1623
|
attr_accessor :due_date
|
1057
1624
|
# 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.
|
@@ -1071,6 +1638,7 @@ module Stripe
|
|
1071
1638
|
collection_method: nil,
|
1072
1639
|
created: nil,
|
1073
1640
|
customer: nil,
|
1641
|
+
customer_account: nil,
|
1074
1642
|
due_date: nil,
|
1075
1643
|
ending_before: nil,
|
1076
1644
|
expand: nil,
|
@@ -1082,6 +1650,7 @@ module Stripe
|
|
1082
1650
|
@collection_method = collection_method
|
1083
1651
|
@created = created
|
1084
1652
|
@customer = customer
|
1653
|
+
@customer_account = customer_account
|
1085
1654
|
@due_date = due_date
|
1086
1655
|
@ending_before = ending_before
|
1087
1656
|
@expand = expand
|
@@ -1093,6 +1662,24 @@ module Stripe
|
|
1093
1662
|
end
|
1094
1663
|
|
1095
1664
|
class CreateParams < Stripe::RequestParams
|
1665
|
+
class AmountsDue < Stripe::RequestParams
|
1666
|
+
# The amount in cents (or local equivalent).
|
1667
|
+
attr_accessor :amount
|
1668
|
+
# Number of days from when invoice is finalized until the payment is due.
|
1669
|
+
attr_accessor :days_until_due
|
1670
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
1671
|
+
attr_accessor :description
|
1672
|
+
# Date on which a payment plan’s payment is due.
|
1673
|
+
attr_accessor :due_date
|
1674
|
+
|
1675
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
1676
|
+
@amount = amount
|
1677
|
+
@days_until_due = days_until_due
|
1678
|
+
@description = description
|
1679
|
+
@due_date = due_date
|
1680
|
+
end
|
1681
|
+
end
|
1682
|
+
|
1096
1683
|
class AutomaticTax < Stripe::RequestParams
|
1097
1684
|
class Liability < Stripe::RequestParams
|
1098
1685
|
# The connected account being referenced when `type` is `account`.
|
@@ -1129,16 +1716,44 @@ module Stripe
|
|
1129
1716
|
end
|
1130
1717
|
|
1131
1718
|
class Discount < Stripe::RequestParams
|
1719
|
+
class DiscountEnd < Stripe::RequestParams
|
1720
|
+
class Duration < Stripe::RequestParams
|
1721
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1722
|
+
attr_accessor :interval
|
1723
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1724
|
+
attr_accessor :interval_count
|
1725
|
+
|
1726
|
+
def initialize(interval: nil, interval_count: nil)
|
1727
|
+
@interval = interval
|
1728
|
+
@interval_count = interval_count
|
1729
|
+
end
|
1730
|
+
end
|
1731
|
+
# Time span for the redeemed discount.
|
1732
|
+
attr_accessor :duration
|
1733
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1734
|
+
attr_accessor :timestamp
|
1735
|
+
# The type of calculation made to determine when the discount ends.
|
1736
|
+
attr_accessor :type
|
1737
|
+
|
1738
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1739
|
+
@duration = duration
|
1740
|
+
@timestamp = timestamp
|
1741
|
+
@type = type
|
1742
|
+
end
|
1743
|
+
end
|
1132
1744
|
# ID of the coupon to create a new discount for.
|
1133
1745
|
attr_accessor :coupon
|
1134
1746
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1135
1747
|
attr_accessor :discount
|
1748
|
+
# Details to determine how long the discount should be applied for.
|
1749
|
+
attr_accessor :discount_end
|
1136
1750
|
# ID of the promotion code to create a new discount for.
|
1137
1751
|
attr_accessor :promotion_code
|
1138
1752
|
|
1139
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1753
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1140
1754
|
@coupon = coupon
|
1141
1755
|
@discount = discount
|
1756
|
+
@discount_end = discount_end
|
1142
1757
|
@promotion_code = promotion_code
|
1143
1758
|
end
|
1144
1759
|
end
|
@@ -1270,17 +1885,47 @@ module Stripe
|
|
1270
1885
|
end
|
1271
1886
|
end
|
1272
1887
|
|
1888
|
+
class IdBankTransfer < Stripe::RequestParams; end
|
1273
1889
|
class Konbini < Stripe::RequestParams; end
|
1274
1890
|
class SepaDebit < Stripe::RequestParams; end
|
1275
1891
|
|
1892
|
+
class Upi < Stripe::RequestParams
|
1893
|
+
class MandateOptions < Stripe::RequestParams
|
1894
|
+
# Amount to be charged for future payments.
|
1895
|
+
attr_accessor :amount
|
1896
|
+
# One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
|
1897
|
+
attr_accessor :amount_type
|
1898
|
+
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
1899
|
+
attr_accessor :description
|
1900
|
+
# End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
1901
|
+
attr_accessor :end_date
|
1902
|
+
|
1903
|
+
def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
|
1904
|
+
@amount = amount
|
1905
|
+
@amount_type = amount_type
|
1906
|
+
@description = description
|
1907
|
+
@end_date = end_date
|
1908
|
+
end
|
1909
|
+
end
|
1910
|
+
# Configuration options for setting up an eMandate
|
1911
|
+
attr_accessor :mandate_options
|
1912
|
+
|
1913
|
+
def initialize(mandate_options: nil)
|
1914
|
+
@mandate_options = mandate_options
|
1915
|
+
end
|
1916
|
+
end
|
1917
|
+
|
1276
1918
|
class UsBankAccount < Stripe::RequestParams
|
1277
1919
|
class FinancialConnections < Stripe::RequestParams
|
1278
1920
|
class Filters < Stripe::RequestParams
|
1279
1921
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
1280
1922
|
attr_accessor :account_subcategories
|
1923
|
+
# ID of the institution to use to filter for selectable accounts.
|
1924
|
+
attr_accessor :institution
|
1281
1925
|
|
1282
|
-
def initialize(account_subcategories: nil)
|
1926
|
+
def initialize(account_subcategories: nil, institution: nil)
|
1283
1927
|
@account_subcategories = account_subcategories
|
1928
|
+
@institution = institution
|
1284
1929
|
end
|
1285
1930
|
end
|
1286
1931
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -1314,10 +1959,14 @@ module Stripe
|
|
1314
1959
|
attr_accessor :card
|
1315
1960
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1316
1961
|
attr_accessor :customer_balance
|
1962
|
+
# 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.
|
1963
|
+
attr_accessor :id_bank_transfer
|
1317
1964
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1318
1965
|
attr_accessor :konbini
|
1319
1966
|
# 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.
|
1320
1967
|
attr_accessor :sepa_debit
|
1968
|
+
# If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
|
1969
|
+
attr_accessor :upi
|
1321
1970
|
# If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
1322
1971
|
attr_accessor :us_bank_account
|
1323
1972
|
|
@@ -1326,16 +1975,20 @@ module Stripe
|
|
1326
1975
|
bancontact: nil,
|
1327
1976
|
card: nil,
|
1328
1977
|
customer_balance: nil,
|
1978
|
+
id_bank_transfer: nil,
|
1329
1979
|
konbini: nil,
|
1330
1980
|
sepa_debit: nil,
|
1981
|
+
upi: nil,
|
1331
1982
|
us_bank_account: nil
|
1332
1983
|
)
|
1333
1984
|
@acss_debit = acss_debit
|
1334
1985
|
@bancontact = bancontact
|
1335
1986
|
@card = card
|
1336
1987
|
@customer_balance = customer_balance
|
1988
|
+
@id_bank_transfer = id_bank_transfer
|
1337
1989
|
@konbini = konbini
|
1338
1990
|
@sepa_debit = sepa_debit
|
1991
|
+
@upi = upi
|
1339
1992
|
@us_bank_account = us_bank_account
|
1340
1993
|
end
|
1341
1994
|
end
|
@@ -1545,6 +2198,8 @@ module Stripe
|
|
1545
2198
|
end
|
1546
2199
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1547
2200
|
attr_accessor :account_tax_ids
|
2201
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
2202
|
+
attr_accessor :amounts_due
|
1548
2203
|
# 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).
|
1549
2204
|
attr_accessor :application_fee_amount
|
1550
2205
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false.
|
@@ -1561,8 +2216,12 @@ module Stripe
|
|
1561
2216
|
attr_accessor :custom_fields
|
1562
2217
|
# The ID of the customer who will be billed.
|
1563
2218
|
attr_accessor :customer
|
2219
|
+
# The ID of the account who will be billed.
|
2220
|
+
attr_accessor :customer_account
|
1564
2221
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1565
2222
|
attr_accessor :days_until_due
|
2223
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
2224
|
+
attr_accessor :default_margins
|
1566
2225
|
# 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.
|
1567
2226
|
attr_accessor :default_payment_method
|
1568
2227
|
# 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.
|
@@ -1610,6 +2269,7 @@ module Stripe
|
|
1610
2269
|
|
1611
2270
|
def initialize(
|
1612
2271
|
account_tax_ids: nil,
|
2272
|
+
amounts_due: nil,
|
1613
2273
|
application_fee_amount: nil,
|
1614
2274
|
auto_advance: nil,
|
1615
2275
|
automatic_tax: nil,
|
@@ -1618,7 +2278,9 @@ module Stripe
|
|
1618
2278
|
currency: nil,
|
1619
2279
|
custom_fields: nil,
|
1620
2280
|
customer: nil,
|
2281
|
+
customer_account: nil,
|
1621
2282
|
days_until_due: nil,
|
2283
|
+
default_margins: nil,
|
1622
2284
|
default_payment_method: nil,
|
1623
2285
|
default_source: nil,
|
1624
2286
|
default_tax_rates: nil,
|
@@ -1643,6 +2305,7 @@ module Stripe
|
|
1643
2305
|
transfer_data: nil
|
1644
2306
|
)
|
1645
2307
|
@account_tax_ids = account_tax_ids
|
2308
|
+
@amounts_due = amounts_due
|
1646
2309
|
@application_fee_amount = application_fee_amount
|
1647
2310
|
@auto_advance = auto_advance
|
1648
2311
|
@automatic_tax = automatic_tax
|
@@ -1651,7 +2314,9 @@ module Stripe
|
|
1651
2314
|
@currency = currency
|
1652
2315
|
@custom_fields = custom_fields
|
1653
2316
|
@customer = customer
|
2317
|
+
@customer_account = customer_account
|
1654
2318
|
@days_until_due = days_until_due
|
2319
|
+
@default_margins = default_margins
|
1655
2320
|
@default_payment_method = default_payment_method
|
1656
2321
|
@default_source = default_source
|
1657
2322
|
@default_tax_rates = default_tax_rates
|
@@ -1698,16 +2363,44 @@ module Stripe
|
|
1698
2363
|
class AddLinesParams < Stripe::RequestParams
|
1699
2364
|
class Line < Stripe::RequestParams
|
1700
2365
|
class Discount < Stripe::RequestParams
|
2366
|
+
class DiscountEnd < Stripe::RequestParams
|
2367
|
+
class Duration < Stripe::RequestParams
|
2368
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2369
|
+
attr_accessor :interval
|
2370
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2371
|
+
attr_accessor :interval_count
|
2372
|
+
|
2373
|
+
def initialize(interval: nil, interval_count: nil)
|
2374
|
+
@interval = interval
|
2375
|
+
@interval_count = interval_count
|
2376
|
+
end
|
2377
|
+
end
|
2378
|
+
# Time span for the redeemed discount.
|
2379
|
+
attr_accessor :duration
|
2380
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2381
|
+
attr_accessor :timestamp
|
2382
|
+
# The type of calculation made to determine when the discount ends.
|
2383
|
+
attr_accessor :type
|
2384
|
+
|
2385
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2386
|
+
@duration = duration
|
2387
|
+
@timestamp = timestamp
|
2388
|
+
@type = type
|
2389
|
+
end
|
2390
|
+
end
|
1701
2391
|
# ID of the coupon to create a new discount for.
|
1702
2392
|
attr_accessor :coupon
|
1703
2393
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1704
2394
|
attr_accessor :discount
|
2395
|
+
# Details to determine how long the discount should be applied for.
|
2396
|
+
attr_accessor :discount_end
|
1705
2397
|
# ID of the promotion code to create a new discount for.
|
1706
2398
|
attr_accessor :promotion_code
|
1707
2399
|
|
1708
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2400
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1709
2401
|
@coupon = coupon
|
1710
2402
|
@discount = discount
|
2403
|
+
@discount_end = discount_end
|
1711
2404
|
@promotion_code = promotion_code
|
1712
2405
|
end
|
1713
2406
|
end
|
@@ -1860,6 +2553,8 @@ module Stripe
|
|
1860
2553
|
attr_accessor :discounts
|
1861
2554
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1862
2555
|
attr_accessor :invoice_item
|
2556
|
+
# 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.
|
2557
|
+
attr_accessor :margins
|
1863
2558
|
# 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`.
|
1864
2559
|
attr_accessor :metadata
|
1865
2560
|
# 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.
|
@@ -1881,6 +2576,7 @@ module Stripe
|
|
1881
2576
|
discountable: nil,
|
1882
2577
|
discounts: nil,
|
1883
2578
|
invoice_item: nil,
|
2579
|
+
margins: nil,
|
1884
2580
|
metadata: nil,
|
1885
2581
|
period: nil,
|
1886
2582
|
price_data: nil,
|
@@ -1894,6 +2590,7 @@ module Stripe
|
|
1894
2590
|
@discountable = discountable
|
1895
2591
|
@discounts = discounts
|
1896
2592
|
@invoice_item = invoice_item
|
2593
|
+
@margins = margins
|
1897
2594
|
@metadata = metadata
|
1898
2595
|
@period = period
|
1899
2596
|
@price_data = price_data
|
@@ -1918,14 +2615,59 @@ module Stripe
|
|
1918
2615
|
end
|
1919
2616
|
|
1920
2617
|
class AttachPaymentParams < Stripe::RequestParams
|
2618
|
+
class PaymentRecordData < Stripe::RequestParams
|
2619
|
+
# The amount that was paid out of band.
|
2620
|
+
attr_accessor :amount
|
2621
|
+
# The currency that was paid out of band.
|
2622
|
+
attr_accessor :currency
|
2623
|
+
# 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`.
|
2624
|
+
attr_accessor :metadata
|
2625
|
+
# The type of money movement for this out of band payment record.
|
2626
|
+
attr_accessor :money_movement_type
|
2627
|
+
# The timestamp when this out of band payment was paid.
|
2628
|
+
attr_accessor :paid_at
|
2629
|
+
# The reference for this out of band payment record.
|
2630
|
+
attr_accessor :payment_reference
|
2631
|
+
|
2632
|
+
def initialize(
|
2633
|
+
amount: nil,
|
2634
|
+
currency: nil,
|
2635
|
+
metadata: nil,
|
2636
|
+
money_movement_type: nil,
|
2637
|
+
paid_at: nil,
|
2638
|
+
payment_reference: nil
|
2639
|
+
)
|
2640
|
+
@amount = amount
|
2641
|
+
@currency = currency
|
2642
|
+
@metadata = metadata
|
2643
|
+
@money_movement_type = money_movement_type
|
2644
|
+
@paid_at = paid_at
|
2645
|
+
@payment_reference = payment_reference
|
2646
|
+
end
|
2647
|
+
end
|
2648
|
+
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
2649
|
+
attr_accessor :amount_requested
|
1921
2650
|
# Specifies which fields in the response should be expanded.
|
1922
2651
|
attr_accessor :expand
|
1923
2652
|
# The ID of the PaymentIntent to attach to the invoice.
|
1924
2653
|
attr_accessor :payment_intent
|
2654
|
+
# The ID of the PaymentRecord to attach to the invoice.
|
2655
|
+
attr_accessor :payment_record
|
2656
|
+
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
2657
|
+
attr_accessor :payment_record_data
|
1925
2658
|
|
1926
|
-
def initialize(
|
2659
|
+
def initialize(
|
2660
|
+
amount_requested: nil,
|
2661
|
+
expand: nil,
|
2662
|
+
payment_intent: nil,
|
2663
|
+
payment_record: nil,
|
2664
|
+
payment_record_data: nil
|
2665
|
+
)
|
2666
|
+
@amount_requested = amount_requested
|
1927
2667
|
@expand = expand
|
1928
2668
|
@payment_intent = payment_intent
|
2669
|
+
@payment_record = payment_record
|
2670
|
+
@payment_record_data = payment_record_data
|
1929
2671
|
end
|
1930
2672
|
end
|
1931
2673
|
|
@@ -2025,16 +2767,44 @@ module Stripe
|
|
2025
2767
|
class UpdateLinesParams < Stripe::RequestParams
|
2026
2768
|
class Line < Stripe::RequestParams
|
2027
2769
|
class Discount < Stripe::RequestParams
|
2770
|
+
class DiscountEnd < Stripe::RequestParams
|
2771
|
+
class Duration < Stripe::RequestParams
|
2772
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2773
|
+
attr_accessor :interval
|
2774
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2775
|
+
attr_accessor :interval_count
|
2776
|
+
|
2777
|
+
def initialize(interval: nil, interval_count: nil)
|
2778
|
+
@interval = interval
|
2779
|
+
@interval_count = interval_count
|
2780
|
+
end
|
2781
|
+
end
|
2782
|
+
# Time span for the redeemed discount.
|
2783
|
+
attr_accessor :duration
|
2784
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2785
|
+
attr_accessor :timestamp
|
2786
|
+
# The type of calculation made to determine when the discount ends.
|
2787
|
+
attr_accessor :type
|
2788
|
+
|
2789
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2790
|
+
@duration = duration
|
2791
|
+
@timestamp = timestamp
|
2792
|
+
@type = type
|
2793
|
+
end
|
2794
|
+
end
|
2028
2795
|
# ID of the coupon to create a new discount for.
|
2029
2796
|
attr_accessor :coupon
|
2030
2797
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2031
2798
|
attr_accessor :discount
|
2799
|
+
# Details to determine how long the discount should be applied for.
|
2800
|
+
attr_accessor :discount_end
|
2032
2801
|
# ID of the promotion code to create a new discount for.
|
2033
2802
|
attr_accessor :promotion_code
|
2034
2803
|
|
2035
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2804
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2036
2805
|
@coupon = coupon
|
2037
2806
|
@discount = discount
|
2807
|
+
@discount_end = discount_end
|
2038
2808
|
@promotion_code = promotion_code
|
2039
2809
|
end
|
2040
2810
|
end
|
@@ -2187,6 +2957,8 @@ module Stripe
|
|
2187
2957
|
attr_accessor :discounts
|
2188
2958
|
# ID of an existing line item on the invoice.
|
2189
2959
|
attr_accessor :id
|
2960
|
+
# 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.
|
2961
|
+
attr_accessor :margins
|
2190
2962
|
# 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.
|
2191
2963
|
attr_accessor :metadata
|
2192
2964
|
# 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.
|
@@ -2208,6 +2980,7 @@ module Stripe
|
|
2208
2980
|
discountable: nil,
|
2209
2981
|
discounts: nil,
|
2210
2982
|
id: nil,
|
2983
|
+
margins: nil,
|
2211
2984
|
metadata: nil,
|
2212
2985
|
period: nil,
|
2213
2986
|
price_data: nil,
|
@@ -2221,6 +2994,7 @@ module Stripe
|
|
2221
2994
|
@discountable = discountable
|
2222
2995
|
@discounts = discounts
|
2223
2996
|
@id = id
|
2997
|
+
@margins = margins
|
2224
2998
|
@metadata = metadata
|
2225
2999
|
@period = period
|
2226
3000
|
@price_data = price_data
|
@@ -2395,32 +3169,88 @@ module Stripe
|
|
2395
3169
|
end
|
2396
3170
|
|
2397
3171
|
class Discount < Stripe::RequestParams
|
3172
|
+
class DiscountEnd < Stripe::RequestParams
|
3173
|
+
class Duration < Stripe::RequestParams
|
3174
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3175
|
+
attr_accessor :interval
|
3176
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3177
|
+
attr_accessor :interval_count
|
3178
|
+
|
3179
|
+
def initialize(interval: nil, interval_count: nil)
|
3180
|
+
@interval = interval
|
3181
|
+
@interval_count = interval_count
|
3182
|
+
end
|
3183
|
+
end
|
3184
|
+
# Time span for the redeemed discount.
|
3185
|
+
attr_accessor :duration
|
3186
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3187
|
+
attr_accessor :timestamp
|
3188
|
+
# The type of calculation made to determine when the discount ends.
|
3189
|
+
attr_accessor :type
|
3190
|
+
|
3191
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3192
|
+
@duration = duration
|
3193
|
+
@timestamp = timestamp
|
3194
|
+
@type = type
|
3195
|
+
end
|
3196
|
+
end
|
2398
3197
|
# ID of the coupon to create a new discount for.
|
2399
3198
|
attr_accessor :coupon
|
2400
3199
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2401
3200
|
attr_accessor :discount
|
3201
|
+
# Details to determine how long the discount should be applied for.
|
3202
|
+
attr_accessor :discount_end
|
2402
3203
|
# ID of the promotion code to create a new discount for.
|
2403
3204
|
attr_accessor :promotion_code
|
2404
3205
|
|
2405
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3206
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2406
3207
|
@coupon = coupon
|
2407
3208
|
@discount = discount
|
3209
|
+
@discount_end = discount_end
|
2408
3210
|
@promotion_code = promotion_code
|
2409
3211
|
end
|
2410
3212
|
end
|
2411
3213
|
|
2412
3214
|
class InvoiceItem < Stripe::RequestParams
|
2413
3215
|
class Discount < Stripe::RequestParams
|
3216
|
+
class DiscountEnd < Stripe::RequestParams
|
3217
|
+
class Duration < Stripe::RequestParams
|
3218
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3219
|
+
attr_accessor :interval
|
3220
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3221
|
+
attr_accessor :interval_count
|
3222
|
+
|
3223
|
+
def initialize(interval: nil, interval_count: nil)
|
3224
|
+
@interval = interval
|
3225
|
+
@interval_count = interval_count
|
3226
|
+
end
|
3227
|
+
end
|
3228
|
+
# Time span for the redeemed discount.
|
3229
|
+
attr_accessor :duration
|
3230
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3231
|
+
attr_accessor :timestamp
|
3232
|
+
# The type of calculation made to determine when the discount ends.
|
3233
|
+
attr_accessor :type
|
3234
|
+
|
3235
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3236
|
+
@duration = duration
|
3237
|
+
@timestamp = timestamp
|
3238
|
+
@type = type
|
3239
|
+
end
|
3240
|
+
end
|
2414
3241
|
# ID of the coupon to create a new discount for.
|
2415
3242
|
attr_accessor :coupon
|
2416
3243
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2417
3244
|
attr_accessor :discount
|
3245
|
+
# Details to determine how long the discount should be applied for.
|
3246
|
+
attr_accessor :discount_end
|
2418
3247
|
# ID of the promotion code to create a new discount for.
|
2419
3248
|
attr_accessor :promotion_code
|
2420
3249
|
|
2421
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3250
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2422
3251
|
@coupon = coupon
|
2423
3252
|
@discount = discount
|
3253
|
+
@discount_end = discount_end
|
2424
3254
|
@promotion_code = promotion_code
|
2425
3255
|
end
|
2426
3256
|
end
|
@@ -2546,6 +3376,458 @@ module Stripe
|
|
2546
3376
|
end
|
2547
3377
|
|
2548
3378
|
class ScheduleDetails < Stripe::RequestParams
|
3379
|
+
class Amendment < Stripe::RequestParams
|
3380
|
+
class AmendmentEnd < Stripe::RequestParams
|
3381
|
+
class DiscountEnd < Stripe::RequestParams
|
3382
|
+
# The ID of a specific discount.
|
3383
|
+
attr_accessor :discount
|
3384
|
+
|
3385
|
+
def initialize(discount: nil)
|
3386
|
+
@discount = discount
|
3387
|
+
end
|
3388
|
+
end
|
3389
|
+
|
3390
|
+
class Duration < Stripe::RequestParams
|
3391
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3392
|
+
attr_accessor :interval
|
3393
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3394
|
+
attr_accessor :interval_count
|
3395
|
+
|
3396
|
+
def initialize(interval: nil, interval_count: nil)
|
3397
|
+
@interval = interval
|
3398
|
+
@interval_count = interval_count
|
3399
|
+
end
|
3400
|
+
end
|
3401
|
+
# Use the `end` time of a given discount.
|
3402
|
+
attr_accessor :discount_end
|
3403
|
+
# Time span for the amendment starting from the `amendment_start`.
|
3404
|
+
attr_accessor :duration
|
3405
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
3406
|
+
attr_accessor :timestamp
|
3407
|
+
# Select one of three ways to pass the `amendment_end`.
|
3408
|
+
attr_accessor :type
|
3409
|
+
|
3410
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
3411
|
+
@discount_end = discount_end
|
3412
|
+
@duration = duration
|
3413
|
+
@timestamp = timestamp
|
3414
|
+
@type = type
|
3415
|
+
end
|
3416
|
+
end
|
3417
|
+
|
3418
|
+
class AmendmentStart < Stripe::RequestParams
|
3419
|
+
class AmendmentEnd < Stripe::RequestParams
|
3420
|
+
# 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.
|
3421
|
+
attr_accessor :index
|
3422
|
+
|
3423
|
+
def initialize(index: nil)
|
3424
|
+
@index = index
|
3425
|
+
end
|
3426
|
+
end
|
3427
|
+
|
3428
|
+
class DiscountEnd < Stripe::RequestParams
|
3429
|
+
# The ID of a specific discount.
|
3430
|
+
attr_accessor :discount
|
3431
|
+
|
3432
|
+
def initialize(discount: nil)
|
3433
|
+
@discount = discount
|
3434
|
+
end
|
3435
|
+
end
|
3436
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
3437
|
+
attr_accessor :amendment_end
|
3438
|
+
# Use the `end` time of a given discount.
|
3439
|
+
attr_accessor :discount_end
|
3440
|
+
# A precise Unix timestamp for the amendment to start.
|
3441
|
+
attr_accessor :timestamp
|
3442
|
+
# Select one of three ways to pass the `amendment_start`.
|
3443
|
+
attr_accessor :type
|
3444
|
+
|
3445
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
3446
|
+
@amendment_end = amendment_end
|
3447
|
+
@discount_end = discount_end
|
3448
|
+
@timestamp = timestamp
|
3449
|
+
@type = type
|
3450
|
+
end
|
3451
|
+
end
|
3452
|
+
|
3453
|
+
class DiscountAction < Stripe::RequestParams
|
3454
|
+
class Add < Stripe::RequestParams
|
3455
|
+
class DiscountEnd < Stripe::RequestParams
|
3456
|
+
# The type of calculation made to determine when the discount ends.
|
3457
|
+
attr_accessor :type
|
3458
|
+
|
3459
|
+
def initialize(type: nil)
|
3460
|
+
@type = type
|
3461
|
+
end
|
3462
|
+
end
|
3463
|
+
# The coupon code to redeem.
|
3464
|
+
attr_accessor :coupon
|
3465
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
3466
|
+
attr_accessor :discount
|
3467
|
+
# Details to determine how long the discount should be applied for.
|
3468
|
+
attr_accessor :discount_end
|
3469
|
+
# 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.
|
3470
|
+
attr_accessor :index
|
3471
|
+
# The promotion code to redeem.
|
3472
|
+
attr_accessor :promotion_code
|
3473
|
+
|
3474
|
+
def initialize(
|
3475
|
+
coupon: nil,
|
3476
|
+
discount: nil,
|
3477
|
+
discount_end: nil,
|
3478
|
+
index: nil,
|
3479
|
+
promotion_code: nil
|
3480
|
+
)
|
3481
|
+
@coupon = coupon
|
3482
|
+
@discount = discount
|
3483
|
+
@discount_end = discount_end
|
3484
|
+
@index = index
|
3485
|
+
@promotion_code = promotion_code
|
3486
|
+
end
|
3487
|
+
end
|
3488
|
+
|
3489
|
+
class Remove < Stripe::RequestParams
|
3490
|
+
# The coupon code to remove from the `discounts` array.
|
3491
|
+
attr_accessor :coupon
|
3492
|
+
# The ID of a discount to remove from the `discounts` array.
|
3493
|
+
attr_accessor :discount
|
3494
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
3495
|
+
attr_accessor :promotion_code
|
3496
|
+
|
3497
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3498
|
+
@coupon = coupon
|
3499
|
+
@discount = discount
|
3500
|
+
@promotion_code = promotion_code
|
3501
|
+
end
|
3502
|
+
end
|
3503
|
+
|
3504
|
+
class Set < Stripe::RequestParams
|
3505
|
+
# The coupon code to replace the `discounts` array with.
|
3506
|
+
attr_accessor :coupon
|
3507
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
3508
|
+
attr_accessor :discount
|
3509
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
3510
|
+
attr_accessor :promotion_code
|
3511
|
+
|
3512
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3513
|
+
@coupon = coupon
|
3514
|
+
@discount = discount
|
3515
|
+
@promotion_code = promotion_code
|
3516
|
+
end
|
3517
|
+
end
|
3518
|
+
# Details of the discount to add.
|
3519
|
+
attr_accessor :add
|
3520
|
+
# Details of the discount to remove.
|
3521
|
+
attr_accessor :remove
|
3522
|
+
# Details of the discount to replace the existing discounts with.
|
3523
|
+
attr_accessor :set
|
3524
|
+
# Determines the type of discount action.
|
3525
|
+
attr_accessor :type
|
3526
|
+
|
3527
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3528
|
+
@add = add
|
3529
|
+
@remove = remove
|
3530
|
+
@set = set
|
3531
|
+
@type = type
|
3532
|
+
end
|
3533
|
+
end
|
3534
|
+
|
3535
|
+
class ItemAction < Stripe::RequestParams
|
3536
|
+
class Add < Stripe::RequestParams
|
3537
|
+
class Discount < Stripe::RequestParams
|
3538
|
+
class DiscountEnd < Stripe::RequestParams
|
3539
|
+
class Duration < Stripe::RequestParams
|
3540
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3541
|
+
attr_accessor :interval
|
3542
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3543
|
+
attr_accessor :interval_count
|
3544
|
+
|
3545
|
+
def initialize(interval: nil, interval_count: nil)
|
3546
|
+
@interval = interval
|
3547
|
+
@interval_count = interval_count
|
3548
|
+
end
|
3549
|
+
end
|
3550
|
+
# Time span for the redeemed discount.
|
3551
|
+
attr_accessor :duration
|
3552
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3553
|
+
attr_accessor :timestamp
|
3554
|
+
# The type of calculation made to determine when the discount ends.
|
3555
|
+
attr_accessor :type
|
3556
|
+
|
3557
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3558
|
+
@duration = duration
|
3559
|
+
@timestamp = timestamp
|
3560
|
+
@type = type
|
3561
|
+
end
|
3562
|
+
end
|
3563
|
+
# ID of the coupon to create a new discount for.
|
3564
|
+
attr_accessor :coupon
|
3565
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3566
|
+
attr_accessor :discount
|
3567
|
+
# Details to determine how long the discount should be applied for.
|
3568
|
+
attr_accessor :discount_end
|
3569
|
+
# ID of the promotion code to create a new discount for.
|
3570
|
+
attr_accessor :promotion_code
|
3571
|
+
|
3572
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3573
|
+
@coupon = coupon
|
3574
|
+
@discount = discount
|
3575
|
+
@discount_end = discount_end
|
3576
|
+
@promotion_code = promotion_code
|
3577
|
+
end
|
3578
|
+
end
|
3579
|
+
|
3580
|
+
class Trial < Stripe::RequestParams
|
3581
|
+
# 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.
|
3582
|
+
attr_accessor :converts_to
|
3583
|
+
# Determines the type of trial for this item.
|
3584
|
+
attr_accessor :type
|
3585
|
+
|
3586
|
+
def initialize(converts_to: nil, type: nil)
|
3587
|
+
@converts_to = converts_to
|
3588
|
+
@type = type
|
3589
|
+
end
|
3590
|
+
end
|
3591
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
3592
|
+
attr_accessor :discounts
|
3593
|
+
# 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`.
|
3594
|
+
attr_accessor :metadata
|
3595
|
+
# The ID of the price object.
|
3596
|
+
attr_accessor :price
|
3597
|
+
# Quantity for this item.
|
3598
|
+
attr_accessor :quantity
|
3599
|
+
# 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`.
|
3600
|
+
attr_accessor :tax_rates
|
3601
|
+
# Options that configure the trial on the subscription item.
|
3602
|
+
attr_accessor :trial
|
3603
|
+
|
3604
|
+
def initialize(
|
3605
|
+
discounts: nil,
|
3606
|
+
metadata: nil,
|
3607
|
+
price: nil,
|
3608
|
+
quantity: nil,
|
3609
|
+
tax_rates: nil,
|
3610
|
+
trial: nil
|
3611
|
+
)
|
3612
|
+
@discounts = discounts
|
3613
|
+
@metadata = metadata
|
3614
|
+
@price = price
|
3615
|
+
@quantity = quantity
|
3616
|
+
@tax_rates = tax_rates
|
3617
|
+
@trial = trial
|
3618
|
+
end
|
3619
|
+
end
|
3620
|
+
|
3621
|
+
class Remove < Stripe::RequestParams
|
3622
|
+
# ID of a price to remove.
|
3623
|
+
attr_accessor :price
|
3624
|
+
|
3625
|
+
def initialize(price: nil)
|
3626
|
+
@price = price
|
3627
|
+
end
|
3628
|
+
end
|
3629
|
+
|
3630
|
+
class Set < Stripe::RequestParams
|
3631
|
+
class Discount < Stripe::RequestParams
|
3632
|
+
class DiscountEnd < Stripe::RequestParams
|
3633
|
+
class Duration < Stripe::RequestParams
|
3634
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3635
|
+
attr_accessor :interval
|
3636
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3637
|
+
attr_accessor :interval_count
|
3638
|
+
|
3639
|
+
def initialize(interval: nil, interval_count: nil)
|
3640
|
+
@interval = interval
|
3641
|
+
@interval_count = interval_count
|
3642
|
+
end
|
3643
|
+
end
|
3644
|
+
# Time span for the redeemed discount.
|
3645
|
+
attr_accessor :duration
|
3646
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3647
|
+
attr_accessor :timestamp
|
3648
|
+
# The type of calculation made to determine when the discount ends.
|
3649
|
+
attr_accessor :type
|
3650
|
+
|
3651
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3652
|
+
@duration = duration
|
3653
|
+
@timestamp = timestamp
|
3654
|
+
@type = type
|
3655
|
+
end
|
3656
|
+
end
|
3657
|
+
# ID of the coupon to create a new discount for.
|
3658
|
+
attr_accessor :coupon
|
3659
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3660
|
+
attr_accessor :discount
|
3661
|
+
# Details to determine how long the discount should be applied for.
|
3662
|
+
attr_accessor :discount_end
|
3663
|
+
# ID of the promotion code to create a new discount for.
|
3664
|
+
attr_accessor :promotion_code
|
3665
|
+
|
3666
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3667
|
+
@coupon = coupon
|
3668
|
+
@discount = discount
|
3669
|
+
@discount_end = discount_end
|
3670
|
+
@promotion_code = promotion_code
|
3671
|
+
end
|
3672
|
+
end
|
3673
|
+
|
3674
|
+
class Trial < Stripe::RequestParams
|
3675
|
+
# 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.
|
3676
|
+
attr_accessor :converts_to
|
3677
|
+
# Determines the type of trial for this item.
|
3678
|
+
attr_accessor :type
|
3679
|
+
|
3680
|
+
def initialize(converts_to: nil, type: nil)
|
3681
|
+
@converts_to = converts_to
|
3682
|
+
@type = type
|
3683
|
+
end
|
3684
|
+
end
|
3685
|
+
# 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`.
|
3686
|
+
attr_accessor :discounts
|
3687
|
+
# 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`.
|
3688
|
+
attr_accessor :metadata
|
3689
|
+
# The ID of the price object.
|
3690
|
+
attr_accessor :price
|
3691
|
+
# 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`.
|
3692
|
+
attr_accessor :quantity
|
3693
|
+
# 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`.
|
3694
|
+
attr_accessor :tax_rates
|
3695
|
+
# 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`.
|
3696
|
+
attr_accessor :trial
|
3697
|
+
|
3698
|
+
def initialize(
|
3699
|
+
discounts: nil,
|
3700
|
+
metadata: nil,
|
3701
|
+
price: nil,
|
3702
|
+
quantity: nil,
|
3703
|
+
tax_rates: nil,
|
3704
|
+
trial: nil
|
3705
|
+
)
|
3706
|
+
@discounts = discounts
|
3707
|
+
@metadata = metadata
|
3708
|
+
@price = price
|
3709
|
+
@quantity = quantity
|
3710
|
+
@tax_rates = tax_rates
|
3711
|
+
@trial = trial
|
3712
|
+
end
|
3713
|
+
end
|
3714
|
+
# 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.
|
3715
|
+
attr_accessor :add
|
3716
|
+
# Details of the subscription item to remove.
|
3717
|
+
attr_accessor :remove
|
3718
|
+
# 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.
|
3719
|
+
attr_accessor :set
|
3720
|
+
# Determines the type of item action.
|
3721
|
+
attr_accessor :type
|
3722
|
+
|
3723
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3724
|
+
@add = add
|
3725
|
+
@remove = remove
|
3726
|
+
@set = set
|
3727
|
+
@type = type
|
3728
|
+
end
|
3729
|
+
end
|
3730
|
+
|
3731
|
+
class MetadataAction < Stripe::RequestParams
|
3732
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
3733
|
+
attr_accessor :add
|
3734
|
+
# Keys to remove from schedule phase metadata.
|
3735
|
+
attr_accessor :remove
|
3736
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
3737
|
+
attr_accessor :set
|
3738
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
3739
|
+
attr_accessor :type
|
3740
|
+
|
3741
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3742
|
+
@add = add
|
3743
|
+
@remove = remove
|
3744
|
+
@set = set
|
3745
|
+
@type = type
|
3746
|
+
end
|
3747
|
+
end
|
3748
|
+
|
3749
|
+
class SetPauseCollection < Stripe::RequestParams
|
3750
|
+
class Set < Stripe::RequestParams
|
3751
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3752
|
+
attr_accessor :behavior
|
3753
|
+
|
3754
|
+
def initialize(behavior: nil)
|
3755
|
+
@behavior = behavior
|
3756
|
+
end
|
3757
|
+
end
|
3758
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
3759
|
+
attr_accessor :set
|
3760
|
+
# Determines the type of the pause_collection amendment.
|
3761
|
+
attr_accessor :type
|
3762
|
+
|
3763
|
+
def initialize(set: nil, type: nil)
|
3764
|
+
@set = set
|
3765
|
+
@type = type
|
3766
|
+
end
|
3767
|
+
end
|
3768
|
+
|
3769
|
+
class TrialSettings < Stripe::RequestParams
|
3770
|
+
class EndBehavior < Stripe::RequestParams
|
3771
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3772
|
+
attr_accessor :prorate_up_front
|
3773
|
+
|
3774
|
+
def initialize(prorate_up_front: nil)
|
3775
|
+
@prorate_up_front = prorate_up_front
|
3776
|
+
end
|
3777
|
+
end
|
3778
|
+
# Defines how the subscription should behave when a trial ends.
|
3779
|
+
attr_accessor :end_behavior
|
3780
|
+
|
3781
|
+
def initialize(end_behavior: nil)
|
3782
|
+
@end_behavior = end_behavior
|
3783
|
+
end
|
3784
|
+
end
|
3785
|
+
# 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.
|
3786
|
+
attr_accessor :amendment_end
|
3787
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
3788
|
+
attr_accessor :amendment_start
|
3789
|
+
# 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.
|
3790
|
+
attr_accessor :billing_cycle_anchor
|
3791
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
3792
|
+
attr_accessor :discount_actions
|
3793
|
+
# Changes to the subscription items during the amendment time span.
|
3794
|
+
attr_accessor :item_actions
|
3795
|
+
# Instructions for how to modify phase metadata
|
3796
|
+
attr_accessor :metadata_actions
|
3797
|
+
# 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`.
|
3798
|
+
attr_accessor :proration_behavior
|
3799
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
3800
|
+
attr_accessor :set_pause_collection
|
3801
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
3802
|
+
attr_accessor :set_schedule_end
|
3803
|
+
# Settings related to subscription trials.
|
3804
|
+
attr_accessor :trial_settings
|
3805
|
+
|
3806
|
+
def initialize(
|
3807
|
+
amendment_end: nil,
|
3808
|
+
amendment_start: nil,
|
3809
|
+
billing_cycle_anchor: nil,
|
3810
|
+
discount_actions: nil,
|
3811
|
+
item_actions: nil,
|
3812
|
+
metadata_actions: nil,
|
3813
|
+
proration_behavior: nil,
|
3814
|
+
set_pause_collection: nil,
|
3815
|
+
set_schedule_end: nil,
|
3816
|
+
trial_settings: nil
|
3817
|
+
)
|
3818
|
+
@amendment_end = amendment_end
|
3819
|
+
@amendment_start = amendment_start
|
3820
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
3821
|
+
@discount_actions = discount_actions
|
3822
|
+
@item_actions = item_actions
|
3823
|
+
@metadata_actions = metadata_actions
|
3824
|
+
@proration_behavior = proration_behavior
|
3825
|
+
@set_pause_collection = set_pause_collection
|
3826
|
+
@set_schedule_end = set_schedule_end
|
3827
|
+
@trial_settings = trial_settings
|
3828
|
+
end
|
3829
|
+
end
|
3830
|
+
|
2549
3831
|
class BillingMode < Stripe::RequestParams
|
2550
3832
|
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
2551
3833
|
attr_accessor :type
|
@@ -2558,16 +3840,44 @@ module Stripe
|
|
2558
3840
|
class Phase < Stripe::RequestParams
|
2559
3841
|
class AddInvoiceItem < Stripe::RequestParams
|
2560
3842
|
class Discount < Stripe::RequestParams
|
3843
|
+
class DiscountEnd < Stripe::RequestParams
|
3844
|
+
class Duration < Stripe::RequestParams
|
3845
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3846
|
+
attr_accessor :interval
|
3847
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3848
|
+
attr_accessor :interval_count
|
3849
|
+
|
3850
|
+
def initialize(interval: nil, interval_count: nil)
|
3851
|
+
@interval = interval
|
3852
|
+
@interval_count = interval_count
|
3853
|
+
end
|
3854
|
+
end
|
3855
|
+
# Time span for the redeemed discount.
|
3856
|
+
attr_accessor :duration
|
3857
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3858
|
+
attr_accessor :timestamp
|
3859
|
+
# The type of calculation made to determine when the discount ends.
|
3860
|
+
attr_accessor :type
|
3861
|
+
|
3862
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3863
|
+
@duration = duration
|
3864
|
+
@timestamp = timestamp
|
3865
|
+
@type = type
|
3866
|
+
end
|
3867
|
+
end
|
2561
3868
|
# ID of the coupon to create a new discount for.
|
2562
3869
|
attr_accessor :coupon
|
2563
3870
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2564
3871
|
attr_accessor :discount
|
3872
|
+
# Details to determine how long the discount should be applied for.
|
3873
|
+
attr_accessor :discount_end
|
2565
3874
|
# ID of the promotion code to create a new discount for.
|
2566
3875
|
attr_accessor :promotion_code
|
2567
3876
|
|
2568
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3877
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2569
3878
|
@coupon = coupon
|
2570
3879
|
@discount = discount
|
3880
|
+
@discount_end = discount_end
|
2571
3881
|
@promotion_code = promotion_code
|
2572
3882
|
end
|
2573
3883
|
end
|
@@ -2703,16 +4013,44 @@ module Stripe
|
|
2703
4013
|
end
|
2704
4014
|
|
2705
4015
|
class Discount < Stripe::RequestParams
|
4016
|
+
class DiscountEnd < Stripe::RequestParams
|
4017
|
+
class Duration < Stripe::RequestParams
|
4018
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
4019
|
+
attr_accessor :interval
|
4020
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
4021
|
+
attr_accessor :interval_count
|
4022
|
+
|
4023
|
+
def initialize(interval: nil, interval_count: nil)
|
4024
|
+
@interval = interval
|
4025
|
+
@interval_count = interval_count
|
4026
|
+
end
|
4027
|
+
end
|
4028
|
+
# Time span for the redeemed discount.
|
4029
|
+
attr_accessor :duration
|
4030
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
4031
|
+
attr_accessor :timestamp
|
4032
|
+
# The type of calculation made to determine when the discount ends.
|
4033
|
+
attr_accessor :type
|
4034
|
+
|
4035
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
4036
|
+
@duration = duration
|
4037
|
+
@timestamp = timestamp
|
4038
|
+
@type = type
|
4039
|
+
end
|
4040
|
+
end
|
2706
4041
|
# ID of the coupon to create a new discount for.
|
2707
4042
|
attr_accessor :coupon
|
2708
4043
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2709
4044
|
attr_accessor :discount
|
4045
|
+
# Details to determine how long the discount should be applied for.
|
4046
|
+
attr_accessor :discount_end
|
2710
4047
|
# ID of the promotion code to create a new discount for.
|
2711
4048
|
attr_accessor :promotion_code
|
2712
4049
|
|
2713
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
4050
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2714
4051
|
@coupon = coupon
|
2715
4052
|
@discount = discount
|
4053
|
+
@discount_end = discount_end
|
2716
4054
|
@promotion_code = promotion_code
|
2717
4055
|
end
|
2718
4056
|
end
|
@@ -2766,16 +4104,44 @@ module Stripe
|
|
2766
4104
|
end
|
2767
4105
|
|
2768
4106
|
class Discount < Stripe::RequestParams
|
4107
|
+
class DiscountEnd < Stripe::RequestParams
|
4108
|
+
class Duration < Stripe::RequestParams
|
4109
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
4110
|
+
attr_accessor :interval
|
4111
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
4112
|
+
attr_accessor :interval_count
|
4113
|
+
|
4114
|
+
def initialize(interval: nil, interval_count: nil)
|
4115
|
+
@interval = interval
|
4116
|
+
@interval_count = interval_count
|
4117
|
+
end
|
4118
|
+
end
|
4119
|
+
# Time span for the redeemed discount.
|
4120
|
+
attr_accessor :duration
|
4121
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
4122
|
+
attr_accessor :timestamp
|
4123
|
+
# The type of calculation made to determine when the discount ends.
|
4124
|
+
attr_accessor :type
|
4125
|
+
|
4126
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
4127
|
+
@duration = duration
|
4128
|
+
@timestamp = timestamp
|
4129
|
+
@type = type
|
4130
|
+
end
|
4131
|
+
end
|
2769
4132
|
# ID of the coupon to create a new discount for.
|
2770
4133
|
attr_accessor :coupon
|
2771
4134
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2772
4135
|
attr_accessor :discount
|
4136
|
+
# Details to determine how long the discount should be applied for.
|
4137
|
+
attr_accessor :discount_end
|
2773
4138
|
# ID of the promotion code to create a new discount for.
|
2774
4139
|
attr_accessor :promotion_code
|
2775
4140
|
|
2776
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
4141
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2777
4142
|
@coupon = coupon
|
2778
4143
|
@discount = discount
|
4144
|
+
@discount_end = discount_end
|
2779
4145
|
@promotion_code = promotion_code
|
2780
4146
|
end
|
2781
4147
|
end
|
@@ -2821,6 +4187,18 @@ module Stripe
|
|
2821
4187
|
@unit_amount_decimal = unit_amount_decimal
|
2822
4188
|
end
|
2823
4189
|
end
|
4190
|
+
|
4191
|
+
class Trial < Stripe::RequestParams
|
4192
|
+
# 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.
|
4193
|
+
attr_accessor :converts_to
|
4194
|
+
# Determines the type of trial for this item.
|
4195
|
+
attr_accessor :type
|
4196
|
+
|
4197
|
+
def initialize(converts_to: nil, type: nil)
|
4198
|
+
@converts_to = converts_to
|
4199
|
+
@type = type
|
4200
|
+
end
|
4201
|
+
end
|
2824
4202
|
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
2825
4203
|
attr_accessor :billing_thresholds
|
2826
4204
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -2837,6 +4215,8 @@ module Stripe
|
|
2837
4215
|
attr_accessor :quantity
|
2838
4216
|
# 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.
|
2839
4217
|
attr_accessor :tax_rates
|
4218
|
+
# Options that configure the trial on the subscription item.
|
4219
|
+
attr_accessor :trial
|
2840
4220
|
|
2841
4221
|
def initialize(
|
2842
4222
|
billing_thresholds: nil,
|
@@ -2846,7 +4226,8 @@ module Stripe
|
|
2846
4226
|
price: nil,
|
2847
4227
|
price_data: nil,
|
2848
4228
|
quantity: nil,
|
2849
|
-
tax_rates: nil
|
4229
|
+
tax_rates: nil,
|
4230
|
+
trial: nil
|
2850
4231
|
)
|
2851
4232
|
@billing_thresholds = billing_thresholds
|
2852
4233
|
@discounts = discounts
|
@@ -2856,6 +4237,16 @@ module Stripe
|
|
2856
4237
|
@price_data = price_data
|
2857
4238
|
@quantity = quantity
|
2858
4239
|
@tax_rates = tax_rates
|
4240
|
+
@trial = trial
|
4241
|
+
end
|
4242
|
+
end
|
4243
|
+
|
4244
|
+
class PauseCollection < Stripe::RequestParams
|
4245
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
4246
|
+
attr_accessor :behavior
|
4247
|
+
|
4248
|
+
def initialize(behavior: nil)
|
4249
|
+
@behavior = behavior
|
2859
4250
|
end
|
2860
4251
|
end
|
2861
4252
|
|
@@ -2870,6 +4261,23 @@ module Stripe
|
|
2870
4261
|
@destination = destination
|
2871
4262
|
end
|
2872
4263
|
end
|
4264
|
+
|
4265
|
+
class TrialSettings < Stripe::RequestParams
|
4266
|
+
class EndBehavior < Stripe::RequestParams
|
4267
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
4268
|
+
attr_accessor :prorate_up_front
|
4269
|
+
|
4270
|
+
def initialize(prorate_up_front: nil)
|
4271
|
+
@prorate_up_front = prorate_up_front
|
4272
|
+
end
|
4273
|
+
end
|
4274
|
+
# Defines how the subscription should behave when a trial ends.
|
4275
|
+
attr_accessor :end_behavior
|
4276
|
+
|
4277
|
+
def initialize(end_behavior: nil)
|
4278
|
+
@end_behavior = end_behavior
|
4279
|
+
end
|
4280
|
+
end
|
2873
4281
|
# 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.
|
2874
4282
|
attr_accessor :add_invoice_items
|
2875
4283
|
# 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).
|
@@ -2906,6 +4314,8 @@ module Stripe
|
|
2906
4314
|
attr_accessor :metadata
|
2907
4315
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
2908
4316
|
attr_accessor :on_behalf_of
|
4317
|
+
# 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).
|
4318
|
+
attr_accessor :pause_collection
|
2909
4319
|
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
2910
4320
|
attr_accessor :proration_behavior
|
2911
4321
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -2914,8 +4324,12 @@ module Stripe
|
|
2914
4324
|
attr_accessor :transfer_data
|
2915
4325
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
2916
4326
|
attr_accessor :trial
|
4327
|
+
# Specify trial behavior when crossing phase boundaries
|
4328
|
+
attr_accessor :trial_continuation
|
2917
4329
|
# 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`
|
2918
4330
|
attr_accessor :trial_end
|
4331
|
+
# Settings related to subscription trials.
|
4332
|
+
attr_accessor :trial_settings
|
2919
4333
|
|
2920
4334
|
def initialize(
|
2921
4335
|
add_invoice_items: nil,
|
@@ -2936,11 +4350,14 @@ module Stripe
|
|
2936
4350
|
iterations: nil,
|
2937
4351
|
metadata: nil,
|
2938
4352
|
on_behalf_of: nil,
|
4353
|
+
pause_collection: nil,
|
2939
4354
|
proration_behavior: nil,
|
2940
4355
|
start_date: nil,
|
2941
4356
|
transfer_data: nil,
|
2942
4357
|
trial: nil,
|
2943
|
-
|
4358
|
+
trial_continuation: nil,
|
4359
|
+
trial_end: nil,
|
4360
|
+
trial_settings: nil
|
2944
4361
|
)
|
2945
4362
|
@add_invoice_items = add_invoice_items
|
2946
4363
|
@application_fee_percent = application_fee_percent
|
@@ -2960,26 +4377,95 @@ module Stripe
|
|
2960
4377
|
@iterations = iterations
|
2961
4378
|
@metadata = metadata
|
2962
4379
|
@on_behalf_of = on_behalf_of
|
4380
|
+
@pause_collection = pause_collection
|
2963
4381
|
@proration_behavior = proration_behavior
|
2964
4382
|
@start_date = start_date
|
2965
4383
|
@transfer_data = transfer_data
|
2966
4384
|
@trial = trial
|
4385
|
+
@trial_continuation = trial_continuation
|
2967
4386
|
@trial_end = trial_end
|
4387
|
+
@trial_settings = trial_settings
|
4388
|
+
end
|
4389
|
+
end
|
4390
|
+
|
4391
|
+
class Prebilling < Stripe::RequestParams
|
4392
|
+
class BillUntil < Stripe::RequestParams
|
4393
|
+
class AmendmentEnd < Stripe::RequestParams
|
4394
|
+
# 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.
|
4395
|
+
attr_accessor :index
|
4396
|
+
|
4397
|
+
def initialize(index: nil)
|
4398
|
+
@index = index
|
4399
|
+
end
|
4400
|
+
end
|
4401
|
+
|
4402
|
+
class Duration < Stripe::RequestParams
|
4403
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
4404
|
+
attr_accessor :interval
|
4405
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
4406
|
+
attr_accessor :interval_count
|
4407
|
+
|
4408
|
+
def initialize(interval: nil, interval_count: nil)
|
4409
|
+
@interval = interval
|
4410
|
+
@interval_count = interval_count
|
4411
|
+
end
|
4412
|
+
end
|
4413
|
+
# End the prebilled period when a specified amendment ends.
|
4414
|
+
attr_accessor :amendment_end
|
4415
|
+
# Time span for prebilling, starting from `bill_from`.
|
4416
|
+
attr_accessor :duration
|
4417
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
4418
|
+
attr_accessor :timestamp
|
4419
|
+
# Select one of several ways to pass the `bill_until` value.
|
4420
|
+
attr_accessor :type
|
4421
|
+
|
4422
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
4423
|
+
@amendment_end = amendment_end
|
4424
|
+
@duration = duration
|
4425
|
+
@timestamp = timestamp
|
4426
|
+
@type = type
|
4427
|
+
end
|
4428
|
+
end
|
4429
|
+
# The end of the prebilled time period.
|
4430
|
+
attr_accessor :bill_until
|
4431
|
+
# This is used to determine the number of billing cycles to prebill.
|
4432
|
+
attr_accessor :iterations
|
4433
|
+
|
4434
|
+
def initialize(bill_until: nil, iterations: nil)
|
4435
|
+
@bill_until = bill_until
|
4436
|
+
@iterations = iterations
|
2968
4437
|
end
|
2969
4438
|
end
|
4439
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
4440
|
+
attr_accessor :amendments
|
4441
|
+
# 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.
|
4442
|
+
attr_accessor :billing_behavior
|
2970
4443
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2971
4444
|
attr_accessor :billing_mode
|
2972
4445
|
# 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.
|
2973
4446
|
attr_accessor :end_behavior
|
2974
4447
|
# 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.
|
2975
4448
|
attr_accessor :phases
|
4449
|
+
# Provide any time periods to bill in advance.
|
4450
|
+
attr_accessor :prebilling
|
2976
4451
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
2977
4452
|
attr_accessor :proration_behavior
|
2978
4453
|
|
2979
|
-
def initialize(
|
4454
|
+
def initialize(
|
4455
|
+
amendments: nil,
|
4456
|
+
billing_behavior: nil,
|
4457
|
+
billing_mode: nil,
|
4458
|
+
end_behavior: nil,
|
4459
|
+
phases: nil,
|
4460
|
+
prebilling: nil,
|
4461
|
+
proration_behavior: nil
|
4462
|
+
)
|
4463
|
+
@amendments = amendments
|
4464
|
+
@billing_behavior = billing_behavior
|
2980
4465
|
@billing_mode = billing_mode
|
2981
4466
|
@end_behavior = end_behavior
|
2982
4467
|
@phases = phases
|
4468
|
+
@prebilling = prebilling
|
2983
4469
|
@proration_behavior = proration_behavior
|
2984
4470
|
end
|
2985
4471
|
end
|
@@ -3005,16 +4491,44 @@ module Stripe
|
|
3005
4491
|
end
|
3006
4492
|
|
3007
4493
|
class Discount < Stripe::RequestParams
|
4494
|
+
class DiscountEnd < Stripe::RequestParams
|
4495
|
+
class Duration < Stripe::RequestParams
|
4496
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
4497
|
+
attr_accessor :interval
|
4498
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
4499
|
+
attr_accessor :interval_count
|
4500
|
+
|
4501
|
+
def initialize(interval: nil, interval_count: nil)
|
4502
|
+
@interval = interval
|
4503
|
+
@interval_count = interval_count
|
4504
|
+
end
|
4505
|
+
end
|
4506
|
+
# Time span for the redeemed discount.
|
4507
|
+
attr_accessor :duration
|
4508
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
4509
|
+
attr_accessor :timestamp
|
4510
|
+
# The type of calculation made to determine when the discount ends.
|
4511
|
+
attr_accessor :type
|
4512
|
+
|
4513
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
4514
|
+
@duration = duration
|
4515
|
+
@timestamp = timestamp
|
4516
|
+
@type = type
|
4517
|
+
end
|
4518
|
+
end
|
3008
4519
|
# ID of the coupon to create a new discount for.
|
3009
4520
|
attr_accessor :coupon
|
3010
4521
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3011
4522
|
attr_accessor :discount
|
4523
|
+
# Details to determine how long the discount should be applied for.
|
4524
|
+
attr_accessor :discount_end
|
3012
4525
|
# ID of the promotion code to create a new discount for.
|
3013
4526
|
attr_accessor :promotion_code
|
3014
4527
|
|
3015
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
4528
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3016
4529
|
@coupon = coupon
|
3017
4530
|
@discount = discount
|
4531
|
+
@discount_end = discount_end
|
3018
4532
|
@promotion_code = promotion_code
|
3019
4533
|
end
|
3020
4534
|
end
|
@@ -3109,6 +4623,15 @@ module Stripe
|
|
3109
4623
|
@tax_rates = tax_rates
|
3110
4624
|
end
|
3111
4625
|
end
|
4626
|
+
|
4627
|
+
class Prebilling < Stripe::RequestParams
|
4628
|
+
# This is used to determine the number of billing cycles to prebill.
|
4629
|
+
attr_accessor :iterations
|
4630
|
+
|
4631
|
+
def initialize(iterations: nil)
|
4632
|
+
@iterations = iterations
|
4633
|
+
end
|
4634
|
+
end
|
3112
4635
|
# 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`.
|
3113
4636
|
attr_accessor :billing_cycle_anchor
|
3114
4637
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
@@ -3123,6 +4646,8 @@ module Stripe
|
|
3123
4646
|
attr_accessor :default_tax_rates
|
3124
4647
|
# A list of up to 20 subscription items, each with an attached price.
|
3125
4648
|
attr_accessor :items
|
4649
|
+
# The pre-billing to apply to the subscription as a preview.
|
4650
|
+
attr_accessor :prebilling
|
3126
4651
|
# 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`.
|
3127
4652
|
attr_accessor :proration_behavior
|
3128
4653
|
# 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'.
|
@@ -3142,6 +4667,7 @@ module Stripe
|
|
3142
4667
|
cancel_now: nil,
|
3143
4668
|
default_tax_rates: nil,
|
3144
4669
|
items: nil,
|
4670
|
+
prebilling: nil,
|
3145
4671
|
proration_behavior: nil,
|
3146
4672
|
proration_date: nil,
|
3147
4673
|
resume_at: nil,
|
@@ -3155,6 +4681,7 @@ module Stripe
|
|
3155
4681
|
@cancel_now = cancel_now
|
3156
4682
|
@default_tax_rates = default_tax_rates
|
3157
4683
|
@items = items
|
4684
|
+
@prebilling = prebilling
|
3158
4685
|
@proration_behavior = proration_behavior
|
3159
4686
|
@proration_date = proration_date
|
3160
4687
|
@resume_at = resume_at
|
@@ -3164,10 +4691,14 @@ module Stripe
|
|
3164
4691
|
end
|
3165
4692
|
# Settings for automatic tax lookup for this invoice preview.
|
3166
4693
|
attr_accessor :automatic_tax
|
4694
|
+
# The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
|
4695
|
+
attr_accessor :billing_cadence
|
3167
4696
|
# The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
3168
4697
|
attr_accessor :currency
|
3169
4698
|
# 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.
|
3170
4699
|
attr_accessor :customer
|
4700
|
+
# 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.
|
4701
|
+
attr_accessor :customer_account
|
3171
4702
|
# 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.
|
3172
4703
|
attr_accessor :customer_details
|
3173
4704
|
# 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.
|
@@ -3193,8 +4724,10 @@ module Stripe
|
|
3193
4724
|
|
3194
4725
|
def initialize(
|
3195
4726
|
automatic_tax: nil,
|
4727
|
+
billing_cadence: nil,
|
3196
4728
|
currency: nil,
|
3197
4729
|
customer: nil,
|
4730
|
+
customer_account: nil,
|
3198
4731
|
customer_details: nil,
|
3199
4732
|
discounts: nil,
|
3200
4733
|
expand: nil,
|
@@ -3208,8 +4741,10 @@ module Stripe
|
|
3208
4741
|
subscription_details: nil
|
3209
4742
|
)
|
3210
4743
|
@automatic_tax = automatic_tax
|
4744
|
+
@billing_cadence = billing_cadence
|
3211
4745
|
@currency = currency
|
3212
4746
|
@customer = customer
|
4747
|
+
@customer_account = customer_account
|
3213
4748
|
@customer_details = customer_details
|
3214
4749
|
@discounts = discounts
|
3215
4750
|
@expand = expand
|
@@ -3239,6 +4774,8 @@ module Stripe
|
|
3239
4774
|
attr_reader :amount_remaining
|
3240
4775
|
# This is the sum of all the shipping amounts.
|
3241
4776
|
attr_reader :amount_shipping
|
4777
|
+
# List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
|
4778
|
+
attr_reader :amounts_due
|
3242
4779
|
# ID of the Connect Application that created the invoice.
|
3243
4780
|
attr_reader :application
|
3244
4781
|
# Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
|
@@ -3273,6 +4810,8 @@ module Stripe
|
|
3273
4810
|
attr_reader :custom_fields
|
3274
4811
|
# The ID of the customer who will be billed.
|
3275
4812
|
attr_reader :customer
|
4813
|
+
# The ID of the account who will be billed.
|
4814
|
+
attr_reader :customer_account
|
3276
4815
|
# The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
|
3277
4816
|
attr_reader :customer_address
|
3278
4817
|
# The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
|
@@ -3287,6 +4826,8 @@ module Stripe
|
|
3287
4826
|
attr_reader :customer_tax_exempt
|
3288
4827
|
# The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
|
3289
4828
|
attr_reader :customer_tax_ids
|
4829
|
+
# The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
|
4830
|
+
attr_reader :default_margins
|
3290
4831
|
# 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.
|
3291
4832
|
attr_reader :default_payment_method
|
3292
4833
|
# 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.
|
@@ -3377,6 +4918,8 @@ module Stripe
|
|
3377
4918
|
attr_reader :total_discount_amounts
|
3378
4919
|
# The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
|
3379
4920
|
attr_reader :total_excluding_tax
|
4921
|
+
# The aggregate amounts calculated per margin across all line items.
|
4922
|
+
attr_reader :total_margin_amounts
|
3380
4923
|
# Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
|
3381
4924
|
attr_reader :total_pretax_credit_amounts
|
3382
4925
|
# The aggregate tax information of all line items.
|
@@ -3662,5 +5205,35 @@ module Stripe
|
|
3662
5205
|
opts: opts
|
3663
5206
|
)
|
3664
5207
|
end
|
5208
|
+
|
5209
|
+
def self.inner_class_types
|
5210
|
+
@inner_class_types = {
|
5211
|
+
amounts_due: AmountsDue,
|
5212
|
+
automatic_tax: AutomaticTax,
|
5213
|
+
confirmation_secret: ConfirmationSecret,
|
5214
|
+
custom_fields: CustomField,
|
5215
|
+
customer_address: CustomerAddress,
|
5216
|
+
customer_shipping: CustomerShipping,
|
5217
|
+
customer_tax_ids: CustomerTaxId,
|
5218
|
+
from_invoice: FromInvoice,
|
5219
|
+
issuer: Issuer,
|
5220
|
+
last_finalization_error: LastFinalizationError,
|
5221
|
+
parent: Parent,
|
5222
|
+
payment_settings: PaymentSettings,
|
5223
|
+
rendering: Rendering,
|
5224
|
+
shipping_cost: ShippingCost,
|
5225
|
+
shipping_details: ShippingDetails,
|
5226
|
+
status_transitions: StatusTransitions,
|
5227
|
+
threshold_reason: ThresholdReason,
|
5228
|
+
total_discount_amounts: TotalDiscountAmount,
|
5229
|
+
total_margin_amounts: TotalMarginAmount,
|
5230
|
+
total_pretax_credit_amounts: TotalPretaxCreditAmount,
|
5231
|
+
total_taxes: TotalTax,
|
5232
|
+
}
|
5233
|
+
end
|
5234
|
+
|
5235
|
+
def self.field_remappings
|
5236
|
+
@field_remappings = {}
|
5237
|
+
end
|
3665
5238
|
end
|
3666
5239
|
end
|