stripe 13.2.0 → 13.3.0.pre.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1396 -645
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/object_types.rb +32 -0
- data/lib/stripe/request_signing_authenticator.rb +79 -0
- data/lib/stripe/resources/account.rb +230 -0
- data/lib/stripe/resources/account_link.rb +9 -0
- data/lib/stripe/resources/account_notice.rb +60 -0
- data/lib/stripe/resources/account_session.rb +103 -0
- data/lib/stripe/resources/apple_pay_domain.rb +13 -0
- data/lib/stripe/resources/application.rb +20 -0
- data/lib/stripe/resources/application_fee.rb +34 -0
- data/lib/stripe/resources/application_fee_refund.rb +17 -0
- data/lib/stripe/resources/apps/secret.rb +22 -0
- data/lib/stripe/resources/balance.rb +59 -0
- data/lib/stripe/resources/balance_transaction.rb +34 -0
- data/lib/stripe/resources/bank_account.rb +60 -2
- data/lib/stripe/resources/billing/alert.rb +21 -0
- data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +25 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +45 -1
- data/lib/stripe/resources/billing/credit_grant.rb +46 -2
- data/lib/stripe/resources/billing/meter.rb +49 -7
- data/lib/stripe/resources/billing/meter_error_report.rb +44 -0
- data/lib/stripe/resources/billing/meter_event.rb +17 -3
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +17 -1
- data/lib/stripe/resources/billing/meter_event_summary.rb +15 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +70 -0
- data/lib/stripe/resources/billing_portal/session.rb +61 -0
- data/lib/stripe/resources/capability.rb +38 -0
- data/lib/stripe/resources/capital/financing_offer.rb +94 -0
- data/lib/stripe/resources/capital/financing_summary.rb +32 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +56 -0
- data/lib/stripe/resources/card.rb +72 -0
- data/lib/stripe/resources/cash_balance.rb +14 -0
- data/lib/stripe/resources/charge.rb +469 -0
- data/lib/stripe/resources/checkout/session.rb +496 -0
- data/lib/stripe/resources/climate/order.rb +55 -0
- data/lib/stripe/resources/climate/product.rb +24 -0
- data/lib/stripe/resources/climate/supplier.rb +18 -0
- data/lib/stripe/resources/confirmation_token.rb +297 -0
- data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
- data/lib/stripe/resources/country_spec.rb +27 -0
- data/lib/stripe/resources/coupon.rb +44 -0
- data/lib/stripe/resources/credit_note.rb +91 -0
- data/lib/stripe/resources/credit_note_line_item.rb +46 -0
- data/lib/stripe/resources/customer.rb +93 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +72 -0
- data/lib/stripe/resources/customer_session.rb +34 -0
- data/lib/stripe/resources/discount.rb +29 -0
- data/lib/stripe/resources/dispute.rb +88 -0
- data/lib/stripe/resources/entitlements/active_entitlement.rb +11 -0
- data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
- data/lib/stripe/resources/entitlements/feature.rb +15 -0
- data/lib/stripe/resources/ephemeral_key.rb +13 -0
- data/lib/stripe/resources/event.rb +44 -0
- data/lib/stripe/resources/exchange_rate.rb +7 -0
- data/lib/stripe/resources/file.rb +23 -0
- data/lib/stripe/resources/file_link.rb +19 -0
- data/lib/stripe/resources/financial_connections/account.rb +87 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
- data/lib/stripe/resources/financial_connections/institution.rb +61 -0
- data/lib/stripe/resources/financial_connections/session.rb +49 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +28 -0
- data/lib/stripe/resources/forwarding/request.rb +40 -0
- data/lib/stripe/resources/funding_instructions.rb +82 -0
- data/lib/stripe/resources/gift_cards/card.rb +96 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +132 -0
- data/lib/stripe/resources/identity/verification_report.rb +92 -0
- data/lib/stripe/resources/identity/verification_session.rb +76 -0
- data/lib/stripe/resources/invoice.rb +418 -0
- data/lib/stripe/resources/invoice_item.rb +54 -0
- data/lib/stripe/resources/invoice_line_item.rb +83 -0
- data/lib/stripe/resources/invoice_payment.rb +46 -0
- data/lib/stripe/resources/invoice_rendering_template.rb +17 -0
- data/lib/stripe/resources/issuing/authorization.rb +129 -0
- data/lib/stripe/resources/issuing/card.rb +86 -0
- data/lib/stripe/resources/issuing/cardholder.rb +76 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +145 -0
- data/lib/stripe/resources/issuing/dispute.rb +65 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +49 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +43 -0
- data/lib/stripe/resources/issuing/personalization_design.rb +38 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +18 -0
- data/lib/stripe/resources/issuing/settlement.rb +49 -0
- data/lib/stripe/resources/issuing/token.rb +46 -0
- data/lib/stripe/resources/issuing/transaction.rb +106 -0
- data/lib/stripe/resources/line_item.rb +50 -0
- data/lib/stripe/resources/login_link.rb +7 -0
- data/lib/stripe/resources/mandate.rb +78 -0
- data/lib/stripe/resources/margin.rb +56 -0
- data/lib/stripe/resources/order.rb +322 -0
- data/lib/stripe/resources/payment_attempt_record.rb +100 -0
- data/lib/stripe/resources/payment_intent.rb +712 -0
- data/lib/stripe/resources/payment_link.rb +198 -0
- data/lib/stripe/resources/payment_method.rb +368 -0
- data/lib/stripe/resources/payment_method_configuration.rb +430 -0
- data/lib/stripe/resources/payment_method_domain.rb +57 -0
- data/lib/stripe/resources/payment_record.rb +194 -0
- data/lib/stripe/resources/payout.rb +56 -0
- data/lib/stripe/resources/person.rb +128 -0
- data/lib/stripe/resources/plan.rb +52 -0
- data/lib/stripe/resources/price.rb +77 -0
- data/lib/stripe/resources/product.rb +60 -0
- data/lib/stripe/resources/product_feature.rb +12 -0
- data/lib/stripe/resources/promotion_code.rb +35 -0
- data/lib/stripe/resources/quote.rb +356 -0
- data/lib/stripe/resources/quote_line.rb +136 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +374 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +170 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +17 -0
- data/lib/stripe/resources/radar/value_list.rb +23 -0
- data/lib/stripe/resources/radar/value_list_item.rb +17 -0
- data/lib/stripe/resources/refund.rb +130 -0
- data/lib/stripe/resources/reporting/report_run.rb +29 -0
- data/lib/stripe/resources/reporting/report_type.rb +19 -0
- data/lib/stripe/resources/reserve_transaction.rb +22 -0
- data/lib/stripe/resources/reversal.rb +21 -0
- data/lib/stripe/resources/review.rb +36 -0
- data/lib/stripe/resources/setup_attempt.rb +101 -0
- data/lib/stripe/resources/setup_intent.rb +158 -0
- data/lib/stripe/resources/shipping_rate.rb +42 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +26 -0
- data/lib/stripe/resources/source.rb +195 -0
- data/lib/stripe/resources/source_mandate_notification.rb +59 -0
- data/lib/stripe/resources/source_transaction.rb +48 -0
- data/lib/stripe/resources/subscription.rb +214 -0
- data/lib/stripe/resources/subscription_item.rb +46 -0
- data/lib/stripe/resources/subscription_schedule.rb +173 -0
- data/lib/stripe/resources/tax/association.rb +60 -0
- data/lib/stripe/resources/tax/calculation.rb +72 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +33 -0
- data/lib/stripe/resources/tax/form.rb +124 -0
- data/lib/stripe/resources/tax/registration.rb +379 -0
- data/lib/stripe/resources/tax/settings.rb +33 -0
- data/lib/stripe/resources/tax/transaction.rb +68 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +30 -0
- data/lib/stripe/resources/tax_code.rb +9 -0
- data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
- data/lib/stripe/resources/tax_id.rb +30 -0
- data/lib/stripe/resources/tax_rate.rb +42 -0
- data/lib/stripe/resources/terminal/configuration.rb +107 -0
- data/lib/stripe/resources/terminal/connection_token.rb +7 -0
- data/lib/stripe/resources/terminal/location.rb +20 -0
- data/lib/stripe/resources/terminal/reader.rb +178 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +30 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +27 -0
- data/lib/stripe/resources/token.rb +29 -0
- data/lib/stripe/resources/topup.rb +33 -0
- data/lib/stripe/resources/transfer.rb +35 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +32 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +38 -0
- data/lib/stripe/resources/treasury/financial_account.rb +57 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +91 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +66 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +85 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +82 -0
- data/lib/stripe/resources/treasury/received_credit.rb +70 -0
- data/lib/stripe/resources/treasury/received_debit.rb +67 -0
- data/lib/stripe/resources/treasury/transaction.rb +42 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +34 -0
- data/lib/stripe/resources/usage_record.rb +13 -0
- data/lib/stripe/resources/usage_record_summary.rb +18 -0
- data/lib/stripe/resources/v2/amount.rb +9 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +20 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
- data/lib/stripe/resources/v2/event.rb +21 -0
- data/lib/stripe/resources/v2/event_destination.rb +49 -0
- data/lib/stripe/resources/webhook_endpoint.rb +27 -0
- data/lib/stripe/resources.rb +31 -0
- data/lib/stripe/services/account_notice_service.rb +39 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -1
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +2 -2
- data/lib/stripe/services/billing/credit_grant_service.rb +3 -3
- data/lib/stripe/services/billing/meter_event_adjustment_service.rb +1 -1
- data/lib/stripe/services/billing/meter_event_service.rb +1 -1
- data/lib/stripe/services/billing/meter_service.rb +5 -5
- data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_service.rb +3 -1
- data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/gift_cards/card_service.rb +63 -0
- data/lib/stripe/services/gift_cards/transaction_service.rb +74 -0
- data/lib/stripe/services/gift_cards_service.rb +14 -0
- data/lib/stripe/services/invoice_payment_service.rb +28 -0
- data/lib/stripe/services/invoice_service.rb +44 -1
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/margin_service.rb +50 -0
- data/lib/stripe/services/order_line_item_service.rb +17 -0
- data/lib/stripe/services/order_service.rb +78 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +28 -0
- data/lib/stripe/services/payment_intent_service.rb +37 -0
- data/lib/stripe/services/payment_record_service.rb +78 -0
- data/lib/stripe/services/quote_line_service.rb +17 -0
- data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
- data/lib/stripe/services/quote_service.rb +49 -1
- data/lib/stripe/services/subscription_schedule_service.rb +11 -0
- data/lib/stripe/services/tax/association_service.rb +19 -0
- data/lib/stripe/services/tax/form_service.rb +37 -0
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
- data/lib/stripe/services/terminal/reader_service.rb +33 -0
- data/lib/stripe/services/terminal_service.rb +2 -1
- data/lib/stripe/services/v1_services.rb +8 -1
- data/lib/stripe/services.rb +25 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +5 -0
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +45 -0
- data/stripe.gemspec +2 -1
- metadata +62 -4
@@ -24,6 +24,201 @@ module Stripe
|
|
24
24
|
|
25
25
|
nested_resource_class_methods :source_transaction, operations: %i[retrieve list]
|
26
26
|
|
27
|
+
class AchCreditTransfer < Stripe::StripeObject
|
28
|
+
attr_reader :account_number, :bank_name, :fingerprint, :refund_account_holder_name, :refund_account_holder_type, :refund_routing_number, :routing_number, :swift_code
|
29
|
+
end
|
30
|
+
|
31
|
+
class AchDebit < Stripe::StripeObject
|
32
|
+
attr_reader :bank_name, :country, :fingerprint, :last4, :routing_number, :type
|
33
|
+
end
|
34
|
+
|
35
|
+
class AcssDebit < Stripe::StripeObject
|
36
|
+
attr_reader :bank_address_city, :bank_address_line_1, :bank_address_line_2, :bank_address_postal_code, :bank_name, :category, :country, :fingerprint, :last4, :routing_number
|
37
|
+
end
|
38
|
+
|
39
|
+
class Alipay < Stripe::StripeObject
|
40
|
+
attr_reader :data_string, :native_url, :statement_descriptor
|
41
|
+
end
|
42
|
+
|
43
|
+
class AuBecsDebit < Stripe::StripeObject
|
44
|
+
attr_reader :bsb_number, :fingerprint, :last4
|
45
|
+
end
|
46
|
+
|
47
|
+
class Bancontact < Stripe::StripeObject
|
48
|
+
attr_reader :bank_code, :bank_name, :bic, :iban_last4, :preferred_language, :statement_descriptor
|
49
|
+
end
|
50
|
+
|
51
|
+
class Card < Stripe::StripeObject
|
52
|
+
attr_reader :address_line1_check, :address_zip_check, :brand, :country, :cvc_check, :description, :dynamic_last4, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :name, :three_d_secure, :tokenization_method
|
53
|
+
end
|
54
|
+
|
55
|
+
class CardPresent < Stripe::StripeObject
|
56
|
+
attr_reader :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :brand, :country, :cvm_type, :data_type, :dedicated_file_name, :description, :emv_auth_data, :evidence_customer_signature, :evidence_transaction_certificate, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :pos_device_id, :pos_entry_mode, :read_method, :reader, :terminal_verification_results, :transaction_status_information
|
57
|
+
end
|
58
|
+
|
59
|
+
class CodeVerification < Stripe::StripeObject
|
60
|
+
attr_reader :attempts_remaining, :status
|
61
|
+
end
|
62
|
+
|
63
|
+
class Eps < Stripe::StripeObject
|
64
|
+
attr_reader :reference, :statement_descriptor
|
65
|
+
end
|
66
|
+
|
67
|
+
class Giropay < Stripe::StripeObject
|
68
|
+
attr_reader :bank_code, :bank_name, :bic, :statement_descriptor
|
69
|
+
end
|
70
|
+
|
71
|
+
class Ideal < Stripe::StripeObject
|
72
|
+
attr_reader :bank, :bic, :iban_last4, :statement_descriptor
|
73
|
+
end
|
74
|
+
|
75
|
+
class Klarna < Stripe::StripeObject
|
76
|
+
attr_reader :background_image_url, :client_token, :first_name, :last_name, :locale, :logo_url, :page_title, :pay_later_asset_urls_descriptive, :pay_later_asset_urls_standard, :pay_later_name, :pay_later_redirect_url, :pay_now_asset_urls_descriptive, :pay_now_asset_urls_standard, :pay_now_name, :pay_now_redirect_url, :pay_over_time_asset_urls_descriptive, :pay_over_time_asset_urls_standard, :pay_over_time_name, :pay_over_time_redirect_url, :payment_method_categories, :purchase_country, :purchase_type, :redirect_url, :shipping_delay, :shipping_first_name, :shipping_last_name
|
77
|
+
end
|
78
|
+
|
79
|
+
class Multibanco < Stripe::StripeObject
|
80
|
+
attr_reader :entity, :reference, :refund_account_holder_address_city, :refund_account_holder_address_country, :refund_account_holder_address_line1, :refund_account_holder_address_line2, :refund_account_holder_address_postal_code, :refund_account_holder_address_state, :refund_account_holder_name, :refund_iban
|
81
|
+
end
|
82
|
+
|
83
|
+
class Owner < Stripe::StripeObject
|
84
|
+
class Address < Stripe::StripeObject
|
85
|
+
attr_reader :city, :country, :line1, :line2, :postal_code, :state
|
86
|
+
end
|
87
|
+
|
88
|
+
class VerifiedAddress < Stripe::StripeObject
|
89
|
+
attr_reader :city, :country, :line1, :line2, :postal_code, :state
|
90
|
+
end
|
91
|
+
attr_reader :address, :email, :name, :phone, :verified_address, :verified_email, :verified_name, :verified_phone
|
92
|
+
end
|
93
|
+
|
94
|
+
class P24 < Stripe::StripeObject
|
95
|
+
attr_reader :reference
|
96
|
+
end
|
97
|
+
|
98
|
+
class Paypal < Stripe::StripeObject
|
99
|
+
attr_reader :billing_agreement, :fingerprint, :payer_id, :reference_id, :reference_transaction_amount, :reference_transaction_charged, :statement_descriptor, :transaction_id, :verified_email
|
100
|
+
end
|
101
|
+
|
102
|
+
class Receiver < Stripe::StripeObject
|
103
|
+
attr_reader :address, :amount_charged, :amount_received, :amount_returned, :refund_attributes_method, :refund_attributes_status
|
104
|
+
end
|
105
|
+
|
106
|
+
class Redirect < Stripe::StripeObject
|
107
|
+
attr_reader :failure_reason, :return_url, :status, :url
|
108
|
+
end
|
109
|
+
|
110
|
+
class SepaCreditTransfer < Stripe::StripeObject
|
111
|
+
attr_reader :bank_name, :bic, :iban, :refund_account_holder_address_city, :refund_account_holder_address_country, :refund_account_holder_address_line1, :refund_account_holder_address_line2, :refund_account_holder_address_postal_code, :refund_account_holder_address_state, :refund_account_holder_name, :refund_iban
|
112
|
+
end
|
113
|
+
|
114
|
+
class SepaDebit < Stripe::StripeObject
|
115
|
+
attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate_reference, :mandate_url
|
116
|
+
end
|
117
|
+
|
118
|
+
class Sofort < Stripe::StripeObject
|
119
|
+
attr_reader :bank_code, :bank_name, :bic, :country, :iban_last4, :preferred_language, :statement_descriptor
|
120
|
+
end
|
121
|
+
|
122
|
+
class SourceOrder < Stripe::StripeObject
|
123
|
+
class Item < Stripe::StripeObject
|
124
|
+
attr_reader :amount, :currency, :description, :parent, :quantity, :type
|
125
|
+
end
|
126
|
+
|
127
|
+
class Shipping < Stripe::StripeObject
|
128
|
+
class Address < Stripe::StripeObject
|
129
|
+
attr_reader :city, :country, :line1, :line2, :postal_code, :state
|
130
|
+
end
|
131
|
+
attr_reader :address, :carrier, :name, :phone, :tracking_number
|
132
|
+
end
|
133
|
+
attr_reader :amount, :currency, :email, :items, :shipping
|
134
|
+
end
|
135
|
+
|
136
|
+
class ThreeDSecure < Stripe::StripeObject
|
137
|
+
attr_reader :address_line1_check, :address_zip_check, :authenticated, :brand, :card, :country, :customer, :cvc_check, :description, :dynamic_last4, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :name, :three_d_secure, :tokenization_method
|
138
|
+
end
|
139
|
+
|
140
|
+
class Wechat < Stripe::StripeObject
|
141
|
+
attr_reader :prepay_id, :qr_code_url, :statement_descriptor
|
142
|
+
end
|
143
|
+
# Attribute for field ach_credit_transfer
|
144
|
+
attr_reader :ach_credit_transfer
|
145
|
+
# Attribute for field ach_debit
|
146
|
+
attr_reader :ach_debit
|
147
|
+
# Attribute for field acss_debit
|
148
|
+
attr_reader :acss_debit
|
149
|
+
# Attribute for field alipay
|
150
|
+
attr_reader :alipay
|
151
|
+
# A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources.
|
152
|
+
attr_reader :amount
|
153
|
+
# Attribute for field au_becs_debit
|
154
|
+
attr_reader :au_becs_debit
|
155
|
+
# Attribute for field bancontact
|
156
|
+
attr_reader :bancontact
|
157
|
+
# Attribute for field card
|
158
|
+
attr_reader :card
|
159
|
+
# Attribute for field card_present
|
160
|
+
attr_reader :card_present
|
161
|
+
# The client secret of the source. Used for client-side retrieval using a publishable key.
|
162
|
+
attr_reader :client_secret
|
163
|
+
# Attribute for field code_verification
|
164
|
+
attr_reader :code_verification
|
165
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
166
|
+
attr_reader :created
|
167
|
+
# Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.
|
168
|
+
attr_reader :currency
|
169
|
+
# The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
|
170
|
+
attr_reader :customer
|
171
|
+
# Attribute for field eps
|
172
|
+
attr_reader :eps
|
173
|
+
# The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.
|
174
|
+
attr_reader :flow
|
175
|
+
# Attribute for field giropay
|
176
|
+
attr_reader :giropay
|
177
|
+
# Unique identifier for the object.
|
178
|
+
attr_reader :id
|
179
|
+
# Attribute for field ideal
|
180
|
+
attr_reader :ideal
|
181
|
+
# Attribute for field klarna
|
182
|
+
attr_reader :klarna
|
183
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
184
|
+
attr_reader :livemode
|
185
|
+
# 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.
|
186
|
+
attr_reader :metadata
|
187
|
+
# Attribute for field multibanco
|
188
|
+
attr_reader :multibanco
|
189
|
+
# String representing the object's type. Objects of the same type share the same value.
|
190
|
+
attr_reader :object
|
191
|
+
# Information about the owner of the payment instrument that may be used or required by particular source types.
|
192
|
+
attr_reader :owner
|
193
|
+
# Attribute for field p24
|
194
|
+
attr_reader :p24
|
195
|
+
# Attribute for field paypal
|
196
|
+
attr_reader :paypal
|
197
|
+
# Attribute for field receiver
|
198
|
+
attr_reader :receiver
|
199
|
+
# Attribute for field redirect
|
200
|
+
attr_reader :redirect
|
201
|
+
# Attribute for field sepa_credit_transfer
|
202
|
+
attr_reader :sepa_credit_transfer
|
203
|
+
# Attribute for field sepa_debit
|
204
|
+
attr_reader :sepa_debit
|
205
|
+
# Attribute for field sofort
|
206
|
+
attr_reader :sofort
|
207
|
+
# Attribute for field source_order
|
208
|
+
attr_reader :source_order
|
209
|
+
# Extra information about a source. This will appear on your customer's statement every time you charge the source.
|
210
|
+
attr_reader :statement_descriptor
|
211
|
+
# The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.
|
212
|
+
attr_reader :status
|
213
|
+
# Attribute for field three_d_secure
|
214
|
+
attr_reader :three_d_secure
|
215
|
+
# The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.
|
216
|
+
attr_reader :type
|
217
|
+
# Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
|
218
|
+
attr_reader :usage
|
219
|
+
# Attribute for field wechat
|
220
|
+
attr_reader :wechat
|
221
|
+
|
27
222
|
# Creates a new source object.
|
28
223
|
def self.create(params = {}, opts = {})
|
29
224
|
request_stripe_object(method: :post, path: "/v1/sources", params: params, opts: opts)
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
# Source mandate notifications should be created when a notification related to
|
6
|
+
# a source mandate must be sent to the payer. They will trigger a webhook or
|
7
|
+
# deliver an email to the customer.
|
8
|
+
class SourceMandateNotification < APIResource
|
9
|
+
OBJECT_NAME = "source_mandate_notification"
|
10
|
+
def self.object_name
|
11
|
+
"source_mandate_notification"
|
12
|
+
end
|
13
|
+
|
14
|
+
class AcssDebit < Stripe::StripeObject
|
15
|
+
attr_reader :statement_descriptor
|
16
|
+
end
|
17
|
+
|
18
|
+
class BacsDebit < Stripe::StripeObject
|
19
|
+
attr_reader :last4
|
20
|
+
end
|
21
|
+
|
22
|
+
class SepaDebit < Stripe::StripeObject
|
23
|
+
attr_reader :creditor_identifier, :last4, :mandate_reference
|
24
|
+
end
|
25
|
+
# Attribute for field acss_debit
|
26
|
+
attr_reader :acss_debit
|
27
|
+
# A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`.
|
28
|
+
attr_reader :amount
|
29
|
+
# Attribute for field bacs_debit
|
30
|
+
attr_reader :bacs_debit
|
31
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
32
|
+
attr_reader :created
|
33
|
+
# Unique identifier for the object.
|
34
|
+
attr_reader :id
|
35
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
36
|
+
attr_reader :livemode
|
37
|
+
# String representing the object's type. Objects of the same type share the same value.
|
38
|
+
attr_reader :object
|
39
|
+
# The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.
|
40
|
+
attr_reader :reason
|
41
|
+
# Attribute for field sepa_debit
|
42
|
+
attr_reader :sepa_debit
|
43
|
+
# `Source` objects allow you to accept a variety of payment methods. They
|
44
|
+
# represent a customer's payment instrument, and can be used with the Stripe API
|
45
|
+
# just like a `Card` object: once chargeable, they can be charged, or can be
|
46
|
+
# attached to customers.
|
47
|
+
#
|
48
|
+
# Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).
|
49
|
+
# We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).
|
50
|
+
# This newer API provides access to our latest features and payment method types.
|
51
|
+
#
|
52
|
+
# Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
|
53
|
+
attr_reader :source
|
54
|
+
# The status of the mandate notification. Valid statuses are `pending` or `submitted`.
|
55
|
+
attr_reader :status
|
56
|
+
# The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`.
|
57
|
+
attr_reader :type
|
58
|
+
end
|
59
|
+
end
|
@@ -11,5 +11,53 @@ module Stripe
|
|
11
11
|
def self.object_name
|
12
12
|
"source_transaction"
|
13
13
|
end
|
14
|
+
|
15
|
+
class AchCreditTransfer < Stripe::StripeObject
|
16
|
+
attr_reader :customer_data, :fingerprint, :last4, :routing_number
|
17
|
+
end
|
18
|
+
|
19
|
+
class ChfCreditTransfer < Stripe::StripeObject
|
20
|
+
attr_reader :reference, :sender_address_country, :sender_address_line1, :sender_iban, :sender_name
|
21
|
+
end
|
22
|
+
|
23
|
+
class GbpCreditTransfer < Stripe::StripeObject
|
24
|
+
attr_reader :fingerprint, :funding_method, :last4, :reference, :sender_account_number, :sender_name, :sender_sort_code
|
25
|
+
end
|
26
|
+
|
27
|
+
class PaperCheck < Stripe::StripeObject
|
28
|
+
attr_reader :available_at, :invoices
|
29
|
+
end
|
30
|
+
|
31
|
+
class SepaCreditTransfer < Stripe::StripeObject
|
32
|
+
attr_reader :reference, :sender_iban, :sender_name
|
33
|
+
end
|
34
|
+
# Attribute for field ach_credit_transfer
|
35
|
+
attr_reader :ach_credit_transfer
|
36
|
+
# A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver.
|
37
|
+
attr_reader :amount
|
38
|
+
# Attribute for field chf_credit_transfer
|
39
|
+
attr_reader :chf_credit_transfer
|
40
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
41
|
+
attr_reader :created
|
42
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
43
|
+
attr_reader :currency
|
44
|
+
# Attribute for field gbp_credit_transfer
|
45
|
+
attr_reader :gbp_credit_transfer
|
46
|
+
# Unique identifier for the object.
|
47
|
+
attr_reader :id
|
48
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
49
|
+
attr_reader :livemode
|
50
|
+
# String representing the object's type. Objects of the same type share the same value.
|
51
|
+
attr_reader :object
|
52
|
+
# Attribute for field paper_check
|
53
|
+
attr_reader :paper_check
|
54
|
+
# Attribute for field sepa_credit_transfer
|
55
|
+
attr_reader :sepa_credit_transfer
|
56
|
+
# The ID of the source this transaction is attached to.
|
57
|
+
attr_reader :source
|
58
|
+
# The status of the transaction, one of `succeeded`, `pending`, or `failed`.
|
59
|
+
attr_reader :status
|
60
|
+
# The type of source this transaction is attached to.
|
61
|
+
attr_reader :type
|
14
62
|
end
|
15
63
|
end
|
@@ -16,6 +16,220 @@ module Stripe
|
|
16
16
|
"subscription"
|
17
17
|
end
|
18
18
|
|
19
|
+
class AutomaticTax < Stripe::StripeObject
|
20
|
+
class Liability < Stripe::StripeObject
|
21
|
+
attr_reader :account, :type
|
22
|
+
end
|
23
|
+
attr_reader :disabled_reason, :enabled, :liability
|
24
|
+
end
|
25
|
+
|
26
|
+
class BillingCycleAnchorConfig < Stripe::StripeObject
|
27
|
+
attr_reader :day_of_month, :hour, :minute, :month, :second
|
28
|
+
end
|
29
|
+
|
30
|
+
class BillingThresholds < Stripe::StripeObject
|
31
|
+
attr_reader :amount_gte, :reset_billing_cycle_anchor
|
32
|
+
end
|
33
|
+
|
34
|
+
class CancellationDetails < Stripe::StripeObject
|
35
|
+
attr_reader :comment, :feedback, :reason
|
36
|
+
end
|
37
|
+
|
38
|
+
class InvoiceSettings < Stripe::StripeObject
|
39
|
+
class Issuer < Stripe::StripeObject
|
40
|
+
attr_reader :account, :type
|
41
|
+
end
|
42
|
+
attr_reader :account_tax_ids, :issuer
|
43
|
+
end
|
44
|
+
|
45
|
+
class LastPriceMigrationError < Stripe::StripeObject
|
46
|
+
class FailedTransition < Stripe::StripeObject
|
47
|
+
attr_reader :source_price, :target_price
|
48
|
+
end
|
49
|
+
attr_reader :errored_at, :failed_transitions, :type
|
50
|
+
end
|
51
|
+
|
52
|
+
class PauseCollection < Stripe::StripeObject
|
53
|
+
attr_reader :behavior, :resumes_at
|
54
|
+
end
|
55
|
+
|
56
|
+
class PaymentSettings < Stripe::StripeObject
|
57
|
+
class PaymentMethodOptions < Stripe::StripeObject
|
58
|
+
class AcssDebit < Stripe::StripeObject
|
59
|
+
class MandateOptions < Stripe::StripeObject
|
60
|
+
attr_reader :transaction_type
|
61
|
+
end
|
62
|
+
attr_reader :mandate_options, :verification_method
|
63
|
+
end
|
64
|
+
|
65
|
+
class Bancontact < Stripe::StripeObject
|
66
|
+
attr_reader :preferred_language
|
67
|
+
end
|
68
|
+
|
69
|
+
class Card < Stripe::StripeObject
|
70
|
+
class MandateOptions < Stripe::StripeObject
|
71
|
+
attr_reader :amount, :amount_type, :description
|
72
|
+
end
|
73
|
+
attr_reader :mandate_options, :network, :request_three_d_secure
|
74
|
+
end
|
75
|
+
|
76
|
+
class CustomerBalance < Stripe::StripeObject
|
77
|
+
class BankTransfer < Stripe::StripeObject
|
78
|
+
class EuBankTransfer < Stripe::StripeObject
|
79
|
+
attr_reader :country
|
80
|
+
end
|
81
|
+
attr_reader :eu_bank_transfer, :type
|
82
|
+
end
|
83
|
+
attr_reader :bank_transfer, :funding_type
|
84
|
+
end
|
85
|
+
|
86
|
+
class IdBankTransfer < Stripe::StripeObject; end
|
87
|
+
class Konbini < Stripe::StripeObject; end
|
88
|
+
class SepaDebit < Stripe::StripeObject; end
|
89
|
+
|
90
|
+
class UsBankAccount < Stripe::StripeObject
|
91
|
+
class FinancialConnections < Stripe::StripeObject
|
92
|
+
class Filters < Stripe::StripeObject
|
93
|
+
attr_reader :account_subcategories, :institution
|
94
|
+
end
|
95
|
+
attr_reader :filters, :permissions, :prefetch
|
96
|
+
end
|
97
|
+
attr_reader :financial_connections, :verification_method
|
98
|
+
end
|
99
|
+
attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account
|
100
|
+
end
|
101
|
+
attr_reader :payment_method_options, :payment_method_types, :save_default_payment_method
|
102
|
+
end
|
103
|
+
|
104
|
+
class PendingInvoiceItemInterval < Stripe::StripeObject
|
105
|
+
attr_reader :interval, :interval_count
|
106
|
+
end
|
107
|
+
|
108
|
+
class PendingUpdate < Stripe::StripeObject
|
109
|
+
attr_reader :billing_cycle_anchor, :expires_at, :prebilling_iterations, :subscription_items, :trial_end, :trial_from_plan
|
110
|
+
end
|
111
|
+
|
112
|
+
class Prebilling < Stripe::StripeObject
|
113
|
+
attr_reader :invoice, :period_end, :period_start, :update_behavior
|
114
|
+
end
|
115
|
+
|
116
|
+
class TransferData < Stripe::StripeObject
|
117
|
+
attr_reader :amount_percent, :destination
|
118
|
+
end
|
119
|
+
|
120
|
+
class TrialSettings < Stripe::StripeObject
|
121
|
+
class EndBehavior < Stripe::StripeObject
|
122
|
+
attr_reader :missing_payment_method
|
123
|
+
end
|
124
|
+
attr_reader :end_behavior
|
125
|
+
end
|
126
|
+
# ID of the Connect Application that created the subscription.
|
127
|
+
attr_reader :application
|
128
|
+
# 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.
|
129
|
+
attr_reader :application_fee_percent
|
130
|
+
# Attribute for field automatic_tax
|
131
|
+
attr_reader :automatic_tax
|
132
|
+
# The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
|
133
|
+
attr_reader :billing_cycle_anchor
|
134
|
+
# The fixed values used to calculate the `billing_cycle_anchor`.
|
135
|
+
attr_reader :billing_cycle_anchor_config
|
136
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
137
|
+
attr_reader :billing_thresholds
|
138
|
+
# A date in the future at which the subscription will automatically get canceled
|
139
|
+
attr_reader :cancel_at
|
140
|
+
# Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
|
141
|
+
attr_reader :cancel_at_period_end
|
142
|
+
# If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
|
143
|
+
attr_reader :canceled_at
|
144
|
+
# Details about why this subscription was cancelled
|
145
|
+
attr_reader :cancellation_details
|
146
|
+
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
147
|
+
attr_reader :collection_method
|
148
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
149
|
+
attr_reader :created
|
150
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
151
|
+
attr_reader :currency
|
152
|
+
# End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
|
153
|
+
attr_reader :current_period_end
|
154
|
+
# Start of the current period that the subscription has been invoiced for.
|
155
|
+
attr_reader :current_period_start
|
156
|
+
# ID of the customer who owns the subscription.
|
157
|
+
attr_reader :customer
|
158
|
+
# Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.
|
159
|
+
attr_reader :days_until_due
|
160
|
+
# ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
|
161
|
+
attr_reader :default_payment_method
|
162
|
+
# ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
|
163
|
+
attr_reader :default_source
|
164
|
+
# The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
|
165
|
+
attr_reader :default_tax_rates
|
166
|
+
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
167
|
+
attr_reader :description
|
168
|
+
# Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
169
|
+
attr_reader :discount
|
170
|
+
# The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
171
|
+
attr_reader :discounts
|
172
|
+
# If the subscription has ended, the date the subscription ended.
|
173
|
+
attr_reader :ended_at
|
174
|
+
# Unique identifier for the object.
|
175
|
+
attr_reader :id
|
176
|
+
# Attribute for field invoice_settings
|
177
|
+
attr_reader :invoice_settings
|
178
|
+
# List of subscription items, each with an attached price.
|
179
|
+
attr_reader :items
|
180
|
+
# Details of the most recent price migration that failed for the subscription.
|
181
|
+
attr_reader :last_price_migration_error
|
182
|
+
# The most recent invoice this subscription has generated.
|
183
|
+
attr_reader :latest_invoice
|
184
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
185
|
+
attr_reader :livemode
|
186
|
+
# 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.
|
187
|
+
attr_reader :metadata
|
188
|
+
# Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.
|
189
|
+
attr_reader :next_pending_invoice_item_invoice
|
190
|
+
# String representing the object's type. Objects of the same type share the same value.
|
191
|
+
attr_reader :object
|
192
|
+
# The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.
|
193
|
+
attr_reader :on_behalf_of
|
194
|
+
# 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).
|
195
|
+
attr_reader :pause_collection
|
196
|
+
# Payment settings passed on to invoices created by the subscription.
|
197
|
+
attr_reader :payment_settings
|
198
|
+
# Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
|
199
|
+
attr_reader :pending_invoice_item_interval
|
200
|
+
# You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).
|
201
|
+
attr_reader :pending_setup_intent
|
202
|
+
# If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
|
203
|
+
attr_reader :pending_update
|
204
|
+
# Time period and invoice for a Subscription billed in advance.
|
205
|
+
attr_reader :prebilling
|
206
|
+
# The schedule attached to the subscription
|
207
|
+
attr_reader :schedule
|
208
|
+
# Date when the subscription was first created. The date might differ from the `created` date due to backdating.
|
209
|
+
attr_reader :start_date
|
210
|
+
# Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`.
|
211
|
+
#
|
212
|
+
# For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated.
|
213
|
+
#
|
214
|
+
# A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
|
215
|
+
#
|
216
|
+
# A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged.
|
217
|
+
#
|
218
|
+
# If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).
|
219
|
+
#
|
220
|
+
# If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
|
221
|
+
attr_reader :status
|
222
|
+
# ID of the test clock this subscription belongs to.
|
223
|
+
attr_reader :test_clock
|
224
|
+
# The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
225
|
+
attr_reader :transfer_data
|
226
|
+
# If the subscription has a trial, the end of that trial.
|
227
|
+
attr_reader :trial_end
|
228
|
+
# Settings related to subscription trials.
|
229
|
+
attr_reader :trial_settings
|
230
|
+
# If the subscription has a trial, the beginning of that trial.
|
231
|
+
attr_reader :trial_start
|
232
|
+
|
19
233
|
# Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata).
|
20
234
|
#
|
21
235
|
# Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed.
|
@@ -21,6 +21,52 @@ module Stripe
|
|
21
21
|
operations: %i[list],
|
22
22
|
resource_plural: "usage_record_summaries"
|
23
23
|
|
24
|
+
class BillingThresholds < Stripe::StripeObject
|
25
|
+
attr_reader :usage_gte
|
26
|
+
end
|
27
|
+
|
28
|
+
class Trial < Stripe::StripeObject
|
29
|
+
attr_reader :converts_to, :type
|
30
|
+
end
|
31
|
+
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
32
|
+
attr_reader :billing_thresholds
|
33
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
34
|
+
attr_reader :created
|
35
|
+
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
36
|
+
attr_reader :discounts
|
37
|
+
# Unique identifier for the object.
|
38
|
+
attr_reader :id
|
39
|
+
# 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.
|
40
|
+
attr_reader :metadata
|
41
|
+
# String representing the object's type. Objects of the same type share the same value.
|
42
|
+
attr_reader :object
|
43
|
+
# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
|
44
|
+
#
|
45
|
+
# Plans define the base price, currency, and billing cycle for recurring purchases of products.
|
46
|
+
# [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
|
47
|
+
#
|
48
|
+
# For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
|
49
|
+
#
|
50
|
+
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
|
51
|
+
attr_reader :plan
|
52
|
+
# Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
|
53
|
+
# [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
|
54
|
+
#
|
55
|
+
# For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
|
56
|
+
#
|
57
|
+
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
|
58
|
+
attr_reader :price
|
59
|
+
# The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.
|
60
|
+
attr_reader :quantity
|
61
|
+
# The `subscription` this `subscription_item` belongs to.
|
62
|
+
attr_reader :subscription
|
63
|
+
# The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
64
|
+
attr_reader :tax_rates
|
65
|
+
# Options that configure the trial on the subscription item.
|
66
|
+
attr_reader :trial
|
67
|
+
# Always true for a deleted object
|
68
|
+
attr_reader :deleted
|
69
|
+
|
24
70
|
# Adds a new item to an existing subscription. No existing items will be changed or replaced.
|
25
71
|
def self.create(params = {}, opts = {})
|
26
72
|
request_stripe_object(
|