stripe 18.2.0.pre.alpha.1 → 18.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +1 -1
  3. data/lib/stripe/object_types.rb +1 -0
  4. data/lib/stripe/params/checkout/session_create_params.rb +4 -1
  5. data/lib/stripe/params/checkout/session_update_params.rb +4 -1
  6. data/lib/stripe/params/invoice_add_lines_params.rb +4 -1
  7. data/lib/stripe/params/invoice_create_preview_params.rb +2 -2
  8. data/lib/stripe/params/invoice_line_item_update_params.rb +4 -1
  9. data/lib/stripe/params/invoice_update_lines_params.rb +4 -1
  10. data/lib/stripe/params/payment_link_create_params.rb +4 -1
  11. data/lib/stripe/params/plan_create_params.rb +16 -1
  12. data/lib/stripe/params/price_create_params.rb +16 -1
  13. data/lib/stripe/params/product_create_params.rb +4 -1
  14. data/lib/stripe/params/product_update_params.rb +4 -1
  15. data/lib/stripe/params/quote_create_params.rb +3 -3
  16. data/lib/stripe/params/quote_update_params.rb +3 -3
  17. data/lib/stripe/params/shared_payment/{granted_token_update_params.rb → granted_token_revoke_params.rb} +1 -1
  18. data/lib/stripe/params/subscription_pause_params.rb +33 -0
  19. data/lib/stripe/params/subscription_schedule_amend_params.rb +1 -1
  20. data/lib/stripe/params/subscription_schedule_create_params.rb +2 -2
  21. data/lib/stripe/params/subscription_schedule_update_params.rb +2 -2
  22. data/lib/stripe/params/tax/calculation_create_params.rb +5 -1
  23. data/lib/stripe/params/tax/location_create_params.rb +54 -0
  24. data/lib/stripe/params/tax/location_list_params.rb +27 -0
  25. data/lib/stripe/params/tax/location_retrieve_params.rb +15 -0
  26. data/lib/stripe/params/test_helpers/shared_payment/{granted_token_update_params.rb → granted_token_revoke_params.rb} +1 -1
  27. data/lib/stripe/params.rb +6 -2
  28. data/lib/stripe/resources/invoice.rb +2 -0
  29. data/lib/stripe/resources/plan.rb +2 -0
  30. data/lib/stripe/resources/price.rb +2 -0
  31. data/lib/stripe/resources/quote.rb +2 -2
  32. data/lib/stripe/resources/quote_line.rb +1 -1
  33. data/lib/stripe/resources/quote_preview_invoice.rb +2 -0
  34. data/lib/stripe/resources/shared_payment/granted_token.rb +2 -2
  35. data/lib/stripe/resources/subscription.rb +20 -0
  36. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  37. data/lib/stripe/resources/tax/location.rb +72 -0
  38. data/lib/stripe/resources/tax/registration.rb +128 -0
  39. data/lib/stripe/resources/tax_code.rb +15 -1
  40. data/lib/stripe/resources.rb +1 -0
  41. data/lib/stripe/services/subscription_service.rb +11 -0
  42. data/lib/stripe/services/tax/location_service.rb +45 -0
  43. data/lib/stripe/services/tax_service.rb +2 -1
  44. data/lib/stripe/services/test_helpers/shared_payment/granted_token_service.rb +1 -1
  45. data/lib/stripe/services.rb +1 -0
  46. data/lib/stripe/util.rb +9 -3
  47. data/lib/stripe/version.rb +1 -1
  48. data/rbi/stripe.rbi +604 -67
  49. metadata +10 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c65f80ccfaae751823ad3f01c7656322c4f4950a52d91699e51138a4b7a8d728
4
- data.tar.gz: aa1c3a71fa4547894b2d27d0fcda583c695cbe409eea6e13f4204238071d3cbb
3
+ metadata.gz: c5ec9248559b09d65ff2d7f6023dc4f706441260ccebfcd92b7c1f1a681714eb
4
+ data.tar.gz: bcd470b3846ddc18bab7a774754c4f57fe6461d7e1d4ed7a38fee062c116be2e
5
5
  SHA512:
