stripe 19.6.0.pre.alpha.1 → 19.6.0.pre.alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stripe/object_types.rb +2 -1
- data/lib/stripe/params/account_create_params.rb +14 -1
- data/lib/stripe/params/account_update_params.rb +14 -1
- data/lib/stripe/params/delegated_checkout/requested_session_confirm_params.rb +4 -0
- data/lib/stripe/params/invoice_create_params.rb +13 -0
- data/lib/stripe/params/invoice_item_create_params.rb +13 -0
- data/lib/stripe/params/payment_plan_create_params.rb +128 -0
- data/lib/stripe/params/payment_plan_list_params.rb +25 -0
- data/lib/stripe/params/payment_plan_retrieve_params.rb +13 -0
- data/lib/stripe/params/payment_plan_update_params.rb +105 -0
- data/lib/stripe/params/price_create_params.rb +19 -0
- data/lib/stripe/params/product_create_params.rb +47 -2
- data/lib/stripe/params/tax/calculation_create_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_create_params.rb +4 -0
- data/lib/stripe/params/v2/billing/contract_update_params.rb +22 -4
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +47 -1
- data/lib/stripe/params/v2/money_management/transaction_update_params.rb +21 -0
- data/lib/stripe/params.rb +10 -0
- data/lib/stripe/resources/account.rb +16 -0
- data/lib/stripe/resources/billing/alert.rb +46 -14
- data/lib/stripe/resources/billing/credit_balance_summary.rb +32 -6
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +46 -14
- data/lib/stripe/resources/billing/credit_grant.rb +10 -2
- data/lib/stripe/resources/billing/{feedback_options.rb → feedback_option.rb} +3 -3
- data/lib/stripe/resources/billing_portal/session.rb +16 -0
- data/lib/stripe/resources/checkout/session.rb +5 -2
- data/lib/stripe/resources/credit_note_line_item.rb +1 -1
- data/lib/stripe/resources/customer_session.rb +16 -0
- data/lib/stripe/resources/invoice.rb +18 -0
- data/lib/stripe/resources/invoice_item.rb +24 -2
- data/lib/stripe/resources/invoice_line_item.rb +9 -3
- data/lib/stripe/resources/issuing/authorization.rb +261 -34
- data/lib/stripe/resources/issuing/transaction.rb +150 -49
- data/lib/stripe/resources/payment_attempt_record.rb +1 -3
- data/lib/stripe/resources/payment_plan.rb +213 -0
- data/lib/stripe/resources/payment_record.rb +1 -3
- data/lib/stripe/resources/plan.rb +7 -4
- data/lib/stripe/resources/price.rb +33 -8
- data/lib/stripe/resources/quote_preview_invoice.rb +16 -0
- data/lib/stripe/resources/subscription.rb +2 -0
- data/lib/stripe/resources/tax/registration.rb +432 -27
- data/lib/stripe/resources/v2/billing/contract.rb +4 -0
- data/lib/stripe/resources/v2/data/analytics/metric_query_result.rb +1 -1
- data/lib/stripe/resources/v2/money_management/financial_account_statement.rb +9 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +72 -2
- data/lib/stripe/resources/v2/money_management/transaction.rb +3 -0
- data/lib/stripe/resources.rb +4 -2
- data/lib/stripe/services/payment_plan_service.rb +50 -0
- data/lib/stripe/services/v1_services.rb +2 -1
- data/lib/stripe/services/v2/money_management/transaction_service.rb +11 -0
- data/lib/stripe/services.rb +2 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +1947 -143
- metadata +10 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e747ec38e78a2cce5154bc5dd8680438e30cb711bd330e7ebb0621bfbf9ada96
|
|
4
|
+
data.tar.gz: 8f66e5168e6469a73a2ff77581de96d70e08e3d4859e51654d5c59e523f2d006
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a72057b85f4ed9cbc8fa5d24a829fe51f2348d6d4334edd9b64fd0dbdd82f691e488b64b9990439d72d3744c15e7d33753f7ac90faaeae6a24f69998ae310471
|
|
7
|
+
data.tar.gz: 34c2b31b6bf1ed98cbf6655e1024f349941b98780d4532e2c3f46559858236cf4d122668c149fb3fb7dae7abff47d417fe1a832f2ffdf5c2d4d881d620f18e69
|
data/lib/stripe/object_types.rb
CHANGED
|
@@ -36,7 +36,7 @@ module Stripe
|
|
|
36
36
|
Billing::CreditBalanceSummary.object_name => Billing::CreditBalanceSummary,
|
|
37
37
|
Billing::CreditBalanceTransaction.object_name => Billing::CreditBalanceTransaction,
|
|
38
38
|
Billing::CreditGrant.object_name => Billing::CreditGrant,
|
|
39
|
-
Billing::
|
|
39
|
+
Billing::FeedbackOption.object_name => Billing::FeedbackOption,
|
|
40
40
|
Billing::Meter.object_name => Billing::Meter,
|
|
41
41
|
Billing::MeterEvent.object_name => Billing::MeterEvent,
|
|
42
42
|
Billing::MeterEventAdjustment.object_name => Billing::MeterEventAdjustment,
|
|
@@ -134,6 +134,7 @@ module Stripe
|
|
|
134
134
|
PaymentMethodBalance.object_name => PaymentMethodBalance,
|
|
135
135
|
PaymentMethodConfiguration.object_name => PaymentMethodConfiguration,
|
|
136
136
|
PaymentMethodDomain.object_name => PaymentMethodDomain,
|
|
137
|
+
PaymentPlan.object_name => PaymentPlan,
|
|
137
138
|
PaymentRecord.object_name => PaymentRecord,
|
|
138
139
|
Payout.object_name => Payout,
|
|
139
140
|
Person.object_name => Person,
|
|
@@ -2543,6 +2543,15 @@ module Stripe
|
|
|
2543
2543
|
@tos_acceptance = tos_acceptance
|
|
2544
2544
|
end
|
|
2545
2545
|
end
|
|
2546
|
+
|
|
2547
|
+
class WechatPayPayments < ::Stripe::RequestParams
|
|
2548
|
+
# The domains of the user's mobile web checkout pages for WeChat Pay payments. At most 4 domains are allowed.
|
|
2549
|
+
attr_accessor :mobile_web_domains
|
|
2550
|
+
|
|
2551
|
+
def initialize(mobile_web_domains: nil)
|
|
2552
|
+
@mobile_web_domains = mobile_web_domains
|
|
2553
|
+
end
|
|
2554
|
+
end
|
|
2546
2555
|
# Settings specific to Bacs Direct Debit.
|
|
2547
2556
|
attr_accessor :bacs_debit_payments
|
|
2548
2557
|
# Settings specific to bank BCA onboarding for Indonesia bank transfers payments method.
|
|
@@ -2569,6 +2578,8 @@ module Stripe
|
|
|
2569
2578
|
attr_accessor :tax_forms
|
|
2570
2579
|
# Settings specific to the account's Treasury FinancialAccounts.
|
|
2571
2580
|
attr_accessor :treasury
|
|
2581
|
+
# Settings specific to the WeChat Pay payments method.
|
|
2582
|
+
attr_accessor :wechat_pay_payments
|
|
2572
2583
|
|
|
2573
2584
|
def initialize(
|
|
2574
2585
|
bacs_debit_payments: nil,
|
|
@@ -2583,7 +2594,8 @@ module Stripe
|
|
|
2583
2594
|
paypay_payments: nil,
|
|
2584
2595
|
smart_disputes: nil,
|
|
2585
2596
|
tax_forms: nil,
|
|
2586
|
-
treasury: nil
|
|
2597
|
+
treasury: nil,
|
|
2598
|
+
wechat_pay_payments: nil
|
|
2587
2599
|
)
|
|
2588
2600
|
@bacs_debit_payments = bacs_debit_payments
|
|
2589
2601
|
@bank_bca_onboarding = bank_bca_onboarding
|
|
@@ -2598,6 +2610,7 @@ module Stripe
|
|
|
2598
2610
|
@smart_disputes = smart_disputes
|
|
2599
2611
|
@tax_forms = tax_forms
|
|
2600
2612
|
@treasury = treasury
|
|
2613
|
+
@wechat_pay_payments = wechat_pay_payments
|
|
2601
2614
|
end
|
|
2602
2615
|
end
|
|
2603
2616
|
|
|
@@ -2498,6 +2498,15 @@ module Stripe
|
|
|
2498
2498
|
@tos_acceptance = tos_acceptance
|
|
2499
2499
|
end
|
|
2500
2500
|
end
|
|
2501
|
+
|
|
2502
|
+
class WechatPayPayments < ::Stripe::RequestParams
|
|
2503
|
+
# The domains of the user's mobile web checkout pages for WeChat Pay payments. At most 4 domains are allowed.
|
|
2504
|
+
attr_accessor :mobile_web_domains
|
|
2505
|
+
|
|
2506
|
+
def initialize(mobile_web_domains: nil)
|
|
2507
|
+
@mobile_web_domains = mobile_web_domains
|
|
2508
|
+
end
|
|
2509
|
+
end
|
|
2501
2510
|
# Settings specific to Bacs Direct Debit payments.
|
|
2502
2511
|
attr_accessor :bacs_debit_payments
|
|
2503
2512
|
# Settings specific to bank BCA onboarding for Indonesia bank transfers payments method.
|
|
@@ -2526,6 +2535,8 @@ module Stripe
|
|
|
2526
2535
|
attr_accessor :tax_forms
|
|
2527
2536
|
# Settings specific to the account's Treasury FinancialAccounts.
|
|
2528
2537
|
attr_accessor :treasury
|
|
2538
|
+
# Settings specific to the WeChat Pay payments method.
|
|
2539
|
+
attr_accessor :wechat_pay_payments
|
|
2529
2540
|
|
|
2530
2541
|
def initialize(
|
|
2531
2542
|
bacs_debit_payments: nil,
|
|
@@ -2541,7 +2552,8 @@ module Stripe
|
|
|
2541
2552
|
sepa_debit_payments: nil,
|
|
2542
2553
|
smart_disputes: nil,
|
|
2543
2554
|
tax_forms: nil,
|
|
2544
|
-
treasury: nil
|
|
2555
|
+
treasury: nil,
|
|
2556
|
+
wechat_pay_payments: nil
|
|
2545
2557
|
)
|
|
2546
2558
|
@bacs_debit_payments = bacs_debit_payments
|
|
2547
2559
|
@bank_bca_onboarding = bank_bca_onboarding
|
|
@@ -2557,6 +2569,7 @@ module Stripe
|
|
|
2557
2569
|
@smart_disputes = smart_disputes
|
|
2558
2570
|
@tax_forms = tax_forms
|
|
2559
2571
|
@treasury = treasury
|
|
2572
|
+
@wechat_pay_payments = wechat_pay_payments
|
|
2560
2573
|
end
|
|
2561
2574
|
end
|
|
2562
2575
|
|
|
@@ -145,6 +145,8 @@ module Stripe
|
|
|
145
145
|
attr_accessor :return_url
|
|
146
146
|
# Risk details/signals associated with the requested session
|
|
147
147
|
attr_accessor :risk_details
|
|
148
|
+
# A SharedPaymentIssuedToken (`spt_...`) previously issued to this buyer. Mutually exclusive with `payment_method` and `payment_method_data`.
|
|
149
|
+
attr_accessor :shared_payment_issued_token
|
|
148
150
|
# Set to true when using Stripe.js, iOS, or Android client-side SDKs to handle next actions.
|
|
149
151
|
attr_accessor :use_stripe_sdk
|
|
150
152
|
|
|
@@ -156,6 +158,7 @@ module Stripe
|
|
|
156
158
|
payment_method: nil,
|
|
157
159
|
return_url: nil,
|
|
158
160
|
risk_details: nil,
|
|
161
|
+
shared_payment_issued_token: nil,
|
|
159
162
|
use_stripe_sdk: nil
|
|
160
163
|
)
|
|
161
164
|
@affiliate_attribution = affiliate_attribution
|
|
@@ -165,6 +168,7 @@ module Stripe
|
|
|
165
168
|
@payment_method = payment_method
|
|
166
169
|
@return_url = return_url
|
|
167
170
|
@risk_details = risk_details
|
|
171
|
+
@shared_payment_issued_token = shared_payment_issued_token
|
|
168
172
|
@use_stripe_sdk = use_stripe_sdk
|
|
169
173
|
end
|
|
170
174
|
end
|
|
@@ -123,6 +123,15 @@ module Stripe
|
|
|
123
123
|
end
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
+
class ManagedPayments < ::Stripe::RequestParams
|
|
127
|
+
# Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution.
|
|
128
|
+
attr_accessor :enabled
|
|
129
|
+
|
|
130
|
+
def initialize(enabled: nil)
|
|
131
|
+
@enabled = enabled
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
126
135
|
class PaymentSettings < ::Stripe::RequestParams
|
|
127
136
|
class PaymentMethodOptions < ::Stripe::RequestParams
|
|
128
137
|
class AcssDebit < ::Stripe::RequestParams
|
|
@@ -659,6 +668,8 @@ module Stripe
|
|
|
659
668
|
attr_accessor :from_invoice
|
|
660
669
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
661
670
|
attr_accessor :issuer
|
|
671
|
+
# Settings for Managed Payments for this invoice.
|
|
672
|
+
attr_accessor :managed_payments
|
|
662
673
|
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
663
674
|
attr_accessor :metadata
|
|
664
675
|
# Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
|
|
@@ -707,6 +718,7 @@ module Stripe
|
|
|
707
718
|
footer: nil,
|
|
708
719
|
from_invoice: nil,
|
|
709
720
|
issuer: nil,
|
|
721
|
+
managed_payments: nil,
|
|
710
722
|
metadata: nil,
|
|
711
723
|
number: nil,
|
|
712
724
|
on_behalf_of: nil,
|
|
@@ -743,6 +755,7 @@ module Stripe
|
|
|
743
755
|
@footer = footer
|
|
744
756
|
@from_invoice = from_invoice
|
|
745
757
|
@issuer = issuer
|
|
758
|
+
@managed_payments = managed_payments
|
|
746
759
|
@metadata = metadata
|
|
747
760
|
@number = number
|
|
748
761
|
@on_behalf_of = on_behalf_of
|
|
@@ -46,6 +46,15 @@ module Stripe
|
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
class ManagedPayments < ::Stripe::RequestParams
|
|
50
|
+
# Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution.
|
|
51
|
+
attr_accessor :enabled
|
|
52
|
+
|
|
53
|
+
def initialize(enabled: nil)
|
|
54
|
+
@enabled = enabled
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
49
58
|
class Period < ::Stripe::RequestParams
|
|
50
59
|
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
51
60
|
attr_accessor :end
|
|
@@ -115,6 +124,8 @@ module Stripe
|
|
|
115
124
|
attr_accessor :expand
|
|
116
125
|
# The ID of an existing invoice to add this invoice item to. For subscription invoices, when left blank, the invoice item will be added to the next upcoming scheduled invoice. For standalone invoices, the invoice item won't be automatically added unless you pass `pending_invoice_item_behavior: 'include'` when creating the invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
|
|
117
126
|
attr_accessor :invoice
|
|
127
|
+
# Settings for Managed Payments for this invoice item.
|
|
128
|
+
attr_accessor :managed_payments
|
|
118
129
|
# The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item.
|
|
119
130
|
attr_accessor :margins
|
|
120
131
|
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
@@ -150,6 +161,7 @@ module Stripe
|
|
|
150
161
|
discounts: nil,
|
|
151
162
|
expand: nil,
|
|
152
163
|
invoice: nil,
|
|
164
|
+
managed_payments: nil,
|
|
153
165
|
margins: nil,
|
|
154
166
|
metadata: nil,
|
|
155
167
|
period: nil,
|
|
@@ -172,6 +184,7 @@ module Stripe
|
|
|
172
184
|
@discounts = discounts
|
|
173
185
|
@expand = expand
|
|
174
186
|
@invoice = invoice
|
|
187
|
+
@managed_payments = managed_payments
|
|
175
188
|
@margins = margins
|
|
176
189
|
@metadata = metadata
|
|
177
190
|
@period = period
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
class PaymentPlanCreateParams < ::Stripe::RequestParams
|
|
6
|
+
class CollectsOn < ::Stripe::RequestParams
|
|
7
|
+
class InvoiceDetails < ::Stripe::RequestParams
|
|
8
|
+
# The ID of the invoice.
|
|
9
|
+
attr_accessor :invoice
|
|
10
|
+
|
|
11
|
+
def initialize(invoice: nil)
|
|
12
|
+
@invoice = invoice
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
# Details of the invoice this payment plan collects on.
|
|
16
|
+
attr_accessor :invoice_details
|
|
17
|
+
# The type of object this plan collects on. Currently always `invoice_details`.
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
def initialize(invoice_details: nil, type: nil)
|
|
21
|
+
@invoice_details = invoice_details
|
|
22
|
+
@type = type
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
class Schedule < ::Stripe::RequestParams
|
|
27
|
+
class AmountsDue < ::Stripe::RequestParams
|
|
28
|
+
class Amount < ::Stripe::RequestParams
|
|
29
|
+
class DueDate < ::Stripe::RequestParams
|
|
30
|
+
class Relative < ::Stripe::RequestParams
|
|
31
|
+
# The number of intervals after finalization.
|
|
32
|
+
attr_accessor :count
|
|
33
|
+
# The interval unit.
|
|
34
|
+
attr_accessor :interval
|
|
35
|
+
|
|
36
|
+
def initialize(count: nil, interval: nil)
|
|
37
|
+
@count = count
|
|
38
|
+
@interval = interval
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
# Unix timestamp. Required when type is 'absolute'.
|
|
42
|
+
attr_accessor :absolute
|
|
43
|
+
# Required when type is 'relative'.
|
|
44
|
+
attr_accessor :relative
|
|
45
|
+
# Either 'absolute' or 'relative'.
|
|
46
|
+
attr_accessor :type
|
|
47
|
+
|
|
48
|
+
def initialize(absolute: nil, relative: nil, type: nil)
|
|
49
|
+
@absolute = absolute
|
|
50
|
+
@relative = relative
|
|
51
|
+
@type = type
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
class FixedAmount < ::Stripe::RequestParams
|
|
56
|
+
# The installment amount in minor units.
|
|
57
|
+
attr_accessor :amount
|
|
58
|
+
# Three-letter ISO currency code.
|
|
59
|
+
attr_accessor :currency
|
|
60
|
+
|
|
61
|
+
def initialize(amount: nil, currency: nil)
|
|
62
|
+
@amount = amount
|
|
63
|
+
@currency = currency
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
# Optional description for this installment.
|
|
67
|
+
attr_accessor :description
|
|
68
|
+
# When this installment is due.
|
|
69
|
+
attr_accessor :due_date
|
|
70
|
+
# Required when type is 'fixed_amount'.
|
|
71
|
+
attr_accessor :fixed_amount
|
|
72
|
+
# Optional stable identifier for the installment entry.
|
|
73
|
+
attr_accessor :id
|
|
74
|
+
# The installment percentage of the total. Required when type is 'percentage'.
|
|
75
|
+
attr_accessor :percentage
|
|
76
|
+
# Either 'fixed_amount' or 'percentage'.
|
|
77
|
+
attr_accessor :type
|
|
78
|
+
|
|
79
|
+
def initialize(
|
|
80
|
+
description: nil,
|
|
81
|
+
due_date: nil,
|
|
82
|
+
fixed_amount: nil,
|
|
83
|
+
id: nil,
|
|
84
|
+
percentage: nil,
|
|
85
|
+
type: nil
|
|
86
|
+
)
|
|
87
|
+
@description = description
|
|
88
|
+
@due_date = due_date
|
|
89
|
+
@fixed_amount = fixed_amount
|
|
90
|
+
@id = id
|
|
91
|
+
@percentage = percentage
|
|
92
|
+
@type = type
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
# The list of installment entries.
|
|
96
|
+
attr_accessor :amounts
|
|
97
|
+
|
|
98
|
+
def initialize(amounts: nil)
|
|
99
|
+
@amounts = amounts
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
# Required when type is 'amounts_due'.
|
|
103
|
+
attr_accessor :amounts_due
|
|
104
|
+
# The schedule type. Currently only 'amounts_due' is supported.
|
|
105
|
+
attr_accessor :type
|
|
106
|
+
|
|
107
|
+
def initialize(amounts_due: nil, type: nil)
|
|
108
|
+
@amounts_due = amounts_due
|
|
109
|
+
@type = type
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
# The invoice(s) this payment plan collects on. Currently must contain exactly one invoice entry.
|
|
113
|
+
attr_accessor :collects_on
|
|
114
|
+
# Specifies which fields in the response should be expanded.
|
|
115
|
+
attr_accessor :expand
|
|
116
|
+
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
117
|
+
attr_accessor :metadata
|
|
118
|
+
# The schedule defining how to split the invoice total into installments.
|
|
119
|
+
attr_accessor :schedule
|
|
120
|
+
|
|
121
|
+
def initialize(collects_on: nil, expand: nil, metadata: nil, schedule: nil)
|
|
122
|
+
@collects_on = collects_on
|
|
123
|
+
@expand = expand
|
|
124
|
+
@metadata = metadata
|
|
125
|
+
@schedule = schedule
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
class PaymentPlanListParams < ::Stripe::RequestParams
|
|
6
|
+
# 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.
|
|
7
|
+
attr_accessor :ending_before
|
|
8
|
+
# Specifies which fields in the response should be expanded.
|
|
9
|
+
attr_accessor :expand
|
|
10
|
+
# Only return payment plans associated with the given invoice.
|
|
11
|
+
attr_accessor :invoice
|
|
12
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
|
13
|
+
attr_accessor :limit
|
|
14
|
+
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
|
15
|
+
attr_accessor :starting_after
|
|
16
|
+
|
|
17
|
+
def initialize(ending_before: nil, expand: nil, invoice: nil, limit: nil, starting_after: nil)
|
|
18
|
+
@ending_before = ending_before
|
|
19
|
+
@expand = expand
|
|
20
|
+
@invoice = invoice
|
|
21
|
+
@limit = limit
|
|
22
|
+
@starting_after = starting_after
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
class PaymentPlanRetrieveParams < ::Stripe::RequestParams
|
|
6
|
+
# Specifies which fields in the response should be expanded.
|
|
7
|
+
attr_accessor :expand
|
|
8
|
+
|
|
9
|
+
def initialize(expand: nil)
|
|
10
|
+
@expand = expand
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
class PaymentPlanUpdateParams < ::Stripe::RequestParams
|
|
6
|
+
class Schedule < ::Stripe::RequestParams
|
|
7
|
+
class AmountsDue < ::Stripe::RequestParams
|
|
8
|
+
class Amount < ::Stripe::RequestParams
|
|
9
|
+
class DueDate < ::Stripe::RequestParams
|
|
10
|
+
class Relative < ::Stripe::RequestParams
|
|
11
|
+
# The number of intervals after finalization.
|
|
12
|
+
attr_accessor :count
|
|
13
|
+
# The interval unit.
|
|
14
|
+
attr_accessor :interval
|
|
15
|
+
|
|
16
|
+
def initialize(count: nil, interval: nil)
|
|
17
|
+
@count = count
|
|
18
|
+
@interval = interval
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
# Unix timestamp. Required when type is 'absolute'.
|
|
22
|
+
attr_accessor :absolute
|
|
23
|
+
# Required when type is 'relative'.
|
|
24
|
+
attr_accessor :relative
|
|
25
|
+
# Either 'absolute' or 'relative'.
|
|
26
|
+
attr_accessor :type
|
|
27
|
+
|
|
28
|
+
def initialize(absolute: nil, relative: nil, type: nil)
|
|
29
|
+
@absolute = absolute
|
|
30
|
+
@relative = relative
|
|
31
|
+
@type = type
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
class FixedAmount < ::Stripe::RequestParams
|
|
36
|
+
# The installment amount in minor units.
|
|
37
|
+
attr_accessor :amount
|
|
38
|
+
# Three-letter ISO currency code.
|
|
39
|
+
attr_accessor :currency
|
|
40
|
+
|
|
41
|
+
def initialize(amount: nil, currency: nil)
|
|
42
|
+
@amount = amount
|
|
43
|
+
@currency = currency
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
# Optional description for this installment.
|
|
47
|
+
attr_accessor :description
|
|
48
|
+
# When this installment is due.
|
|
49
|
+
attr_accessor :due_date
|
|
50
|
+
# Required when type is 'fixed_amount'.
|
|
51
|
+
attr_accessor :fixed_amount
|
|
52
|
+
# Optional stable identifier for the installment entry.
|
|
53
|
+
attr_accessor :id
|
|
54
|
+
# The installment percentage of the total. Required when type is 'percentage'.
|
|
55
|
+
attr_accessor :percentage
|
|
56
|
+
# Either 'fixed_amount' or 'percentage'.
|
|
57
|
+
attr_accessor :type
|
|
58
|
+
|
|
59
|
+
def initialize(
|
|
60
|
+
description: nil,
|
|
61
|
+
due_date: nil,
|
|
62
|
+
fixed_amount: nil,
|
|
63
|
+
id: nil,
|
|
64
|
+
percentage: nil,
|
|
65
|
+
type: nil
|
|
66
|
+
)
|
|
67
|
+
@description = description
|
|
68
|
+
@due_date = due_date
|
|
69
|
+
@fixed_amount = fixed_amount
|
|
70
|
+
@id = id
|
|
71
|
+
@percentage = percentage
|
|
72
|
+
@type = type
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
# The list of installment entries.
|
|
76
|
+
attr_accessor :amounts
|
|
77
|
+
|
|
78
|
+
def initialize(amounts: nil)
|
|
79
|
+
@amounts = amounts
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
# Required when type is 'amounts_due'.
|
|
83
|
+
attr_accessor :amounts_due
|
|
84
|
+
# The schedule type. Currently only 'amounts_due' is supported.
|
|
85
|
+
attr_accessor :type
|
|
86
|
+
|
|
87
|
+
def initialize(amounts_due: nil, type: nil)
|
|
88
|
+
@amounts_due = amounts_due
|
|
89
|
+
@type = type
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
# Specifies which fields in the response should be expanded.
|
|
93
|
+
attr_accessor :expand
|
|
94
|
+
# Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
95
|
+
attr_accessor :metadata
|
|
96
|
+
# The new schedule for this payment plan.
|
|
97
|
+
attr_accessor :schedule
|
|
98
|
+
|
|
99
|
+
def initialize(expand: nil, metadata: nil, schedule: nil)
|
|
100
|
+
@expand = expand
|
|
101
|
+
@metadata = metadata
|
|
102
|
+
@schedule = schedule
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -323,6 +323,25 @@ module Stripe
|
|
|
323
323
|
|
|
324
324
|
def self.field_encodings
|
|
325
325
|
@field_encodings = {
|
|
326
|
+
currency_options: {
|
|
327
|
+
kind: :array,
|
|
328
|
+
element: {
|
|
329
|
+
kind: :object,
|
|
330
|
+
fields: {
|
|
331
|
+
tiers: {
|
|
332
|
+
kind: :array,
|
|
333
|
+
element: {
|
|
334
|
+
kind: :object,
|
|
335
|
+
fields: {
|
|
336
|
+
flat_amount_decimal: :decimal_string,
|
|
337
|
+
unit_amount_decimal: :decimal_string,
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
unit_amount_decimal: :decimal_string,
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
326
345
|
tiers: {
|
|
327
346
|
kind: :array,
|
|
328
347
|
element: {
|
|
@@ -165,7 +165,28 @@ module Stripe
|
|
|
165
165
|
end
|
|
166
166
|
|
|
167
167
|
def self.field_encodings
|
|
168
|
-
@field_encodings = {
|
|
168
|
+
@field_encodings = {
|
|
169
|
+
currency_options: {
|
|
170
|
+
kind: :array,
|
|
171
|
+
element: {
|
|
172
|
+
kind: :object,
|
|
173
|
+
fields: {
|
|
174
|
+
tiers: {
|
|
175
|
+
kind: :array,
|
|
176
|
+
element: {
|
|
177
|
+
kind: :object,
|
|
178
|
+
fields: {
|
|
179
|
+
flat_amount_decimal: :decimal_string,
|
|
180
|
+
unit_amount_decimal: :decimal_string,
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
unit_amount_decimal: :decimal_string,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
unit_amount_decimal: :decimal_string,
|
|
189
|
+
}
|
|
169
190
|
end
|
|
170
191
|
end
|
|
171
192
|
|
|
@@ -316,7 +337,31 @@ module Stripe
|
|
|
316
337
|
|
|
317
338
|
def self.field_encodings
|
|
318
339
|
@field_encodings = {
|
|
319
|
-
default_price_data: {
|
|
340
|
+
default_price_data: {
|
|
341
|
+
kind: :object,
|
|
342
|
+
fields: {
|
|
343
|
+
currency_options: {
|
|
344
|
+
kind: :array,
|
|
345
|
+
element: {
|
|
346
|
+
kind: :object,
|
|
347
|
+
fields: {
|
|
348
|
+
tiers: {
|
|
349
|
+
kind: :array,
|
|
350
|
+
element: {
|
|
351
|
+
kind: :object,
|
|
352
|
+
fields: {
|
|
353
|
+
flat_amount_decimal: :decimal_string,
|
|
354
|
+
unit_amount_decimal: :decimal_string,
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
unit_amount_decimal: :decimal_string,
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
},
|
|
362
|
+
unit_amount_decimal: :decimal_string,
|
|
363
|
+
},
|
|
364
|
+
},
|
|
320
365
|
}
|
|
321
366
|
end
|
|
322
367
|
end
|
|
@@ -219,7 +219,7 @@ module Stripe
|
|
|
219
219
|
attr_accessor :customer_details
|
|
220
220
|
# Specifies which fields in the response should be expanded.
|
|
221
221
|
attr_accessor :expand
|
|
222
|
-
# A list of items the customer is purchasing.
|
|
222
|
+
# A list of items the customer is purchasing. You can pass up to 100 line items, or 1,000 if your account has an increased limit.
|
|
223
223
|
attr_accessor :line_items
|
|
224
224
|
# Details about the address from which the goods are being shipped.
|
|
225
225
|
attr_accessor :ship_from_details
|
|
@@ -396,6 +396,8 @@ module Stripe
|
|
|
396
396
|
attr_accessor :ends_at
|
|
397
397
|
# A user-provided lookup key to reference this pricing override.
|
|
398
398
|
attr_accessor :lookup_key
|
|
399
|
+
# Set of key-value pairs.
|
|
400
|
+
attr_accessor :metadata
|
|
399
401
|
# Parameters for a multiply_pricing override. Required if `type` is `multiply_pricing`.
|
|
400
402
|
attr_accessor :multiply_pricing
|
|
401
403
|
# The priority of this override relative to others. The highest priority is 0 and the lowest is 100.
|
|
@@ -408,6 +410,7 @@ module Stripe
|
|
|
408
410
|
def initialize(
|
|
409
411
|
ends_at: nil,
|
|
410
412
|
lookup_key: nil,
|
|
413
|
+
metadata: nil,
|
|
411
414
|
multiply_pricing: nil,
|
|
412
415
|
priority: nil,
|
|
413
416
|
starts_at: nil,
|
|
@@ -415,6 +418,7 @@ module Stripe
|
|
|
415
418
|
)
|
|
416
419
|
@ends_at = ends_at
|
|
417
420
|
@lookup_key = lookup_key
|
|
421
|
+
@metadata = metadata
|
|
418
422
|
@multiply_pricing = multiply_pricing
|
|
419
423
|
@priority = priority
|
|
420
424
|
@starts_at = starts_at
|