stripe 21.2.0.pre.alpha.1 → 21.2.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_operations/singleton_save.rb +4 -4
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/event_types.rb +22 -0
- data/lib/stripe/events/v2_money_management_dispute_adjustment_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_dispute_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_dispute_lost_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_dispute_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_dispute_won_event.rb +44 -0
- data/lib/stripe/events/v2_risk_evaluation_outcome_delinquency_ready_event.rb +44 -0
- data/lib/stripe/object_types.rb +3 -0
- data/lib/stripe/params/balance_transaction_list_params.rb +2 -2
- data/lib/stripe/params/billing_portal/session_create_params.rb +13 -0
- data/lib/stripe/params/checkout/session_create_params.rb +208 -4
- data/lib/stripe/params/crypto/onramp_session_checkout_params.rb +37 -1
- data/lib/stripe/params/crypto/onramp_session_create_params.rb +4 -0
- data/lib/stripe/params/customer_create_params.rb +7 -1
- data/lib/stripe/params/customer_update_params.rb +7 -1
- data/lib/stripe/params/invoice_rendering_template_create_params.rb +14 -2
- data/lib/stripe/params/invoice_rendering_template_update_params.rb +14 -2
- data/lib/stripe/params/issuing/authorization_create_params.rb +1 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +96 -4
- data/lib/stripe/params/payment_intent_create_params.rb +96 -4
- data/lib/stripe/params/payment_intent_update_params.rb +96 -4
- data/lib/stripe/params/payment_method_configuration_create_params.rb +63 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +63 -0
- data/lib/stripe/params/tax/calculation_create_params.rb +1 -1
- data/lib/stripe/params/terminal/configuration_create_params.rb +1 -1
- data/lib/stripe/params/terminal/configuration_update_params.rb +1 -1
- data/lib/stripe/params/terminal/reader_refund_payment_params.rb +15 -1
- data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +1 -1
- data/lib/stripe/params/v2/billing/contract_create_params.rb +182 -9
- data/lib/stripe/params/v2/billing/contract_update_params.rb +328 -16
- data/lib/stripe/params/v2/core/account_create_params.rb +432 -3
- data/lib/stripe/params/v2/core/account_token_create_params.rb +4 -1
- data/lib/stripe/params/v2/core/account_update_params.rb +436 -4
- data/lib/stripe/params/v2/core/fee_batch_list_params.rb +7 -1
- data/lib/stripe/params/v2/money_management/dispute_adjustment_list_params.rb +23 -0
- data/lib/stripe/params/v2/money_management/dispute_adjustment_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/dispute_create_params.rb +37 -0
- data/lib/stripe/params/v2/money_management/dispute_list_params.rb +26 -0
- data/lib/stripe/params/v2/money_management/dispute_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +41 -1
- data/lib/stripe/params/v2/money_management/inbound_transfer_mandate_create_params.rb +24 -8
- data/lib/stripe/params/v2/money_management/spending_mandate_create_params.rb +51 -0
- data/lib/stripe/params/v2/money_management/spending_mandate_list_params.rb +4 -1
- data/lib/stripe/params/v2/money_management/spending_mandate_update_params.rb +39 -0
- data/lib/stripe/params/v2/money_management/test_helpers/financial_address_debit_params.rb +20 -1
- data/lib/stripe/params/v2/risk/evaluation_outcome_list_params.rb +34 -0
- data/lib/stripe/params/v2/risk/evaluation_outcome_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/test_helpers/money_management/inbound_transfer_fail_params.rb +19 -0
- data/lib/stripe/params/v2/test_helpers/money_management/inbound_transfer_succeed_params.rb +12 -0
- data/lib/stripe/params.rb +27 -5
- data/lib/stripe/resources/billing_portal/session.rb +16 -0
- data/lib/stripe/resources/cash_balance.rb +1 -1
- data/lib/stripe/resources/charge.rb +32 -0
- data/lib/stripe/resources/checkout/session.rb +65 -2
- data/lib/stripe/resources/confirmation_token.rb +54 -2
- data/lib/stripe/resources/customer.rb +4 -0
- data/lib/stripe/resources/customer_tax_exemption.rb +2 -0
- data/lib/stripe/resources/dispute.rb +4 -0
- data/lib/stripe/resources/identity/verification_report.rb +34 -0
- data/lib/stripe/resources/invoice.rb +0 -30
- data/lib/stripe/resources/invoice_rendering_template.rb +19 -1
- data/lib/stripe/resources/issuing/authorization.rb +18 -0
- data/lib/stripe/resources/issuing/card.rb +28 -0
- data/lib/stripe/resources/issuing/transaction.rb +18 -0
- data/lib/stripe/resources/mandate.rb +65 -0
- data/lib/stripe/resources/payment_attempt_record.rb +46 -0
- data/lib/stripe/resources/payment_intent.rb +113 -103
- data/lib/stripe/resources/payment_link.rb +2 -0
- data/lib/stripe/resources/payment_method.rb +53 -1
- data/lib/stripe/resources/payment_method_configuration.rb +102 -0
- data/lib/stripe/resources/payment_record.rb +46 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -30
- data/lib/stripe/resources/radar/account_evaluation.rb +36 -2
- data/lib/stripe/resources/reserve/plan.rb +1 -1
- data/lib/stripe/resources/risk/form.rb +44 -1
- data/lib/stripe/resources/setup_attempt.rb +91 -0
- data/lib/stripe/resources/setup_intent.rb +1 -1
- data/lib/stripe/resources/source.rb +2 -2
- data/lib/stripe/resources/subscription.rb +0 -20
- data/lib/stripe/resources/tax/calculation.rb +1 -1
- data/lib/stripe/resources/tax/form.rb +6 -0
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/terminal/configuration.rb +1 -1
- data/lib/stripe/resources/terminal/onboarding_link.rb +2 -1
- data/lib/stripe/resources/terminal/reader.rb +17 -1
- data/lib/stripe/resources/test_helpers/test_clock.rb +1 -1
- data/lib/stripe/resources/three_d_secure/authentication.rb +1 -1
- data/lib/stripe/resources/v2/billing/contract.rb +285 -6
- data/lib/stripe/resources/v2/billing/contract_term.rb +133 -6
- data/lib/stripe/resources/v2/core/account.rb +2709 -322
- data/lib/stripe/resources/v2/core/fee_batch.rb +3 -0
- data/lib/stripe/resources/v2/core/fee_entry.rb +33 -3
- data/lib/stripe/resources/v2/money_management/dispute.rb +78 -0
- data/lib/stripe/resources/v2/money_management/dispute_adjustment.rb +53 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +45 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer_mandate.rb +6 -4
- data/lib/stripe/resources/v2/money_management/received_debit.rb +27 -1
- data/lib/stripe/resources/v2/money_management/spending_mandate.rb +18 -2
- 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/resources/v2/risk/evaluation_outcome.rb +305 -0
- data/lib/stripe/resources/v2/signals/account_evaluation.rb +34 -0
- data/lib/stripe/resources/v2/signals/account_signal.rb +23 -0
- data/lib/stripe/resources.rb +30 -0
- data/lib/stripe/services/checkout/session_service.rb +1 -1
- data/lib/stripe/services/payment_intent_service.rb +0 -11
- data/lib/stripe/services/risk/form_service.rb +44 -1
- data/lib/stripe/services/subscription_service.rb +0 -11
- data/lib/stripe/services/terminal/onboarding_link_service.rb +1 -0
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +1 -1
- data/lib/stripe/services/v2/core/fee_batch_service.rb +4 -1
- data/lib/stripe/services/v2/core/fee_entry_service.rb +3 -1
- data/lib/stripe/services/v2/money_management/debit_dispute_service.rb +1 -0
- data/lib/stripe/services/v2/money_management/dispute_adjustment_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/dispute_service.rb +46 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_mandate_service.rb +6 -3
- data/lib/stripe/services/v2/money_management/spending_mandate_service.rb +26 -0
- data/lib/stripe/services/v2/money_management_service.rb +3 -1
- data/lib/stripe/services/v2/risk/evaluation_outcome_service.rb +32 -0
- data/lib/stripe/services/v2/risk_service.rb +2 -1
- data/lib/stripe/services/v2/test_helpers/money_management/inbound_transfer_service.rb +34 -0
- data/lib/stripe/services/v2/test_helpers/money_management_service.rb +8 -0
- data/lib/stripe/services.rb +11 -0
- data/lib/stripe/stripe_client.rb +1 -1
- data/lib/stripe/stripe_event_notification_handler.rb +24 -0
- data/lib/stripe/stripe_object.rb +14 -4
- data/lib/stripe/util.rb +21 -2
- data/lib/stripe/v2_type_coercion.rb +6 -2
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -0
- data/rbi/stripe.rbi +8211 -782
- metadata +26 -4
- data/lib/stripe/params/payment_intent_update_crypto_refund_address_params.rb +0 -19
- data/lib/stripe/params/subscription_attach_cadence_params.rb +0 -16
|
@@ -248,6 +248,8 @@ module Stripe
|
|
|
248
248
|
attr_reader :reporting_year
|
|
249
249
|
# Attribute for field state_income_tax_withheld
|
|
250
250
|
attr_reader :state_income_tax_withheld
|
|
251
|
+
# The Treasury Tipped Occupation Code stored on the form's payee identity, returned when present regardless of reporting year. Contains one three-digit code or two codes separated by `|`, preserving leading zeros. Uses the selected identity for draft forms and the identity snapshot for finalized forms. Omitted when no code is recorded.
|
|
252
|
+
attr_reader :treasury_tipped_occupation_code
|
|
251
253
|
|
|
252
254
|
def self.inner_class_types
|
|
253
255
|
@inner_class_types = {
|
|
@@ -562,6 +564,8 @@ module Stripe
|
|
|
562
564
|
attr_reader :state_tax_withheld
|
|
563
565
|
# Attribute for field substitute_payments
|
|
564
566
|
attr_reader :substitute_payments
|
|
567
|
+
# The Treasury Tipped Occupation Code stored on the form's payee identity, returned when present regardless of reporting year. Contains one three-digit code or two codes separated by `|`, preserving leading zeros. Uses the selected identity for draft forms and the identity snapshot for finalized forms. Omitted when no code is recorded.
|
|
568
|
+
attr_reader :treasury_tipped_occupation_code
|
|
565
569
|
|
|
566
570
|
def self.inner_class_types
|
|
567
571
|
@inner_class_types = {
|
|
@@ -700,6 +704,8 @@ module Stripe
|
|
|
700
704
|
attr_reader :state_income
|
|
701
705
|
# Attribute for field state_tax_withheld
|
|
702
706
|
attr_reader :state_tax_withheld
|
|
707
|
+
# The Treasury Tipped Occupation Code stored on the form's payee identity, returned when present regardless of reporting year. Contains one three-digit code or two codes separated by `|`, preserving leading zeros. Uses the selected identity for draft forms and the identity snapshot for finalized forms. Omitted when no code is recorded.
|
|
708
|
+
attr_reader :treasury_tipped_occupation_code
|
|
703
709
|
|
|
704
710
|
def self.inner_class_types
|
|
705
711
|
@inner_class_types = {
|
|
@@ -227,7 +227,7 @@ module Stripe
|
|
|
227
227
|
attr_reader :ship_from_details
|
|
228
228
|
# The shipping cost details for the transaction.
|
|
229
229
|
attr_reader :shipping_cost
|
|
230
|
-
# The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window.
|
|
230
|
+
# The calculation uses the tax rules and rates that are in effect at this timestamp, expressed in seconds since the Unix epoch (January 1, 1970, at 00:00 UTC). Stripe Tax interprets this timestamp in each taxing jurisdiction's timezone to determine the applicable rules and rates. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window.
|
|
231
231
|
attr_reader :tax_date
|
|
232
232
|
# If `reversal`, this transaction reverses an earlier transaction.
|
|
233
233
|
attr_reader :type
|
|
@@ -633,7 +633,7 @@ module Stripe
|
|
|
633
633
|
|
|
634
634
|
class Wifi < ::Stripe::StripeObject
|
|
635
635
|
class EnterpriseEapPeap < ::Stripe::StripeObject
|
|
636
|
-
# A File ID representing a PEM file containing the server certificate
|
|
636
|
+
# A File ID representing a PEM file containing the server certificate. The certificate is not currently used to validate the identity of the server, but will be used in a future device update.
|
|
637
637
|
attr_reader :ca_certificate_file
|
|
638
638
|
# Password for connecting to the WiFi network
|
|
639
639
|
attr_reader :password
|
|
@@ -46,10 +46,11 @@ module Stripe
|
|
|
46
46
|
attr_reader :object
|
|
47
47
|
# Stripe account ID to generate the link for.
|
|
48
48
|
attr_reader :on_behalf_of
|
|
49
|
-
# The link passed back to the user for their onboarding.
|
|
49
|
+
# The link passed back to the user for their onboarding. This URL expires 30 minutes after creation. If it expires, create a new onboarding link.
|
|
50
50
|
attr_reader :redirect_url
|
|
51
51
|
|
|
52
52
|
# Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone.
|
|
53
|
+
# The returned URL expires 30 minutes after creation.
|
|
53
54
|
def self.create(params = {}, opts = {})
|
|
54
55
|
request_stripe_object(
|
|
55
56
|
method: :post,
|
|
@@ -540,11 +540,27 @@ module Stripe
|
|
|
540
540
|
|
|
541
541
|
class RefundPayment < ::Stripe::StripeObject
|
|
542
542
|
class RefundPaymentConfig < ::Stripe::StripeObject
|
|
543
|
+
class GiftCard < ::Stripe::StripeObject
|
|
544
|
+
# The brand of the destination gift card collected on the reader.
|
|
545
|
+
attr_reader :brand
|
|
546
|
+
# The gift card operation to perform with the refund amount.
|
|
547
|
+
attr_reader :operation_type
|
|
548
|
+
|
|
549
|
+
def self.inner_class_types
|
|
550
|
+
@inner_class_types = {}
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
def self.field_remappings
|
|
554
|
+
@field_remappings = {}
|
|
555
|
+
end
|
|
556
|
+
end
|
|
543
557
|
# Enable customer-initiated cancellation when refunding this payment.
|
|
544
558
|
attr_reader :enable_customer_cancellation
|
|
559
|
+
# Represents the destination gift card configuration for a refund
|
|
560
|
+
attr_reader :gift_card
|
|
545
561
|
|
|
546
562
|
def self.inner_class_types
|
|
547
|
-
@inner_class_types = {}
|
|
563
|
+
@inner_class_types = { gift_card: GiftCard }
|
|
548
564
|
end
|
|
549
565
|
|
|
550
566
|
def self.field_remappings
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
module Stripe
|
|
5
5
|
module TestHelpers
|
|
6
|
-
# A test clock enables deterministic control over objects in
|
|
6
|
+
# A test clock enables deterministic control over objects in a sandbox. With a test clock, you can create
|
|
7
7
|
# objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,
|
|
8
8
|
# you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.
|
|
9
9
|
class TestClock < APIResource
|
|
@@ -290,7 +290,7 @@ module Stripe
|
|
|
290
290
|
attr_reader :network_details
|
|
291
291
|
# The 3DS protocol version used for this 3DS Authentication.
|
|
292
292
|
attr_reader :protocol_version
|
|
293
|
-
# The indicator provided to the issuer by Stripe in the AReq that indicates whether a challenge is requested for this Authentication. This indicator should match the flow_preference you specified but may be overridden (for compliance reasons for example).
|
|
293
|
+
# The indicator provided to the issuer by Stripe in the AReq that indicates whether a challenge is requested for this Authentication. This indicator should match the flow_preference you specified but may be overridden (for compliance reasons or protocol version supportability for example).
|
|
294
294
|
attr_reader :requestor_challenge_indicator
|
|
295
295
|
# The Results Request Message (RReq) communicates the results of the authentication or verification.
|
|
296
296
|
attr_reader :rreq
|
|
@@ -239,16 +239,74 @@ module Stripe
|
|
|
239
239
|
end
|
|
240
240
|
|
|
241
241
|
class OverwritePrice < ::Stripe::StripeObject
|
|
242
|
+
class Tier < ::Stripe::StripeObject
|
|
243
|
+
# Price for the entire tier, represented as a decimal string in minor currency units.
|
|
244
|
+
attr_reader :flat_amount
|
|
245
|
+
# Price for the entire tier in minor currency units.
|
|
246
|
+
attr_reader :flat_amount_decimal
|
|
247
|
+
# Per-unit price for units included in this tier, represented as a decimal string in minor currency units.
|
|
248
|
+
attr_reader :unit_amount
|
|
249
|
+
# Per-unit price for units included in this tier in minor currency units.
|
|
250
|
+
attr_reader :unit_amount_decimal
|
|
251
|
+
# Up to and including this whole-number quantity is contained in the tier. If omitted, the tier has no upper bound.
|
|
252
|
+
attr_reader :up_to
|
|
253
|
+
# Up to and including this quantity will be contained in the tier.
|
|
254
|
+
attr_reader :up_to_decimal
|
|
255
|
+
# No upper bound to this tier.
|
|
256
|
+
attr_reader :up_to_inf
|
|
257
|
+
|
|
258
|
+
def self.inner_class_types
|
|
259
|
+
@inner_class_types = {}
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
def self.field_remappings
|
|
263
|
+
@field_remappings = {}
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
def self.field_encodings
|
|
267
|
+
@field_encodings = {
|
|
268
|
+
flat_amount_decimal: :decimal_string,
|
|
269
|
+
unit_amount_decimal: :decimal_string,
|
|
270
|
+
up_to: :int64_string,
|
|
271
|
+
up_to_decimal: :decimal_string,
|
|
272
|
+
}
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
# Defines whether the price override is billed per unit or by tiers.
|
|
276
|
+
attr_reader :billing_scheme
|
|
277
|
+
# Defines whether the tiered price should be graduated or volume-based.
|
|
278
|
+
attr_reader :tiering_mode
|
|
279
|
+
# Each element represents a pricing tier.
|
|
280
|
+
attr_reader :tiers
|
|
281
|
+
# Defines whether the tiered price should be graduated or volume-based.
|
|
282
|
+
attr_reader :tiers_mode
|
|
242
283
|
# The per-unit amount to be charged, represented as a decimal string in minor currency units.
|
|
243
284
|
attr_reader :unit_amount
|
|
244
285
|
|
|
245
286
|
def self.inner_class_types
|
|
246
|
-
@inner_class_types = {}
|
|
287
|
+
@inner_class_types = { tiers: Tier }
|
|
247
288
|
end
|
|
248
289
|
|
|
249
290
|
def self.field_remappings
|
|
250
291
|
@field_remappings = {}
|
|
251
292
|
end
|
|
293
|
+
|
|
294
|
+
def self.field_encodings
|
|
295
|
+
@field_encodings = {
|
|
296
|
+
tiers: {
|
|
297
|
+
kind: :array,
|
|
298
|
+
element: {
|
|
299
|
+
kind: :object,
|
|
300
|
+
fields: {
|
|
301
|
+
flat_amount_decimal: :decimal_string,
|
|
302
|
+
unit_amount_decimal: :decimal_string,
|
|
303
|
+
up_to: :int64_string,
|
|
304
|
+
up_to_decimal: :decimal_string,
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
}
|
|
309
|
+
end
|
|
252
310
|
end
|
|
253
311
|
|
|
254
312
|
class StartsAt < ::Stripe::StripeObject
|
|
@@ -291,6 +349,28 @@ module Stripe
|
|
|
291
349
|
def self.field_remappings
|
|
292
350
|
@field_remappings = {}
|
|
293
351
|
end
|
|
352
|
+
|
|
353
|
+
def self.field_encodings
|
|
354
|
+
@field_encodings = {
|
|
355
|
+
overwrite_price: {
|
|
356
|
+
kind: :object,
|
|
357
|
+
fields: {
|
|
358
|
+
tiers: {
|
|
359
|
+
kind: :array,
|
|
360
|
+
element: {
|
|
361
|
+
kind: :object,
|
|
362
|
+
fields: {
|
|
363
|
+
flat_amount_decimal: :decimal_string,
|
|
364
|
+
unit_amount_decimal: :decimal_string,
|
|
365
|
+
up_to: :int64_string,
|
|
366
|
+
up_to_decimal: :decimal_string,
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
}
|
|
373
|
+
end
|
|
294
374
|
end
|
|
295
375
|
# The pricing line overrides.
|
|
296
376
|
attr_reader :data
|
|
@@ -302,6 +382,36 @@ module Stripe
|
|
|
302
382
|
def self.field_remappings
|
|
303
383
|
@field_remappings = {}
|
|
304
384
|
end
|
|
385
|
+
|
|
386
|
+
def self.field_encodings
|
|
387
|
+
@field_encodings = {
|
|
388
|
+
data: {
|
|
389
|
+
kind: :array,
|
|
390
|
+
element: {
|
|
391
|
+
kind: :object,
|
|
392
|
+
fields: {
|
|
393
|
+
overwrite_price: {
|
|
394
|
+
kind: :object,
|
|
395
|
+
fields: {
|
|
396
|
+
tiers: {
|
|
397
|
+
kind: :array,
|
|
398
|
+
element: {
|
|
399
|
+
kind: :object,
|
|
400
|
+
fields: {
|
|
401
|
+
flat_amount_decimal: :decimal_string,
|
|
402
|
+
unit_amount_decimal: :decimal_string,
|
|
403
|
+
up_to: :int64_string,
|
|
404
|
+
up_to_decimal: :decimal_string,
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
}
|
|
414
|
+
end
|
|
305
415
|
end
|
|
306
416
|
# The current quantity on this pricing line.
|
|
307
417
|
attr_reader :current_quantity
|
|
@@ -319,7 +429,39 @@ module Stripe
|
|
|
319
429
|
end
|
|
320
430
|
|
|
321
431
|
def self.field_encodings
|
|
322
|
-
@field_encodings = {
|
|
432
|
+
@field_encodings = {
|
|
433
|
+
current_quantity: :decimal_string,
|
|
434
|
+
pricing_overrides: {
|
|
435
|
+
kind: :object,
|
|
436
|
+
fields: {
|
|
437
|
+
data: {
|
|
438
|
+
kind: :array,
|
|
439
|
+
element: {
|
|
440
|
+
kind: :object,
|
|
441
|
+
fields: {
|
|
442
|
+
overwrite_price: {
|
|
443
|
+
kind: :object,
|
|
444
|
+
fields: {
|
|
445
|
+
tiers: {
|
|
446
|
+
kind: :array,
|
|
447
|
+
element: {
|
|
448
|
+
kind: :object,
|
|
449
|
+
fields: {
|
|
450
|
+
flat_amount_decimal: :decimal_string,
|
|
451
|
+
unit_amount_decimal: :decimal_string,
|
|
452
|
+
up_to: :int64_string,
|
|
453
|
+
up_to_decimal: :decimal_string,
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
}
|
|
323
465
|
end
|
|
324
466
|
end
|
|
325
467
|
# V1 price details. Present when `type` is `price`.
|
|
@@ -337,7 +479,42 @@ module Stripe
|
|
|
337
479
|
|
|
338
480
|
def self.field_encodings
|
|
339
481
|
@field_encodings = {
|
|
340
|
-
price_details: {
|
|
482
|
+
price_details: {
|
|
483
|
+
kind: :object,
|
|
484
|
+
fields: {
|
|
485
|
+
current_quantity: :decimal_string,
|
|
486
|
+
pricing_overrides: {
|
|
487
|
+
kind: :object,
|
|
488
|
+
fields: {
|
|
489
|
+
data: {
|
|
490
|
+
kind: :array,
|
|
491
|
+
element: {
|
|
492
|
+
kind: :object,
|
|
493
|
+
fields: {
|
|
494
|
+
overwrite_price: {
|
|
495
|
+
kind: :object,
|
|
496
|
+
fields: {
|
|
497
|
+
tiers: {
|
|
498
|
+
kind: :array,
|
|
499
|
+
element: {
|
|
500
|
+
kind: :object,
|
|
501
|
+
fields: {
|
|
502
|
+
flat_amount_decimal: :decimal_string,
|
|
503
|
+
unit_amount_decimal: :decimal_string,
|
|
504
|
+
up_to: :int64_string,
|
|
505
|
+
up_to_decimal: :decimal_string,
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
},
|
|
341
518
|
}
|
|
342
519
|
end
|
|
343
520
|
end
|
|
@@ -380,7 +557,42 @@ module Stripe
|
|
|
380
557
|
pricing: {
|
|
381
558
|
kind: :object,
|
|
382
559
|
fields: {
|
|
383
|
-
price_details: {
|
|
560
|
+
price_details: {
|
|
561
|
+
kind: :object,
|
|
562
|
+
fields: {
|
|
563
|
+
current_quantity: :decimal_string,
|
|
564
|
+
pricing_overrides: {
|
|
565
|
+
kind: :object,
|
|
566
|
+
fields: {
|
|
567
|
+
data: {
|
|
568
|
+
kind: :array,
|
|
569
|
+
element: {
|
|
570
|
+
kind: :object,
|
|
571
|
+
fields: {
|
|
572
|
+
overwrite_price: {
|
|
573
|
+
kind: :object,
|
|
574
|
+
fields: {
|
|
575
|
+
tiers: {
|
|
576
|
+
kind: :array,
|
|
577
|
+
element: {
|
|
578
|
+
kind: :object,
|
|
579
|
+
fields: {
|
|
580
|
+
flat_amount_decimal: :decimal_string,
|
|
581
|
+
unit_amount_decimal: :decimal_string,
|
|
582
|
+
up_to: :int64_string,
|
|
583
|
+
up_to_decimal: :decimal_string,
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
},
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
},
|
|
384
596
|
},
|
|
385
597
|
},
|
|
386
598
|
}
|
|
@@ -407,7 +619,42 @@ module Stripe
|
|
|
407
619
|
pricing: {
|
|
408
620
|
kind: :object,
|
|
409
621
|
fields: {
|
|
410
|
-
price_details: {
|
|
622
|
+
price_details: {
|
|
623
|
+
kind: :object,
|
|
624
|
+
fields: {
|
|
625
|
+
current_quantity: :decimal_string,
|
|
626
|
+
pricing_overrides: {
|
|
627
|
+
kind: :object,
|
|
628
|
+
fields: {
|
|
629
|
+
data: {
|
|
630
|
+
kind: :array,
|
|
631
|
+
element: {
|
|
632
|
+
kind: :object,
|
|
633
|
+
fields: {
|
|
634
|
+
overwrite_price: {
|
|
635
|
+
kind: :object,
|
|
636
|
+
fields: {
|
|
637
|
+
tiers: {
|
|
638
|
+
kind: :array,
|
|
639
|
+
element: {
|
|
640
|
+
kind: :object,
|
|
641
|
+
fields: {
|
|
642
|
+
flat_amount_decimal: :decimal_string,
|
|
643
|
+
unit_amount_decimal: :decimal_string,
|
|
644
|
+
up_to: :int64_string,
|
|
645
|
+
up_to_decimal: :decimal_string,
|
|
646
|
+
},
|
|
647
|
+
},
|
|
648
|
+
},
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
},
|
|
657
|
+
},
|
|
411
658
|
},
|
|
412
659
|
},
|
|
413
660
|
},
|
|
@@ -614,7 +861,39 @@ module Stripe
|
|
|
614
861
|
fields: {
|
|
615
862
|
price_details: {
|
|
616
863
|
kind: :object,
|
|
617
|
-
fields: {
|
|
864
|
+
fields: {
|
|
865
|
+
current_quantity: :decimal_string,
|
|
866
|
+
pricing_overrides: {
|
|
867
|
+
kind: :object,
|
|
868
|
+
fields: {
|
|
869
|
+
data: {
|
|
870
|
+
kind: :array,
|
|
871
|
+
element: {
|
|
872
|
+
kind: :object,
|
|
873
|
+
fields: {
|
|
874
|
+
overwrite_price: {
|
|
875
|
+
kind: :object,
|
|
876
|
+
fields: {
|
|
877
|
+
tiers: {
|
|
878
|
+
kind: :array,
|
|
879
|
+
element: {
|
|
880
|
+
kind: :object,
|
|
881
|
+
fields: {
|
|
882
|
+
flat_amount_decimal: :decimal_string,
|
|
883
|
+
unit_amount_decimal: :decimal_string,
|
|
884
|
+
up_to: :int64_string,
|
|
885
|
+
up_to_decimal: :decimal_string,
|
|
886
|
+
},
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
},
|
|
890
|
+
},
|
|
891
|
+
},
|
|
892
|
+
},
|
|
893
|
+
},
|
|
894
|
+
},
|
|
895
|
+
},
|
|
896
|
+
},
|
|
618
897
|
},
|
|
619
898
|
},
|
|
620
899
|
},
|
|
@@ -58,11 +58,41 @@ module Stripe
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
class Overwrite < ::Stripe::StripeObject
|
|
61
|
+
class Tier < ::Stripe::StripeObject
|
|
62
|
+
# Flat amount in minor currency units.
|
|
63
|
+
attr_reader :flat_amount_decimal
|
|
64
|
+
# Per-unit amount in minor currency units.
|
|
65
|
+
attr_reader :unit_amount_decimal
|
|
66
|
+
# Inclusive whole-number upper bound. Omitted for an unbounded final tier.
|
|
67
|
+
attr_reader :up_to
|
|
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
|
+
|
|
77
|
+
def self.field_encodings
|
|
78
|
+
@field_encodings = {
|
|
79
|
+
flat_amount_decimal: :decimal_string,
|
|
80
|
+
unit_amount_decimal: :decimal_string,
|
|
81
|
+
up_to: :int64_string,
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
# Whether the replacement pricing is per unit or tiered.
|
|
86
|
+
attr_reader :billing_scheme
|
|
87
|
+
# Replacement pricing tiers.
|
|
88
|
+
attr_reader :tiers
|
|
89
|
+
# How the pricing tiers are applied.
|
|
90
|
+
attr_reader :tiers_mode
|
|
61
91
|
# The replacement per-unit amount in minor currency units.
|
|
62
92
|
attr_reader :unit_amount_decimal
|
|
63
93
|
|
|
64
94
|
def self.inner_class_types
|
|
65
|
-
@inner_class_types = {}
|
|
95
|
+
@inner_class_types = { tiers: Tier }
|
|
66
96
|
end
|
|
67
97
|
|
|
68
98
|
def self.field_remappings
|
|
@@ -70,7 +100,20 @@ module Stripe
|
|
|
70
100
|
end
|
|
71
101
|
|
|
72
102
|
def self.field_encodings
|
|
73
|
-
@field_encodings = {
|
|
103
|
+
@field_encodings = {
|
|
104
|
+
tiers: {
|
|
105
|
+
kind: :array,
|
|
106
|
+
element: {
|
|
107
|
+
kind: :object,
|
|
108
|
+
fields: {
|
|
109
|
+
flat_amount_decimal: :decimal_string,
|
|
110
|
+
unit_amount_decimal: :decimal_string,
|
|
111
|
+
up_to: :int64_string,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
unit_amount_decimal: :decimal_string,
|
|
116
|
+
}
|
|
74
117
|
end
|
|
75
118
|
end
|
|
76
119
|
|
|
@@ -118,7 +161,23 @@ module Stripe
|
|
|
118
161
|
def self.field_encodings
|
|
119
162
|
@field_encodings = {
|
|
120
163
|
multiply: { kind: :object, fields: { factor: :decimal_string } },
|
|
121
|
-
overwrite: {
|
|
164
|
+
overwrite: {
|
|
165
|
+
kind: :object,
|
|
166
|
+
fields: {
|
|
167
|
+
tiers: {
|
|
168
|
+
kind: :array,
|
|
169
|
+
element: {
|
|
170
|
+
kind: :object,
|
|
171
|
+
fields: {
|
|
172
|
+
flat_amount_decimal: :decimal_string,
|
|
173
|
+
unit_amount_decimal: :decimal_string,
|
|
174
|
+
up_to: :int64_string,
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
unit_amount_decimal: :decimal_string,
|
|
179
|
+
},
|
|
180
|
+
},
|
|
122
181
|
}
|
|
123
182
|
end
|
|
124
183
|
end
|
|
@@ -186,10 +245,12 @@ module Stripe
|
|
|
186
245
|
@field_remappings = {}
|
|
187
246
|
end
|
|
188
247
|
end
|
|
189
|
-
# Amount in the contract's currency.
|
|
190
|
-
attr_reader :amount
|
|
191
248
|
# The resolved bill date.
|
|
192
249
|
attr_reader :bill_at
|
|
250
|
+
# Resolved installment quantity. Always present; defaults to 1 when omitted on input.
|
|
251
|
+
attr_reader :quantity
|
|
252
|
+
# Unit price in minor units of the contract's currency, before multiplying by quantity.
|
|
253
|
+
attr_reader :unit_amount_decimal
|
|
193
254
|
|
|
194
255
|
def self.inner_class_types
|
|
195
256
|
@inner_class_types = { bill_at: BillAt }
|
|
@@ -198,6 +259,10 @@ module Stripe
|
|
|
198
259
|
def self.field_remappings
|
|
199
260
|
@field_remappings = {}
|
|
200
261
|
end
|
|
262
|
+
|
|
263
|
+
def self.field_encodings
|
|
264
|
+
@field_encodings = { quantity: :decimal_string, unit_amount_decimal: :decimal_string }
|
|
265
|
+
end
|
|
201
266
|
end
|
|
202
267
|
# Scheduled installments and billed history.
|
|
203
268
|
attr_reader :custom
|
|
@@ -211,6 +276,18 @@ module Stripe
|
|
|
211
276
|
def self.field_remappings
|
|
212
277
|
@field_remappings = {}
|
|
213
278
|
end
|
|
279
|
+
|
|
280
|
+
def self.field_encodings
|
|
281
|
+
@field_encodings = {
|
|
282
|
+
custom: {
|
|
283
|
+
kind: :array,
|
|
284
|
+
element: {
|
|
285
|
+
kind: :object,
|
|
286
|
+
fields: { quantity: :decimal_string, unit_amount_decimal: :decimal_string },
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
}
|
|
290
|
+
end
|
|
214
291
|
end
|
|
215
292
|
|
|
216
293
|
class ServicePeriod < ::Stripe::StripeObject
|
|
@@ -266,6 +343,23 @@ module Stripe
|
|
|
266
343
|
def self.field_remappings
|
|
267
344
|
@field_remappings = {}
|
|
268
345
|
end
|
|
346
|
+
|
|
347
|
+
def self.field_encodings
|
|
348
|
+
@field_encodings = {
|
|
349
|
+
bill_schedule: {
|
|
350
|
+
kind: :object,
|
|
351
|
+
fields: {
|
|
352
|
+
custom: {
|
|
353
|
+
kind: :array,
|
|
354
|
+
element: {
|
|
355
|
+
kind: :object,
|
|
356
|
+
fields: { quantity: :decimal_string, unit_amount_decimal: :decimal_string },
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
}
|
|
362
|
+
end
|
|
269
363
|
end
|
|
270
364
|
# The stable ID of the term.
|
|
271
365
|
attr_reader :id
|
|
@@ -304,10 +398,43 @@ module Stripe
|
|
|
304
398
|
kind: :object,
|
|
305
399
|
fields: {
|
|
306
400
|
multiply: { kind: :object, fields: { factor: :decimal_string } },
|
|
307
|
-
overwrite: {
|
|
401
|
+
overwrite: {
|
|
402
|
+
kind: :object,
|
|
403
|
+
fields: {
|
|
404
|
+
tiers: {
|
|
405
|
+
kind: :array,
|
|
406
|
+
element: {
|
|
407
|
+
kind: :object,
|
|
408
|
+
fields: {
|
|
409
|
+
flat_amount_decimal: :decimal_string,
|
|
410
|
+
unit_amount_decimal: :decimal_string,
|
|
411
|
+
up_to: :int64_string,
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
unit_amount_decimal: :decimal_string,
|
|
416
|
+
},
|
|
417
|
+
},
|
|
308
418
|
},
|
|
309
419
|
},
|
|
310
420
|
recurring_price: { kind: :object, fields: { quantity: :decimal_string } },
|
|
421
|
+
scheduled_fee: {
|
|
422
|
+
kind: :object,
|
|
423
|
+
fields: {
|
|
424
|
+
bill_schedule: {
|
|
425
|
+
kind: :object,
|
|
426
|
+
fields: {
|
|
427
|
+
custom: {
|
|
428
|
+
kind: :array,
|
|
429
|
+
element: {
|
|
430
|
+
kind: :object,
|
|
431
|
+
fields: { quantity: :decimal_string, unit_amount_decimal: :decimal_string },
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
},
|
|
437
|
+
},
|
|
311
438
|
}
|
|
312
439
|
end
|
|
313
440
|
end
|