stripe 19.7.0.pre.alpha.1 → 19.7.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/api_requestor.rb +2 -2
- data/lib/stripe/event_types.rb +32 -0
- data/lib/stripe/events/v2_core_health_metronome_notification_latency_firing_event.rb +58 -0
- data/lib/stripe/events/v2_core_health_metronome_notification_latency_resolved_event.rb +60 -0
- data/lib/stripe/events/v2_money_management_payout_intent_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_payout_intent_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_payout_intent_posted_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_payout_intent_processing_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_payout_intent_requires_action_event.rb +44 -0
- data/lib/stripe/events/v2_signals_payment_retry_evaluations_retry_recommended_event.rb +46 -0
- data/lib/stripe/object_types.rb +4 -0
- data/lib/stripe/params/account_session_create_params.rb +8 -1
- data/lib/stripe/params/billing/feedback_option_create_params.rb +18 -0
- data/lib/stripe/params/billing/feedback_option_deactivate_params.rb +15 -0
- data/lib/stripe/params/billing/feedback_option_list_params.rb +27 -0
- data/lib/stripe/params/billing/feedback_option_retrieve_params.rb +15 -0
- data/lib/stripe/params/billing/feedback_option_update_params.rb +18 -0
- data/lib/stripe/params/billing_portal/configuration_create_params.rb +4 -1
- data/lib/stripe/params/billing_portal/configuration_update_params.rb +4 -1
- data/lib/stripe/params/checkout/session_create_params.rb +4 -1
- data/lib/stripe/params/checkout/session_update_params.rb +53 -0
- data/lib/stripe/params/customer_session_create_params.rb +26 -0
- data/lib/stripe/params/payment_intent_confirm_params.rb +9 -5
- data/lib/stripe/params/payment_intent_create_params.rb +9 -5
- data/lib/stripe/params/payment_intent_update_params.rb +9 -5
- data/lib/stripe/params/payment_link_update_params.rb +32 -1
- data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +19 -0
- data/lib/stripe/params/payment_record_report_payment_params.rb +19 -0
- data/lib/stripe/params/radar/billing_evaluation_create_params.rb +231 -0
- data/lib/stripe/params/radar/payment_evaluation_create_params.rb +1 -1
- data/lib/stripe/params/setup_intent_confirm_params.rb +4 -1
- data/lib/stripe/params/setup_intent_create_params.rb +4 -5
- data/lib/stripe/params/setup_intent_update_params.rb +4 -5
- data/lib/stripe/params/shared_payment/granted_token_create_params.rb +21 -1
- data/lib/stripe/params/shared_payment/issued_token_create_params.rb +21 -1
- data/lib/stripe/params/subscription_cancel_params.rb +4 -1
- data/lib/stripe/params/subscription_update_params.rb +8 -1
- data/lib/stripe/params/tax/registration_create_params.rb +351 -27
- data/lib/stripe/params/test_helpers/shared_payment/granted_token_create_params.rb +21 -1
- data/lib/stripe/params/v2/billing/contract_create_params.rb +34 -0
- data/lib/stripe/params/v2/billing/contract_update_params.rb +91 -0
- data/lib/stripe/params/v2/core/account_create_params.rb +2 -5
- data/lib/stripe/params/v2/core/account_update_params.rb +6 -5
- data/lib/stripe/params/v2/core/approval_request_list_params.rb +31 -1
- data/lib/stripe/params/v2/core/{approval_request_submit_params.rb → approval_request_update_params.rb} +2 -2
- data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +13 -1
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +1 -1
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +1 -1
- data/lib/stripe/params/v2/money_management/payout_method_disable_params.rb +10 -0
- data/lib/stripe/params/v2/signals/account_activity_create_params.rb +32 -0
- data/lib/stripe/params/v2/signals/payment_retry_evaluation_cancel_params.rb +17 -0
- data/lib/stripe/params/v2/signals/payment_retry_evaluation_create_params.rb +20 -0
- data/lib/stripe/params/v2/signals/payment_retry_evaluation_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/signals/payment_retry_evaluation_update_params.rb +20 -0
- data/lib/stripe/params/v2/{core/approval_request_execute_params.rb → signals/payment_retry_signal_retrieve_params.rb} +2 -2
- data/lib/stripe/params/v2/tax/integration_configuration_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/tax/integration_configuration_update_params.rb +25 -0
- data/lib/stripe/params.rb +31 -4
- data/lib/stripe/resources/account.rb +2 -0
- data/lib/stripe/resources/account_session.rb +27 -0
- data/lib/stripe/resources/billing/feedback_option.rb +59 -1
- data/lib/stripe/resources/charge.rb +16 -0
- data/lib/stripe/resources/checkout/session.rb +16 -0
- data/lib/stripe/resources/confirmation_token.rb +15 -0
- data/lib/stripe/resources/customer_tax_exemption.rb +6 -6
- data/lib/stripe/resources/identity/verification_report.rb +24 -0
- data/lib/stripe/resources/payment_attempt_record.rb +16 -0
- data/lib/stripe/resources/payment_intent.rb +26 -0
- data/lib/stripe/resources/payment_record.rb +16 -0
- data/lib/stripe/resources/radar/billing_evaluation.rb +281 -0
- data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +2 -0
- data/lib/stripe/resources/shared_payment/granted_token.rb +17 -1
- data/lib/stripe/resources/shared_payment/issued_token.rb +17 -1
- data/lib/stripe/resources/terminal/reader.rb +1 -1
- data/lib/stripe/resources/v2/billing/contract.rb +48 -0
- data/lib/stripe/resources/v2/core/account.rb +2 -2
- data/lib/stripe/resources/v2/core/approval_request.rb +72 -14
- data/lib/stripe/resources/v2/core/event_notification.rb +6 -3
- data/lib/stripe/resources/v2/core/fee_batch.rb +2 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +2 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +2 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +75 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +4 -2
- data/lib/stripe/resources/v2/money_management/received_debit.rb +2 -0
- data/lib/stripe/resources/v2/signals/account_activity.rb +36 -0
- data/lib/stripe/resources/v2/signals/account_signal.rb +50 -26
- data/lib/stripe/resources/v2/signals/payment_retry_evaluation.rb +47 -0
- data/lib/stripe/resources/v2/signals/payment_retry_signal.rb +56 -0
- data/lib/stripe/resources/v2/tax/integration_configuration.rb +44 -0
- data/lib/stripe/resources.rb +46 -0
- data/lib/stripe/services/billing/feedback_option_service.rb +63 -0
- data/lib/stripe/services/billing_service.rb +2 -1
- data/lib/stripe/services/oauth_service.rb +1 -1
- data/lib/stripe/services/radar/billing_evaluation_service.rb +19 -0
- data/lib/stripe/services/radar_service.rb +2 -1
- data/lib/stripe/services/v2/billing/contract_service.rb +5 -0
- data/lib/stripe/services/v2/core/approval_request_service.rb +4 -16
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +15 -0
- data/lib/stripe/services/v2/signals/payment_retry_evaluation_service.rb +62 -0
- data/lib/stripe/services/v2/signals/payment_retry_signal_service.rb +21 -0
- data/lib/stripe/services/v2/signals_service.rb +4 -1
- data/lib/stripe/services/v2/tax/integration_configuration_service.rb +32 -0
- data/lib/stripe/services/v2/tax_service.rb +3 -1
- data/lib/stripe/services.rb +10 -0
- data/lib/stripe/stripe_event_notification_handler.rb +32 -0
- data/lib/stripe/util.rb +32 -0
- data/lib/stripe/v2_list_object.rb +2 -1
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +3252 -521
- metadata +34 -4
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Radar
|
|
6
|
+
# Billing Evaluations represent Stripe Radar's assessment of the non-payment abuse risk of an upcoming charge. Unlike a [Payment Evaluation](https://docs.stripe.com/api/radar/payment-evaluation), a billing evaluation is created before the payment is attempted and returns the `non_payment_abuse` signal only.
|
|
7
|
+
class BillingEvaluation < APIResource
|
|
8
|
+
extend Stripe::APIOperations::Create
|
|
9
|
+
|
|
10
|
+
OBJECT_NAME = "radar.billing_evaluation"
|
|
11
|
+
def self.object_name
|
|
12
|
+
"radar.billing_evaluation"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class ClientDeviceMetadataDetails < ::Stripe::StripeObject
|
|
16
|
+
# ID for the Radar Session associated with the billing evaluation. A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
|
|
17
|
+
attr_reader :radar_session
|
|
18
|
+
|
|
19
|
+
def self.inner_class_types
|
|
20
|
+
@inner_class_types = {}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.field_remappings
|
|
24
|
+
@field_remappings = {}
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class CustomerDetails < ::Stripe::StripeObject
|
|
29
|
+
class Data < ::Stripe::StripeObject
|
|
30
|
+
# The customer's email address.
|
|
31
|
+
attr_reader :email
|
|
32
|
+
# The customer's full name or business name.
|
|
33
|
+
attr_reader :name
|
|
34
|
+
# The customer's phone number.
|
|
35
|
+
attr_reader :phone
|
|
36
|
+
|
|
37
|
+
def self.inner_class_types
|
|
38
|
+
@inner_class_types = {}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.field_remappings
|
|
42
|
+
@field_remappings = {}
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
# The ID of the customer whose upcoming payment was evaluated.
|
|
46
|
+
attr_reader :customer
|
|
47
|
+
# The ID of the Account representing the customer whose upcoming payment was evaluated.
|
|
48
|
+
attr_reader :customer_account
|
|
49
|
+
# Attributes of the customer being evaluated. These are populated from the `customer` or `customer_account` object when one was supplied, and from the request otherwise.
|
|
50
|
+
attr_reader :data
|
|
51
|
+
|
|
52
|
+
def self.inner_class_types
|
|
53
|
+
@inner_class_types = { data: Data }
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.field_remappings
|
|
57
|
+
@field_remappings = {}
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class PaymentDetails < ::Stripe::StripeObject
|
|
62
|
+
class MoneyMovementDetails < ::Stripe::StripeObject
|
|
63
|
+
class Card < ::Stripe::StripeObject
|
|
64
|
+
# Describes the presence of the customer during the payment.
|
|
65
|
+
attr_reader :customer_presence
|
|
66
|
+
# Describes the type of payment.
|
|
67
|
+
attr_reader :payment_type
|
|
68
|
+
|
|
69
|
+
def self.inner_class_types
|
|
70
|
+
@inner_class_types = {}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def self.field_remappings
|
|
74
|
+
@field_remappings = {}
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
# Describes card money movement details.
|
|
78
|
+
attr_reader :card
|
|
79
|
+
# Describes the type of money movement. Currently only `card` is supported.
|
|
80
|
+
attr_reader :money_movement_type
|
|
81
|
+
|
|
82
|
+
def self.inner_class_types
|
|
83
|
+
@inner_class_types = { card: Card }
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def self.field_remappings
|
|
87
|
+
@field_remappings = {}
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
class PaymentMethodDetails < ::Stripe::StripeObject
|
|
92
|
+
class BillingDetails < ::Stripe::StripeObject
|
|
93
|
+
class Address < ::Stripe::StripeObject
|
|
94
|
+
# City, district, suburb, town, or village.
|
|
95
|
+
attr_reader :city
|
|
96
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
97
|
+
attr_reader :country
|
|
98
|
+
# Address line 1, such as the street, PO Box, or company name.
|
|
99
|
+
attr_reader :line1
|
|
100
|
+
# Address line 2, such as the apartment, suite, unit, or building.
|
|
101
|
+
attr_reader :line2
|
|
102
|
+
# ZIP or postal code.
|
|
103
|
+
attr_reader :postal_code
|
|
104
|
+
# State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
|
|
105
|
+
attr_reader :state
|
|
106
|
+
|
|
107
|
+
def self.inner_class_types
|
|
108
|
+
@inner_class_types = {}
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def self.field_remappings
|
|
112
|
+
@field_remappings = {}
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
# Address data.
|
|
116
|
+
attr_reader :address
|
|
117
|
+
# Email address.
|
|
118
|
+
attr_reader :email
|
|
119
|
+
# Full name.
|
|
120
|
+
attr_reader :name
|
|
121
|
+
# Billing phone number (including extension).
|
|
122
|
+
attr_reader :phone
|
|
123
|
+
|
|
124
|
+
def self.inner_class_types
|
|
125
|
+
@inner_class_types = { address: Address }
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def self.field_remappings
|
|
129
|
+
@field_remappings = {}
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
# Billing information associated with the billing evaluation.
|
|
133
|
+
attr_reader :billing_details
|
|
134
|
+
# The payment method that will be charged.
|
|
135
|
+
attr_reader :payment_method
|
|
136
|
+
|
|
137
|
+
def self.inner_class_types
|
|
138
|
+
@inner_class_types = { billing_details: BillingDetails }
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def self.field_remappings
|
|
142
|
+
@field_remappings = {}
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
class ShippingDetails < ::Stripe::StripeObject
|
|
147
|
+
class Address < ::Stripe::StripeObject
|
|
148
|
+
# City, district, suburb, town, or village.
|
|
149
|
+
attr_reader :city
|
|
150
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
151
|
+
attr_reader :country
|
|
152
|
+
# Address line 1, such as the street, PO Box, or company name.
|
|
153
|
+
attr_reader :line1
|
|
154
|
+
# Address line 2, such as the apartment, suite, unit, or building.
|
|
155
|
+
attr_reader :line2
|
|
156
|
+
# ZIP or postal code.
|
|
157
|
+
attr_reader :postal_code
|
|
158
|
+
# State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
|
|
159
|
+
attr_reader :state
|
|
160
|
+
|
|
161
|
+
def self.inner_class_types
|
|
162
|
+
@inner_class_types = {}
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def self.field_remappings
|
|
166
|
+
@field_remappings = {}
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
# Address data.
|
|
170
|
+
attr_reader :address
|
|
171
|
+
# Shipping name.
|
|
172
|
+
attr_reader :name
|
|
173
|
+
# Shipping phone number.
|
|
174
|
+
attr_reader :phone
|
|
175
|
+
|
|
176
|
+
def self.inner_class_types
|
|
177
|
+
@inner_class_types = { address: Address }
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
def self.field_remappings
|
|
181
|
+
@field_remappings = {}
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
# Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
|
|
185
|
+
attr_reader :amount
|
|
186
|
+
# 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).
|
|
187
|
+
attr_reader :currency
|
|
188
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
|
189
|
+
attr_reader :description
|
|
190
|
+
# Details about the payment's customer presence and type.
|
|
191
|
+
attr_reader :money_movement_details
|
|
192
|
+
# Details about the payment method that will be charged.
|
|
193
|
+
attr_reader :payment_method_details
|
|
194
|
+
# Shipping details for the billing evaluation.
|
|
195
|
+
attr_reader :shipping_details
|
|
196
|
+
# Payment statement descriptor.
|
|
197
|
+
attr_reader :statement_descriptor
|
|
198
|
+
|
|
199
|
+
def self.inner_class_types
|
|
200
|
+
@inner_class_types = {
|
|
201
|
+
money_movement_details: MoneyMovementDetails,
|
|
202
|
+
payment_method_details: PaymentMethodDetails,
|
|
203
|
+
shipping_details: ShippingDetails,
|
|
204
|
+
}
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def self.field_remappings
|
|
208
|
+
@field_remappings = {}
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
class Signals < ::Stripe::StripeObject
|
|
213
|
+
class NonPaymentAbuse < ::Stripe::StripeObject
|
|
214
|
+
# The time when this signal was evaluated.
|
|
215
|
+
attr_reader :evaluated_at
|
|
216
|
+
# Risk level.
|
|
217
|
+
attr_reader :risk_level
|
|
218
|
+
|
|
219
|
+
def self.inner_class_types
|
|
220
|
+
@inner_class_types = {}
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def self.field_remappings
|
|
224
|
+
@field_remappings = {}
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
# Stripe Radar's assessment of the likelihood that the upcoming charge results in non-payment abuse.
|
|
228
|
+
attr_reader :non_payment_abuse
|
|
229
|
+
|
|
230
|
+
def self.inner_class_types
|
|
231
|
+
@inner_class_types = { non_payment_abuse: NonPaymentAbuse }
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
def self.field_remappings
|
|
235
|
+
@field_remappings = {}
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
# Client device metadata attached to this billing evaluation.
|
|
239
|
+
attr_reader :client_device_metadata_details
|
|
240
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
241
|
+
attr_reader :created_at
|
|
242
|
+
# Details of the customer this billing evaluation assesses.
|
|
243
|
+
attr_reader :customer_details
|
|
244
|
+
# Unique identifier for the object.
|
|
245
|
+
attr_reader :id
|
|
246
|
+
# If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
|
247
|
+
attr_reader :livemode
|
|
248
|
+
# 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.
|
|
249
|
+
attr_reader :metadata
|
|
250
|
+
# String representing the object's type. Objects of the same type share the same value.
|
|
251
|
+
attr_reader :object
|
|
252
|
+
# Payment details for the upcoming charge this billing evaluation assesses.
|
|
253
|
+
attr_reader :payment_details
|
|
254
|
+
# Stripe Radar's signals for the upcoming charge this billing evaluation assesses.
|
|
255
|
+
attr_reader :signals
|
|
256
|
+
|
|
257
|
+
# Request Stripe Radar's assessment of the non-payment abuse risk of an upcoming charge, before the payment is attempted.
|
|
258
|
+
def self.create(params = {}, opts = {})
|
|
259
|
+
request_stripe_object(
|
|
260
|
+
method: :post,
|
|
261
|
+
path: "/v1/radar/billing_evaluations",
|
|
262
|
+
params: params,
|
|
263
|
+
opts: opts
|
|
264
|
+
)
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
def self.inner_class_types
|
|
268
|
+
@inner_class_types = {
|
|
269
|
+
client_device_metadata_details: ClientDeviceMetadataDetails,
|
|
270
|
+
customer_details: CustomerDetails,
|
|
271
|
+
payment_details: PaymentDetails,
|
|
272
|
+
signals: Signals,
|
|
273
|
+
}
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
def self.field_remappings
|
|
277
|
+
@field_remappings = {}
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
end
|
|
@@ -302,7 +302,7 @@ module Stripe
|
|
|
302
302
|
@field_remappings = {}
|
|
303
303
|
end
|
|
304
304
|
end
|
|
305
|
-
# Describes card money movement details
|
|
305
|
+
# Describes card money movement details.
|
|
306
306
|
attr_reader :card
|
|
307
307
|
# Describes the type of money movement. Currently only `card` is supported.
|
|
308
308
|
attr_reader :money_movement_type
|
|
@@ -397,6 +397,8 @@ module Stripe
|
|
|
397
397
|
end
|
|
398
398
|
# Attribute for field mandate_options
|
|
399
399
|
attr_reader :mandate_options
|
|
400
|
+
# Attribute for field verification_method
|
|
401
|
+
attr_reader :verification_method
|
|
400
402
|
|
|
401
403
|
def self.inner_class_types
|
|
402
404
|
@inner_class_types = { mandate_options: MandateOptions }
|
|
@@ -582,17 +582,33 @@ module Stripe
|
|
|
582
582
|
end
|
|
583
583
|
|
|
584
584
|
class UsageLimits < ::Stripe::StripeObject
|
|
585
|
+
class Recurring < ::Stripe::StripeObject
|
|
586
|
+
# The interval at which the shared payment token's amount usage restrictions reset.
|
|
587
|
+
attr_reader :interval
|
|
588
|
+
# The number of intervals between each reset.
|
|
589
|
+
attr_reader :interval_count
|
|
590
|
+
|
|
591
|
+
def self.inner_class_types
|
|
592
|
+
@inner_class_types = {}
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
def self.field_remappings
|
|
596
|
+
@field_remappings = {}
|
|
597
|
+
end
|
|
598
|
+
end
|
|
585
599
|
# 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).
|
|
586
600
|
attr_reader :currency
|
|
587
601
|
# Time at which this SharedPaymentToken expires and can no longer be used to confirm a PaymentIntent.
|
|
588
602
|
attr_reader :expires_at
|
|
589
603
|
# Max amount that can be captured using this SharedPaymentToken.
|
|
590
604
|
attr_reader :max_amount
|
|
605
|
+
# The recurring schedule for the shared payment token's amount usage restrictions.
|
|
606
|
+
attr_reader :recurring
|
|
591
607
|
# The recurring interval at which the shared payment token's amount usage restrictions reset.
|
|
592
608
|
attr_reader :recurring_interval
|
|
593
609
|
|
|
594
610
|
def self.inner_class_types
|
|
595
|
-
@inner_class_types = {}
|
|
611
|
+
@inner_class_types = { recurring: Recurring }
|
|
596
612
|
end
|
|
597
613
|
|
|
598
614
|
def self.field_remappings
|
|
@@ -212,17 +212,33 @@ module Stripe
|
|
|
212
212
|
end
|
|
213
213
|
|
|
214
214
|
class UsageLimits < ::Stripe::StripeObject
|
|
215
|
+
class Recurring < ::Stripe::StripeObject
|
|
216
|
+
# The interval at which the shared payment token's amount usage restrictions reset.
|
|
217
|
+
attr_reader :interval
|
|
218
|
+
# The number of intervals between each reset.
|
|
219
|
+
attr_reader :interval_count
|
|
220
|
+
|
|
221
|
+
def self.inner_class_types
|
|
222
|
+
@inner_class_types = {}
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
def self.field_remappings
|
|
226
|
+
@field_remappings = {}
|
|
227
|
+
end
|
|
228
|
+
end
|
|
215
229
|
# 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).
|
|
216
230
|
attr_reader :currency
|
|
217
231
|
# Time at which this SharedPaymentToken expires and can no longer be used to confirm a PaymentIntent.
|
|
218
232
|
attr_reader :expires_at
|
|
219
233
|
# Max amount that can be captured using this SharedPaymentToken.
|
|
220
234
|
attr_reader :max_amount
|
|
235
|
+
# The recurring schedule for the shared payment token's amount usage restrictions.
|
|
236
|
+
attr_reader :recurring
|
|
221
237
|
# The recurring interval at which the shared payment token's amount usage restrictions reset.
|
|
222
238
|
attr_reader :recurring_interval
|
|
223
239
|
|
|
224
240
|
def self.inner_class_types
|
|
225
|
-
@inner_class_types = {}
|
|
241
|
+
@inner_class_types = { recurring: Recurring }
|
|
226
242
|
end
|
|
227
243
|
|
|
228
244
|
def self.field_remappings
|
|
@@ -730,7 +730,7 @@ module Stripe
|
|
|
730
730
|
attr_reader :object
|
|
731
731
|
# Serial number of the reader.
|
|
732
732
|
attr_reader :serial_number
|
|
733
|
-
# The networking status of the reader. We do not recommend using this field in flows that may block taking payments.
|
|
733
|
+
# The networking status of the reader. This value is `null` for mobile readers. We do not recommend using this field in flows that may block taking payments.
|
|
734
734
|
attr_reader :status
|
|
735
735
|
|
|
736
736
|
# Initiates a gift card activation flow on a Reader and optionally sets its balance.
|
|
@@ -140,6 +140,51 @@ module Stripe
|
|
|
140
140
|
end
|
|
141
141
|
end
|
|
142
142
|
|
|
143
|
+
class OneTimeFees < ::Stripe::StripeObject
|
|
144
|
+
class Data < ::Stripe::StripeObject
|
|
145
|
+
class BillAt < ::Stripe::StripeObject
|
|
146
|
+
# The timestamp at which the fee will be billed.
|
|
147
|
+
attr_reader :timestamp
|
|
148
|
+
|
|
149
|
+
def self.inner_class_types
|
|
150
|
+
@inner_class_types = {}
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def self.field_remappings
|
|
154
|
+
@field_remappings = {}
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
# The amount billed for this fee.
|
|
158
|
+
attr_reader :amount
|
|
159
|
+
# When this fee will be billed. Always contains a concrete timestamp.
|
|
160
|
+
attr_reader :bill_at
|
|
161
|
+
# The id of the one-time fee.
|
|
162
|
+
attr_reader :id
|
|
163
|
+
# The user-provided lookup key.
|
|
164
|
+
attr_reader :lookup_key
|
|
165
|
+
# The id of the product for this fee.
|
|
166
|
+
attr_reader :product
|
|
167
|
+
|
|
168
|
+
def self.inner_class_types
|
|
169
|
+
@inner_class_types = { bill_at: BillAt }
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def self.field_remappings
|
|
173
|
+
@field_remappings = {}
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
# The one-time fees for this page.
|
|
177
|
+
attr_reader :data
|
|
178
|
+
|
|
179
|
+
def self.inner_class_types
|
|
180
|
+
@inner_class_types = { data: Data }
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
def self.field_remappings
|
|
184
|
+
@field_remappings = {}
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
143
188
|
class PricingLines < ::Stripe::StripeObject
|
|
144
189
|
class Data < ::Stripe::StripeObject
|
|
145
190
|
class EndsAt < ::Stripe::StripeObject
|
|
@@ -486,6 +531,8 @@ module Stripe
|
|
|
486
531
|
attr_reader :metadata
|
|
487
532
|
# String representing the object's type. Objects of the same type share the same value of the object field.
|
|
488
533
|
attr_reader :object
|
|
534
|
+
# The one-time fees. Only populated when `one_time_fees` is passed in the `include` parameter.
|
|
535
|
+
attr_reader :one_time_fees
|
|
489
536
|
# The pricing lines. Only populated when `pricing_lines` is passed in the `include` parameter.
|
|
490
537
|
attr_reader :pricing_lines
|
|
491
538
|
# The pricing overrides. Only populated when `pricing_overrides` is passed in the `include` parameter.
|
|
@@ -499,6 +546,7 @@ module Stripe
|
|
|
499
546
|
@inner_class_types = {
|
|
500
547
|
billing_cycle_anchor: BillingCycleAnchor,
|
|
501
548
|
billing_settings: BillingSettings,
|
|
549
|
+
one_time_fees: OneTimeFees,
|
|
502
550
|
pricing_lines: PricingLines,
|
|
503
551
|
pricing_overrides: PricingOverrides,
|
|
504
552
|
status_transitions: StatusTransitions,
|
|
@@ -7846,8 +7846,6 @@ module Stripe
|
|
|
7846
7846
|
class GrossSettlement < ::Stripe::StripeObject
|
|
7847
7847
|
# The ID of the payment method to use for gross settlement payouts.
|
|
7848
7848
|
attr_reader :payment_method
|
|
7849
|
-
# Whether to collect a payment method for gross settlement.
|
|
7850
|
-
attr_reader :payment_method_collection
|
|
7851
7849
|
|
|
7852
7850
|
def self.inner_class_types
|
|
7853
7851
|
@inner_class_types = {}
|
|
@@ -17602,6 +17600,8 @@ module Stripe
|
|
|
17602
17600
|
attr_reader :currency
|
|
17603
17601
|
# The Account's preferred locales (languages), ordered by preference.
|
|
17604
17602
|
attr_reader :locales
|
|
17603
|
+
# Default payout methods per currency. Keys are three-letter [ISO currency codes](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Values are v2 Payout Method IDs.
|
|
17604
|
+
attr_reader :payout_methods
|
|
17605
17605
|
# Account profile information.
|
|
17606
17606
|
attr_reader :profile
|
|
17607
17607
|
# Default responsibilities held by either Stripe or the platform.
|
|
@@ -12,13 +12,42 @@ module Stripe
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
class RequestedBy < ::Stripe::StripeObject
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
class ApiKey < ::Stripe::StripeObject
|
|
16
|
+
# Stripe-defined identifier for the API key (e.g. a restricted API key token).
|
|
17
|
+
attr_reader :id
|
|
18
|
+
# Merchant-defined name for the API key.
|
|
19
|
+
attr_reader :name
|
|
20
|
+
|
|
21
|
+
def self.inner_class_types
|
|
22
|
+
@inner_class_types = {}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.field_remappings
|
|
26
|
+
@field_remappings = {}
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
class User < ::Stripe::StripeObject
|
|
31
|
+
# Email address of the dashboard user.
|
|
32
|
+
attr_reader :email
|
|
33
|
+
|
|
34
|
+
def self.inner_class_types
|
|
35
|
+
@inner_class_types = {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.field_remappings
|
|
39
|
+
@field_remappings = {}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
# Present when `type` is `api_key`.
|
|
43
|
+
attr_reader :api_key
|
|
44
|
+
# The type of actor that made the request.
|
|
45
|
+
attr_reader :type
|
|
46
|
+
# Present when `type` is `user`.
|
|
47
|
+
attr_reader :user
|
|
19
48
|
|
|
20
49
|
def self.inner_class_types
|
|
21
|
-
@inner_class_types = {}
|
|
50
|
+
@inner_class_types = { api_key: ApiKey, user: User }
|
|
22
51
|
end
|
|
23
52
|
|
|
24
53
|
def self.field_remappings
|
|
@@ -28,13 +57,42 @@ module Stripe
|
|
|
28
57
|
|
|
29
58
|
class Review < ::Stripe::StripeObject
|
|
30
59
|
class ReviewedBy < ::Stripe::StripeObject
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
60
|
+
class ApiKey < ::Stripe::StripeObject
|
|
61
|
+
# Stripe-defined identifier for the API key (e.g. a restricted API key token).
|
|
62
|
+
attr_reader :id
|
|
63
|
+
# Merchant-defined name for the API key.
|
|
64
|
+
attr_reader :name
|
|
65
|
+
|
|
66
|
+
def self.inner_class_types
|
|
67
|
+
@inner_class_types = {}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def self.field_remappings
|
|
71
|
+
@field_remappings = {}
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
class User < ::Stripe::StripeObject
|
|
76
|
+
# Email address of the dashboard user.
|
|
77
|
+
attr_reader :email
|
|
78
|
+
|
|
79
|
+
def self.inner_class_types
|
|
80
|
+
@inner_class_types = {}
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def self.field_remappings
|
|
84
|
+
@field_remappings = {}
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
# Present when `type` is `api_key`.
|
|
88
|
+
attr_reader :api_key
|
|
89
|
+
# The type of actor that reviewed the request.
|
|
90
|
+
attr_reader :type
|
|
91
|
+
# Present when `type` is `user`.
|
|
92
|
+
attr_reader :user
|
|
35
93
|
|
|
36
94
|
def self.inner_class_types
|
|
37
|
-
@inner_class_types = {}
|
|
95
|
+
@inner_class_types = { api_key: ApiKey, user: User }
|
|
38
96
|
end
|
|
39
97
|
|
|
40
98
|
def self.field_remappings
|
|
@@ -268,6 +326,8 @@ module Stripe
|
|
|
268
326
|
end
|
|
269
327
|
|
|
270
328
|
class StatusTransitions < ::Stripe::StripeObject
|
|
329
|
+
# Timestamp when the approval request was approved.
|
|
330
|
+
attr_reader :approved_at
|
|
271
331
|
# Timestamp when the approval request was canceled.
|
|
272
332
|
attr_reader :canceled_at
|
|
273
333
|
# Timestamp when the approval request expired.
|
|
@@ -276,8 +336,6 @@ module Stripe
|
|
|
276
336
|
attr_reader :failed_at
|
|
277
337
|
# Timestamp when the approval request was rejected.
|
|
278
338
|
attr_reader :rejected_at
|
|
279
|
-
# Timestamp when the approval request moved to requires_execution status.
|
|
280
|
-
attr_reader :requires_execution_at
|
|
281
339
|
# Timestamp when the approval request succeeded.
|
|
282
340
|
attr_reader :succeeded_at
|
|
283
341
|
|
|
@@ -295,8 +353,6 @@ module Stripe
|
|
|
295
353
|
attr_reader :created
|
|
296
354
|
# The URL to the dashboard for this ApprovalRequest.
|
|
297
355
|
attr_reader :dashboard_url
|
|
298
|
-
# A description of the approval request.
|
|
299
|
-
attr_reader :description
|
|
300
356
|
# The timestamp at which this ApprovalRequest will expire.
|
|
301
357
|
attr_reader :expires_at
|
|
302
358
|
# The unique identifier for this ApprovalRequest.
|
|
@@ -305,6 +361,8 @@ module Stripe
|
|
|
305
361
|
attr_reader :livemode
|
|
306
362
|
# String representing the object's type. Objects of the same type share the same value of the object field.
|
|
307
363
|
attr_reader :object
|
|
364
|
+
# Context provided by the requester (e.g. an agent) to help reviewers evaluate the request.
|
|
365
|
+
attr_reader :reason
|
|
308
366
|
# The requester of this ApprovalRequest.
|
|
309
367
|
attr_reader :requested_by
|
|
310
368
|
# The review of this ApprovalRequest if it has been reviewed.
|
|
@@ -54,9 +54,12 @@ module Stripe
|
|
|
54
54
|
|
|
55
55
|
# Retrieves the Event that generated this EventNotification.
|
|
56
56
|
def fetch_event
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
# `id` comes from the notification body, so escape it the way generated
|
|
58
|
+
# services do -- otherwise it can inject extra path or query segments.
|
|
59
|
+
path = "/v2/core/events/#{CGI.escape(id)}"
|
|
60
|
+
resp = @client.raw_request(:get, path, opts: { stripe_context: context,
|
|
61
|
+
"Stripe-Request-Trigger" => "event=#{id}", },
|
|
62
|
+
usage: ["fetch_event"])
|
|
60
63
|
@client.deserialize(resp.http_body, api_mode: :v2)
|
|
61
64
|
end
|
|
62
65
|
end
|
|
@@ -123,6 +123,8 @@ module Stripe
|
|
|
123
123
|
attr_reader :balance_transaction
|
|
124
124
|
# The ID of the associated credit transaction.
|
|
125
125
|
attr_reader :credit_transaction
|
|
126
|
+
# The ID of the associated crypto transaction.
|
|
127
|
+
attr_reader :crypto_transaction
|
|
126
128
|
# The ID of the associated v2 money management transaction.
|
|
127
129
|
attr_reader :money_management_transaction
|
|
128
130
|
# The ID of the associated accounts-receivable invoice.
|
|
@@ -114,6 +114,8 @@ module Stripe
|
|
|
114
114
|
attr_reader :livemode
|
|
115
115
|
# String representing the object's type. Objects of the same type share the same value of the object field.
|
|
116
116
|
attr_reader :object
|
|
117
|
+
# Whether the GB Bank Account is currently unusable for money movement, despite potentially being correctly set up. Please reach out to Stripe Support for more information.
|
|
118
|
+
attr_reader :restricted
|
|
117
119
|
# The Sort Code of the bank account.
|
|
118
120
|
attr_reader :sort_code
|
|
119
121
|
# The list of currencies supported by this bank account.
|
|
@@ -81,6 +81,8 @@ module Stripe
|
|
|
81
81
|
attr_reader :livemode
|
|
82
82
|
# String representing the object's type. Objects of the same type share the same value of the object field.
|
|
83
83
|
attr_reader :object
|
|
84
|
+
# Whether the US Bank Account is currently unusable for money movement, despite potentially being correctly set up. Please reach out to Stripe Support for more information.
|
|
85
|
+
attr_reader :restricted
|
|
84
86
|
# The ACH routing number of the bank account.
|
|
85
87
|
attr_reader :routing_number
|
|
86
88
|
# The list of currencies supported by this bank account.
|