6
- metadata.gz: fe74010bbfb4a24d36f4a7474c845bb3cc043c0362eb0da8369008815811a34729d69be7ed787b152d12bd4b3bc6ddd598a906e2cc522a827a7fef564007477f
7
- data.tar.gz: a367ae5f54a61f58da64275f4c438c6dd2c41000b2a7e04d01e4ab965b60dbb48912210a073667541497f2c1b1129f7f5dcea137921fe4aaf664553d7e60b486
6
+ metadata.gz: bbc13ab3c9586304d495d2ea40f44f1886d06999dc8d1f7f45bcc62b7d94eace4f8a337e33479cde540afcf7f1c685c8469cd4f36b8adea8abddfa3f44094e99
7
+ data.tar.gz: 00fb6a2644108d1ac09732d8d763a1ce9bea18cb3be271254d3ae0da724e0eb858f0029001ff93a81144e47401d0663f0cf2740a946ff0ba8fa9ff748b7d605a
@@ -471,7 +471,7 @@ module Stripe
471
471
  raise ArgumentError, "api_base cannot be empty" if base_url.nil? || base_url.empty?
472
472
 
473
473
  api_key ||= opts[:api_key]
474
- params = Util.objects_to_ids(params)
474
+ params = Util.objects_to_ids(params, api_mode)
475
475
 
476
476
  check_api_key!(api_key)
477
477
 
@@ -156,6 +156,7 @@ module Stripe
156
156
  Tax::Calculation.object_name => Tax::Calculation,
157
157
  Tax::CalculationLineItem.object_name => Tax::CalculationLineItem,
158
158
  Tax::Form.object_name => Tax::Form,
159
+ Tax::Location.object_name => Tax::Location,
159
160
  Tax::Registration.object_name => Tax::Registration,
160
161
  Tax::Settings.object_name => Tax::Settings,
161
162
  Tax::Transaction.object_name => Tax::Transaction,
@@ -545,10 +545,13 @@ module Stripe
545
545
  class PriceData < ::Stripe::RequestParams
546
546
  class ProductData < ::Stripe::RequestParams
547
547
  class TaxDetails < ::Stripe::RequestParams
548
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
549
+ attr_accessor :performance_location
548
550
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
549
551
  attr_accessor :tax_code
550
552
 
551
- def initialize(tax_code: nil)
553
+ def initialize(performance_location: nil, tax_code: nil)
554
+ @performance_location = performance_location
552
555
  @tax_code = tax_code
553
556
  end
554
557
  end
@@ -163,10 +163,13 @@ module Stripe
163
163
  class PriceData < ::Stripe::RequestParams
164
164
  class ProductData < ::Stripe::RequestParams
165
165
  class TaxDetails < ::Stripe::RequestParams
166
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
167
+ attr_accessor :performance_location
166
168
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
167
169
  attr_accessor :tax_code
168
170
 
169
- def initialize(tax_code: nil)
171
+ def initialize(performance_location: nil, tax_code: nil)
172
+ @performance_location = performance_location
170
173
  @tax_code = tax_code
171
174
  end
172
175
  end
@@ -62,10 +62,13 @@ module Stripe
62
62
  class PriceData < ::Stripe::RequestParams
63
63
  class ProductData < ::Stripe::RequestParams
64
64
  class TaxDetails < ::Stripe::RequestParams
65
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
66
+ attr_accessor :performance_location
65
67
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
66
68
  attr_accessor :tax_code
67
69
 
68
- def initialize(tax_code: nil)
70
+ def initialize(performance_location: nil, tax_code: nil)
71
+ @performance_location = performance_location
69
72
  @tax_code = tax_code
70
73
  end
