stripe 18.2.0.pre.alpha.1 → 18.2.0.pre.alpha.3
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 +1 -1
- data/lib/stripe/event_types.rb +4 -0
- data/lib/stripe/events/v2_core_account_including_future_requirements_updated_event.rb +44 -0
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/params/checkout/session_create_params.rb +4 -1
- data/lib/stripe/params/checkout/session_update_params.rb +4 -1
- data/lib/stripe/params/invoice_add_lines_params.rb +4 -1
- data/lib/stripe/params/invoice_create_preview_params.rb +2 -2
- data/lib/stripe/params/invoice_line_item_update_params.rb +4 -1
- data/lib/stripe/params/invoice_update_lines_params.rb +4 -1
- data/lib/stripe/params/payment_link_create_params.rb +4 -1
- data/lib/stripe/params/plan_create_params.rb +16 -1
- data/lib/stripe/params/price_create_params.rb +16 -1
- data/lib/stripe/params/product_catalog/trial_offer_create_params.rb +4 -1
- data/lib/stripe/params/product_create_params.rb +4 -1
- data/lib/stripe/params/product_update_params.rb +4 -1
- data/lib/stripe/params/quote_create_params.rb +3 -3
- data/lib/stripe/params/quote_update_params.rb +3 -3
- data/lib/stripe/params/radar/account_evaluation_update_params.rb +24 -1
- data/lib/stripe/params/shared_payment/{granted_token_update_params.rb → granted_token_revoke_params.rb} +1 -1
- data/lib/stripe/params/subscription_pause_params.rb +33 -0
- data/lib/stripe/params/subscription_schedule_amend_params.rb +1 -1
- data/lib/stripe/params/subscription_schedule_create_params.rb +2 -2
- data/lib/stripe/params/subscription_schedule_update_params.rb +2 -2
- data/lib/stripe/params/tax/calculation_create_params.rb +5 -1
- data/lib/stripe/params/tax/location_create_params.rb +54 -0
- data/lib/stripe/params/tax/location_list_params.rb +27 -0
- data/lib/stripe/params/tax/location_retrieve_params.rb +15 -0
- data/lib/stripe/params/test_helpers/shared_payment/{granted_token_update_params.rb → granted_token_revoke_params.rb} +1 -1
- data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +21 -4
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +4 -4
- data/lib/stripe/params.rb +6 -2
- data/lib/stripe/resources/delegated_checkout/requested_session.rb +36 -6
- data/lib/stripe/resources/invoice.rb +2 -0
- data/lib/stripe/resources/plan.rb +2 -0
- data/lib/stripe/resources/price.rb +2 -0
- data/lib/stripe/resources/product_catalog/trial_offer.rb +2 -0
- data/lib/stripe/resources/quote.rb +2 -2
- data/lib/stripe/resources/quote_line.rb +1 -1
- data/lib/stripe/resources/quote_preview_invoice.rb +2 -0
- data/lib/stripe/resources/radar/account_evaluation.rb +30 -1
- data/lib/stripe/resources/shared_payment/granted_token.rb +2 -2
- data/lib/stripe/resources/subscription.rb +20 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/location.rb +72 -0
- data/lib/stripe/resources/tax/registration.rb +128 -0
- data/lib/stripe/resources/tax_code.rb +15 -1
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +85 -3
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +2 -2
- data/lib/stripe/resources.rb +2 -0
- data/lib/stripe/services/subscription_service.rb +11 -0
- data/lib/stripe/services/tax/location_service.rb +45 -0
- data/lib/stripe/services/tax_service.rb +2 -1
- data/lib/stripe/services/test_helpers/shared_payment/granted_token_service.rb +1 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +2 -0
- data/lib/stripe/services/v2/core/account_service.rb +10 -0
- data/lib/stripe/services/v2/core/account_token_service.rb +4 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +10 -0
- data/lib/stripe/services/v2/core/accounts/person_token_service.rb +4 -0
- data/lib/stripe/services/v2/iam/api_key_service.rb +5 -5
- data/lib/stripe/services.rb +1 -0
- data/lib/stripe/util.rb +9 -3
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +896 -107
- metadata +11 -4
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Tax
|
|
6
|
+
class LocationListParams < ::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
|
+
# 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.
|
|
14
|
+
attr_accessor :starting_after
|
|
15
|
+
# Type of the tax location. Currently the only option is `performance`.
|
|
16
|
+
attr_accessor :type
|
|
17
|
+
|
|
18
|
+
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil, type: nil)
|
|
19
|
+
@ending_before = ending_before
|
|
20
|
+
@expand = expand
|
|
21
|
+
@limit = limit
|
|
22
|
+
@starting_after = starting_after
|
|
23
|
+
@type = type
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Tax
|
|
6
|
+
class LocationRetrieveParams < ::Stripe::RequestParams
|
|
7
|
+
# Specifies which fields in the response should be expanded.
|
|
8
|
+
attr_accessor :expand
|
|
9
|
+
|
|
10
|
+
def initialize(expand: nil)
|
|
11
|
+
@expand = expand
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
module Stripe
|
|
5
5
|
module TestHelpers
|
|
6
6
|
module SharedPayment
|
|
7
|
-
class
|
|
7
|
+
class GrantedTokenRevokeParams < ::Stripe::RequestParams
|
|
8
8
|
# Specifies which fields in the response should be expanded.
|
|
9
9
|
attr_accessor :expand
|
|
10
10
|
|
|
@@ -18,14 +18,31 @@ module Stripe
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
class DeliveryOptions < ::Stripe::RequestParams
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
class PaperCheck < ::Stripe::RequestParams
|
|
22
|
+
# Memo printed on the memo field of the check.
|
|
23
|
+
attr_accessor :memo
|
|
24
|
+
# Open Enum. Shipping speed of the paper check. Defaults to standard.
|
|
25
|
+
attr_accessor :shipping_speed
|
|
26
|
+
# Signature for the paper check.
|
|
27
|
+
attr_accessor :signature
|
|
28
|
+
|
|
29
|
+
def initialize(memo: nil, shipping_speed: nil, signature: nil)
|
|
30
|
+
@memo = memo
|
|
31
|
+
@shipping_speed = shipping_speed
|
|
32
|
+
@signature = signature
|
|
33
|
+
end
|
|
34
|
+
end
|
|
23
35
|
# Open Enum. Speed of the payout.
|
|
24
36
|
attr_accessor :speed
|
|
37
|
+
# Open Enum. Method for bank account.
|
|
38
|
+
attr_accessor :bank_account
|
|
39
|
+
# Delivery options for paper check.
|
|
40
|
+
attr_accessor :paper_check
|
|
25
41
|
|
|
26
|
-
def initialize(bank_account: nil,
|
|
27
|
-
@bank_account = bank_account
|
|
42
|
+
def initialize(speed: nil, bank_account: nil, paper_check: nil)
|
|
28
43
|
@speed = speed
|
|
44
|
+
@bank_account = bank_account
|
|
45
|
+
@paper_check = paper_check
|
|
29
46
|
end
|
|
30
47
|
end
|
|
31
48
|
|
|
@@ -18,14 +18,14 @@ module Stripe
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
class DeliveryOptions < ::Stripe::RequestParams
|
|
21
|
-
# Open Enum. Method for bank account.
|
|
22
|
-
attr_accessor :bank_account
|
|
23
21
|
# Open Enum. Speed of the payout.
|
|
24
22
|
attr_accessor :speed
|
|
23
|
+
# Open Enum. Method for bank account.
|
|
24
|
+
attr_accessor :bank_account
|
|
25
25
|
|
|
26
|
-
def initialize(
|
|
27
|
-
@bank_account = bank_account
|
|
26
|
+
def initialize(speed: nil, bank_account: nil)
|
|
28
27
|
@speed = speed
|
|
28
|
+
@bank_account = bank_account
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
data/lib/stripe/params.rb
CHANGED
|
@@ -475,7 +475,7 @@ require "stripe/params/setup_intent_update_params"
|
|
|
475
475
|
require "stripe/params/setup_intent_verify_microdeposits_params"
|
|
476
476
|
require "stripe/params/shared_payment/granted_token_create_params"
|
|
477
477
|
require "stripe/params/shared_payment/granted_token_retrieve_params"
|
|
478
|
-
require "stripe/params/shared_payment/
|
|
478
|
+
require "stripe/params/shared_payment/granted_token_revoke_params"
|
|
479
479
|
require "stripe/params/shipping_rate_create_params"
|
|
480
480
|
require "stripe/params/shipping_rate_list_params"
|
|
481
481
|
require "stripe/params/shipping_rate_retrieve_params"
|
|
@@ -499,6 +499,7 @@ require "stripe/params/subscription_item_retrieve_params"
|
|
|
499
499
|
require "stripe/params/subscription_item_update_params"
|
|
500
500
|
require "stripe/params/subscription_list_params"
|
|
501
501
|
require "stripe/params/subscription_migrate_params"
|
|
502
|
+
require "stripe/params/subscription_pause_params"
|
|
502
503
|
require "stripe/params/subscription_resume_params"
|
|
503
504
|
require "stripe/params/subscription_retrieve_params"
|
|
504
505
|
require "stripe/params/subscription_schedule_amend_params"
|
|
@@ -518,6 +519,9 @@ require "stripe/params/tax/calculation_retrieve_params"
|
|
|
518
519
|
require "stripe/params/tax/form_list_params"
|
|
519
520
|
require "stripe/params/tax/form_pdf_params"
|
|
520
521
|
require "stripe/params/tax/form_retrieve_params"
|
|
522
|
+
require "stripe/params/tax/location_create_params"
|
|
523
|
+
require "stripe/params/tax/location_list_params"
|
|
524
|
+
require "stripe/params/tax/location_retrieve_params"
|
|
521
525
|
require "stripe/params/tax/registration_create_params"
|
|
522
526
|
require "stripe/params/tax/registration_list_params"
|
|
523
527
|
require "stripe/params/tax/registration_retrieve_params"
|
|
@@ -592,7 +596,7 @@ require "stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_p
|
|
|
592
596
|
require "stripe/params/test_helpers/issuing/transaction_refund_params"
|
|
593
597
|
require "stripe/params/test_helpers/refund_expire_params"
|
|
594
598
|
require "stripe/params/test_helpers/shared_payment/granted_token_create_params"
|
|
595
|
-
require "stripe/params/test_helpers/shared_payment/
|
|
599
|
+
require "stripe/params/test_helpers/shared_payment/granted_token_revoke_params"
|
|
596
600
|
require "stripe/params/test_helpers/terminal/reader_present_payment_method_params"
|
|
597
601
|
require "stripe/params/test_helpers/terminal/reader_succeed_input_collection_params"
|
|
598
602
|
require "stripe/params/test_helpers/terminal/reader_timeout_input_collection_params"
|
|
@@ -194,14 +194,8 @@ module Stripe
|
|
|
194
194
|
attr_reader :amount_discount
|
|
195
195
|
# The total before any discounts or taxes are applied.
|
|
196
196
|
attr_reader :amount_subtotal
|
|
197
|
-
# The description of the line item.
|
|
198
|
-
attr_reader :description
|
|
199
|
-
# The images of the line item.
|
|
200
|
-
attr_reader :images
|
|
201
197
|
# The key of the line item.
|
|
202
198
|
attr_reader :key
|
|
203
|
-
# The name of the line item.
|
|
204
|
-
attr_reader :name
|
|
205
199
|
# Attribute for field product_details
|
|
206
200
|
attr_reader :product_details
|
|
207
201
|
# The quantity of the line item.
|
|
@@ -355,6 +349,39 @@ module Stripe
|
|
|
355
349
|
@field_remappings = {}
|
|
356
350
|
end
|
|
357
351
|
end
|
|
352
|
+
|
|
353
|
+
class RiskDetails < ::Stripe::StripeObject
|
|
354
|
+
class ClientDeviceMetadataDetails < ::Stripe::StripeObject
|
|
355
|
+
# The radar session for the client device.
|
|
356
|
+
attr_reader :radar_session
|
|
357
|
+
# The referrer of the client device.
|
|
358
|
+
attr_reader :referrer
|
|
359
|
+
# The remote IP address of the client device.
|
|
360
|
+
attr_reader :remote_ip
|
|
361
|
+
# The time spent on the page by the client device.
|
|
362
|
+
attr_reader :time_on_page_ms
|
|
363
|
+
# The user agent of the client device.
|
|
364
|
+
attr_reader :user_agent
|
|
365
|
+
|
|
366
|
+
def self.inner_class_types
|
|
367
|
+
@inner_class_types = {}
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
def self.field_remappings
|
|
371
|
+
@field_remappings = {}
|
|
372
|
+
end
|
|
373
|
+
end
|
|
374
|
+
# The risk metadata for the client device.
|
|
375
|
+
attr_reader :client_device_metadata_details
|
|
376
|
+
|
|
377
|
+
def self.inner_class_types
|
|
378
|
+
@inner_class_types = { client_device_metadata_details: ClientDeviceMetadataDetails }
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
def self.field_remappings
|
|
382
|
+
@field_remappings = {}
|
|
383
|
+
end
|
|
384
|
+
end
|
|
358
385
|
# The subtotal amount of the requested session.
|
|
359
386
|
attr_reader :amount_subtotal
|
|
360
387
|
# The total amount of the requested session.
|
|
@@ -399,6 +426,8 @@ module Stripe
|
|
|
399
426
|
attr_reader :total_details
|
|
400
427
|
# Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
|
401
428
|
attr_reader :updated_at
|
|
429
|
+
# The risk details of the requested session.
|
|
430
|
+
attr_reader :risk_details
|
|
402
431
|
|
|
403
432
|
# Confirms a requested session
|
|
404
433
|
def confirm(params = {}, opts = {})
|
|
@@ -468,6 +497,7 @@ module Stripe
|
|
|
468
497
|
payment_method_preview: PaymentMethodPreview,
|
|
469
498
|
seller_details: SellerDetails,
|
|
470
499
|
total_details: TotalDetails,
|
|
500
|
+
risk_details: RiskDetails,
|
|
471
501
|
}
|
|
472
502
|
end
|
|
473
503
|
|
|
@@ -359,6 +359,8 @@ module Stripe
|
|
|
359
359
|
class ScheduleDetails < ::Stripe::StripeObject
|
|
360
360
|
# The schedule that generated this invoice
|
|
361
361
|
attr_reader :schedule
|
|
362
|
+
# The subscription associated with this schedule
|
|
363
|
+
attr_reader :subscription
|
|
362
364
|
|
|
363
365
|
def self.inner_class_types
|
|
364
366
|
@inner_class_types = {}
|
|
@@ -96,6 +96,8 @@ module Stripe
|
|
|
96
96
|
attr_reader :trial_period_days
|
|
97
97
|
# Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
|
|
98
98
|
attr_reader :usage_type
|
|
99
|
+
# A custom identifier for this price, such as a SKU number or product code, that can be used to reference records from external systems.
|
|
100
|
+
attr_reader :external_reference
|
|
99
101
|
# Always true for a deleted object
|
|
100
102
|
attr_reader :deleted
|
|
101
103
|
|
|
@@ -211,6 +211,8 @@ module Stripe
|
|
|
211
211
|
attr_reader :unit_amount
|
|
212
212
|
# The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
|
|
213
213
|
attr_reader :unit_amount_decimal
|
|
214
|
+
# A custom identifier for this price, such as a SKU number or product code, that can be used to reference records from external systems.
|
|
215
|
+
attr_reader :external_reference
|
|
214
216
|
# Always true for a deleted object
|
|
215
217
|
attr_reader :deleted
|
|
216
218
|
|
|
@@ -78,6 +78,8 @@ module Stripe
|
|
|
78
78
|
attr_reader :object
|
|
79
79
|
# The price during the trial offer.
|
|
80
80
|
attr_reader :price
|
|
81
|
+
# A brief, user-friendly name for the trial offer-for identification purposes.
|
|
82
|
+
attr_reader :name
|
|
81
83
|
|
|
82
84
|
# Creates a trial offer.
|
|
83
85
|
def self.create(params = {}, opts = {})
|
|
@@ -732,7 +732,7 @@ module Stripe
|
|
|
732
732
|
attr_reader :from_subscription
|
|
733
733
|
# Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
|
734
734
|
attr_reader :metadata
|
|
735
|
-
# Configures how the
|
|
735
|
+
# Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
|
|
736
736
|
attr_reader :phase_effective_at
|
|
737
737
|
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
738
738
|
attr_reader :prebilling
|
|
@@ -991,7 +991,7 @@ module Stripe
|
|
|
991
991
|
attr_reader :description
|
|
992
992
|
# Behavior of the subscription schedule and underlying subscription when it ends.
|
|
993
993
|
attr_reader :end_behavior
|
|
994
|
-
# Configures how the
|
|
994
|
+
# Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
|
|
995
995
|
attr_reader :phase_effective_at
|
|
996
996
|
# Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
997
997
|
attr_reader :proration_behavior
|
|
@@ -489,7 +489,7 @@ module Stripe
|
|
|
489
489
|
attr_reader :billing_cycle_anchor
|
|
490
490
|
# A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
|
491
491
|
attr_reader :cancel_subscription_schedule
|
|
492
|
-
# Configures how the subscription schedule handles billing for phase transitions.
|
|
492
|
+
# Configures how the subscription schedule handles billing for phase transitions.
|
|
493
493
|
attr_reader :effective_at
|
|
494
494
|
# Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
|
495
495
|
attr_reader :ends_at
|
|
@@ -367,6 +367,8 @@ module Stripe
|
|
|
367
367
|
class ScheduleDetails < ::Stripe::StripeObject
|
|
368
368
|
# The schedule that generated this invoice
|
|
369
369
|
attr_reader :schedule
|
|
370
|
+
# The subscription associated with this schedule
|
|
371
|
+
attr_reader :subscription
|
|
370
372
|
|
|
371
373
|
def self.inner_class_types
|
|
372
374
|
@inner_class_types = {}
|
|
@@ -14,13 +14,42 @@ module Stripe
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
class Event < ::Stripe::StripeObject
|
|
17
|
+
class LoginFailed < ::Stripe::StripeObject
|
|
18
|
+
# The reason why this login failed.
|
|
19
|
+
attr_reader :reason
|
|
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 RegistrationFailed < ::Stripe::StripeObject
|
|
31
|
+
# The reason why this registration failed.
|
|
32
|
+
attr_reader :reason
|
|
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
|
|
17
42
|
# Time at which the event occurred. Measured in seconds since the Unix epoch.
|
|
18
43
|
attr_reader :occurred_at
|
|
19
44
|
# The type of event that occurred.
|
|
20
45
|
attr_reader :type
|
|
46
|
+
# Data about a failed login event.
|
|
47
|
+
attr_reader :login_failed
|
|
48
|
+
# Data about a failed registration event.
|
|
49
|
+
attr_reader :registration_failed
|
|
21
50
|
|
|
22
51
|
def self.inner_class_types
|
|
23
|
-
@inner_class_types = {}
|
|
52
|
+
@inner_class_types = { login_failed: LoginFailed, registration_failed: RegistrationFailed }
|
|
24
53
|
end
|
|
25
54
|
|
|
26
55
|
def self.field_remappings
|
|
@@ -94,7 +94,7 @@ module Stripe
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
|
|
97
|
-
def self.
|
|
97
|
+
def self.revoke(shared_payment_granted_token, params = {}, opts = {})
|
|
98
98
|
request_stripe_object(
|
|
99
99
|
method: :post,
|
|
100
100
|
path: format("/v1/test_helpers/shared_payment/granted_tokens/%<shared_payment_granted_token>s/revoke", { shared_payment_granted_token: CGI.escape(shared_payment_granted_token) }),
|
|
@@ -104,7 +104,7 @@ module Stripe
|
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
# Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
|
|
107
|
-
def
|
|
107
|
+
def revoke(params = {}, opts = {})
|
|
108
108
|
@resource.request_stripe_object(
|
|
109
109
|
method: :post,
|
|
110
110
|
path: format("/v1/test_helpers/shared_payment/granted_tokens/%<shared_payment_granted_token>s/revoke", { shared_payment_granted_token: CGI.escape(@resource["id"]) }),
|
|
@@ -936,6 +936,26 @@ module Stripe
|
|
|
936
936
|
)
|
|
937
937
|
end
|
|
938
938
|
|
|
939
|
+
# Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules.
|
|
940
|
+
def pause(params = {}, opts = {})
|
|
941
|
+
request_stripe_object(
|
|
942
|
+
method: :post,
|
|
943
|
+
path: format("/v1/subscriptions/%<subscription>s/pause", { subscription: CGI.escape(self["id"]) }),
|
|
944
|
+
params: params,
|
|
945
|
+
opts: opts
|
|
946
|
+
)
|
|
947
|
+
end
|
|
948
|
+
|
|
949
|
+
# Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules.
|
|
950
|
+
def self.pause(subscription, params = {}, opts = {})
|
|
951
|
+
request_stripe_object(
|
|
952
|
+
method: :post,
|
|
953
|
+
path: format("/v1/subscriptions/%<subscription>s/pause", { subscription: CGI.escape(subscription) }),
|
|
954
|
+
params: params,
|
|
955
|
+
opts: opts
|
|
956
|
+
)
|
|
957
|
+
end
|
|
958
|
+
|
|
939
959
|
# Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
|
|
940
960
|
def resume(params = {}, opts = {})
|
|
941
961
|
request_stripe_object(
|
|
@@ -90,6 +90,8 @@ module Stripe
|
|
|
90
90
|
attr_reader :tax_breakdown
|
|
91
91
|
# The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for this resource.
|
|
92
92
|
attr_reader :tax_code
|
|
93
|
+
# A tax location for a line item that acts as a performance location. This indicates that the line item might be taxed at the place where it is being performed at. This is helpful for events or other services being performed at non-customer addresses like venues or offices. This can be left empty for tax codes that do not require a tax location. For tax codes where the location requirement is "optional", this would override the customer address in most use cases.
|
|
94
|
+
attr_reader :performance_location
|
|
93
95
|
|
|
94
96
|
def self.inner_class_types
|
|
95
97
|
@inner_class_types = { tax_breakdown: TaxBreakdown }
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Tax
|
|
6
|
+
# Tax locations represent venues for services, tickets, or other product types.
|
|
7
|
+
class Location < APIResource
|
|
8
|
+
extend Stripe::APIOperations::Create
|
|
9
|
+
extend Stripe::APIOperations::List
|
|
10
|
+
|
|
11
|
+
OBJECT_NAME = "tax.location"
|
|
12
|
+
def self.object_name
|
|
13
|
+
"tax.location"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class Address < ::Stripe::StripeObject
|
|
17
|
+
# City, district, suburb, town, or village.
|
|
18
|
+
attr_reader :city
|
|
19
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
20
|
+
attr_reader :country
|
|
21
|
+
# Address line 1, such as the street, PO Box, or company name.
|
|
22
|
+
attr_reader :line1
|
|
23
|
+
# Address line 2, such as the apartment, suite, unit, or building.
|
|
24
|
+
attr_reader :line2
|
|
25
|
+
# ZIP or postal code.
|
|
26
|
+
attr_reader :postal_code
|
|
27
|
+
# State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
|
|
28
|
+
attr_reader :state
|
|
29
|
+
|
|
30
|
+
def self.inner_class_types
|
|
31
|
+
@inner_class_types = {}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.field_remappings
|
|
35
|
+
@field_remappings = {}
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
# Attribute for field address
|
|
39
|
+
attr_reader :address
|
|
40
|
+
# A descriptive text providing additional context about the tax location. This can include information about the venue, types of events held, services available, or any relevant details for better identification (e.g., "A spacious auditorium suitable for large concerts and events.").
|
|
41
|
+
attr_reader :description
|
|
42
|
+
# Unique identifier for the object.
|
|
43
|
+
attr_reader :id
|
|
44
|
+
# String representing the object's type. Objects of the same type share the same value.
|
|
45
|
+
attr_reader :object
|
|
46
|
+
# The type of tax location to be defined. Currently the only option is `performance`.
|
|
47
|
+
attr_reader :type
|
|
48
|
+
|
|
49
|
+
# Create a tax location to use in calculating taxes for a service, ticket, or other type of product. The resulting object contains the id, address, name, description, and current operational status of the tax location.
|
|
50
|
+
def self.create(params = {}, opts = {})
|
|
51
|
+
request_stripe_object(method: :post, path: "/v1/tax/locations", params: params, opts: opts)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Retrieve a list of all tax locations. Tax locations can represent the venues for services, tickets, or other product types.
|
|
55
|
+
#
|
|
56
|
+
# The response includes detailed information for each tax location, such as its address, name, description, and current operational status.
|
|
57
|
+
#
|
|
58
|
+
# You can paginate through the list by using the limit parameter to control the number of results returned in each request.
|
|
59
|
+
def self.list(params = {}, opts = {})
|
|
60
|
+
request_stripe_object(method: :get, path: "/v1/tax/locations", params: params, opts: opts)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def self.inner_class_types
|
|
64
|
+
@inner_class_types = { address: Address }
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def self.field_remappings
|
|
68
|
+
@field_remappings = {}
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -1733,6 +1733,71 @@ module Stripe
|
|
|
1733
1733
|
end
|
|
1734
1734
|
|
|
1735
1735
|
class Us < ::Stripe::StripeObject
|
|
1736
|
+
class AdmissionsTax < ::Stripe::StripeObject
|
|
1737
|
+
# A [jurisdiction code](https://docs.stripe.com/tax/registering?type=admissions_tax#registration-types) representing the local jurisdiction.
|
|
1738
|
+
attr_reader :jurisdiction
|
|
1739
|
+
|
|
1740
|
+
def self.inner_class_types
|
|
1741
|
+
@inner_class_types = {}
|
|
1742
|
+
end
|
|
1743
|
+
|
|
1744
|
+
def self.field_remappings
|
|
1745
|
+
@field_remappings = {}
|
|
1746
|
+
end
|
|
1747
|
+
end
|
|
1748
|
+
|
|
1749
|
+
class AttendanceTax < ::Stripe::StripeObject
|
|
1750
|
+
# A [jurisdiction code](https://docs.stripe.com/tax/registering?type=attendance_tax#registration-types) representing the local jurisdiction.
|
|
1751
|
+
attr_reader :jurisdiction
|
|
1752
|
+
|
|
1753
|
+
def self.inner_class_types
|
|
1754
|
+
@inner_class_types = {}
|
|
1755
|
+
end
|
|
1756
|
+
|
|
1757
|
+
def self.field_remappings
|
|
1758
|
+
@field_remappings = {}
|
|
1759
|
+
end
|
|
1760
|
+
end
|
|
1761
|
+
|
|
1762
|
+
class EntertainmentTax < ::Stripe::StripeObject
|
|
1763
|
+
# A [jurisdiction code](https://docs.stripe.com/tax/registering?type=entertainment_tax#registration-types) representing the local jurisdiction.
|
|
1764
|
+
attr_reader :jurisdiction
|
|
1765
|
+
|
|
1766
|
+
def self.inner_class_types
|
|
1767
|
+
@inner_class_types = {}
|
|
1768
|
+
end
|
|
1769
|
+
|
|
1770
|
+
def self.field_remappings
|
|
1771
|
+
@field_remappings = {}
|
|
1772
|
+
end
|
|
1773
|
+
end
|
|
1774
|
+
|
|
1775
|
+
class GrossReceiptsTax < ::Stripe::StripeObject
|
|
1776
|
+
# A [jurisdiction code](https://docs.stripe.com/tax/registering?type=gross_receipts_tax#registration-types) representing the local jurisdiction.
|
|
1777
|
+
attr_reader :jurisdiction
|
|
1778
|
+
|
|
1779
|
+
def self.inner_class_types
|
|
1780
|
+
@inner_class_types = {}
|
|
1781
|
+
end
|
|
1782
|
+
|
|
1783
|
+
def self.field_remappings
|
|
1784
|
+
@field_remappings = {}
|
|
1785
|
+
end
|
|
1786
|
+
end
|
|
1787
|
+
|
|
1788
|
+
class HospitalityTax < ::Stripe::StripeObject
|
|
1789
|
+
# A [jurisdiction code](https://docs.stripe.com/tax/registering?type=hospitality_tax#registration-types) representing the local jurisdiction.
|
|
1790
|
+
attr_reader :jurisdiction
|
|
1791
|
+
|
|
1792
|
+
def self.inner_class_types
|
|
1793
|
+
@inner_class_types = {}
|
|
1794
|
+
end
|
|
1795
|
+
|
|
1796
|
+
def self.field_remappings
|
|
1797
|
+
@field_remappings = {}
|
|
1798
|
+
end
|
|
1799
|
+
end
|
|
1800
|
+
|
|
1736
1801
|
class LocalAmusementTax < ::Stripe::StripeObject
|
|
1737
1802
|
# A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
|
|
1738
1803
|
attr_reader :jurisdiction
|
|
@@ -1759,6 +1824,32 @@ module Stripe
|
|
|
1759
1824
|
end
|
|
1760
1825
|
end
|
|
1761
1826
|
|
|
1827
|
+
class LuxuryTax < ::Stripe::StripeObject
|
|
1828
|
+
# A [jurisdiction code](https://docs.stripe.com/tax/registering?type=luxury_tax#registration-types) representing the local jurisdiction.
|
|
1829
|
+
attr_reader :jurisdiction
|
|
1830
|
+
|
|
1831
|
+
def self.inner_class_types
|
|
1832
|
+
@inner_class_types = {}
|
|
1833
|
+
end
|
|
1834
|
+
|
|
1835
|
+
def self.field_remappings
|
|
1836
|
+
@field_remappings = {}
|
|
1837
|
+
end
|
|
1838
|
+
end
|
|
1839
|
+
|
|
1840
|
+
class ResortTax < ::Stripe::StripeObject
|
|
1841
|
+
# A [jurisdiction code](https://docs.stripe.com/tax/registering?type=resort_tax#registration-types) representing the local jurisdiction.
|
|
1842
|
+
attr_reader :jurisdiction
|
|
1843
|
+
|
|
1844
|
+
def self.inner_class_types
|
|
1845
|
+
@inner_class_types = {}
|
|
1846
|
+
end
|
|
1847
|
+
|
|
1848
|
+
def self.field_remappings
|
|
1849
|
+
@field_remappings = {}
|
|
1850
|
+
end
|
|
1851
|
+
end
|
|
1852
|
+
|
|
1762
1853
|
class StateSalesTax < ::Stripe::StripeObject
|
|
1763
1854
|
class Election < ::Stripe::StripeObject
|
|
1764
1855
|
# A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
|
|
@@ -1785,6 +1876,19 @@ module Stripe
|
|
|
1785
1876
|
@field_remappings = {}
|
|
1786
1877
|
end
|
|
1787
1878
|
end
|
|
1879
|
+
|
|
1880
|
+
class TourismTax < ::Stripe::StripeObject
|
|
1881
|
+
# A [jurisdiction code](https://docs.stripe.com/tax/registering?type=tourism_tax#registration-types) representing the local jurisdiction.
|
|
1882
|
+
attr_reader :jurisdiction
|
|
1883
|
+
|
|
1884
|
+
def self.inner_class_types
|
|
1885
|
+
@inner_class_types = {}
|
|
1886
|
+
end
|
|
1887
|
+
|
|
1888
|
+
def self.field_remappings
|
|
1889
|
+
@field_remappings = {}
|
|
1890
|
+
end
|
|
1891
|
+
end
|
|
1788
1892
|
# Attribute for field local_amusement_tax
|
|
1789
1893
|
attr_reader :local_amusement_tax
|
|
1790
1894
|
# Attribute for field local_lease_tax
|
|
@@ -1795,12 +1899,36 @@ module Stripe
|
|
|
1795
1899
|
attr_reader :state_sales_tax
|
|
1796
1900
|
# Type of registration in the US.
|
|
1797
1901
|
attr_reader :type
|
|
1902
|
+
# Attribute for field admissions_tax
|
|
1903
|
+
attr_reader :admissions_tax
|
|
1904
|
+
# Attribute for field attendance_tax
|
|
1905
|
+
attr_reader :attendance_tax
|
|
1906
|
+
# Attribute for field entertainment_tax
|
|
1907
|
+
attr_reader :entertainment_tax
|
|
1908
|
+
# Attribute for field gross_receipts_tax
|
|
1909
|
+
attr_reader :gross_receipts_tax
|
|
1910
|
+
# Attribute for field hospitality_tax
|
|
1911
|
+
attr_reader :hospitality_tax
|
|
1912
|
+
# Attribute for field luxury_tax
|
|
1913
|
+
attr_reader :luxury_tax
|
|
1914
|
+
# Attribute for field resort_tax
|
|
1915
|
+
attr_reader :resort_tax
|
|
1916
|
+
# Attribute for field tourism_tax
|
|
1917
|
+
attr_reader :tourism_tax
|
|
1798
1918
|
|
|
1799
1919
|
def self.inner_class_types
|
|
1800
1920
|
@inner_class_types = {
|
|
1801
1921
|
local_amusement_tax: LocalAmusementTax,
|
|
1802
1922
|
local_lease_tax: LocalLeaseTax,
|
|
1803
1923
|
state_sales_tax: StateSalesTax,
|
|
1924
|
+
admissions_tax: AdmissionsTax,
|
|
1925
|
+
attendance_tax: AttendanceTax,
|
|
1926
|
+
entertainment_tax: EntertainmentTax,
|
|
1927
|
+
gross_receipts_tax: GrossReceiptsTax,
|
|
1928
|
+
hospitality_tax: HospitalityTax,
|
|
1929
|
+
luxury_tax: LuxuryTax,
|
|
1930
|
+
resort_tax: ResortTax,
|
|
1931
|
+
tourism_tax: TourismTax,
|
|
1804
1932
|
}
|
|
1805
1933
|
end
|
|
1806
1934
|
|