stripe 15.5.0.pre.beta.2 → 15.6.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/API_VERSION +1 -1
- data/CHANGELOG.md +53 -1
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +18 -18
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +23 -23
- data/lib/stripe/resources/account.rb +2 -2
- data/lib/stripe/resources/account_session.rb +94 -13
- data/lib/stripe/resources/balance.rb +2 -7
- data/lib/stripe/resources/balance_settings.rb +72 -65
- data/lib/stripe/resources/billing/meter.rb +2 -2
- data/lib/stripe/resources/billing/meter_usage_row.rb +1 -1
- data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
- data/lib/stripe/resources/charge.rb +40 -5
- data/lib/stripe/resources/checkout/session.rb +109 -5
- data/lib/stripe/resources/credit_note.rb +3 -3
- data/lib/stripe/resources/dispute.rb +1 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/file_link.rb +1 -1
- data/lib/stripe/resources/invoice.rb +44 -1
- data/lib/stripe/resources/invoice_payment.rb +1 -1
- data/lib/stripe/resources/issuing/card.rb +8 -0
- data/lib/stripe/resources/mandate.rb +65 -1
- data/lib/stripe/resources/payment_attempt_record.rb +90 -10
- data/lib/stripe/resources/payment_intent.rb +182 -4
- data/lib/stripe/resources/payment_link.rb +1 -1
- data/lib/stripe/resources/payment_method.rb +2 -0
- data/lib/stripe/resources/payment_record.rb +111 -14
- data/lib/stripe/resources/promotion_code.rb +5 -2
- data/lib/stripe/resources/quote_preview_invoice.rb +1 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +24 -0
- data/lib/stripe/resources/setup_attempt.rb +4 -1
- data/lib/stripe/resources/setup_intent.rb +194 -1
- data/lib/stripe/resources/subscription.rb +107 -9
- data/lib/stripe/resources/subscription_schedule.rb +124 -2
- data/lib/stripe/resources/terminal/configuration.rb +82 -0
- data/lib/stripe/resources/terminal/reader.rb +22 -0
- data/lib/stripe/resources/v2/core/account.rb +8 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +2 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +1 -1
- data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
- data/lib/stripe/services/account_session_service.rb +64 -13
- data/lib/stripe/services/balance_settings_service.rb +44 -41
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
- data/lib/stripe/services/checkout/session_service.rb +86 -4
- data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
- data/lib/stripe/services/credit_note_service.rb +2 -2
- data/lib/stripe/services/customer_service.rb +4 -4
- data/lib/stripe/services/file_link_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/invoice_payment_service.rb +1 -1
- data/lib/stripe/services/invoice_service.rb +43 -0
- data/lib/stripe/services/issuing/card_service.rb +8 -0
- data/lib/stripe/services/mandate_service.rb +40 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +4 -1
- data/lib/stripe/services/payment_intent_service.rb +157 -3
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_record_service.rb +25 -5
- data/lib/stripe/services/quote_service.rb +4 -4
- data/lib/stripe/services/setup_intent_service.rb +153 -0
- data/lib/stripe/services/subscription_schedule_service.rb +100 -2
- data/lib/stripe/services/subscription_service.rb +107 -9
- data/lib/stripe/services/terminal/configuration_service.rb +64 -0
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
- data/lib/stripe/services/v1_services.rb +5 -5
- data/lib/stripe/services/v2/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core/account_service.rb +16 -2
- data/lib/stripe/services/v2/core_service.rb +3 -3
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +4 -1
- data/lib/stripe/services/v2/money_management_service.rb +3 -3
- data/lib/stripe/stripe_service.rb +3 -1
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +142341 -140132
- metadata +2 -2
@@ -2973,6 +2973,41 @@ module Stripe
|
|
2973
2973
|
end
|
2974
2974
|
end
|
2975
2975
|
|
2976
|
+
class Period < Stripe::RequestParams
|
2977
|
+
class End < Stripe::RequestParams
|
2978
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
2979
|
+
attr_accessor :timestamp
|
2980
|
+
# Select how to calculate the end of the invoice item period.
|
2981
|
+
attr_accessor :type
|
2982
|
+
|
2983
|
+
def initialize(timestamp: nil, type: nil)
|
2984
|
+
@timestamp = timestamp
|
2985
|
+
@type = type
|
2986
|
+
end
|
2987
|
+
end
|
2988
|
+
|
2989
|
+
class Start < Stripe::RequestParams
|
2990
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
2991
|
+
attr_accessor :timestamp
|
2992
|
+
# Select how to calculate the start of the invoice item period.
|
2993
|
+
attr_accessor :type
|
2994
|
+
|
2995
|
+
def initialize(timestamp: nil, type: nil)
|
2996
|
+
@timestamp = timestamp
|
2997
|
+
@type = type
|
2998
|
+
end
|
2999
|
+
end
|
3000
|
+
# End of the invoice item period.
|
3001
|
+
attr_accessor :end
|
3002
|
+
# Start of the invoice item period.
|
3003
|
+
attr_accessor :start
|
3004
|
+
|
3005
|
+
def initialize(end_: nil, start: nil)
|
3006
|
+
@end = end_
|
3007
|
+
@start = start
|
3008
|
+
end
|
3009
|
+
end
|
3010
|
+
|
2976
3011
|
class PriceData < Stripe::RequestParams
|
2977
3012
|
# 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).
|
2978
3013
|
attr_accessor :currency
|
@@ -3001,6 +3036,10 @@ module Stripe
|
|
3001
3036
|
end
|
3002
3037
|
# The coupons to redeem into discounts for the item.
|
3003
3038
|
attr_accessor :discounts
|
3039
|
+
# 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`.
|
3040
|
+
attr_accessor :metadata
|
3041
|
+
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
3042
|
+
attr_accessor :period
|
3004
3043
|
# The ID of the price object. One of `price` or `price_data` is required.
|
3005
3044
|
attr_accessor :price
|
3006
3045
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -3012,12 +3051,16 @@ module Stripe
|
|
3012
3051
|
|
3013
3052
|
def initialize(
|
3014
3053
|
discounts: nil,
|
3054
|
+
metadata: nil,
|
3055
|
+
period: nil,
|
3015
3056
|
price: nil,
|
3016
3057
|
price_data: nil,
|
3017
3058
|
quantity: nil,
|
3018
3059
|
tax_rates: nil
|
3019
3060
|
)
|
3020
3061
|
@discounts = discounts
|
3062
|
+
@metadata = metadata
|
3063
|
+
@period = period
|
3021
3064
|
@price = price
|
3022
3065
|
@price_data = price_data
|
3023
3066
|
@quantity = quantity
|
@@ -217,6 +217,10 @@ module Stripe
|
|
217
217
|
attr_accessor :cardholder
|
218
218
|
# The currency for the card.
|
219
219
|
attr_accessor :currency
|
220
|
+
# The desired expiration month (1-12) for this card if [specifying a custom expiration date](/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates).
|
221
|
+
attr_accessor :exp_month
|
222
|
+
# The desired 4-digit expiration year for this card if [specifying a custom expiration date](/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates).
|
223
|
+
attr_accessor :exp_year
|
220
224
|
# Specifies which fields in the response should be expanded.
|
221
225
|
attr_accessor :expand
|
222
226
|
# The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account.
|
@@ -245,6 +249,8 @@ module Stripe
|
|
245
249
|
def initialize(
|
246
250
|
cardholder: nil,
|
247
251
|
currency: nil,
|
252
|
+
exp_month: nil,
|
253
|
+
exp_year: nil,
|
248
254
|
expand: nil,
|
249
255
|
financial_account: nil,
|
250
256
|
metadata: nil,
|
@@ -260,6 +266,8 @@ module Stripe
|
|
260
266
|
)
|
261
267
|
@cardholder = cardholder
|
262
268
|
@currency = currency
|
269
|
+
@exp_month = exp_month
|
270
|
+
@exp_year = exp_year
|
263
271
|
@expand = expand
|
264
272
|
@financial_account = financial_account
|
265
273
|
@metadata = metadata
|
@@ -3,6 +3,41 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class MandateService < StripeService
|
6
|
+
class ListParams < Stripe::RequestParams
|
7
|
+
# 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.
|
8
|
+
attr_accessor :ending_before
|
9
|
+
# Specifies which fields in the response should be expanded.
|
10
|
+
attr_accessor :expand
|
11
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
12
|
+
attr_accessor :limit
|
13
|
+
# The Stripe account ID that the mandates are intended for. Learn more about the [use case for connected accounts payments](https://stripe.com/docs/payments/connected-accounts).
|
14
|
+
attr_accessor :on_behalf_of
|
15
|
+
# Attribute for param field payment_method
|
16
|
+
attr_accessor :payment_method
|
17
|
+
# 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.
|
18
|
+
attr_accessor :starting_after
|
19
|
+
# The status of the mandates to retrieve. Status indicates whether or not you can use it to initiate a payment, and can have a value of `active`, `pending`, or `inactive`.
|
20
|
+
attr_accessor :status
|
21
|
+
|
22
|
+
def initialize(
|
23
|
+
ending_before: nil,
|
24
|
+
expand: nil,
|
25
|
+
limit: nil,
|
26
|
+
on_behalf_of: nil,
|
27
|
+
payment_method: nil,
|
28
|
+
starting_after: nil,
|
29
|
+
status: nil
|
30
|
+
)
|
31
|
+
@ending_before = ending_before
|
32
|
+
@expand = expand
|
33
|
+
@limit = limit
|
34
|
+
@on_behalf_of = on_behalf_of
|
35
|
+
@payment_method = payment_method
|
36
|
+
@starting_after = starting_after
|
37
|
+
@status = status
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
6
41
|
class RetrieveParams < Stripe::RequestParams
|
7
42
|
# Specifies which fields in the response should be expanded.
|
8
43
|
attr_accessor :expand
|
@@ -12,6 +47,11 @@ module Stripe
|
|
12
47
|
end
|
13
48
|
end
|
14
49
|
|
50
|
+
# Retrieves a list of Mandates for a given PaymentMethod.
|
51
|
+
def list(params = {}, opts = {})
|
52
|
+
request(method: :get, path: "/v1/mandates", params: params, opts: opts, base_address: :api)
|
53
|
+
end
|
54
|
+
|
15
55
|
# Retrieves a Mandate object.
|
16
56
|
def retrieve(mandate, params = {}, opts = {})
|
17
57
|
request(
|
@@ -6,11 +6,14 @@ module Stripe
|
|
6
6
|
class ListParams < Stripe::RequestParams
|
7
7
|
# Specifies which fields in the response should be expanded.
|
8
8
|
attr_accessor :expand
|
9
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
10
|
+
attr_accessor :limit
|
9
11
|
# The ID of the Payment Record.
|
10
12
|
attr_accessor :payment_record
|
11
13
|
|
12
|
-
def initialize(expand: nil, payment_record: nil)
|
14
|
+
def initialize(expand: nil, limit: nil, payment_record: nil)
|
13
15
|
@expand = expand
|
16
|
+
@limit = limit
|
14
17
|
@payment_record = payment_record
|
15
18
|
end
|
16
19
|
end
|
@@ -2961,10 +2961,52 @@ module Stripe
|
|
2961
2961
|
end
|
2962
2962
|
|
2963
2963
|
class Pix < Stripe::RequestParams
|
2964
|
+
class MandateOptions < Stripe::RequestParams
|
2965
|
+
# Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
|
2966
|
+
attr_accessor :amount
|
2967
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
2968
|
+
attr_accessor :amount_includes_iof
|
2969
|
+
# Type of amount. Defaults to `maximum`.
|
2970
|
+
attr_accessor :amount_type
|
2971
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
|
2972
|
+
attr_accessor :currency
|
2973
|
+
# Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
2974
|
+
attr_accessor :end_date
|
2975
|
+
# Schedule at which the future payments will be charged. Defaults to `weekly`.
|
2976
|
+
attr_accessor :payment_schedule
|
2977
|
+
# Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
|
2978
|
+
attr_accessor :reference
|
2979
|
+
# Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
|
2980
|
+
attr_accessor :start_date
|
2981
|
+
|
2982
|
+
def initialize(
|
2983
|
+
amount: nil,
|
2984
|
+
amount_includes_iof: nil,
|
2985
|
+
amount_type: nil,
|
2986
|
+
currency: nil,
|
2987
|
+
end_date: nil,
|
2988
|
+
payment_schedule: nil,
|
2989
|
+
reference: nil,
|
2990
|
+
start_date: nil
|
2991
|
+
)
|
2992
|
+
@amount = amount
|
2993
|
+
@amount_includes_iof = amount_includes_iof
|
2994
|
+
@amount_type = amount_type
|
2995
|
+
@currency = currency
|
2996
|
+
@end_date = end_date
|
2997
|
+
@payment_schedule = payment_schedule
|
2998
|
+
@reference = reference
|
2999
|
+
@start_date = start_date
|
3000
|
+
end
|
3001
|
+
end
|
3002
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
3003
|
+
attr_accessor :amount_includes_iof
|
2964
3004
|
# The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
|
2965
3005
|
attr_accessor :expires_after_seconds
|
2966
3006
|
# The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
|
2967
3007
|
attr_accessor :expires_at
|
3008
|
+
# Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
|
3009
|
+
attr_accessor :mandate_options
|
2968
3010
|
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
2969
3011
|
#
|
2970
3012
|
# If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
|
@@ -2976,9 +3018,17 @@ module Stripe
|
|
2976
3018
|
# If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
|
2977
3019
|
attr_accessor :setup_future_usage
|
2978
3020
|
|
2979
|
-
def initialize(
|
3021
|
+
def initialize(
|
3022
|
+
amount_includes_iof: nil,
|
3023
|
+
expires_after_seconds: nil,
|
3024
|
+
expires_at: nil,
|
3025
|
+
mandate_options: nil,
|
3026
|
+
setup_future_usage: nil
|
3027
|
+
)
|
3028
|
+
@amount_includes_iof = amount_includes_iof
|
2980
3029
|
@expires_after_seconds = expires_after_seconds
|
2981
3030
|
@expires_at = expires_at
|
3031
|
+
@mandate_options = mandate_options
|
2982
3032
|
@setup_future_usage = setup_future_usage
|
2983
3033
|
end
|
2984
3034
|
end
|
@@ -3689,6 +3739,8 @@ module Stripe
|
|
3689
3739
|
attr_accessor :description
|
3690
3740
|
# Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
|
3691
3741
|
attr_accessor :error_on_requires_action
|
3742
|
+
# The list of payment method types to exclude from use with this payment.
|
3743
|
+
attr_accessor :excluded_payment_method_types
|
3692
3744
|
# Specifies which fields in the response should be expanded.
|
3693
3745
|
attr_accessor :expand
|
3694
3746
|
# The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
|
@@ -3769,6 +3821,7 @@ module Stripe
|
|
3769
3821
|
customer_account: nil,
|
3770
3822
|
description: nil,
|
3771
3823
|
error_on_requires_action: nil,
|
3824
|
+
excluded_payment_method_types: nil,
|
3772
3825
|
expand: nil,
|
3773
3826
|
fx_quote: nil,
|
3774
3827
|
hooks: nil,
|
@@ -3808,6 +3861,7 @@ module Stripe
|
|
3808
3861
|
@customer_account = customer_account
|
3809
3862
|
@description = description
|
3810
3863
|
@error_on_requires_action = error_on_requires_action
|
3864
|
+
@excluded_payment_method_types = excluded_payment_method_types
|
3811
3865
|
@expand = expand
|
3812
3866
|
@fx_quote = fx_quote
|
3813
3867
|
@hooks = hooks
|
@@ -6725,10 +6779,52 @@ module Stripe
|
|
6725
6779
|
end
|
6726
6780
|
|
6727
6781
|
class Pix < Stripe::RequestParams
|
6782
|
+
class MandateOptions < Stripe::RequestParams
|
6783
|
+
# Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
|
6784
|
+
attr_accessor :amount
|
6785
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
6786
|
+
attr_accessor :amount_includes_iof
|
6787
|
+
# Type of amount. Defaults to `maximum`.
|
6788
|
+
attr_accessor :amount_type
|
6789
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
|
6790
|
+
attr_accessor :currency
|
6791
|
+
# Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
6792
|
+
attr_accessor :end_date
|
6793
|
+
# Schedule at which the future payments will be charged. Defaults to `weekly`.
|
6794
|
+
attr_accessor :payment_schedule
|
6795
|
+
# Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
|
6796
|
+
attr_accessor :reference
|
6797
|
+
# Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
|
6798
|
+
attr_accessor :start_date
|
6799
|
+
|
6800
|
+
def initialize(
|
6801
|
+
amount: nil,
|
6802
|
+
amount_includes_iof: nil,
|
6803
|
+
amount_type: nil,
|
6804
|
+
currency: nil,
|
6805
|
+
end_date: nil,
|
6806
|
+
payment_schedule: nil,
|
6807
|
+
reference: nil,
|
6808
|
+
start_date: nil
|
6809
|
+
)
|
6810
|
+
@amount = amount
|
6811
|
+
@amount_includes_iof = amount_includes_iof
|
6812
|
+
@amount_type = amount_type
|
6813
|
+
@currency = currency
|
6814
|
+
@end_date = end_date
|
6815
|
+
@payment_schedule = payment_schedule
|
6816
|
+
@reference = reference
|
6817
|
+
@start_date = start_date
|
6818
|
+
end
|
6819
|
+
end
|
6820
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
6821
|
+
attr_accessor :amount_includes_iof
|
6728
6822
|
# The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
|
6729
6823
|
attr_accessor :expires_after_seconds
|
6730
6824
|
# The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
|
6731
6825
|
attr_accessor :expires_at
|
6826
|
+
# Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
|
6827
|
+
attr_accessor :mandate_options
|
6732
6828
|
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
6733
6829
|
#
|
6734
6830
|
# If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
|
@@ -6740,9 +6836,17 @@ module Stripe
|
|
6740
6836
|
# If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
|
6741
6837
|
attr_accessor :setup_future_usage
|
6742
6838
|
|
6743
|
-
def initialize(
|
6839
|
+
def initialize(
|
6840
|
+
amount_includes_iof: nil,
|
6841
|
+
expires_after_seconds: nil,
|
6842
|
+
expires_at: nil,
|
6843
|
+
mandate_options: nil,
|
6844
|
+
setup_future_usage: nil
|
6845
|
+
)
|
6846
|
+
@amount_includes_iof = amount_includes_iof
|
6744
6847
|
@expires_after_seconds = expires_after_seconds
|
6745
6848
|
@expires_at = expires_at
|
6849
|
+
@mandate_options = mandate_options
|
6746
6850
|
@setup_future_usage = setup_future_usage
|
6747
6851
|
end
|
6748
6852
|
end
|
@@ -11405,10 +11509,52 @@ module Stripe
|
|
11405
11509
|
end
|
11406
11510
|
|
11407
11511
|
class Pix < Stripe::RequestParams
|
11512
|
+
class MandateOptions < Stripe::RequestParams
|
11513
|
+
# Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
|
11514
|
+
attr_accessor :amount
|
11515
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
11516
|
+
attr_accessor :amount_includes_iof
|
11517
|
+
# Type of amount. Defaults to `maximum`.
|
11518
|
+
attr_accessor :amount_type
|
11519
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
|
11520
|
+
attr_accessor :currency
|
11521
|
+
# Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
|
11522
|
+
attr_accessor :end_date
|
11523
|
+
# Schedule at which the future payments will be charged. Defaults to `weekly`.
|
11524
|
+
attr_accessor :payment_schedule
|
11525
|
+
# Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
|
11526
|
+
attr_accessor :reference
|
11527
|
+
# Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
|
11528
|
+
attr_accessor :start_date
|
11529
|
+
|
11530
|
+
def initialize(
|
11531
|
+
amount: nil,
|
11532
|
+
amount_includes_iof: nil,
|
11533
|
+
amount_type: nil,
|
11534
|
+
currency: nil,
|
11535
|
+
end_date: nil,
|
11536
|
+
payment_schedule: nil,
|
11537
|
+
reference: nil,
|
11538
|
+
start_date: nil
|
11539
|
+
)
|
11540
|
+
@amount = amount
|
11541
|
+
@amount_includes_iof = amount_includes_iof
|
11542
|
+
@amount_type = amount_type
|
11543
|
+
@currency = currency
|
11544
|
+
@end_date = end_date
|
11545
|
+
@payment_schedule = payment_schedule
|
11546
|
+
@reference = reference
|
11547
|
+
@start_date = start_date
|
11548
|
+
end
|
11549
|
+
end
|
11550
|
+
# Determines if the amount includes the IOF tax. Defaults to `never`.
|
11551
|
+
attr_accessor :amount_includes_iof
|
11408
11552
|
# The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
|
11409
11553
|
attr_accessor :expires_after_seconds
|
11410
11554
|
# The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
|
11411
11555
|
attr_accessor :expires_at
|
11556
|
+
# Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
|
11557
|
+
attr_accessor :mandate_options
|
11412
11558
|
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
11413
11559
|
#
|
11414
11560
|
# If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
|
@@ -11420,9 +11566,17 @@ module Stripe
|
|
11420
11566
|
# If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
|
11421
11567
|
attr_accessor :setup_future_usage
|
11422
11568
|
|
11423
|
-
def initialize(
|
11569
|
+
def initialize(
|
11570
|
+
amount_includes_iof: nil,
|
11571
|
+
expires_after_seconds: nil,
|
11572
|
+
expires_at: nil,
|
11573
|
+
mandate_options: nil,
|
11574
|
+
setup_future_usage: nil
|
11575
|
+
)
|
11576
|
+
@amount_includes_iof = amount_includes_iof
|
11424
11577
|
@expires_after_seconds = expires_after_seconds
|
11425
11578
|
@expires_at = expires_at
|
11579
|
+
@mandate_options = mandate_options
|
11426
11580
|
@setup_future_usage = setup_future_usage
|
11427
11581
|
end
|
11428
11582
|
end
|
@@ -438,7 +438,7 @@ module Stripe
|
|
438
438
|
end
|
439
439
|
# When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
|
440
440
|
attr_accessor :adjustable_quantity
|
441
|
-
# The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
|
441
|
+
# The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
|
442
442
|
attr_accessor :price
|
443
443
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
444
444
|
attr_accessor :price_data
|
@@ -243,7 +243,7 @@ module Stripe
|
|
243
243
|
class AmountRequested < Stripe::RequestParams
|
244
244
|
# 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).
|
245
245
|
attr_accessor :currency
|
246
|
-
# A positive integer representing the amount in the [
|
246
|
+
# A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
|
247
247
|
attr_accessor :value
|
248
248
|
|
249
249
|
def initialize(currency: nil, value: nil)
|
@@ -365,6 +365,26 @@ module Stripe
|
|
365
365
|
end
|
366
366
|
end
|
367
367
|
|
368
|
+
class ProcessorDetails < Stripe::RequestParams
|
369
|
+
class Custom < Stripe::RequestParams
|
370
|
+
# An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
|
371
|
+
attr_accessor :payment_reference
|
372
|
+
|
373
|
+
def initialize(payment_reference: nil)
|
374
|
+
@payment_reference = payment_reference
|
375
|
+
end
|
376
|
+
end
|
377
|
+
# Information about the custom processor used to make this payment.
|
378
|
+
attr_accessor :custom
|
379
|
+
# The type of the processor details. An additional hash is included on processor_details with a name matching this value. It contains additional information specific to the processor.
|
380
|
+
attr_accessor :type
|
381
|
+
|
382
|
+
def initialize(custom: nil, type: nil)
|
383
|
+
@custom = custom
|
384
|
+
@type = type
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
368
388
|
class ShippingDetails < Stripe::RequestParams
|
369
389
|
class Address < Stripe::RequestParams
|
370
390
|
# City, district, suburb, town, or village.
|
@@ -431,8 +451,8 @@ module Stripe
|
|
431
451
|
attr_accessor :outcome
|
432
452
|
# Information about the Payment Method debited for this payment.
|
433
453
|
attr_accessor :payment_method_details
|
434
|
-
#
|
435
|
-
attr_accessor :
|
454
|
+
# Processor information for this payment.
|
455
|
+
attr_accessor :processor_details
|
436
456
|
# Shipping information for this payment.
|
437
457
|
attr_accessor :shipping_details
|
438
458
|
|
@@ -448,7 +468,7 @@ module Stripe
|
|
448
468
|
metadata: nil,
|
449
469
|
outcome: nil,
|
450
470
|
payment_method_details: nil,
|
451
|
-
|
471
|
+
processor_details: nil,
|
452
472
|
shipping_details: nil
|
453
473
|
)
|
454
474
|
@amount_requested = amount_requested
|
@@ -462,7 +482,7 @@ module Stripe
|
|
462
482
|
@metadata = metadata
|
463
483
|
@outcome = outcome
|
464
484
|
@payment_method_details = payment_method_details
|
465
|
-
@
|
485
|
+
@processor_details = processor_details
|
466
486
|
@shipping_details = shipping_details
|
467
487
|
end
|
468
488
|
end
|
@@ -3,16 +3,16 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class QuoteService < StripeService
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :computed_upfront_line_items, :lines, :line_items, :preview_invoices, :preview_subscription_schedules
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super
|
10
|
+
@computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
|
11
|
+
@lines = Stripe::QuoteLineService.new(@requestor)
|
12
|
+
@line_items = Stripe::QuoteLineItemService.new(@requestor)
|
10
13
|
@preview_invoices = Stripe::QuotePreviewInvoiceService.new(@requestor)
|
11
14
|
@preview_subscription_schedules = Stripe::QuotePreviewSubscriptionScheduleService
|
12
15
|
.new(@requestor)
|
13
|
-
@lines = Stripe::QuoteLineService.new(@requestor)
|
14
|
-
@line_items = Stripe::QuoteLineItemService.new(@requestor)
|
15
|
-
@computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
|
16
16
|
end
|
17
17
|
|
18
18
|
class ListParams < Stripe::RequestParams
|