71
74
  end
@@ -798,7 +798,7 @@ module Stripe
798
798
  attr_accessor :billing_schedules_actions
799
799
  # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
800
800
  attr_accessor :discount_actions
801
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
801
+ # Configures how the subscription schedule handles billing for phase transitions.
802
802
  attr_accessor :effective_at
803
803
  # Changes to the subscription items during the amendment time span.
804
804
  attr_accessor :item_actions
@@ -1383,7 +1383,7 @@ module Stripe
1383
1383
  attr_accessor :discounts
1384
1384
  # The number of intervals the phase should last. If set, `end_date` must not be set.
1385
1385
  attr_accessor :duration
1386
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
1386
+ # Configures how the subscription schedule handles billing for phase transitions.
1387
1387
  attr_accessor :effective_at
1388
1388
  # The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
1389
1389
  attr_accessor :end_date
@@ -61,10 +61,13 @@ module Stripe
61
61
  class PriceData < ::Stripe::RequestParams
62
62
  class ProductData < ::Stripe::RequestParams
63
63
  class TaxDetails < ::Stripe::RequestParams
64
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
65
+ attr_accessor :performance_location
64
66
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
65
67
  attr_accessor :tax_code
66
68
 
67
- def initialize(tax_code: nil)
69
+ def initialize(performance_location: nil, tax_code: nil)
70
+ @performance_location = performance_location
68
71
  @tax_code = tax_code
69
72
  end
70
73
  end
@@ -62,10 +62,13 @@ module Stripe
62
62
  class PriceData < ::Stripe::RequestParams
63
63
  class ProductData < ::Stripe::RequestParams
64
64
  class TaxDetails < ::Stripe::RequestParams
65
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
66
+ attr_accessor :performance_location
65
67
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
66
68
  attr_accessor :tax_code
67
69
 
68
- def initialize(tax_code: nil)
70
+ def initialize(performance_location: nil, tax_code: nil)
71
+ @performance_location = performance_location
69
72
  @tax_code = tax_code
70
73
  end
71
74
  end
@@ -344,10 +344,13 @@ module Stripe
344
344
  class PriceData < ::Stripe::RequestParams
345
345
  class ProductData < ::Stripe::RequestParams
346
346
  class TaxDetails < ::Stripe::RequestParams
347
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
348
+ attr_accessor :performance_location
347
349
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
348
350
  attr_accessor :tax_code
349
351
 
350
- def initialize(tax_code: nil)
352
+ def initialize(performance_location: nil, tax_code: nil)
353
+ @performance_location = performance_location
351
354
  @tax_code = tax_code
352
355
  end
353
356
  end
@@ -4,6 +4,17 @@
4
4
  module Stripe
5
5
  class PlanCreateParams < ::Stripe::RequestParams
6
6
  class Product < ::Stripe::RequestParams
7
+ class TaxDetails < ::Stripe::RequestParams
8
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
9
+ attr_accessor :performance_location
10
+ # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
11
+ attr_accessor :tax_code
12
+
13
+ def initialize(performance_location: nil, tax_code: nil)
14
+ @performance_location = performance_location
15
+ @tax_code = tax_code
16
+ end
17
+ end
7
18
  # Whether the product is currently available for purchase. Defaults to `true`.
8
19
  attr_accessor :active
9
20
  # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
@@ -20,6 +31,8 @@ module Stripe
20
31
  attr_accessor :tax_code
21
32
  # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
22
33
  attr_accessor :unit_label
34
+ # Tax details for this product, including the [tax code](/tax/tax-codes) and an optional performance location.
35
+ attr_accessor :tax_details
23
36
 
24
37
  def initialize(
25
38
  active: nil,
@@ -28,7 +41,8 @@ module Stripe
28
41
  name: nil,
29
42
  statement_descriptor: nil,
30
43
  tax_code: nil,
31
- unit_label: nil
44
+ unit_label: nil,
45
+ tax_details: nil
32
46
  )
