stripe 15.1.0 → 15.2.0.pre.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1561 -695
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +28 -0
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +54 -0
- data/lib/stripe/event_types.rb +89 -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_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_completed_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_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_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/object_types.rb +52 -0
- data/lib/stripe/resources/account.rb +653 -1
- data/lib/stripe/resources/account_notice.rb +123 -0
- data/lib/stripe/resources/account_session.rb +299 -1
- data/lib/stripe/resources/balance_settings.rb +105 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +4 -0
- data/lib/stripe/resources/billing/credit_grant.rb +10 -0
- data/lib/stripe/resources/billing/meter_error_report.rb +59 -0
- data/lib/stripe/resources/billing_portal/session.rb +6 -0
- data/lib/stripe/resources/capital/financing_offer.rb +179 -0
- data/lib/stripe/resources/capital/financing_summary.rb +55 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
- data/lib/stripe/resources/card.rb +2 -0
- data/lib/stripe/resources/cash_balance.rb +2 -0
- data/lib/stripe/resources/charge.rb +1470 -0
- data/lib/stripe/resources/checkout/session.rb +331 -3
- data/lib/stripe/resources/confirmation_token.rb +176 -0
- data/lib/stripe/resources/coupon.rb +30 -1
- data/lib/stripe/resources/credit_note.rb +10 -0
- data/lib/stripe/resources/credit_note_line_item.rb +9 -0
- data/lib/stripe/resources/customer.rb +2 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_session.rb +6 -1
- data/lib/stripe/resources/discount.rb +2 -0
- data/lib/stripe/resources/event.rb +31 -0
- data/lib/stripe/resources/financial_connections/account.rb +20 -1
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
- data/lib/stripe/resources/financial_connections/institution.rb +90 -0
- data/lib/stripe/resources/financial_connections/session.rb +62 -2
- data/lib/stripe/resources/fx_quote.rb +184 -0
- data/lib/stripe/resources/gift_cards/card.rb +208 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +272 -0
- data/lib/stripe/resources/identity/verification_session.rb +10 -0
- data/lib/stripe/resources/invoice.rb +1129 -15
- data/lib/stripe/resources/invoice_item.rb +78 -2
- data/lib/stripe/resources/invoice_line_item.rb +55 -1
- data/lib/stripe/resources/invoice_payment.rb +2 -53
- data/lib/stripe/resources/issuing/cardholder.rb +2 -1
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
- data/lib/stripe/resources/issuing/settlement.rb +53 -0
- data/lib/stripe/resources/issuing/transaction.rb +6 -0
- data/lib/stripe/resources/line_item.rb +37 -0
- data/lib/stripe/resources/mandate.rb +24 -0
- data/lib/stripe/resources/margin.rb +115 -0
- data/lib/stripe/resources/order.rb +2859 -0
- data/lib/stripe/resources/payment_attempt_record.rb +1078 -0
- data/lib/stripe/resources/payment_intent.rb +6036 -1214
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +65 -0
- data/lib/stripe/resources/payment_method.rb +198 -1
- data/lib/stripe/resources/payment_method_configuration.rb +295 -0
- data/lib/stripe/resources/payment_record.rb +1607 -0
- data/lib/stripe/resources/payout.rb +6 -0
- data/lib/stripe/resources/price.rb +30 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +275 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +25 -0
- data/lib/stripe/resources/product.rb +59 -0
- data/lib/stripe/resources/promotion_code.rb +10 -0
- data/lib/stripe/resources/quote.rb +2046 -6
- data/lib/stripe/resources/quote_line.rb +274 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +663 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +339 -0
- data/lib/stripe/resources/refund.rb +9 -0
- data/lib/stripe/resources/setup_attempt.rb +21 -0
- data/lib/stripe/resources/setup_intent.rb +596 -9
- data/lib/stripe/resources/source.rb +29 -0
- data/lib/stripe/resources/subscription.rb +298 -9
- data/lib/stripe/resources/subscription_item.rb +84 -3
- data/lib/stripe/resources/subscription_schedule.rb +1013 -10
- data/lib/stripe/resources/tax/association.rb +89 -0
- data/lib/stripe/resources/tax/form.rb +211 -0
- data/lib/stripe/resources/tax_id.rb +12 -2
- data/lib/stripe/resources/terminal/reader.rb +406 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
- data/lib/stripe/resources/transfer.rb +6 -0
- data/lib/stripe/resources/treasury/financial_account.rb +22 -3
- data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
- data/lib/stripe/resources/treasury/received_credit.rb +38 -1
- data/lib/stripe/resources/treasury/received_debit.rb +40 -1
- data/lib/stripe/resources/v2/core/account.rb +1746 -0
- data/lib/stripe/resources/v2/core/account_link.rb +56 -0
- data/lib/stripe/resources/v2/core/person.rb +276 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +74 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +39 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +20 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +22 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +51 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +58 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +68 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +94 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +129 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +82 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +45 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +117 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +75 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +49 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +136 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +108 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +78 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +68 -0
- data/lib/stripe/resources.rb +99 -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 +269 -1
- data/lib/stripe/services/balance_settings_service.rb +96 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +4 -1
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +8 -0
- data/lib/stripe/services/billing_portal/session_service.rb +4 -0
- 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 +1350 -0
- data/lib/stripe/services/checkout/session_service.rb +247 -2
- 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 -123
- 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/gift_cards/card_service.rb +170 -0
- data/lib/stripe/services/gift_cards/transaction_service.rb +209 -0
- data/lib/stripe/services/gift_cards_service.rb +14 -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_service.rb +1059 -15
- 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/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 +2268 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +49 -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 +4631 -258
- data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
- data/lib/stripe/services/payment_method_service.rb +126 -1
- data/lib/stripe/services/payment_record_service.rb +542 -0
- data/lib/stripe/services/payout_service.rb +4 -0
- data/lib/stripe/services/price_service.rb +19 -0
- data/lib/stripe/services/privacy/redaction_job_service.rb +231 -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/product_service.rb +38 -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 +1730 -7
- data/lib/stripe/services/setup_intent_service.rb +556 -9
- data/lib/stripe/services/subscription_item_service.rb +75 -3
- data/lib/stripe/services/subscription_schedule_service.rb +915 -10
- data/lib/stripe/services/subscription_service.rb +257 -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/reader_collected_data_service.rb +28 -0
- data/lib/stripe/services/terminal/reader_service.rb +180 -0
- data/lib/stripe/services/terminal_service.rb +2 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +103 -0
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -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 +12 -2
- data/lib/stripe/services/v2/core/account_link_service.rb +76 -0
- data/lib/stripe/services/v2/core/account_service.rb +4138 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +1048 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +135 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +109 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +4 -1
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +75 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +44 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +81 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +126 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +96 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +202 -0
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +237 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +174 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +95 -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 +71 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +44 -0
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +70 -0
- data/lib/stripe/services/v2/money_management/transaction_service.rb +74 -0
- data/lib/stripe/services/v2/money_management_service.rb +31 -0
- data/lib/stripe/services/v2/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +50 -0
- data/lib/stripe/services/v2_services.rb +4 -2
- data/lib/stripe/services.rb +54 -1
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +53 -0
- data/rbi/stripe.rbi +191867 -0
- data/stripe.gemspec +4 -1
- metadata +157 -324
- data/lib/stripe/services/invoice_payment_service.rb +0 -83
- data/rbi/stripe/resources/account.rbi +0 -4903
- data/rbi/stripe/resources/account_link.rbi +0 -74
- data/rbi/stripe/resources/account_session.rbi +0 -894
- data/rbi/stripe/resources/apple_pay_domain.rbi +0 -90
- 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 -180
- data/rbi/stripe/resources/balance_transaction.rbi +0 -144
- 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 -645
- 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 -2057
- data/rbi/stripe/resources/checkout/session.rbi +0 -3988
- 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 -1873
- 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 -252
- data/rbi/stripe/resources/credit_note.rbi +0 -747
- data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
- data/rbi/stripe/resources/customer.rbi +0 -1009
- 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 -149
- 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 -351
- data/rbi/stripe/resources/identity/verification_session.rbi +0 -517
- data/rbi/stripe/resources/invoice.rbi +0 -3736
- data/rbi/stripe/resources/invoice_item.rbi +0 -475
- data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
- data/rbi/stripe/resources/invoice_payment.rbi +0 -114
- 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 -741
- 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 -187
- data/rbi/stripe/resources/payment_intent.rbi +0 -9795
- data/rbi/stripe/resources/payment_link.rbi +0 -1801
- data/rbi/stripe/resources/payment_method.rbi +0 -1831
- data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3220
- data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
- data/rbi/stripe/resources/payout.rbi +0 -300
- data/rbi/stripe/resources/person.rbi +0 -401
- data/rbi/stripe/resources/plan.rbi +0 -373
- data/rbi/stripe/resources/price.rbi +0 -694
- data/rbi/stripe/resources/product.rbi +0 -557
- data/rbi/stripe/resources/product_feature.rbi +0 -26
- data/rbi/stripe/resources/promotion_code.rbi +0 -261
- data/rbi/stripe/resources/quote.rbi +0 -1126
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
- data/rbi/stripe/resources/radar/value_list.rbi +0 -170
- data/rbi/stripe/resources/radar/value_list_item.rbi +0 -131
- data/rbi/stripe/resources/refund.rbi +0 -519
- 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 -3869
- 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 -1964
- data/rbi/stripe/resources/subscription_item.rbi +0 -370
- data/rbi/stripe/resources/subscription_schedule.rbi +0 -1495
- data/rbi/stripe/resources/tax/calculation.rbi +0 -474
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -88
- data/rbi/stripe/resources/tax/registration.rbi +0 -2713
- 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 -167
- data/rbi/stripe/resources/tax_rate.rbi +0 -239
- data/rbi/stripe/resources/terminal/configuration.rbi +0 -1388
- data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
- data/rbi/stripe/resources/terminal/location.rbi +0 -224
- data/rbi/stripe/resources/terminal/reader.rbi +0 -587
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -134
- data/rbi/stripe/resources/token.rbi +0 -1283
- 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 -865
- 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 -170
- data/rbi/stripe/services/account_capability_service.rbi +0 -51
- data/rbi/stripe/services/account_link_service.rbi +0 -58
- data/rbi/stripe/services/account_login_link_service.rbi +0 -22
- data/rbi/stripe/services/account_person_service.rbi +0 -1013
- data/rbi/stripe/services/account_service.rbi +0 -4189
- data/rbi/stripe/services/account_session_service.rbi +0 -572
- data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -78
- 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 -511
- 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 -2607
- 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 -196
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
- data/rbi/stripe/services/credit_note_service.rbi +0 -416
- 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 -651
- data/rbi/stripe/services/customer_session_service.rbi +0 -116
- data/rbi/stripe/services/customer_tax_id_service.rbi +0 -72
- 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 -323
- data/rbi/stripe/services/identity_service.rbi +0 -10
- data/rbi/stripe/services/invoice_item_service.rbi +0 -368
- 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 -2920
- data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
- data/rbi/stripe/services/issuing/card_service.rbi +0 -495
- 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 -7819
- data/rbi/stripe/services/payment_link_service.rbi +0 -1352
- data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2255
- data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
- data/rbi/stripe/services/payment_method_service.rbi +0 -846
- data/rbi/stripe/services/payout_service.rbi +0 -205
- data/rbi/stripe/services/plan_service.rbi +0 -284
- data/rbi/stripe/services/price_service.rbi +0 -546
- data/rbi/stripe/services/product_feature_service.rbi +0 -69
- data/rbi/stripe/services/product_service.rbi +0 -479
- 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 -686
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
- data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -111
- data/rbi/stripe/services/radar/value_list_service.rbi +0 -143
- 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 -3605
- 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 -324
- data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1192
- data/rbi/stripe/services/subscription_service.rbi +0 -1596
- data/rbi/stripe/services/tax/calculation_service.rbi +0 -230
- data/rbi/stripe/services/tax/registration_service.rbi +0 -1845
- 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 -112
- 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 -1120
- data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
- data/rbi/stripe/services/terminal/location_service.rbi +0 -184
- data/rbi/stripe/services/terminal/reader_service.rbi +0 -344
- data/rbi/stripe/services/terminal_service.rbi +0 -12
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -805
- 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 -62
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -92
- 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 -1257
- 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 -562
- 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 -20
- 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 -200
- data/rbi/stripe/services/v2/core/event_service.rbi +0 -38
- 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 -131
@@ -49,6 +49,25 @@ 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
|
+
end
|
70
|
+
|
52
71
|
class AutomaticTax < Stripe::StripeObject
|
53
72
|
class Liability < Stripe::StripeObject
|
54
73
|
# The connected account being referenced when `type` is `account`.
|
@@ -221,9 +240,17 @@ module Stripe
|
|
221
240
|
end
|
222
241
|
|
223
242
|
class SubscriptionDetails < Stripe::StripeObject
|
243
|
+
class PauseCollection < Stripe::StripeObject
|
244
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
245
|
+
attr_reader :behavior
|
246
|
+
# The time after which the subscription will resume collecting payments.
|
247
|
+
attr_reader :resumes_at
|
248
|
+
end
|
224
249
|
# 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
250
|
# *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
|
226
251
|
attr_reader :metadata
|
252
|
+
# 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).
|
253
|
+
attr_reader :pause_collection
|
227
254
|
# The subscription that generated this invoice
|
228
255
|
attr_reader :subscription
|
229
256
|
# Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
|
@@ -283,6 +310,7 @@ module Stripe
|
|
283
310
|
attr_reader :funding_type
|
284
311
|
end
|
285
312
|
|
313
|
+
class IdBankTransfer < Stripe::StripeObject; end
|
286
314
|
class Konbini < Stripe::StripeObject; end
|
287
315
|
class SepaDebit < Stripe::StripeObject; end
|
288
316
|
|
@@ -291,6 +319,8 @@ module Stripe
|
|
291
319
|
class Filters < Stripe::StripeObject
|
292
320
|
# The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
293
321
|
attr_reader :account_subcategories
|
322
|
+
# The institution to use to filter for possible accounts to link.
|
323
|
+
attr_reader :institution
|
294
324
|
end
|
295
325
|
# Attribute for field filters
|
296
326
|
attr_reader :filters
|
@@ -312,6 +342,8 @@ module Stripe
|
|
312
342
|
attr_reader :card
|
313
343
|
# 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
344
|
attr_reader :customer_balance
|
345
|
+
# 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.
|
346
|
+
attr_reader :id_bank_transfer
|
315
347
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
316
348
|
attr_reader :konbini
|
317
349
|
# 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.
|
@@ -425,6 +457,13 @@ module Stripe
|
|
425
457
|
attr_reader :discount
|
426
458
|
end
|
427
459
|
|
460
|
+
class TotalMarginAmount < Stripe::StripeObject
|
461
|
+
# The amount, in cents (or local equivalent), of the reduction in line item amount.
|
462
|
+
attr_reader :amount
|
463
|
+
# The margin that was applied to get this margin amount.
|
464
|
+
attr_reader :margin
|
465
|
+
end
|
466
|
+
|
428
467
|
class TotalPretaxCreditAmount < Stripe::StripeObject
|
429
468
|
# The amount, in cents (or local equivalent), of the pretax credit amount.
|
430
469
|
attr_reader :amount
|
@@ -432,6 +471,8 @@ module Stripe
|
|
432
471
|
attr_reader :credit_balance_transaction
|
433
472
|
# The discount that was applied to get this pretax credit amount.
|
434
473
|
attr_reader :discount
|
474
|
+
# The margin that was applied to get this pretax credit amount.
|
475
|
+
attr_reader :margin
|
435
476
|
# Type of the pretax credit amount referenced.
|
436
477
|
attr_reader :type
|
437
478
|
end
|
@@ -459,6 +500,24 @@ module Stripe
|
|
459
500
|
end
|
460
501
|
|
461
502
|
class UpdateParams < Stripe::RequestParams
|
503
|
+
class AmountsDue < Stripe::RequestParams
|
504
|
+
# The amount in cents (or local equivalent).
|
505
|
+
attr_accessor :amount
|
506
|
+
# Number of days from when invoice is finalized until the payment is due.
|
507
|
+
attr_accessor :days_until_due
|
508
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
509
|
+
attr_accessor :description
|
510
|
+
# Date on which a payment plan’s payment is due.
|
511
|
+
attr_accessor :due_date
|
512
|
+
|
513
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
514
|
+
@amount = amount
|
515
|
+
@days_until_due = days_until_due
|
516
|
+
@description = description
|
517
|
+
@due_date = due_date
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
462
521
|
class AutomaticTax < Stripe::RequestParams
|
463
522
|
class Liability < Stripe::RequestParams
|
464
523
|
# The connected account being referenced when `type` is `account`.
|
@@ -495,16 +554,44 @@ module Stripe
|
|
495
554
|
end
|
496
555
|
|
497
556
|
class Discount < Stripe::RequestParams
|
557
|
+
class DiscountEnd < Stripe::RequestParams
|
558
|
+
class Duration < Stripe::RequestParams
|
559
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
560
|
+
attr_accessor :interval
|
561
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
562
|
+
attr_accessor :interval_count
|
563
|
+
|
564
|
+
def initialize(interval: nil, interval_count: nil)
|
565
|
+
@interval = interval
|
566
|
+
@interval_count = interval_count
|
567
|
+
end
|
568
|
+
end
|
569
|
+
# Time span for the redeemed discount.
|
570
|
+
attr_accessor :duration
|
571
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
572
|
+
attr_accessor :timestamp
|
573
|
+
# The type of calculation made to determine when the discount ends.
|
574
|
+
attr_accessor :type
|
575
|
+
|
576
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
577
|
+
@duration = duration
|
578
|
+
@timestamp = timestamp
|
579
|
+
@type = type
|
580
|
+
end
|
581
|
+
end
|
498
582
|
# ID of the coupon to create a new discount for.
|
499
583
|
attr_accessor :coupon
|
500
584
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
501
585
|
attr_accessor :discount
|
586
|
+
# Details to determine how long the discount should be applied for.
|
587
|
+
attr_accessor :discount_end
|
502
588
|
# ID of the promotion code to create a new discount for.
|
503
589
|
attr_accessor :promotion_code
|
504
590
|
|
505
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
591
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
506
592
|
@coupon = coupon
|
507
593
|
@discount = discount
|
594
|
+
@discount_end = discount_end
|
508
595
|
@promotion_code = promotion_code
|
509
596
|
end
|
510
597
|
end
|
@@ -624,6 +711,9 @@ module Stripe
|
|
624
711
|
end
|
625
712
|
end
|
626
713
|
|
714
|
+
class IdBankTransfer < Stripe::RequestParams
|
715
|
+
end
|
716
|
+
|
627
717
|
class Konbini < Stripe::RequestParams
|
628
718
|
end
|
629
719
|
|
@@ -635,9 +725,12 @@ module Stripe
|
|
635
725
|
class Filters < Stripe::RequestParams
|
636
726
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
637
727
|
attr_accessor :account_subcategories
|
728
|
+
# ID of the institution to use to filter for selectable accounts.
|
729
|
+
attr_accessor :institution
|
638
730
|
|
639
|
-
def initialize(account_subcategories: nil)
|
731
|
+
def initialize(account_subcategories: nil, institution: nil)
|
640
732
|
@account_subcategories = account_subcategories
|
733
|
+
@institution = institution
|
641
734
|
end
|
642
735
|
end
|
643
736
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -671,6 +764,8 @@ module Stripe
|
|
671
764
|
attr_accessor :card
|
672
765
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
673
766
|
attr_accessor :customer_balance
|
767
|
+
# 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.
|
768
|
+
attr_accessor :id_bank_transfer
|
674
769
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
675
770
|
attr_accessor :konbini
|
676
771
|
# 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.
|
@@ -683,6 +778,7 @@ module Stripe
|
|
683
778
|
bancontact: nil,
|
684
779
|
card: nil,
|
685
780
|
customer_balance: nil,
|
781
|
+
id_bank_transfer: nil,
|
686
782
|
konbini: nil,
|
687
783
|
sepa_debit: nil,
|
688
784
|
us_bank_account: nil
|
@@ -691,6 +787,7 @@ module Stripe
|
|
691
787
|
@bancontact = bancontact
|
692
788
|
@card = card
|
693
789
|
@customer_balance = customer_balance
|
790
|
+
@id_bank_transfer = id_bank_transfer
|
694
791
|
@konbini = konbini
|
695
792
|
@sepa_debit = sepa_debit
|
696
793
|
@us_bank_account = us_bank_account
|
@@ -902,6 +999,8 @@ module Stripe
|
|
902
999
|
end
|
903
1000
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
904
1001
|
attr_accessor :account_tax_ids
|
1002
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1003
|
+
attr_accessor :amounts_due
|
905
1004
|
# 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).
|
906
1005
|
attr_accessor :application_fee_amount
|
907
1006
|
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
|
@@ -916,6 +1015,8 @@ module Stripe
|
|
916
1015
|
attr_accessor :custom_fields
|
917
1016
|
# 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.
|
918
1017
|
attr_accessor :days_until_due
|
1018
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1019
|
+
attr_accessor :default_margins
|
919
1020
|
# 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.
|
920
1021
|
attr_accessor :default_payment_method
|
921
1022
|
# 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.
|
@@ -957,6 +1058,7 @@ module Stripe
|
|
957
1058
|
|
958
1059
|
def initialize(
|
959
1060
|
account_tax_ids: nil,
|
1061
|
+
amounts_due: nil,
|
960
1062
|
application_fee_amount: nil,
|
961
1063
|
auto_advance: nil,
|
962
1064
|
automatic_tax: nil,
|
@@ -964,6 +1066,7 @@ module Stripe
|
|
964
1066
|
collection_method: nil,
|
965
1067
|
custom_fields: nil,
|
966
1068
|
days_until_due: nil,
|
1069
|
+
default_margins: nil,
|
967
1070
|
default_payment_method: nil,
|
968
1071
|
default_source: nil,
|
969
1072
|
default_tax_rates: nil,
|
@@ -985,6 +1088,7 @@ module Stripe
|
|
985
1088
|
transfer_data: nil
|
986
1089
|
)
|
987
1090
|
@account_tax_ids = account_tax_ids
|
1091
|
+
@amounts_due = amounts_due
|
988
1092
|
@application_fee_amount = application_fee_amount
|
989
1093
|
@auto_advance = auto_advance
|
990
1094
|
@automatic_tax = automatic_tax
|
@@ -992,6 +1096,7 @@ module Stripe
|
|
992
1096
|
@collection_method = collection_method
|
993
1097
|
@custom_fields = custom_fields
|
994
1098
|
@days_until_due = days_until_due
|
1099
|
+
@default_margins = default_margins
|
995
1100
|
@default_payment_method = default_payment_method
|
996
1101
|
@default_source = default_source
|
997
1102
|
@default_tax_rates = default_tax_rates
|
@@ -1056,6 +1161,8 @@ module Stripe
|
|
1056
1161
|
attr_accessor :created
|
1057
1162
|
# Only return invoices for the customer specified by this customer ID.
|
1058
1163
|
attr_accessor :customer
|
1164
|
+
# Only return invoices for the account specified by this account ID.
|
1165
|
+
attr_accessor :customer_account
|
1059
1166
|
# Attribute for param field due_date
|
1060
1167
|
attr_accessor :due_date
|
1061
1168
|
# 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.
|
@@ -1075,6 +1182,7 @@ module Stripe
|
|
1075
1182
|
collection_method: nil,
|
1076
1183
|
created: nil,
|
1077
1184
|
customer: nil,
|
1185
|
+
customer_account: nil,
|
1078
1186
|
due_date: nil,
|
1079
1187
|
ending_before: nil,
|
1080
1188
|
expand: nil,
|
@@ -1086,6 +1194,7 @@ module Stripe
|
|
1086
1194
|
@collection_method = collection_method
|
1087
1195
|
@created = created
|
1088
1196
|
@customer = customer
|
1197
|
+
@customer_account = customer_account
|
1089
1198
|
@due_date = due_date
|
1090
1199
|
@ending_before = ending_before
|
1091
1200
|
@expand = expand
|
@@ -1097,6 +1206,24 @@ module Stripe
|
|
1097
1206
|
end
|
1098
1207
|
|
1099
1208
|
class CreateParams < Stripe::RequestParams
|
1209
|
+
class AmountsDue < Stripe::RequestParams
|
1210
|
+
# The amount in cents (or local equivalent).
|
1211
|
+
attr_accessor :amount
|
1212
|
+
# Number of days from when invoice is finalized until the payment is due.
|
1213
|
+
attr_accessor :days_until_due
|
1214
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
1215
|
+
attr_accessor :description
|
1216
|
+
# Date on which a payment plan’s payment is due.
|
1217
|
+
attr_accessor :due_date
|
1218
|
+
|
1219
|
+
def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
|
1220
|
+
@amount = amount
|
1221
|
+
@days_until_due = days_until_due
|
1222
|
+
@description = description
|
1223
|
+
@due_date = due_date
|
1224
|
+
end
|
1225
|
+
end
|
1226
|
+
|
1100
1227
|
class AutomaticTax < Stripe::RequestParams
|
1101
1228
|
class Liability < Stripe::RequestParams
|
1102
1229
|
# The connected account being referenced when `type` is `account`.
|
@@ -1133,16 +1260,44 @@ module Stripe
|
|
1133
1260
|
end
|
1134
1261
|
|
1135
1262
|
class Discount < Stripe::RequestParams
|
1263
|
+
class DiscountEnd < Stripe::RequestParams
|
1264
|
+
class Duration < Stripe::RequestParams
|
1265
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1266
|
+
attr_accessor :interval
|
1267
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1268
|
+
attr_accessor :interval_count
|
1269
|
+
|
1270
|
+
def initialize(interval: nil, interval_count: nil)
|
1271
|
+
@interval = interval
|
1272
|
+
@interval_count = interval_count
|
1273
|
+
end
|
1274
|
+
end
|
1275
|
+
# Time span for the redeemed discount.
|
1276
|
+
attr_accessor :duration
|
1277
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1278
|
+
attr_accessor :timestamp
|
1279
|
+
# The type of calculation made to determine when the discount ends.
|
1280
|
+
attr_accessor :type
|
1281
|
+
|
1282
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1283
|
+
@duration = duration
|
1284
|
+
@timestamp = timestamp
|
1285
|
+
@type = type
|
1286
|
+
end
|
1287
|
+
end
|
1136
1288
|
# ID of the coupon to create a new discount for.
|
1137
1289
|
attr_accessor :coupon
|
1138
1290
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1139
1291
|
attr_accessor :discount
|
1292
|
+
# Details to determine how long the discount should be applied for.
|
1293
|
+
attr_accessor :discount_end
|
1140
1294
|
# ID of the promotion code to create a new discount for.
|
1141
1295
|
attr_accessor :promotion_code
|
1142
1296
|
|
1143
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1297
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1144
1298
|
@coupon = coupon
|
1145
1299
|
@discount = discount
|
1300
|
+
@discount_end = discount_end
|
1146
1301
|
@promotion_code = promotion_code
|
1147
1302
|
end
|
1148
1303
|
end
|
@@ -1274,6 +1429,9 @@ module Stripe
|
|
1274
1429
|
end
|
1275
1430
|
end
|
1276
1431
|
|
1432
|
+
class IdBankTransfer < Stripe::RequestParams
|
1433
|
+
end
|
1434
|
+
|
1277
1435
|
class Konbini < Stripe::RequestParams
|
1278
1436
|
end
|
1279
1437
|
|
@@ -1285,9 +1443,12 @@ module Stripe
|
|
1285
1443
|
class Filters < Stripe::RequestParams
|
1286
1444
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
1287
1445
|
attr_accessor :account_subcategories
|
1446
|
+
# ID of the institution to use to filter for selectable accounts.
|
1447
|
+
attr_accessor :institution
|
1288
1448
|
|
1289
|
-
def initialize(account_subcategories: nil)
|
1449
|
+
def initialize(account_subcategories: nil, institution: nil)
|
1290
1450
|
@account_subcategories = account_subcategories
|
1451
|
+
@institution = institution
|
1291
1452
|
end
|
1292
1453
|
end
|
1293
1454
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
@@ -1321,6 +1482,8 @@ module Stripe
|
|
1321
1482
|
attr_accessor :card
|
1322
1483
|
# If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1323
1484
|
attr_accessor :customer_balance
|
1485
|
+
# 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.
|
1486
|
+
attr_accessor :id_bank_transfer
|
1324
1487
|
# If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1325
1488
|
attr_accessor :konbini
|
1326
1489
|
# 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.
|
@@ -1333,6 +1496,7 @@ module Stripe
|
|
1333
1496
|
bancontact: nil,
|
1334
1497
|
card: nil,
|
1335
1498
|
customer_balance: nil,
|
1499
|
+
id_bank_transfer: nil,
|
1336
1500
|
konbini: nil,
|
1337
1501
|
sepa_debit: nil,
|
1338
1502
|
us_bank_account: nil
|
@@ -1341,6 +1505,7 @@ module Stripe
|
|
1341
1505
|
@bancontact = bancontact
|
1342
1506
|
@card = card
|
1343
1507
|
@customer_balance = customer_balance
|
1508
|
+
@id_bank_transfer = id_bank_transfer
|
1344
1509
|
@konbini = konbini
|
1345
1510
|
@sepa_debit = sepa_debit
|
1346
1511
|
@us_bank_account = us_bank_account
|
@@ -1552,6 +1717,8 @@ module Stripe
|
|
1552
1717
|
end
|
1553
1718
|
# The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
|
1554
1719
|
attr_accessor :account_tax_ids
|
1720
|
+
# List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
|
1721
|
+
attr_accessor :amounts_due
|
1555
1722
|
# 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).
|
1556
1723
|
attr_accessor :application_fee_amount
|
1557
1724
|
# 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.
|
@@ -1568,8 +1735,12 @@ module Stripe
|
|
1568
1735
|
attr_accessor :custom_fields
|
1569
1736
|
# The ID of the customer who will be billed.
|
1570
1737
|
attr_accessor :customer
|
1738
|
+
# The ID of the account who will be billed.
|
1739
|
+
attr_accessor :customer_account
|
1571
1740
|
# The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
|
1572
1741
|
attr_accessor :days_until_due
|
1742
|
+
# The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
|
1743
|
+
attr_accessor :default_margins
|
1573
1744
|
# 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.
|
1574
1745
|
attr_accessor :default_payment_method
|
1575
1746
|
# 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.
|
@@ -1617,6 +1788,7 @@ module Stripe
|
|
1617
1788
|
|
1618
1789
|
def initialize(
|
1619
1790
|
account_tax_ids: nil,
|
1791
|
+
amounts_due: nil,
|
1620
1792
|
application_fee_amount: nil,
|
1621
1793
|
auto_advance: nil,
|
1622
1794
|
automatic_tax: nil,
|
@@ -1625,7 +1797,9 @@ module Stripe
|
|
1625
1797
|
currency: nil,
|
1626
1798
|
custom_fields: nil,
|
1627
1799
|
customer: nil,
|
1800
|
+
customer_account: nil,
|
1628
1801
|
days_until_due: nil,
|
1802
|
+
default_margins: nil,
|
1629
1803
|
default_payment_method: nil,
|
1630
1804
|
default_source: nil,
|
1631
1805
|
default_tax_rates: nil,
|
@@ -1650,6 +1824,7 @@ module Stripe
|
|
1650
1824
|
transfer_data: nil
|
1651
1825
|
)
|
1652
1826
|
@account_tax_ids = account_tax_ids
|
1827
|
+
@amounts_due = amounts_due
|
1653
1828
|
@application_fee_amount = application_fee_amount
|
1654
1829
|
@auto_advance = auto_advance
|
1655
1830
|
@automatic_tax = automatic_tax
|
@@ -1658,7 +1833,9 @@ module Stripe
|
|
1658
1833
|
@currency = currency
|
1659
1834
|
@custom_fields = custom_fields
|
1660
1835
|
@customer = customer
|
1836
|
+
@customer_account = customer_account
|
1661
1837
|
@days_until_due = days_until_due
|
1838
|
+
@default_margins = default_margins
|
1662
1839
|
@default_payment_method = default_payment_method
|
1663
1840
|
@default_source = default_source
|
1664
1841
|
@default_tax_rates = default_tax_rates
|
@@ -1705,16 +1882,44 @@ module Stripe
|
|
1705
1882
|
class AddLinesParams < Stripe::RequestParams
|
1706
1883
|
class Line < Stripe::RequestParams
|
1707
1884
|
class Discount < Stripe::RequestParams
|
1885
|
+
class DiscountEnd < Stripe::RequestParams
|
1886
|
+
class Duration < Stripe::RequestParams
|
1887
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1888
|
+
attr_accessor :interval
|
1889
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1890
|
+
attr_accessor :interval_count
|
1891
|
+
|
1892
|
+
def initialize(interval: nil, interval_count: nil)
|
1893
|
+
@interval = interval
|
1894
|
+
@interval_count = interval_count
|
1895
|
+
end
|
1896
|
+
end
|
1897
|
+
# Time span for the redeemed discount.
|
1898
|
+
attr_accessor :duration
|
1899
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1900
|
+
attr_accessor :timestamp
|
1901
|
+
# The type of calculation made to determine when the discount ends.
|
1902
|
+
attr_accessor :type
|
1903
|
+
|
1904
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1905
|
+
@duration = duration
|
1906
|
+
@timestamp = timestamp
|
1907
|
+
@type = type
|
1908
|
+
end
|
1909
|
+
end
|
1708
1910
|
# ID of the coupon to create a new discount for.
|
1709
1911
|
attr_accessor :coupon
|
1710
1912
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1711
1913
|
attr_accessor :discount
|
1914
|
+
# Details to determine how long the discount should be applied for.
|
1915
|
+
attr_accessor :discount_end
|
1712
1916
|
# ID of the promotion code to create a new discount for.
|
1713
1917
|
attr_accessor :promotion_code
|
1714
1918
|
|
1715
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1919
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1716
1920
|
@coupon = coupon
|
1717
1921
|
@discount = discount
|
1922
|
+
@discount_end = discount_end
|
1718
1923
|
@promotion_code = promotion_code
|
1719
1924
|
end
|
1720
1925
|
end
|
@@ -1867,6 +2072,8 @@ module Stripe
|
|
1867
2072
|
attr_accessor :discounts
|
1868
2073
|
# ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
|
1869
2074
|
attr_accessor :invoice_item
|
2075
|
+
# 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.
|
2076
|
+
attr_accessor :margins
|
1870
2077
|
# 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`.
|
1871
2078
|
attr_accessor :metadata
|
1872
2079
|
# 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.
|
@@ -1888,6 +2095,7 @@ module Stripe
|
|
1888
2095
|
discountable: nil,
|
1889
2096
|
discounts: nil,
|
1890
2097
|
invoice_item: nil,
|
2098
|
+
margins: nil,
|
1891
2099
|
metadata: nil,
|
1892
2100
|
period: nil,
|
1893
2101
|
price_data: nil,
|
@@ -1901,6 +2109,7 @@ module Stripe
|
|
1901
2109
|
@discountable = discountable
|
1902
2110
|
@discounts = discounts
|
1903
2111
|
@invoice_item = invoice_item
|
2112
|
+
@margins = margins
|
1904
2113
|
@metadata = metadata
|
1905
2114
|
@period = period
|
1906
2115
|
@price_data = price_data
|
@@ -1924,6 +2133,63 @@ module Stripe
|
|
1924
2133
|
end
|
1925
2134
|
end
|
1926
2135
|
|
2136
|
+
class AttachPaymentParams < Stripe::RequestParams
|
2137
|
+
class PaymentRecordData < Stripe::RequestParams
|
2138
|
+
# The amount that was paid out of band.
|
2139
|
+
attr_accessor :amount
|
2140
|
+
# The currency that was paid out of band.
|
2141
|
+
attr_accessor :currency
|
2142
|
+
# 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`.
|
2143
|
+
attr_accessor :metadata
|
2144
|
+
# The type of money movement for this out of band payment record.
|
2145
|
+
attr_accessor :money_movement_type
|
2146
|
+
# The timestamp when this out of band payment was paid.
|
2147
|
+
attr_accessor :paid_at
|
2148
|
+
# The reference for this out of band payment record.
|
2149
|
+
attr_accessor :payment_reference
|
2150
|
+
|
2151
|
+
def initialize(
|
2152
|
+
amount: nil,
|
2153
|
+
currency: nil,
|
2154
|
+
metadata: nil,
|
2155
|
+
money_movement_type: nil,
|
2156
|
+
paid_at: nil,
|
2157
|
+
payment_reference: nil
|
2158
|
+
)
|
2159
|
+
@amount = amount
|
2160
|
+
@currency = currency
|
2161
|
+
@metadata = metadata
|
2162
|
+
@money_movement_type = money_movement_type
|
2163
|
+
@paid_at = paid_at
|
2164
|
+
@payment_reference = payment_reference
|
2165
|
+
end
|
2166
|
+
end
|
2167
|
+
# The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
|
2168
|
+
attr_accessor :amount_requested
|
2169
|
+
# Specifies which fields in the response should be expanded.
|
2170
|
+
attr_accessor :expand
|
2171
|
+
# The ID of the PaymentIntent to attach to the invoice.
|
2172
|
+
attr_accessor :payment_intent
|
2173
|
+
# The ID of the PaymentRecord to attach to the invoice.
|
2174
|
+
attr_accessor :payment_record
|
2175
|
+
# The PaymentRecord data for attaching an out of band payment to the invoice.
|
2176
|
+
attr_accessor :payment_record_data
|
2177
|
+
|
2178
|
+
def initialize(
|
2179
|
+
amount_requested: nil,
|
2180
|
+
expand: nil,
|
2181
|
+
payment_intent: nil,
|
2182
|
+
payment_record: nil,
|
2183
|
+
payment_record_data: nil
|
2184
|
+
)
|
2185
|
+
@amount_requested = amount_requested
|
2186
|
+
@expand = expand
|
2187
|
+
@payment_intent = payment_intent
|
2188
|
+
@payment_record = payment_record
|
2189
|
+
@payment_record_data = payment_record_data
|
2190
|
+
end
|
2191
|
+
end
|
2192
|
+
|
1927
2193
|
class FinalizeInvoiceParams < Stripe::RequestParams
|
1928
2194
|
# 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.
|
1929
2195
|
attr_accessor :auto_advance
|
@@ -2020,16 +2286,44 @@ module Stripe
|
|
2020
2286
|
class UpdateLinesParams < Stripe::RequestParams
|
2021
2287
|
class Line < Stripe::RequestParams
|
2022
2288
|
class Discount < Stripe::RequestParams
|
2289
|
+
class DiscountEnd < Stripe::RequestParams
|
2290
|
+
class Duration < Stripe::RequestParams
|
2291
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2292
|
+
attr_accessor :interval
|
2293
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2294
|
+
attr_accessor :interval_count
|
2295
|
+
|
2296
|
+
def initialize(interval: nil, interval_count: nil)
|
2297
|
+
@interval = interval
|
2298
|
+
@interval_count = interval_count
|
2299
|
+
end
|
2300
|
+
end
|
2301
|
+
# Time span for the redeemed discount.
|
2302
|
+
attr_accessor :duration
|
2303
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2304
|
+
attr_accessor :timestamp
|
2305
|
+
# The type of calculation made to determine when the discount ends.
|
2306
|
+
attr_accessor :type
|
2307
|
+
|
2308
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2309
|
+
@duration = duration
|
2310
|
+
@timestamp = timestamp
|
2311
|
+
@type = type
|
2312
|
+
end
|
2313
|
+
end
|
2023
2314
|
# ID of the coupon to create a new discount for.
|
2024
2315
|
attr_accessor :coupon
|
2025
2316
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2026
2317
|
attr_accessor :discount
|
2318
|
+
# Details to determine how long the discount should be applied for.
|
2319
|
+
attr_accessor :discount_end
|
2027
2320
|
# ID of the promotion code to create a new discount for.
|
2028
2321
|
attr_accessor :promotion_code
|
2029
2322
|
|
2030
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2323
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2031
2324
|
@coupon = coupon
|
2032
2325
|
@discount = discount
|
2326
|
+
@discount_end = discount_end
|
2033
2327
|
@promotion_code = promotion_code
|
2034
2328
|
end
|
2035
2329
|
end
|
@@ -2182,6 +2476,8 @@ module Stripe
|
|
2182
2476
|
attr_accessor :discounts
|
2183
2477
|
# ID of an existing line item on the invoice.
|
2184
2478
|
attr_accessor :id
|
2479
|
+
# 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.
|
2480
|
+
attr_accessor :margins
|
2185
2481
|
# 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.
|
2186
2482
|
attr_accessor :metadata
|
2187
2483
|
# 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.
|
@@ -2203,6 +2499,7 @@ module Stripe
|
|
2203
2499
|
discountable: nil,
|
2204
2500
|
discounts: nil,
|
2205
2501
|
id: nil,
|
2502
|
+
margins: nil,
|
2206
2503
|
metadata: nil,
|
2207
2504
|
period: nil,
|
2208
2505
|
price_data: nil,
|
@@ -2216,6 +2513,7 @@ module Stripe
|
|
2216
2513
|
@discountable = discountable
|
2217
2514
|
@discounts = discounts
|
2218
2515
|
@id = id
|
2516
|
+
@margins = margins
|
2219
2517
|
@metadata = metadata
|
2220
2518
|
@period = period
|
2221
2519
|
@price_data = price_data
|
@@ -2390,32 +2688,88 @@ module Stripe
|
|
2390
2688
|
end
|
2391
2689
|
|
2392
2690
|
class Discount < Stripe::RequestParams
|
2691
|
+
class DiscountEnd < Stripe::RequestParams
|
2692
|
+
class Duration < Stripe::RequestParams
|
2693
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2694
|
+
attr_accessor :interval
|
2695
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2696
|
+
attr_accessor :interval_count
|
2697
|
+
|
2698
|
+
def initialize(interval: nil, interval_count: nil)
|
2699
|
+
@interval = interval
|
2700
|
+
@interval_count = interval_count
|
2701
|
+
end
|
2702
|
+
end
|
2703
|
+
# Time span for the redeemed discount.
|
2704
|
+
attr_accessor :duration
|
2705
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2706
|
+
attr_accessor :timestamp
|
2707
|
+
# The type of calculation made to determine when the discount ends.
|
2708
|
+
attr_accessor :type
|
2709
|
+
|
2710
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2711
|
+
@duration = duration
|
2712
|
+
@timestamp = timestamp
|
2713
|
+
@type = type
|
2714
|
+
end
|
2715
|
+
end
|
2393
2716
|
# ID of the coupon to create a new discount for.
|
2394
2717
|
attr_accessor :coupon
|
2395
2718
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2396
2719
|
attr_accessor :discount
|
2720
|
+
# Details to determine how long the discount should be applied for.
|
2721
|
+
attr_accessor :discount_end
|
2397
2722
|
# ID of the promotion code to create a new discount for.
|
2398
2723
|
attr_accessor :promotion_code
|
2399
2724
|
|
2400
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2725
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2401
2726
|
@coupon = coupon
|
2402
2727
|
@discount = discount
|
2728
|
+
@discount_end = discount_end
|
2403
2729
|
@promotion_code = promotion_code
|
2404
2730
|
end
|
2405
2731
|
end
|
2406
2732
|
|
2407
2733
|
class InvoiceItem < Stripe::RequestParams
|
2408
2734
|
class Discount < Stripe::RequestParams
|
2735
|
+
class DiscountEnd < Stripe::RequestParams
|
2736
|
+
class Duration < Stripe::RequestParams
|
2737
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2738
|
+
attr_accessor :interval
|
2739
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2740
|
+
attr_accessor :interval_count
|
2741
|
+
|
2742
|
+
def initialize(interval: nil, interval_count: nil)
|
2743
|
+
@interval = interval
|
2744
|
+
@interval_count = interval_count
|
2745
|
+
end
|
2746
|
+
end
|
2747
|
+
# Time span for the redeemed discount.
|
2748
|
+
attr_accessor :duration
|
2749
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2750
|
+
attr_accessor :timestamp
|
2751
|
+
# The type of calculation made to determine when the discount ends.
|
2752
|
+
attr_accessor :type
|
2753
|
+
|
2754
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2755
|
+
@duration = duration
|
2756
|
+
@timestamp = timestamp
|
2757
|
+
@type = type
|
2758
|
+
end
|
2759
|
+
end
|
2409
2760
|
# ID of the coupon to create a new discount for.
|
2410
2761
|
attr_accessor :coupon
|
2411
2762
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2412
2763
|
attr_accessor :discount
|
2764
|
+
# Details to determine how long the discount should be applied for.
|
2765
|
+
attr_accessor :discount_end
|
2413
2766
|
# ID of the promotion code to create a new discount for.
|
2414
2767
|
attr_accessor :promotion_code
|
2415
2768
|
|
2416
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2769
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2417
2770
|
@coupon = coupon
|
2418
2771
|
@discount = discount
|
2772
|
+
@discount_end = discount_end
|
2419
2773
|
@promotion_code = promotion_code
|
2420
2774
|
end
|
2421
2775
|
end
|
@@ -2541,19 +2895,499 @@ module Stripe
|
|
2541
2895
|
end
|
2542
2896
|
|
2543
2897
|
class ScheduleDetails < Stripe::RequestParams
|
2898
|
+
class Amendment < Stripe::RequestParams
|
2899
|
+
class AmendmentEnd < Stripe::RequestParams
|
2900
|
+
class DiscountEnd < Stripe::RequestParams
|
2901
|
+
# The ID of a specific discount.
|
2902
|
+
attr_accessor :discount
|
2903
|
+
|
2904
|
+
def initialize(discount: nil)
|
2905
|
+
@discount = discount
|
2906
|
+
end
|
2907
|
+
end
|
2908
|
+
|
2909
|
+
class Duration < Stripe::RequestParams
|
2910
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2911
|
+
attr_accessor :interval
|
2912
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2913
|
+
attr_accessor :interval_count
|
2914
|
+
|
2915
|
+
def initialize(interval: nil, interval_count: nil)
|
2916
|
+
@interval = interval
|
2917
|
+
@interval_count = interval_count
|
2918
|
+
end
|
2919
|
+
end
|
2920
|
+
# Use the `end` time of a given discount.
|
2921
|
+
attr_accessor :discount_end
|
2922
|
+
# Time span for the amendment starting from the `amendment_start`.
|
2923
|
+
attr_accessor :duration
|
2924
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2925
|
+
attr_accessor :timestamp
|
2926
|
+
# Select one of three ways to pass the `amendment_end`.
|
2927
|
+
attr_accessor :type
|
2928
|
+
|
2929
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2930
|
+
@discount_end = discount_end
|
2931
|
+
@duration = duration
|
2932
|
+
@timestamp = timestamp
|
2933
|
+
@type = type
|
2934
|
+
end
|
2935
|
+
end
|
2936
|
+
|
2937
|
+
class AmendmentStart < Stripe::RequestParams
|
2938
|
+
class AmendmentEnd < Stripe::RequestParams
|
2939
|
+
# 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.
|
2940
|
+
attr_accessor :index
|
2941
|
+
|
2942
|
+
def initialize(index: nil)
|
2943
|
+
@index = index
|
2944
|
+
end
|
2945
|
+
end
|
2946
|
+
|
2947
|
+
class DiscountEnd < Stripe::RequestParams
|
2948
|
+
# The ID of a specific discount.
|
2949
|
+
attr_accessor :discount
|
2950
|
+
|
2951
|
+
def initialize(discount: nil)
|
2952
|
+
@discount = discount
|
2953
|
+
end
|
2954
|
+
end
|
2955
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2956
|
+
attr_accessor :amendment_end
|
2957
|
+
# Use the `end` time of a given discount.
|
2958
|
+
attr_accessor :discount_end
|
2959
|
+
# A precise Unix timestamp for the amendment to start.
|
2960
|
+
attr_accessor :timestamp
|
2961
|
+
# Select one of three ways to pass the `amendment_start`.
|
2962
|
+
attr_accessor :type
|
2963
|
+
|
2964
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2965
|
+
@amendment_end = amendment_end
|
2966
|
+
@discount_end = discount_end
|
2967
|
+
@timestamp = timestamp
|
2968
|
+
@type = type
|
2969
|
+
end
|
2970
|
+
end
|
2971
|
+
|
2972
|
+
class DiscountAction < Stripe::RequestParams
|
2973
|
+
class Add < Stripe::RequestParams
|
2974
|
+
class DiscountEnd < Stripe::RequestParams
|
2975
|
+
# The type of calculation made to determine when the discount ends.
|
2976
|
+
attr_accessor :type
|
2977
|
+
|
2978
|
+
def initialize(type: nil)
|
2979
|
+
@type = type
|
2980
|
+
end
|
2981
|
+
end
|
2982
|
+
# The coupon code to redeem.
|
2983
|
+
attr_accessor :coupon
|
2984
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
2985
|
+
attr_accessor :discount
|
2986
|
+
# Details to determine how long the discount should be applied for.
|
2987
|
+
attr_accessor :discount_end
|
2988
|
+
# 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.
|
2989
|
+
attr_accessor :index
|
2990
|
+
# The promotion code to redeem.
|
2991
|
+
attr_accessor :promotion_code
|
2992
|
+
|
2993
|
+
def initialize(
|
2994
|
+
coupon: nil,
|
2995
|
+
discount: nil,
|
2996
|
+
discount_end: nil,
|
2997
|
+
index: nil,
|
2998
|
+
promotion_code: nil
|
2999
|
+
)
|
3000
|
+
@coupon = coupon
|
3001
|
+
@discount = discount
|
3002
|
+
@discount_end = discount_end
|
3003
|
+
@index = index
|
3004
|
+
@promotion_code = promotion_code
|
3005
|
+
end
|
3006
|
+
end
|
3007
|
+
|
3008
|
+
class Remove < Stripe::RequestParams
|
3009
|
+
# The coupon code to remove from the `discounts` array.
|
3010
|
+
attr_accessor :coupon
|
3011
|
+
# The ID of a discount to remove from the `discounts` array.
|
3012
|
+
attr_accessor :discount
|
3013
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
3014
|
+
attr_accessor :promotion_code
|
3015
|
+
|
3016
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3017
|
+
@coupon = coupon
|
3018
|
+
@discount = discount
|
3019
|
+
@promotion_code = promotion_code
|
3020
|
+
end
|
3021
|
+
end
|
3022
|
+
|
3023
|
+
class Set < Stripe::RequestParams
|
3024
|
+
# The coupon code to replace the `discounts` array with.
|
3025
|
+
attr_accessor :coupon
|
3026
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
3027
|
+
attr_accessor :discount
|
3028
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
3029
|
+
attr_accessor :promotion_code
|
3030
|
+
|
3031
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3032
|
+
@coupon = coupon
|
3033
|
+
@discount = discount
|
3034
|
+
@promotion_code = promotion_code
|
3035
|
+
end
|
3036
|
+
end
|
3037
|
+
# Details of the discount to add.
|
3038
|
+
attr_accessor :add
|
3039
|
+
# Details of the discount to remove.
|
3040
|
+
attr_accessor :remove
|
3041
|
+
# Details of the discount to replace the existing discounts with.
|
3042
|
+
attr_accessor :set
|
3043
|
+
# Determines the type of discount action.
|
3044
|
+
attr_accessor :type
|
3045
|
+
|
3046
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3047
|
+
@add = add
|
3048
|
+
@remove = remove
|
3049
|
+
@set = set
|
3050
|
+
@type = type
|
3051
|
+
end
|
3052
|
+
end
|
3053
|
+
|
3054
|
+
class ItemAction < Stripe::RequestParams
|
3055
|
+
class Add < Stripe::RequestParams
|
3056
|
+
class Discount < Stripe::RequestParams
|
3057
|
+
class DiscountEnd < Stripe::RequestParams
|
3058
|
+
class Duration < Stripe::RequestParams
|
3059
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3060
|
+
attr_accessor :interval
|
3061
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3062
|
+
attr_accessor :interval_count
|
3063
|
+
|
3064
|
+
def initialize(interval: nil, interval_count: nil)
|
3065
|
+
@interval = interval
|
3066
|
+
@interval_count = interval_count
|
3067
|
+
end
|
3068
|
+
end
|
3069
|
+
# Time span for the redeemed discount.
|
3070
|
+
attr_accessor :duration
|
3071
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3072
|
+
attr_accessor :timestamp
|
3073
|
+
# The type of calculation made to determine when the discount ends.
|
3074
|
+
attr_accessor :type
|
3075
|
+
|
3076
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3077
|
+
@duration = duration
|
3078
|
+
@timestamp = timestamp
|
3079
|
+
@type = type
|
3080
|
+
end
|
3081
|
+
end
|
3082
|
+
# ID of the coupon to create a new discount for.
|
3083
|
+
attr_accessor :coupon
|
3084
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3085
|
+
attr_accessor :discount
|
3086
|
+
# Details to determine how long the discount should be applied for.
|
3087
|
+
attr_accessor :discount_end
|
3088
|
+
# ID of the promotion code to create a new discount for.
|
3089
|
+
attr_accessor :promotion_code
|
3090
|
+
|
3091
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3092
|
+
@coupon = coupon
|
3093
|
+
@discount = discount
|
3094
|
+
@discount_end = discount_end
|
3095
|
+
@promotion_code = promotion_code
|
3096
|
+
end
|
3097
|
+
end
|
3098
|
+
|
3099
|
+
class Trial < Stripe::RequestParams
|
3100
|
+
# 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.
|
3101
|
+
attr_accessor :converts_to
|
3102
|
+
# Determines the type of trial for this item.
|
3103
|
+
attr_accessor :type
|
3104
|
+
|
3105
|
+
def initialize(converts_to: nil, type: nil)
|
3106
|
+
@converts_to = converts_to
|
3107
|
+
@type = type
|
3108
|
+
end
|
3109
|
+
end
|
3110
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
3111
|
+
attr_accessor :discounts
|
3112
|
+
# 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`.
|
3113
|
+
attr_accessor :metadata
|
3114
|
+
# The ID of the price object.
|
3115
|
+
attr_accessor :price
|
3116
|
+
# Quantity for this item.
|
3117
|
+
attr_accessor :quantity
|
3118
|
+
# 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`.
|
3119
|
+
attr_accessor :tax_rates
|
3120
|
+
# Options that configure the trial on the subscription item.
|
3121
|
+
attr_accessor :trial
|
3122
|
+
|
3123
|
+
def initialize(
|
3124
|
+
discounts: nil,
|
3125
|
+
metadata: nil,
|
3126
|
+
price: nil,
|
3127
|
+
quantity: nil,
|
3128
|
+
tax_rates: nil,
|
3129
|
+
trial: nil
|
3130
|
+
)
|
3131
|
+
@discounts = discounts
|
3132
|
+
@metadata = metadata
|
3133
|
+
@price = price
|
3134
|
+
@quantity = quantity
|
3135
|
+
@tax_rates = tax_rates
|
3136
|
+
@trial = trial
|
3137
|
+
end
|
3138
|
+
end
|
3139
|
+
|
3140
|
+
class Remove < Stripe::RequestParams
|
3141
|
+
# ID of a price to remove.
|
3142
|
+
attr_accessor :price
|
3143
|
+
|
3144
|
+
def initialize(price: nil)
|
3145
|
+
@price = price
|
3146
|
+
end
|
3147
|
+
end
|
3148
|
+
|
3149
|
+
class Set < Stripe::RequestParams
|
3150
|
+
class Discount < Stripe::RequestParams
|
3151
|
+
class DiscountEnd < Stripe::RequestParams
|
3152
|
+
class Duration < Stripe::RequestParams
|
3153
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3154
|
+
attr_accessor :interval
|
3155
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3156
|
+
attr_accessor :interval_count
|
3157
|
+
|
3158
|
+
def initialize(interval: nil, interval_count: nil)
|
3159
|
+
@interval = interval
|
3160
|
+
@interval_count = interval_count
|
3161
|
+
end
|
3162
|
+
end
|
3163
|
+
# Time span for the redeemed discount.
|
3164
|
+
attr_accessor :duration
|
3165
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3166
|
+
attr_accessor :timestamp
|
3167
|
+
# The type of calculation made to determine when the discount ends.
|
3168
|
+
attr_accessor :type
|
3169
|
+
|
3170
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3171
|
+
@duration = duration
|
3172
|
+
@timestamp = timestamp
|
3173
|
+
@type = type
|
3174
|
+
end
|
3175
|
+
end
|
3176
|
+
# ID of the coupon to create a new discount for.
|
3177
|
+
attr_accessor :coupon
|
3178
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
3179
|
+
attr_accessor :discount
|
3180
|
+
# Details to determine how long the discount should be applied for.
|
3181
|
+
attr_accessor :discount_end
|
3182
|
+
# ID of the promotion code to create a new discount for.
|
3183
|
+
attr_accessor :promotion_code
|
3184
|
+
|
3185
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
3186
|
+
@coupon = coupon
|
3187
|
+
@discount = discount
|
3188
|
+
@discount_end = discount_end
|
3189
|
+
@promotion_code = promotion_code
|
3190
|
+
end
|
3191
|
+
end
|
3192
|
+
|
3193
|
+
class Trial < Stripe::RequestParams
|
3194
|
+
# 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.
|
3195
|
+
attr_accessor :converts_to
|
3196
|
+
# Determines the type of trial for this item.
|
3197
|
+
attr_accessor :type
|
3198
|
+
|
3199
|
+
def initialize(converts_to: nil, type: nil)
|
3200
|
+
@converts_to = converts_to
|
3201
|
+
@type = type
|
3202
|
+
end
|
3203
|
+
end
|
3204
|
+
# 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`.
|
3205
|
+
attr_accessor :discounts
|
3206
|
+
# 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`.
|
3207
|
+
attr_accessor :metadata
|
3208
|
+
# The ID of the price object.
|
3209
|
+
attr_accessor :price
|
3210
|
+
# 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`.
|
3211
|
+
attr_accessor :quantity
|
3212
|
+
# 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`.
|
3213
|
+
attr_accessor :tax_rates
|
3214
|
+
# 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`.
|
3215
|
+
attr_accessor :trial
|
3216
|
+
|
3217
|
+
def initialize(
|
3218
|
+
discounts: nil,
|
3219
|
+
metadata: nil,
|
3220
|
+
price: nil,
|
3221
|
+
quantity: nil,
|
3222
|
+
tax_rates: nil,
|
3223
|
+
trial: nil
|
3224
|
+
)
|
3225
|
+
@discounts = discounts
|
3226
|
+
@metadata = metadata
|
3227
|
+
@price = price
|
3228
|
+
@quantity = quantity
|
3229
|
+
@tax_rates = tax_rates
|
3230
|
+
@trial = trial
|
3231
|
+
end
|
3232
|
+
end
|
3233
|
+
# 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.
|
3234
|
+
attr_accessor :add
|
3235
|
+
# Details of the subscription item to remove.
|
3236
|
+
attr_accessor :remove
|
3237
|
+
# 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.
|
3238
|
+
attr_accessor :set
|
3239
|
+
# Determines the type of item action.
|
3240
|
+
attr_accessor :type
|
3241
|
+
|
3242
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3243
|
+
@add = add
|
3244
|
+
@remove = remove
|
3245
|
+
@set = set
|
3246
|
+
@type = type
|
3247
|
+
end
|
3248
|
+
end
|
3249
|
+
|
3250
|
+
class MetadataAction < Stripe::RequestParams
|
3251
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
3252
|
+
attr_accessor :add
|
3253
|
+
# Keys to remove from schedule phase metadata.
|
3254
|
+
attr_accessor :remove
|
3255
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
3256
|
+
attr_accessor :set
|
3257
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
3258
|
+
attr_accessor :type
|
3259
|
+
|
3260
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
3261
|
+
@add = add
|
3262
|
+
@remove = remove
|
3263
|
+
@set = set
|
3264
|
+
@type = type
|
3265
|
+
end
|
3266
|
+
end
|
3267
|
+
|
3268
|
+
class SetPauseCollection < Stripe::RequestParams
|
3269
|
+
class Set < Stripe::RequestParams
|
3270
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3271
|
+
attr_accessor :behavior
|
3272
|
+
|
3273
|
+
def initialize(behavior: nil)
|
3274
|
+
@behavior = behavior
|
3275
|
+
end
|
3276
|
+
end
|
3277
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
3278
|
+
attr_accessor :set
|
3279
|
+
# Determines the type of the pause_collection amendment.
|
3280
|
+
attr_accessor :type
|
3281
|
+
|
3282
|
+
def initialize(set: nil, type: nil)
|
3283
|
+
@set = set
|
3284
|
+
@type = type
|
3285
|
+
end
|
3286
|
+
end
|
3287
|
+
|
3288
|
+
class TrialSettings < Stripe::RequestParams
|
3289
|
+
class EndBehavior < Stripe::RequestParams
|
3290
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3291
|
+
attr_accessor :prorate_up_front
|
3292
|
+
|
3293
|
+
def initialize(prorate_up_front: nil)
|
3294
|
+
@prorate_up_front = prorate_up_front
|
3295
|
+
end
|
3296
|
+
end
|
3297
|
+
# Defines how the subscription should behave when a trial ends.
|
3298
|
+
attr_accessor :end_behavior
|
3299
|
+
|
3300
|
+
def initialize(end_behavior: nil)
|
3301
|
+
@end_behavior = end_behavior
|
3302
|
+
end
|
3303
|
+
end
|
3304
|
+
# 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.
|
3305
|
+
attr_accessor :amendment_end
|
3306
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
3307
|
+
attr_accessor :amendment_start
|
3308
|
+
# 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.
|
3309
|
+
attr_accessor :billing_cycle_anchor
|
3310
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
3311
|
+
attr_accessor :discount_actions
|
3312
|
+
# Changes to the subscription items during the amendment time span.
|
3313
|
+
attr_accessor :item_actions
|
3314
|
+
# Instructions for how to modify phase metadata
|
3315
|
+
attr_accessor :metadata_actions
|
3316
|
+
# 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`.
|
3317
|
+
attr_accessor :proration_behavior
|
3318
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
3319
|
+
attr_accessor :set_pause_collection
|
3320
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
3321
|
+
attr_accessor :set_schedule_end
|
3322
|
+
# Settings related to subscription trials.
|
3323
|
+
attr_accessor :trial_settings
|
3324
|
+
|
3325
|
+
def initialize(
|
3326
|
+
amendment_end: nil,
|
3327
|
+
amendment_start: nil,
|
3328
|
+
billing_cycle_anchor: nil,
|
3329
|
+
discount_actions: nil,
|
3330
|
+
item_actions: nil,
|
3331
|
+
metadata_actions: nil,
|
3332
|
+
proration_behavior: nil,
|
3333
|
+
set_pause_collection: nil,
|
3334
|
+
set_schedule_end: nil,
|
3335
|
+
trial_settings: nil
|
3336
|
+
)
|
3337
|
+
@amendment_end = amendment_end
|
3338
|
+
@amendment_start = amendment_start
|
3339
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
3340
|
+
@discount_actions = discount_actions
|
3341
|
+
@item_actions = item_actions
|
3342
|
+
@metadata_actions = metadata_actions
|
3343
|
+
@proration_behavior = proration_behavior
|
3344
|
+
@set_pause_collection = set_pause_collection
|
3345
|
+
@set_schedule_end = set_schedule_end
|
3346
|
+
@trial_settings = trial_settings
|
3347
|
+
end
|
3348
|
+
end
|
3349
|
+
|
2544
3350
|
class Phase < Stripe::RequestParams
|
2545
3351
|
class AddInvoiceItem < Stripe::RequestParams
|
2546
3352
|
class Discount < Stripe::RequestParams
|
3353
|
+
class DiscountEnd < Stripe::RequestParams
|
3354
|
+
class Duration < Stripe::RequestParams
|
3355
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3356
|
+
attr_accessor :interval
|
3357
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3358
|
+
attr_accessor :interval_count
|
3359
|
+
|
3360
|
+
def initialize(interval: nil, interval_count: nil)
|
3361
|
+
@interval = interval
|
3362
|
+
@interval_count = interval_count
|
3363
|
+
end
|
3364
|
+
end
|
3365
|
+
# Time span for the redeemed discount.
|
3366
|
+
attr_accessor :duration
|
3367
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3368
|
+
attr_accessor :timestamp
|
3369
|
+
# The type of calculation made to determine when the discount ends.
|
3370
|
+
attr_accessor :type
|
3371
|
+
|
3372
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3373
|
+
@duration = duration
|
3374
|
+
@timestamp = timestamp
|
3375
|
+
@type = type
|
3376
|
+
end
|
3377
|
+
end
|
2547
3378
|
# ID of the coupon to create a new discount for.
|
2548
3379
|
attr_accessor :coupon
|
2549
3380
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2550
3381
|
attr_accessor :discount
|
3382
|
+
# Details to determine how long the discount should be applied for.
|
3383
|
+
attr_accessor :discount_end
|
2551
3384
|
# ID of the promotion code to create a new discount for.
|
2552
3385
|
attr_accessor :promotion_code
|
2553
3386
|
|
2554
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3387
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2555
3388
|
@coupon = coupon
|
2556
3389
|
@discount = discount
|
3390
|
+
@discount_end = discount_end
|
2557
3391
|
@promotion_code = promotion_code
|
2558
3392
|
end
|
2559
3393
|
end
|
@@ -2634,16 +3468,44 @@ module Stripe
|
|
2634
3468
|
end
|
2635
3469
|
|
2636
3470
|
class Discount < Stripe::RequestParams
|
3471
|
+
class DiscountEnd < Stripe::RequestParams
|
3472
|
+
class Duration < Stripe::RequestParams
|
3473
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3474
|
+
attr_accessor :interval
|
3475
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3476
|
+
attr_accessor :interval_count
|
3477
|
+
|
3478
|
+
def initialize(interval: nil, interval_count: nil)
|
3479
|
+
@interval = interval
|
3480
|
+
@interval_count = interval_count
|
3481
|
+
end
|
3482
|
+
end
|
3483
|
+
# Time span for the redeemed discount.
|
3484
|
+
attr_accessor :duration
|
3485
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3486
|
+
attr_accessor :timestamp
|
3487
|
+
# The type of calculation made to determine when the discount ends.
|
3488
|
+
attr_accessor :type
|
3489
|
+
|
3490
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3491
|
+
@duration = duration
|
3492
|
+
@timestamp = timestamp
|
3493
|
+
@type = type
|
3494
|
+
end
|
3495
|
+
end
|
2637
3496
|
# ID of the coupon to create a new discount for.
|
2638
3497
|
attr_accessor :coupon
|
2639
3498
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2640
3499
|
attr_accessor :discount
|
3500
|
+
# Details to determine how long the discount should be applied for.
|
3501
|
+
attr_accessor :discount_end
|
2641
3502
|
# ID of the promotion code to create a new discount for.
|
2642
3503
|
attr_accessor :promotion_code
|
2643
3504
|
|
2644
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3505
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2645
3506
|
@coupon = coupon
|
2646
3507
|
@discount = discount
|
3508
|
+
@discount_end = discount_end
|
2647
3509
|
@promotion_code = promotion_code
|
2648
3510
|
end
|
2649
3511
|
end
|
@@ -2676,16 +3538,44 @@ module Stripe
|
|
2676
3538
|
|
2677
3539
|
class Item < Stripe::RequestParams
|
2678
3540
|
class Discount < Stripe::RequestParams
|
3541
|
+
class DiscountEnd < Stripe::RequestParams
|
3542
|
+
class Duration < Stripe::RequestParams
|
3543
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3544
|
+
attr_accessor :interval
|
3545
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3546
|
+
attr_accessor :interval_count
|
3547
|
+
|
3548
|
+
def initialize(interval: nil, interval_count: nil)
|
3549
|
+
@interval = interval
|
3550
|
+
@interval_count = interval_count
|
3551
|
+
end
|
3552
|
+
end
|
3553
|
+
# Time span for the redeemed discount.
|
3554
|
+
attr_accessor :duration
|
3555
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3556
|
+
attr_accessor :timestamp
|
3557
|
+
# The type of calculation made to determine when the discount ends.
|
3558
|
+
attr_accessor :type
|
3559
|
+
|
3560
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3561
|
+
@duration = duration
|
3562
|
+
@timestamp = timestamp
|
3563
|
+
@type = type
|
3564
|
+
end
|
3565
|
+
end
|
2679
3566
|
# ID of the coupon to create a new discount for.
|
2680
3567
|
attr_accessor :coupon
|
2681
3568
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2682
3569
|
attr_accessor :discount
|
3570
|
+
# Details to determine how long the discount should be applied for.
|
3571
|
+
attr_accessor :discount_end
|
2683
3572
|
# ID of the promotion code to create a new discount for.
|
2684
3573
|
attr_accessor :promotion_code
|
2685
3574
|
|
2686
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3575
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2687
3576
|
@coupon = coupon
|
2688
3577
|
@discount = discount
|
3578
|
+
@discount_end = discount_end
|
2689
3579
|
@promotion_code = promotion_code
|
2690
3580
|
end
|
2691
3581
|
end
|
@@ -2731,6 +3621,18 @@ module Stripe
|
|
2731
3621
|
@unit_amount_decimal = unit_amount_decimal
|
2732
3622
|
end
|
2733
3623
|
end
|
3624
|
+
|
3625
|
+
class Trial < Stripe::RequestParams
|
3626
|
+
# 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.
|
3627
|
+
attr_accessor :converts_to
|
3628
|
+
# Determines the type of trial for this item.
|
3629
|
+
attr_accessor :type
|
3630
|
+
|
3631
|
+
def initialize(converts_to: nil, type: nil)
|
3632
|
+
@converts_to = converts_to
|
3633
|
+
@type = type
|
3634
|
+
end
|
3635
|
+
end
|
2734
3636
|
# The coupons to redeem into discounts for the subscription item.
|
2735
3637
|
attr_accessor :discounts
|
2736
3638
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
@@ -2745,6 +3647,8 @@ module Stripe
|
|
2745
3647
|
attr_accessor :quantity
|
2746
3648
|
# 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.
|
2747
3649
|
attr_accessor :tax_rates
|
3650
|
+
# Options that configure the trial on the subscription item.
|
3651
|
+
attr_accessor :trial
|
2748
3652
|
|
2749
3653
|
def initialize(
|
2750
3654
|
discounts: nil,
|
@@ -2753,7 +3657,8 @@ module Stripe
|
|
2753
3657
|
price: nil,
|
2754
3658
|
price_data: nil,
|
2755
3659
|
quantity: nil,
|
2756
|
-
tax_rates: nil
|
3660
|
+
tax_rates: nil,
|
3661
|
+
trial: nil
|
2757
3662
|
)
|
2758
3663
|
@discounts = discounts
|
2759
3664
|
@metadata = metadata
|
@@ -2762,6 +3667,16 @@ module Stripe
|
|
2762
3667
|
@price_data = price_data
|
2763
3668
|
@quantity = quantity
|
2764
3669
|
@tax_rates = tax_rates
|
3670
|
+
@trial = trial
|
3671
|
+
end
|
3672
|
+
end
|
3673
|
+
|
3674
|
+
class PauseCollection < Stripe::RequestParams
|
3675
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
3676
|
+
attr_accessor :behavior
|
3677
|
+
|
3678
|
+
def initialize(behavior: nil)
|
3679
|
+
@behavior = behavior
|
2765
3680
|
end
|
2766
3681
|
end
|
2767
3682
|
|
@@ -2776,6 +3691,23 @@ module Stripe
|
|
2776
3691
|
@destination = destination
|
2777
3692
|
end
|
2778
3693
|
end
|
3694
|
+
|
3695
|
+
class TrialSettings < Stripe::RequestParams
|
3696
|
+
class EndBehavior < Stripe::RequestParams
|
3697
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
3698
|
+
attr_accessor :prorate_up_front
|
3699
|
+
|
3700
|
+
def initialize(prorate_up_front: nil)
|
3701
|
+
@prorate_up_front = prorate_up_front
|
3702
|
+
end
|
3703
|
+
end
|
3704
|
+
# Defines how the subscription should behave when a trial ends.
|
3705
|
+
attr_accessor :end_behavior
|
3706
|
+
|
3707
|
+
def initialize(end_behavior: nil)
|
3708
|
+
@end_behavior = end_behavior
|
3709
|
+
end
|
3710
|
+
end
|
2779
3711
|
# 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.
|
2780
3712
|
attr_accessor :add_invoice_items
|
2781
3713
|
# 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).
|
@@ -2808,6 +3740,8 @@ module Stripe
|
|
2808
3740
|
attr_accessor :metadata
|
2809
3741
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
2810
3742
|
attr_accessor :on_behalf_of
|
3743
|
+
# 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).
|
3744
|
+
attr_accessor :pause_collection
|
2811
3745
|
# Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
|
2812
3746
|
attr_accessor :proration_behavior
|
2813
3747
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -2816,8 +3750,12 @@ module Stripe
|
|
2816
3750
|
attr_accessor :transfer_data
|
2817
3751
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
2818
3752
|
attr_accessor :trial
|
3753
|
+
# Specify trial behavior when crossing phase boundaries
|
3754
|
+
attr_accessor :trial_continuation
|
2819
3755
|
# 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`
|
2820
3756
|
attr_accessor :trial_end
|
3757
|
+
# Settings related to subscription trials.
|
3758
|
+
attr_accessor :trial_settings
|
2821
3759
|
|
2822
3760
|
def initialize(
|
2823
3761
|
add_invoice_items: nil,
|
@@ -2836,11 +3774,14 @@ module Stripe
|
|
2836
3774
|
iterations: nil,
|
2837
3775
|
metadata: nil,
|
2838
3776
|
on_behalf_of: nil,
|
3777
|
+
pause_collection: nil,
|
2839
3778
|
proration_behavior: nil,
|
2840
3779
|
start_date: nil,
|
2841
3780
|
transfer_data: nil,
|
2842
3781
|
trial: nil,
|
2843
|
-
|
3782
|
+
trial_continuation: nil,
|
3783
|
+
trial_end: nil,
|
3784
|
+
trial_settings: nil
|
2844
3785
|
)
|
2845
3786
|
@add_invoice_items = add_invoice_items
|
2846
3787
|
@application_fee_percent = application_fee_percent
|
@@ -2858,23 +3799,95 @@ module Stripe
|
|
2858
3799
|
@iterations = iterations
|
2859
3800
|
@metadata = metadata
|
2860
3801
|
@on_behalf_of = on_behalf_of
|
3802
|
+
@pause_collection = pause_collection
|
2861
3803
|
@proration_behavior = proration_behavior
|
2862
3804
|
@start_date = start_date
|
2863
3805
|
@transfer_data = transfer_data
|
2864
3806
|
@trial = trial
|
3807
|
+
@trial_continuation = trial_continuation
|
2865
3808
|
@trial_end = trial_end
|
3809
|
+
@trial_settings = trial_settings
|
3810
|
+
end
|
3811
|
+
end
|
3812
|
+
|
3813
|
+
class Prebilling < Stripe::RequestParams
|
3814
|
+
class BillUntil < Stripe::RequestParams
|
3815
|
+
class AmendmentEnd < Stripe::RequestParams
|
3816
|
+
# 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.
|
3817
|
+
attr_accessor :index
|
3818
|
+
|
3819
|
+
def initialize(index: nil)
|
3820
|
+
@index = index
|
3821
|
+
end
|
3822
|
+
end
|
3823
|
+
|
3824
|
+
class Duration < Stripe::RequestParams
|
3825
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3826
|
+
attr_accessor :interval
|
3827
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3828
|
+
attr_accessor :interval_count
|
3829
|
+
|
3830
|
+
def initialize(interval: nil, interval_count: nil)
|
3831
|
+
@interval = interval
|
3832
|
+
@interval_count = interval_count
|
3833
|
+
end
|
3834
|
+
end
|
3835
|
+
# End the prebilled period when a specified amendment ends.
|
3836
|
+
attr_accessor :amendment_end
|
3837
|
+
# Time span for prebilling, starting from `bill_from`.
|
3838
|
+
attr_accessor :duration
|
3839
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
3840
|
+
attr_accessor :timestamp
|
3841
|
+
# Select one of several ways to pass the `bill_until` value.
|
3842
|
+
attr_accessor :type
|
3843
|
+
|
3844
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
3845
|
+
@amendment_end = amendment_end
|
3846
|
+
@duration = duration
|
3847
|
+
@timestamp = timestamp
|
3848
|
+
@type = type
|
3849
|
+
end
|
3850
|
+
end
|
3851
|
+
# The end of the prebilled time period.
|
3852
|
+
attr_accessor :bill_until
|
3853
|
+
# This is used to determine the number of billing cycles to prebill.
|
3854
|
+
attr_accessor :iterations
|
3855
|
+
|
3856
|
+
def initialize(bill_until: nil, iterations: nil)
|
3857
|
+
@bill_until = bill_until
|
3858
|
+
@iterations = iterations
|
2866
3859
|
end
|
2867
3860
|
end
|
3861
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
3862
|
+
attr_accessor :amendments
|
3863
|
+
# 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.
|
3864
|
+
attr_accessor :billing_behavior
|
3865
|
+
# Configure billing_mode to opt in improved credit proration behavior.When the schedule creates a subscription, the subscription's `billing_mode` will be set to the same value as the schedule's `billing_mode`.
|
3866
|
+
attr_accessor :billing_mode
|
2868
3867
|
# 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.
|
2869
3868
|
attr_accessor :end_behavior
|
2870
3869
|
# 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.
|
2871
3870
|
attr_accessor :phases
|
3871
|
+
# Provide any time periods to bill in advance.
|
3872
|
+
attr_accessor :prebilling
|
2872
3873
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
2873
3874
|
attr_accessor :proration_behavior
|
2874
3875
|
|
2875
|
-
def initialize(
|
3876
|
+
def initialize(
|
3877
|
+
amendments: nil,
|
3878
|
+
billing_behavior: nil,
|
3879
|
+
billing_mode: nil,
|
3880
|
+
end_behavior: nil,
|
3881
|
+
phases: nil,
|
3882
|
+
prebilling: nil,
|
3883
|
+
proration_behavior: nil
|
3884
|
+
)
|
3885
|
+
@amendments = amendments
|
3886
|
+
@billing_behavior = billing_behavior
|
3887
|
+
@billing_mode = billing_mode
|
2876
3888
|
@end_behavior = end_behavior
|
2877
3889
|
@phases = phases
|
3890
|
+
@prebilling = prebilling
|
2878
3891
|
@proration_behavior = proration_behavior
|
2879
3892
|
end
|
2880
3893
|
end
|
@@ -2882,16 +3895,44 @@ module Stripe
|
|
2882
3895
|
class SubscriptionDetails < Stripe::RequestParams
|
2883
3896
|
class Item < Stripe::RequestParams
|
2884
3897
|
class Discount < Stripe::RequestParams
|
3898
|
+
class DiscountEnd < Stripe::RequestParams
|
3899
|
+
class Duration < Stripe::RequestParams
|
3900
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
3901
|
+
attr_accessor :interval
|
3902
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
3903
|
+
attr_accessor :interval_count
|
3904
|
+
|
3905
|
+
def initialize(interval: nil, interval_count: nil)
|
3906
|
+
@interval = interval
|
3907
|
+
@interval_count = interval_count
|
3908
|
+
end
|
3909
|
+
end
|
3910
|
+
# Time span for the redeemed discount.
|
3911
|
+
attr_accessor :duration
|
3912
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
3913
|
+
attr_accessor :timestamp
|
3914
|
+
# The type of calculation made to determine when the discount ends.
|
3915
|
+
attr_accessor :type
|
3916
|
+
|
3917
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
3918
|
+
@duration = duration
|
3919
|
+
@timestamp = timestamp
|
3920
|
+
@type = type
|
3921
|
+
end
|
3922
|
+
end
|
2885
3923
|
# ID of the coupon to create a new discount for.
|
2886
3924
|
attr_accessor :coupon
|
2887
3925
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2888
3926
|
attr_accessor :discount
|
3927
|
+
# Details to determine how long the discount should be applied for.
|
3928
|
+
attr_accessor :discount_end
|
2889
3929
|
# ID of the promotion code to create a new discount for.
|
2890
3930
|
attr_accessor :promotion_code
|
2891
3931
|
|
2892
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
3932
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2893
3933
|
@coupon = coupon
|
2894
3934
|
@discount = discount
|
3935
|
+
@discount_end = discount_end
|
2895
3936
|
@promotion_code = promotion_code
|
2896
3937
|
end
|
2897
3938
|
end
|
@@ -2982,8 +4023,19 @@ module Stripe
|
|
2982
4023
|
@tax_rates = tax_rates
|
2983
4024
|
end
|
2984
4025
|
end
|
4026
|
+
|
4027
|
+
class Prebilling < Stripe::RequestParams
|
4028
|
+
# This is used to determine the number of billing cycles to prebill.
|
4029
|
+
attr_accessor :iterations
|
4030
|
+
|
4031
|
+
def initialize(iterations: nil)
|
4032
|
+
@iterations = iterations
|
4033
|
+
end
|
4034
|
+
end
|
2985
4035
|
# 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`.
|
2986
4036
|
attr_accessor :billing_cycle_anchor
|
4037
|
+
# Configure billing_mode in each subscription to opt in improved credit proration behavior.
|
4038
|
+
attr_accessor :billing_mode
|
2987
4039
|
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
2988
4040
|
attr_accessor :cancel_at
|
2989
4041
|
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
@@ -2994,6 +4046,8 @@ module Stripe
|
|
2994
4046
|
attr_accessor :default_tax_rates
|
2995
4047
|
# A list of up to 20 subscription items, each with an attached price.
|
2996
4048
|
attr_accessor :items
|
4049
|
+
# The pre-billing to apply to the subscription as a preview.
|
4050
|
+
attr_accessor :prebilling
|
2997
4051
|
# 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`.
|
2998
4052
|
attr_accessor :proration_behavior
|
2999
4053
|
# 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'.
|
@@ -3007,11 +4061,13 @@ module Stripe
|
|
3007
4061
|
|
3008
4062
|
def initialize(
|
3009
4063
|
billing_cycle_anchor: nil,
|
4064
|
+
billing_mode: nil,
|
3010
4065
|
cancel_at: nil,
|
3011
4066
|
cancel_at_period_end: nil,
|
3012
4067
|
cancel_now: nil,
|
3013
4068
|
default_tax_rates: nil,
|
3014
4069
|
items: nil,
|
4070
|
+
prebilling: nil,
|
3015
4071
|
proration_behavior: nil,
|
3016
4072
|
proration_date: nil,
|
3017
4073
|
resume_at: nil,
|
@@ -3019,11 +4075,13 @@ module Stripe
|
|
3019
4075
|
trial_end: nil
|
3020
4076
|
)
|
3021
4077
|
@billing_cycle_anchor = billing_cycle_anchor
|
4078
|
+
@billing_mode = billing_mode
|
3022
4079
|
@cancel_at = cancel_at
|
3023
4080
|
@cancel_at_period_end = cancel_at_period_end
|
3024
4081
|
@cancel_now = cancel_now
|
3025
4082
|
@default_tax_rates = default_tax_rates
|
3026
4083
|
@items = items
|
4084
|
+
@prebilling = prebilling
|
3027
4085
|
@proration_behavior = proration_behavior
|
3028
4086
|
@proration_date = proration_date
|
3029
4087
|
@resume_at = resume_at
|
@@ -3037,6 +4095,8 @@ module Stripe
|
|
3037
4095
|
attr_accessor :currency
|
3038
4096
|
# 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.
|
3039
4097
|
attr_accessor :customer
|
4098
|
+
# 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.
|
4099
|
+
attr_accessor :customer_account
|
3040
4100
|
# 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.
|
3041
4101
|
attr_accessor :customer_details
|
3042
4102
|
# 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.
|
@@ -3064,6 +4124,7 @@ module Stripe
|
|
3064
4124
|
automatic_tax: nil,
|
3065
4125
|
currency: nil,
|
3066
4126
|
customer: nil,
|
4127
|
+
customer_account: nil,
|
3067
4128
|
customer_details: nil,
|
3068
4129
|
discounts: nil,
|
3069
4130
|
expand: nil,
|
@@ -3079,6 +4140,7 @@ module Stripe
|
|
3079
4140
|
@automatic_tax = automatic_tax
|
3080
4141
|
@currency = currency
|
3081
4142
|
@customer = customer
|
4143
|
+
@customer_account = customer_account
|
3082
4144
|
@customer_details = customer_details
|
3083
4145
|
@discounts = discounts
|
3084
4146
|
@expand = expand
|
@@ -3108,6 +4170,8 @@ module Stripe
|
|
3108
4170
|
attr_reader :amount_remaining
|
3109
4171
|
# This is the sum of all the shipping amounts.
|
3110
4172
|
attr_reader :amount_shipping
|
4173
|
+
# List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
|
4174
|
+
attr_reader :amounts_due
|
3111
4175
|
# ID of the Connect Application that created the invoice.
|
3112
4176
|
attr_reader :application
|
3113
4177
|
# 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.
|
@@ -3142,6 +4206,8 @@ module Stripe
|
|
3142
4206
|
attr_reader :custom_fields
|
3143
4207
|
# The ID of the customer who will be billed.
|
3144
4208
|
attr_reader :customer
|
4209
|
+
# The ID of the account who will be billed.
|
4210
|
+
attr_reader :customer_account
|
3145
4211
|
# 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.
|
3146
4212
|
attr_reader :customer_address
|
3147
4213
|
# 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.
|
@@ -3156,6 +4222,8 @@ module Stripe
|
|
3156
4222
|
attr_reader :customer_tax_exempt
|
3157
4223
|
# 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.
|
3158
4224
|
attr_reader :customer_tax_ids
|
4225
|
+
# The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
|
4226
|
+
attr_reader :default_margins
|
3159
4227
|
# 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.
|
3160
4228
|
attr_reader :default_payment_method
|
3161
4229
|
# 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.
|
@@ -3246,6 +4314,8 @@ module Stripe
|
|
3246
4314
|
attr_reader :total_discount_amounts
|
3247
4315
|
# The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
|
3248
4316
|
attr_reader :total_excluding_tax
|
4317
|
+
# The aggregate amounts calculated per margin across all line items.
|
4318
|
+
attr_reader :total_margin_amounts
|
3249
4319
|
# 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.
|
3250
4320
|
attr_reader :total_pretax_credit_amounts
|
3251
4321
|
# The aggregate tax information of all line items.
|
@@ -3275,6 +4345,50 @@ module Stripe
|
|
3275
4345
|
)
|
3276
4346
|
end
|
3277
4347
|
|
4348
|
+
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
4349
|
+
#
|
4350
|
+
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
|
4351
|
+
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
|
4352
|
+
#
|
4353
|
+
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
4354
|
+
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
4355
|
+
# invoice's status becomes paid.
|
4356
|
+
#
|
4357
|
+
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
4358
|
+
# credited to the invoice immediately.
|
4359
|
+
#
|
4360
|
+
# See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
|
4361
|
+
def attach_payment(params = {}, opts = {})
|
4362
|
+
request_stripe_object(
|
4363
|
+
method: :post,
|
4364
|
+
path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(self["id"]) }),
|
4365
|
+
params: params,
|
4366
|
+
opts: opts
|
4367
|
+
)
|
4368
|
+
end
|
4369
|
+
|
4370
|
+
# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
|
4371
|
+
#
|
4372
|
+
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
|
4373
|
+
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
|
4374
|
+
#
|
4375
|
+
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
|
4376
|
+
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
4377
|
+
# invoice's status becomes paid.
|
4378
|
+
#
|
4379
|
+
# If the PaymentIntent's status is already succeeded when it's attached, it's
|
4380
|
+
# credited to the invoice immediately.
|
4381
|
+
#
|
4382
|
+
# See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
|
4383
|
+
def self.attach_payment(invoice, params = {}, opts = {})
|
4384
|
+
request_stripe_object(
|
4385
|
+
method: :post,
|
4386
|
+
path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(invoice) }),
|
4387
|
+
params: params,
|
4388
|
+
opts: opts
|
4389
|
+
)
|
4390
|
+
end
|
4391
|
+
|
3278
4392
|
# This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
|
3279
4393
|
def self.create(params = {}, opts = {})
|
3280
4394
|
request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
|