33
47
  @active = active
34
48
  @id = id
@@ -37,6 +51,7 @@ module Stripe
37
51
  @statement_descriptor = statement_descriptor
38
52
  @tax_code = tax_code
39
53
  @unit_label = unit_label
54
+ @tax_details = tax_details
40
55
  end
41
56
  end
42
57
 
@@ -93,6 +93,17 @@ module Stripe
93
93
  end
94
94
 
95
95
  class ProductData < ::Stripe::RequestParams
96
+ class TaxDetails < ::Stripe::RequestParams
97
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
98
+ attr_accessor :performance_location
99
+ # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
100
+ attr_accessor :tax_code
101
+
102
+ def initialize(performance_location: nil, tax_code: nil)
103
+ @performance_location = performance_location
104
+ @tax_code = tax_code
105
+ end
106
+ end
96
107
  # Whether the product is currently available for purchase. Defaults to `true`.
97
108
  attr_accessor :active
98
109
  # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
@@ -109,6 +120,8 @@ module Stripe
109
120
  attr_accessor :tax_code
110
121
  # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
111
122
  attr_accessor :unit_label
123
+ # Tax details for this product, including the [tax code](/tax/tax-codes) and an optional performance location.
124
+ attr_accessor :tax_details
112
125
 
113
126
  def initialize(
114
127
  active: nil,
@@ -117,7 +130,8 @@ module Stripe
117
130
  name: nil,
118
131
  statement_descriptor: nil,
119
132
  tax_code: nil,
120
- unit_label: nil
133
+ unit_label: nil,
134
+ tax_details: nil
121
135
  )
122
136
  @active = active
123
137
  @id = id
@@ -126,6 +140,7 @@ module Stripe
126
140
  @statement_descriptor = statement_descriptor
127
141
  @tax_code = tax_code
128
142
  @unit_label = unit_label
143
+ @tax_details = tax_details
129
144
  end
130
145
  end
131
146
 
@@ -170,10 +170,13 @@ module Stripe
170
170
  end
171
171
 
172
172
  class TaxDetails < ::Stripe::RequestParams
173
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
174
+ attr_accessor :performance_location
173
175
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
174
176
  attr_accessor :tax_code
175
177
 
176
- def initialize(tax_code: nil)
178
+ def initialize(performance_location: nil, tax_code: nil)
179
+ @performance_location = performance_location
177
180
  @tax_code = tax_code
178
181
  end
179
182
  end
@@ -31,10 +31,13 @@ module Stripe
31
31
  end
32
32
 
33
33
  class TaxDetails < ::Stripe::RequestParams
34
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
35
+ attr_accessor :performance_location
34
36
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
35
37
  attr_accessor :tax_code
36
38
 
37
- def initialize(tax_code: nil)
39
+ def initialize(performance_location: nil, tax_code: nil)
40
+ @performance_location = performance_location
38
41
  @tax_code = tax_code
39
42
  end
40
43
  end
@@ -550,7 +550,7 @@ module Stripe
550
550
  attr_accessor :billing_cycle_anchor
551
551
  # 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.
552
552
  attr_accessor :cancel_subscription_schedule
553
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
553
+ # Configures how the quote handles billing for line transitions.
554
554
  attr_accessor :effective_at
555
555
  # 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.
556
556
  attr_accessor :ends_at
@@ -920,7 +920,7 @@ module Stripe
920
920
  attr_accessor :from_subscription
921
921
  # 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.
922
922
  attr_accessor :metadata
923
- # Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
923
+ # Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
924
924
  attr_accessor :phase_effective_at
925
925
  # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
926
926
  attr_accessor :prebilling
@@ -1171,7 +1171,7 @@ module Stripe
1171
1171
  attr_accessor :description
1172
1172
  # Behavior of the subscription schedule and underlying subscription when it ends.
1173
1173
  attr_accessor :end_behavior
1174
- # Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
1174
+ # Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
1175
1175
  attr_accessor :phase_effective_at
1176
1176
  # Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1177
1177
  #
@@ -541,7 +541,7 @@ module Stripe
541
541
  attr_accessor :billing_cycle_anchor
542
542
  # 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.
543
543
  attr_accessor :cancel_subscription_schedule
544
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
544
+ # Configures how the quote handles billing for line transitions.
545
545
  attr_accessor :effective_at
546
546
  # 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.
547
547
  attr_accessor :ends_at
@@ -901,7 +901,7 @@ module Stripe
901
901
  attr_accessor :end_behavior
902
902
  # 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.
903
903
  attr_accessor :metadata
904
- # Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
904
+ # Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
905
905
  attr_accessor :phase_effective_at
906
906
  # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
907
907
  attr_accessor :prebilling
@@ -1148,7 +1148,7 @@ module Stripe
1148
1148
  attr_accessor :description
1149
1149
  # Behavior of the subscription schedule and underlying subscription when it ends.
1150
1150
  attr_accessor :end_behavior
1151
- # Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
1151
+ # Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
1152
1152
  attr_accessor :phase_effective_at
1153
1153
  # Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1154
1154
  #
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module SharedPayment
6
- class GrantedTokenUpdateParams < ::Stripe::RequestParams
6
+ class GrantedTokenRevokeParams < ::Stripe::RequestParams
7
7
  # Specifies which fields in the response should be expanded.
8
8
  attr_accessor :expand
9
9
 
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class SubscriptionPauseParams < ::Stripe::RequestParams
6
+ class BillFor < ::Stripe::RequestParams
7
+ # Controls whether to debit for accrued metered usage in the current billing period. The default is `false`.
8
+ attr_accessor :outstanding_usage
9
+ # Controls whether to credit for licensed items in the current billing period. The default is `false`.
10
+ attr_accessor :unused_time
11
+
12
+ def initialize(outstanding_usage: nil, unused_time: nil)
13
+ @outstanding_usage = outstanding_usage
14
+ @unused_time = unused_time
15
+ end
16
+ end
17
+ # Controls what to bill for when pausing the subscription.
18
+ attr_accessor :bill_for
19
+ # Specifies which fields in the response should be expanded.
20
+ attr_accessor :expand
21
+ # Determines how to handle debits and credits when pausing. The default is `pending_invoice_item`.
22
+ attr_accessor :invoicing_behavior
23
+ # The type of pause to apply.
24
+ attr_accessor :type
25
+
26
+ def initialize(bill_for: nil, expand: nil, invoicing_behavior: nil, type: nil)
27
+ @bill_for = bill_for
28
+ @expand = expand
29
+ @invoicing_behavior = invoicing_behavior
30
+ @type = type
31
+ end
32
+ end
33
+ end
@@ -450,7 +450,7 @@ module Stripe
450
450
  attr_accessor :billing_schedules_actions
451
451
  # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
452
452
  attr_accessor :discount_actions
453
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
453
+ # Configures how the subscription schedule handles billing for phase transitions.
454
454
  attr_accessor :effective_at
455
455
  # Changes to the subscription items during the amendment time span.
456
456
  attr_accessor :item_actions
@@ -166,7 +166,7 @@ module Stripe
166
166
  attr_accessor :invoice_settings
167
167
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
168
168
  attr_accessor :on_behalf_of
169
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
169
+ # Configures how the subscription schedule handles billing for phase transitions.
170
170
  attr_accessor :phase_effective_at
171
171
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
172
172
  attr_accessor :transfer_data
@@ -667,7 +667,7 @@ module Stripe
667
667
  attr_accessor :discounts
668
668
  # The number of intervals the phase should last. If set, `end_date` must not be set.
669
669
  attr_accessor :duration
670
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
670
+ # Configures how the subscription schedule handles billing for phase transitions.
671
671
  attr_accessor :effective_at
672
672
  # The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
673
673
  attr_accessor :end_date
@@ -146,7 +146,7 @@ module Stripe
146
146
  attr_accessor :invoice_settings
147
147
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
148
148
  attr_accessor :on_behalf_of
149
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
149
+ # Configures how the subscription schedule handles billing for phase transitions.
150
150
  attr_accessor :phase_effective_at
151
151
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
152
152
  attr_accessor :transfer_data
@@ -647,7 +647,7 @@ module Stripe
647
647
  attr_accessor :discounts
648
648
  # The number of intervals the phase should last. If set, `end_date` must not be set.
649
649
  attr_accessor :duration
650
- # Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
650
+ # Configures how the subscription schedule handles billing for phase transitions.
651
651
  attr_accessor :effective_at
652
652
  # The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
653
653
  attr_accessor :end_date
@@ -89,6 +89,8 @@ module Stripe
89
89
  attr_accessor :tax_behavior
90
90
  # A [tax code](https://docs.stripe.com/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.
91
91
  attr_accessor :tax_code
92
+ # A tax location ID. Depending on the [tax code](/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported.
93
+ attr_accessor :performance_location
92
94
 
93
95
  def initialize(
94
96
  amount: nil,
@@ -97,7 +99,8 @@ module Stripe
97
99
  quantity: nil,
98
100
  reference: nil,
99
101
  tax_behavior: nil,
100
- tax_code: nil
102
+ tax_code: nil,
103
+ performance_location: nil
101
104
  )
102
105
  @amount = amount
103
106
  @metadata = metadata
@@ -106,6 +109,7 @@ module Stripe
106
109
  @reference = reference
107
110
  @tax_behavior = tax_behavior
108
111
  @tax_code = tax_code
112
+ @performance_location = performance_location
109
113
  end
110
114
  end
111
115
 
@@ -0,0 +1,54 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ class LocationCreateParams < ::Stripe::RequestParams
7
+ class Address < ::Stripe::RequestParams
8
+ # City, district, suburb, town, or village.
9
+ attr_accessor :city
10
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
11
+ attr_accessor :country
12
+ # Address line 1, such as the street, PO Box, or company name.
13
+ attr_accessor :line1
14
+ # Address line 2, such as the apartment, suite, unit, or building.
15
+ attr_accessor :line2
16
+ # ZIP or postal code.
17
+ attr_accessor :postal_code
18
+ # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX".
19
+ attr_accessor :state
20
+
21
+ def initialize(
22
+ city: nil,
23
+ country: nil,
24
+ line1: nil,
25
+ line2: nil,
26
+ postal_code: nil,
27
+ state: nil
28
+ )
29
+ @city = city
30
+ @country = country
31
+ @line1 = line1
32
+ @line2 = line2
33
+ @postal_code = postal_code
34
+ @state = state
35
+ end
36
+ end
37
+ # The physical address of the tax location.
38
+ attr_accessor :address
39
+ # Details to identify the tax location by its venue, types of events held, or available services, such as "A spacious auditorium suitable for large concerts and events.".
40
+ attr_accessor :description
41
+ # Specifies which fields in the response should be expanded.
42
+ attr_accessor :expand
43
+ # The type of tax location. The only supported value is "performance".
44
+ attr_accessor :type
45
+
46
+ def initialize(address: nil, description: nil, expand: nil, type: nil)
47
+ @address = address
48
+ @description = description
49
+ @expand = expand
50
+ @type = type
51
+ end
52
+ end
53
+ end
54
+ end
@@ -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 GrantedTokenUpdateParams < ::Stripe::RequestParams
7
+ class GrantedTokenRevokeParams < ::Stripe::RequestParams
8
8
  # Specifies which fields in the response should be expanded.
9
9
  attr_accessor :expand
10
10
 
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/granted_token_update_params"
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/granted_token_update_params"
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"
@@ -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