stripe 10.12.0.pre.beta.1 → 10.13.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c161ad9743ceceb2624b6df2f851bb5c58ce3a7dd25c00e0406a41ee307af98d
4
- data.tar.gz: d1fea5ff8da6ad1baa4a0e8256d869cf7104ef75175ab14ff3e08b887b695b84
3
+ metadata.gz: 2f97bf3371d165166cc7250d4776af7e64f556f1274b8eccb96d3ff45fcd5e27
4
+ data.tar.gz: 2978d89e73449e5aba992e20b8404590488fb0ed42652abfa59d04122ed5130b
5
5
  SHA512:
6
- metadata.gz: 8557c142f12cb1dcedba2fc486966ba9bbfb73fb4dfd2bea71490c906484bdd1972d982aefe41f00a0e28f2d9220d7de5cc7bbbf4a575ab1d807bd33408a7fe7
7
- data.tar.gz: 9be2fb4c050e44b88a888bd835840ae84371527e5feb56f7d7883e4e0064271f4821b5a2f0ecdf7d6213efaf7aca6fd9ccdb96a209ea32ddaa7ba12fbf9d878a
6
+ metadata.gz: 37a569d59fa5ada4947bb73b7dcf423ab6b00d81c9b0ff8b2a7a5b7c5d9605fdac46ccd3f6876f52f5b53018384bb6de6210f0d64d6d1299d9aa864b27ef3a46
7
+ data.tar.gz: ade13898d45b5e8e295507812cbe390cbc0fd97f4c16a8ec93c3449305e98ffb2008fdc90f4353dcd42f26b35a7a8b0c9e226f8e21e8a43c9729f4101b5619bb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 10.13.0-beta.1 - 2024-03-14
4
+ * [#1360](https://github.com/stripe/stripe-ruby/pull/1360) Update generated code for beta
5
+ * Add support for new resources `Billing.MeterEventAdjustment`, `Billing.MeterEvent`, and `Billing.Meter`
6
+ * Add support for `create`, `deactivate`, `list`, `reactivate`, `retrieve`, and `update` methods on resource `Meter`
7
+ * Add support for `create` method on resources `MeterEventAdjustment` and `MeterEvent`
8
+ * Add support for `create` test helper method on resource `ConfirmationToken`
9
+ * Add support for `add_lines`, `remove_lines`, and `update_lines` methods on resource `Invoice`
10
+
11
+ ## 10.12.0 - 2024-03-14
12
+ * [#1359](https://github.com/stripe/stripe-ruby/pull/1359) Update generated code
13
+ * Add support for new resources `Issuing.PersonalizationDesign` and `Issuing.PhysicalBundle`
14
+ * Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PersonalizationDesign`
15
+ * Add support for `list` and `retrieve` methods on resource `PhysicalBundle`
16
+ * [#1354](https://github.com/stripe/stripe-ruby/pull/1354) Refactor after SDK based generation pattern
17
+ * [#1347](https://github.com/stripe/stripe-ruby/pull/1347) Reorder methods with lexographical sort
18
+ * [#1355](https://github.com/stripe/stripe-ruby/pull/1355) Disable Metrics/ClassLength
19
+ * [#1351](https://github.com/stripe/stripe-ruby/pull/1351) Update CHANGELOG.md
20
+
3
21
  ## 10.12.0-beta.1 - 2024-02-29
4
22
  * [#1352](https://github.com/stripe/stripe-ruby/pull/1352) Update generated code for beta
5
23
  Release specs are identical.
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v857
1
+ v879
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.12.0-beta.1
1
+ 10.13.0-beta.1
@@ -1,4 +1,3 @@
1
- # File generated from our OpenAPI spec
2
1
  # frozen_string_literal: true
3
2
 
4
3
  # rubocop:disable Metrics/MethodLength
@@ -11,9 +10,9 @@ module Stripe
11
10
  # data structures
12
11
  ListObject.object_name => ListObject,
13
12
  SearchResultObject.object_name => SearchResultObject,
14
-
15
- # business objects
16
13
  File.object_name_alt => File,
14
+
15
+ # The beginning of the section generated from our OpenAPI spec
17
16
  Account.object_name => Account,
18
17
  AccountLink.object_name => AccountLink,
19
18
  AccountNotice.object_name => AccountNotice,
@@ -25,6 +24,10 @@ module Stripe
25
24
  Balance.object_name => Balance,
26
25
  BalanceTransaction.object_name => BalanceTransaction,
27
26
  BankAccount.object_name => BankAccount,
27
+ Billing::Meter.object_name => Billing::Meter,
28
+ Billing::MeterEvent.object_name => Billing::MeterEvent,
29
+ Billing::MeterEventAdjustment.object_name => Billing::MeterEventAdjustment,
30
+ Billing::MeterEventSummary.object_name => Billing::MeterEventSummary,
28
31
  BillingPortal::Configuration.object_name => BillingPortal::Configuration,
29
32
  BillingPortal::Session.object_name => BillingPortal::Session,
30
33
  Capability.object_name => Capability,
@@ -61,8 +64,7 @@ module Stripe
61
64
  FinancialConnections::AccountInferredBalance.object_name =>
62
65
  FinancialConnections::AccountInferredBalance,
63
66
  FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
64
- FinancialConnections::AccountOwnership.object_name =>
65
- FinancialConnections::AccountOwnership,
67
+ FinancialConnections::AccountOwnership.object_name => FinancialConnections::AccountOwnership,
66
68
  FinancialConnections::Session.object_name => FinancialConnections::Session,
67
69
  FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
68
70
  FundingInstructions.object_name => FundingInstructions,
@@ -152,6 +154,7 @@ module Stripe
152
154
  UsageRecord.object_name => UsageRecord,
153
155
  UsageRecordSummary.object_name => UsageRecordSummary,
154
156
  WebhookEndpoint.object_name => WebhookEndpoint,
157
+ # The end of the section generated from our OpenAPI spec
155
158
  }
156
159
  end
157
160
  end
@@ -13,8 +13,8 @@ module Stripe
13
13
  extend Stripe::APIOperations::Create
14
14
  include Stripe::APIOperations::Delete
15
15
  extend Stripe::APIOperations::List
16
- include Stripe::APIOperations::Save
17
16
  extend Stripe::APIOperations::NestedResource
17
+ include Stripe::APIOperations::Save
18
18
 
19
19
  OBJECT_NAME = "account"
20
20
  def self.object_name
@@ -0,0 +1,83 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Billing
6
+ # A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then use the billing meter to charge the user for the number of API calls they make.
7
+ class Meter < APIResource
8
+ extend Stripe::APIOperations::Create
9
+ extend Stripe::APIOperations::List
10
+ extend Stripe::APIOperations::NestedResource
11
+ include Stripe::APIOperations::Save
12
+
13
+ OBJECT_NAME = "billing.meter"
14
+ def self.object_name
15
+ "billing.meter"
16
+ end
17
+
18
+ nested_resource_class_methods :event_summary,
19
+ operations: %i[list],
20
+ resource_plural: "event_summaries"
21
+
22
+ # Creates a billing meter
23
+ def self.create(params = {}, opts = {})
24
+ request_stripe_object(method: :post, path: "/v1/billing/meters", params: params, opts: opts)
25
+ end
26
+
27
+ # Deactivates a billing meter
28
+ def deactivate(params = {}, opts = {})
29
+ request_stripe_object(
30
+ method: :post,
31
+ path: format("/v1/billing/meters/%<id>s/deactivate", { id: CGI.escape(self["id"]) }),
32
+ params: params,
33
+ opts: opts
34
+ )
35
+ end
36
+
37
+ # Deactivates a billing meter
38
+ def self.deactivate(id, params = {}, opts = {})
39
+ request_stripe_object(
40
+ method: :post,
41
+ path: format("/v1/billing/meters/%<id>s/deactivate", { id: CGI.escape(id) }),
42
+ params: params,
43
+ opts: opts
44
+ )
45
+ end
46
+
47
+ # Retrieve a list of billing meters.
48
+ def self.list(filters = {}, opts = {})
49
+ request_stripe_object(method: :get, path: "/v1/billing/meters", params: filters, opts: opts)
50
+ end
51
+
52
+ # Reactivates a billing meter
53
+ def reactivate(params = {}, opts = {})
54
+ request_stripe_object(
55
+ method: :post,
56
+ path: format("/v1/billing/meters/%<id>s/reactivate", { id: CGI.escape(self["id"]) }),
57
+ params: params,
58
+ opts: opts
59
+ )
60
+ end
61
+
62
+ # Reactivates a billing meter
63
+ def self.reactivate(id, params = {}, opts = {})
64
+ request_stripe_object(
65
+ method: :post,
66
+ path: format("/v1/billing/meters/%<id>s/reactivate", { id: CGI.escape(id) }),
67
+ params: params,
68
+ opts: opts
69
+ )
70
+ end
71
+
72
+ # Updates a billing meter
73
+ def self.update(id, params = {}, opts = {})
74
+ request_stripe_object(
75
+ method: :post,
76
+ path: format("/v1/billing/meters/%<id>s", { id: CGI.escape(id) }),
77
+ params: params,
78
+ opts: opts
79
+ )
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,27 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Billing
6
+ # A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage.
7
+ # Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing.
8
+ class MeterEvent < APIResource
9
+ extend Stripe::APIOperations::Create
10
+
11
+ OBJECT_NAME = "billing.meter_event"
12
+ def self.object_name
13
+ "billing.meter_event"
14
+ end
15
+
16
+ # Creates a billing meter event
17
+ def self.create(params = {}, opts = {})
18
+ request_stripe_object(
19
+ method: :post,
20
+ path: "/v1/billing/meter_events",
21
+ params: params,
22
+ opts: opts
23
+ )
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Billing
6
+ # A billing meter event adjustment represents the status of a meter event adjustment.
7
+ class MeterEventAdjustment < APIResource
8
+ extend Stripe::APIOperations::Create
9
+
10
+ OBJECT_NAME = "billing.meter_event_adjustment"
11
+ def self.object_name
12
+ "billing.meter_event_adjustment"
13
+ end
14
+
15
+ # Creates a billing meter event adjustment
16
+ def self.create(params = {}, opts = {})
17
+ request_stripe_object(
18
+ method: :post,
19
+ path: "/v1/billing/meter_event_adjustments",
20
+ params: params,
21
+ opts: opts
22
+ )
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Billing
6
+ # A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much
7
+ # usage was accrued by a customer for that period.
8
+ class MeterEventSummary < APIResource
9
+ OBJECT_NAME = "billing.meter_event_summary"
10
+ def self.object_name
11
+ "billing.meter_event_summary"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -9,9 +9,9 @@ module Stripe
9
9
  class Charge < APIResource
10
10
  extend Stripe::APIOperations::Create
11
11
  extend Stripe::APIOperations::List
12
+ extend Stripe::APIOperations::NestedResource
12
13
  extend Stripe::APIOperations::Search
13
14
  include Stripe::APIOperations::Save
14
- extend Stripe::APIOperations::NestedResource
15
15
 
16
16
  OBJECT_NAME = "charge"
17
17
  def self.object_name
@@ -12,5 +12,26 @@ module Stripe
12
12
  def self.object_name
13
13
  "confirmation_token"
14
14
  end
15
+
16
+ def test_helpers
17
+ TestHelpers.new(self)
18
+ end
19
+
20
+ class TestHelpers < APIResourceTestHelpers
21
+ RESOURCE_CLASS = ConfirmationToken
22
+ def self.resource_class
23
+ "ConfirmationToken"
24
+ end
25
+
26
+ # Creates a test mode Confirmation Token server side for your integration tests.
27
+ def self.create(params = {}, opts = {})
28
+ request_stripe_object(
29
+ method: :post,
30
+ path: "/v1/test_helpers/confirmation_tokens",
31
+ params: params,
32
+ opts: opts
33
+ )
34
+ end
35
+ end
15
36
  end
16
37
  end
@@ -9,9 +9,9 @@ module Stripe
9
9
  extend Stripe::APIOperations::Create
10
10
  include Stripe::APIOperations::Delete
11
11
  extend Stripe::APIOperations::List
12
+ extend Stripe::APIOperations::NestedResource
12
13
  extend Stripe::APIOperations::Search
13
14
  include Stripe::APIOperations::Save
14
- extend Stripe::APIOperations::NestedResource
15
15
 
16
16
  OBJECT_NAME = "customer"
17
17
  def self.object_name
@@ -38,9 +38,9 @@ module Stripe
38
38
  extend Stripe::APIOperations::Create
39
39
  include Stripe::APIOperations::Delete
40
40
  extend Stripe::APIOperations::List
41
+ extend Stripe::APIOperations::NestedResource
41
42
  extend Stripe::APIOperations::Search
42
43
  include Stripe::APIOperations::Save
43
- extend Stripe::APIOperations::NestedResource
44
44
 
45
45
  OBJECT_NAME = "invoice"
46
46
  def self.object_name
@@ -49,6 +49,26 @@ module Stripe
49
49
 
50
50
  nested_resource_class_methods :payment, operations: %i[retrieve list]
51
51
 
52
+ # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
53
+ def add_lines(params = {}, opts = {})
54
+ request_stripe_object(
55
+ method: :post,
56
+ path: format("/v1/invoices/%<invoice>s/add_lines", { invoice: CGI.escape(self["id"]) }),
57
+ params: params,
58
+ opts: opts
59
+ )
60
+ end
61
+
62
+ # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
63
+ def self.add_lines(invoice, params = {}, opts = {})
64
+ request_stripe_object(
65
+ method: :post,
66
+ path: format("/v1/invoices/%<invoice>s/add_lines", { invoice: CGI.escape(invoice) }),
67
+ params: params,
68
+ opts: opts
69
+ )
70
+ end
71
+
52
72
  # Attaches a PaymentIntent to the invoice, adding it to the list of payments.
53
73
  # When the PaymentIntent's status changes to succeeded, the payment is credited
54
74
  # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
@@ -199,6 +219,26 @@ module Stripe
199
219
  )
200
220
  end
201
221
 
222
+ # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
223
+ def remove_lines(params = {}, opts = {})
224
+ request_stripe_object(
225
+ method: :post,
226
+ path: format("/v1/invoices/%<invoice>s/remove_lines", { invoice: CGI.escape(self["id"]) }),
227
+ params: params,
228
+ opts: opts
229
+ )
230
+ end
231
+
232
+ # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
233
+ def self.remove_lines(invoice, params = {}, opts = {})
234
+ request_stripe_object(
235
+ method: :post,
236
+ path: format("/v1/invoices/%<invoice>s/remove_lines", { invoice: CGI.escape(invoice) }),
237
+ params: params,
238
+ opts: opts
239
+ )
240
+ end
241
+
202
242
  def self.search(params = {}, opts = {})
203
243
  request_stripe_object(method: :get, path: "/v1/invoices/search", params: params, opts: opts)
204
244
  end
@@ -255,6 +295,26 @@ module Stripe
255
295
  )
256
296
  end
257
297
 
298
+ # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
299
+ def update_lines(params = {}, opts = {})
300
+ request_stripe_object(
301
+ method: :post,
302
+ path: format("/v1/invoices/%<invoice>s/update_lines", { invoice: CGI.escape(self["id"]) }),
303
+ params: params,
304
+ opts: opts
305
+ )
306
+ end
307
+
308
+ # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
309
+ def self.update_lines(invoice, params = {}, opts = {})
310
+ request_stripe_object(
311
+ method: :post,
312
+ path: format("/v1/invoices/%<invoice>s/update_lines", { invoice: CGI.escape(invoice) }),
313
+ params: params,
314
+ opts: opts
315
+ )
316
+ end
317
+
258
318
  # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
259
319
  def void_invoice(params = {}, opts = {})
260
320
  request_stripe_object(
@@ -101,6 +101,16 @@ module Stripe
101
101
  )
102
102
  end
103
103
 
104
+ # Capture a test-mode authorization.
105
+ def capture(params = {}, opts = {})
106
+ @resource.request_stripe_object(
107
+ method: :post,
108
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }),
109
+ params: params,
110
+ opts: opts
111
+ )
112
+ end
113
+
104
114
  # Create a test-mode authorization.
105
115
  def self.create(params = {}, opts = {})
106
116
  request_stripe_object(
@@ -121,51 +131,41 @@ module Stripe
121
131
  )
122
132
  end
123
133
 
124
- # Increment a test-mode Authorization.
125
- def self.increment(authorization, params = {}, opts = {})
126
- request_stripe_object(
134
+ # Expire a test-mode Authorization.
135
+ def expire(params = {}, opts = {})
136
+ @resource.request_stripe_object(
127
137
  method: :post,
128
- path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(authorization) }),
138
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }),
129
139
  params: params,
130
140
  opts: opts
131
141
  )
132
142
  end
133
143
 
134
- # Reverse a test-mode Authorization.
135
- def self.reverse(authorization, params = {}, opts = {})
144
+ # Increment a test-mode Authorization.
145
+ def self.increment(authorization, params = {}, opts = {})
136
146
  request_stripe_object(
137
147
  method: :post,
138
- path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(authorization) }),
139
- params: params,
140
- opts: opts
141
- )
142
- end
143
-
144
- # Capture a test-mode authorization.
145
- def capture(params = {}, opts = {})
146
- @resource.request_stripe_object(
147
- method: :post,
148
- path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }),
148
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(authorization) }),
149
149
  params: params,
150
150
  opts: opts
151
151
  )
152
152
  end
153
153
 
154
- # Expire a test-mode Authorization.
155
- def expire(params = {}, opts = {})
154
+ # Increment a test-mode Authorization.
155
+ def increment(params = {}, opts = {})
156
156
  @resource.request_stripe_object(
157
157
  method: :post,
158
- path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }),
158
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }),
159
159
  params: params,
160
160
  opts: opts
161
161
  )
162
162
  end
163
163
 
164
- # Increment a test-mode Authorization.
165
- def increment(params = {}, opts = {})
166
- @resource.request_stripe_object(
164
+ # Reverse a test-mode Authorization.
165
+ def self.reverse(authorization, params = {}, opts = {})
166
+ request_stripe_object(
167
167
  method: :post,
168
- path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }),
168
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(authorization) }),
169
169
  params: params,
170
170
  opts: opts
171
171
  )
@@ -54,61 +54,61 @@ module Stripe
54
54
  )
55
55
  end
56
56
 
57
- # Updates the shipping status of the specified Issuing Card object to failure.
58
- def self.fail_card(card, params = {}, opts = {})
59
- request_stripe_object(
57
+ # Updates the shipping status of the specified Issuing Card object to delivered.
58
+ def deliver_card(params = {}, opts = {})
59
+ @resource.request_stripe_object(
60
60
  method: :post,
61
- path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(card) }),
61
+ path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(@resource["id"]) }),
62
62
  params: params,
63
63
  opts: opts
64
64
  )
65
65
  end
66
66
 
67
- # Updates the shipping status of the specified Issuing Card object to returned.
68
- def self.return_card(card, params = {}, opts = {})
67
+ # Updates the shipping status of the specified Issuing Card object to failure.
68
+ def self.fail_card(card, params = {}, opts = {})
69
69
  request_stripe_object(
70
70
  method: :post,
71
- path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(card) }),
71
+ path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(card) }),
72
72
  params: params,
73
73
  opts: opts
74
74
  )
75
75
  end
76
76
 
77
- # Updates the shipping status of the specified Issuing Card object to shipped.
78
- def self.ship_card(card, params = {}, opts = {})
79
- request_stripe_object(
77
+ # Updates the shipping status of the specified Issuing Card object to failure.
78
+ def fail_card(params = {}, opts = {})
79
+ @resource.request_stripe_object(
80
80
  method: :post,
81
- path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(card) }),
81
+ path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(@resource["id"]) }),
82
82
  params: params,
83
83
  opts: opts
84
84
  )
85
85
  end
86
86
 
87
- # Updates the shipping status of the specified Issuing Card object to delivered.
88
- def deliver_card(params = {}, opts = {})
89
- @resource.request_stripe_object(
87
+ # Updates the shipping status of the specified Issuing Card object to returned.
88
+ def self.return_card(card, params = {}, opts = {})
89
+ request_stripe_object(
90
90
  method: :post,
91
- path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(@resource["id"]) }),
91
+ path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(card) }),
92
92
  params: params,
93
93
  opts: opts
94
94
  )
95
95
  end
96
96
 
97
- # Updates the shipping status of the specified Issuing Card object to failure.
98
- def fail_card(params = {}, opts = {})
97
+ # Updates the shipping status of the specified Issuing Card object to returned.
98
+ def return_card(params = {}, opts = {})
99
99
  @resource.request_stripe_object(
100
100
  method: :post,
101
- path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(@resource["id"]) }),
101
+ path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(@resource["id"]) }),
102
102
  params: params,
103
103
  opts: opts
104
104
  )
105
105
  end
106
106
 
107
- # Updates the shipping status of the specified Issuing Card object to returned.
108
- def return_card(params = {}, opts = {})
109
- @resource.request_stripe_object(
107
+ # Updates the shipping status of the specified Issuing Card object to shipped.
108
+ def self.ship_card(card, params = {}, opts = {})
109
+ request_stripe_object(
110
110
  method: :post,
111
- path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(@resource["id"]) }),
111
+ path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(card) }),
112
112
  params: params,
113
113
  opts: opts
114
114
  )
@@ -64,41 +64,41 @@ module Stripe
64
64
  )
65
65
  end
66
66
 
67
- # Updates the status of the specified testmode personalization design object to inactive.
68
- def self.deactivate(personalization_design, params = {}, opts = {})
69
- request_stripe_object(
67
+ # Updates the status of the specified testmode personalization design object to active.
68
+ def activate(params = {}, opts = {})
69
+ @resource.request_stripe_object(
70
70
  method: :post,
71
- path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(personalization_design) }),
71
+ path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(@resource["id"]) }),
72
72
  params: params,
73
73
  opts: opts
74
74
  )
75
75
  end
76
76
 
77
- # Updates the status of the specified testmode personalization design object to rejected.
78
- def self.reject(personalization_design, params = {}, opts = {})
77
+ # Updates the status of the specified testmode personalization design object to inactive.
78
+ def self.deactivate(personalization_design, params = {}, opts = {})
79
79
  request_stripe_object(
80
80
  method: :post,
81
- path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(personalization_design) }),
81
+ path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(personalization_design) }),
82
82
  params: params,
83
83
  opts: opts
84
84
  )
85
85
  end
86
86
 
87
- # Updates the status of the specified testmode personalization design object to active.
88
- def activate(params = {}, opts = {})
87
+ # Updates the status of the specified testmode personalization design object to inactive.
88
+ def deactivate(params = {}, opts = {})
89
89
  @resource.request_stripe_object(
90
90
  method: :post,
91
- path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(@resource["id"]) }),
91
+ path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(@resource["id"]) }),
92
92
  params: params,
93
93
  opts: opts
94
94
  )
95
95
  end
96
96
 
97
- # Updates the status of the specified testmode personalization design object to inactive.
98
- def deactivate(params = {}, opts = {})
99
- @resource.request_stripe_object(
97
+ # Updates the status of the specified testmode personalization design object to rejected.
98
+ def self.reject(personalization_design, params = {}, opts = {})
99
+ request_stripe_object(
100
100
  method: :post,
101
- path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(@resource["id"]) }),
101
+ path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(personalization_design) }),
102
102
  params: params,
103
103
  opts: opts
104
104
  )
@@ -7,8 +7,8 @@ module Stripe
7
7
  class Quote < APIResource
8
8
  extend Stripe::APIOperations::Create
9
9
  extend Stripe::APIOperations::List
10
- include Stripe::APIOperations::Save
11
10
  extend Stripe::APIOperations::NestedResource
11
+ include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "quote"
14
14
  def self.object_name
@@ -14,8 +14,8 @@ module Stripe
14
14
  # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
15
15
  class Source < APIResource
16
16
  extend Stripe::APIOperations::Create
17
- include Stripe::APIOperations::Save
18
17
  extend Stripe::APIOperations::NestedResource
18
+ include Stripe::APIOperations::Save
19
19
 
20
20
  OBJECT_NAME = "source"
21
21
  def self.object_name
@@ -8,8 +8,8 @@ module Stripe
8
8
  extend Stripe::APIOperations::Create
9
9
  include Stripe::APIOperations::Delete
10
10
  extend Stripe::APIOperations::List
11
- include Stripe::APIOperations::Save
12
11
  extend Stripe::APIOperations::NestedResource
12
+ include Stripe::APIOperations::Save
13
13
 
14
14
  OBJECT_NAME = "subscription_item"
15
15
  def self.object_name
@@ -8,7 +8,6 @@ module Stripe
8
8
  # Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api)
9
9
  class Settings < SingletonAPIResource
10
10
  include Stripe::APIOperations::SingletonSave
11
-
12
11
  OBJECT_NAME = "tax.settings"
13
12
  def self.object_name
14
13
  "tax.settings"
@@ -15,8 +15,8 @@ module Stripe
15
15
  class Transfer < APIResource
16
16
  extend Stripe::APIOperations::Create
17
17
  extend Stripe::APIOperations::List
18
- include Stripe::APIOperations::Save
19
18
  extend Stripe::APIOperations::NestedResource
19
+ include Stripe::APIOperations::Save
20
20
 
21
21
  OBJECT_NAME = "transfer"
22
22
  def self.object_name
@@ -73,41 +73,41 @@ module Stripe
73
73
  )
74
74
  end
75
75
 
76
- # Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
77
- def self.return_inbound_transfer(id, params = {}, opts = {})
78
- request_stripe_object(
76
+ # Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
77
+ def fail(params = {}, opts = {})
78
+ @resource.request_stripe_object(
79
79
  method: :post,
80
- path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/return", { id: CGI.escape(id) }),
80
+ path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/fail", { id: CGI.escape(@resource["id"]) }),
81
81
  params: params,
82
82
  opts: opts
83
83
  )
84
84
  end
85
85
 
86
- # Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
87
- def self.succeed(id, params = {}, opts = {})
86
+ # Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
87
+ def self.return_inbound_transfer(id, params = {}, opts = {})
88
88
  request_stripe_object(
89
89
  method: :post,
90
- path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/succeed", { id: CGI.escape(id) }),
90
+ path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/return", { id: CGI.escape(id) }),
91
91
  params: params,
92
92
  opts: opts
93
93
  )
94
94
  end
95
95
 
96
- # Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
97
- def fail(params = {}, opts = {})
96
+ # Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
97
+ def return_inbound_transfer(params = {}, opts = {})
98
98
  @resource.request_stripe_object(
99
99
  method: :post,
100
- path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/fail", { id: CGI.escape(@resource["id"]) }),
100
+ path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/return", { id: CGI.escape(@resource["id"]) }),
101
101
  params: params,
102
102
  opts: opts
103
103
  )
104
104
  end
105
105
 
106
- # Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
107
- def return_inbound_transfer(params = {}, opts = {})
108
- @resource.request_stripe_object(
106
+ # Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
107
+ def self.succeed(id, params = {}, opts = {})
108
+ request_stripe_object(
109
109
  method: :post,
110
- path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/return", { id: CGI.escape(@resource["id"]) }),
110
+ path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/succeed", { id: CGI.escape(id) }),
111
111
  params: params,
112
112
  opts: opts
113
113
  )
@@ -75,41 +75,41 @@ module Stripe
75
75
  )
76
76
  end
77
77
 
78
- # Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
79
- def self.post(id, params = {}, opts = {})
80
- request_stripe_object(
78
+ # Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
79
+ def fail(params = {}, opts = {})
80
+ @resource.request_stripe_object(
81
81
  method: :post,
82
- path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/post", { id: CGI.escape(id) }),
82
+ path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/fail", { id: CGI.escape(@resource["id"]) }),
83
83
  params: params,
84
84
  opts: opts
85
85
  )
86
86
  end
87
87
 
88
- # Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
89
- def self.return_outbound_payment(id, params = {}, opts = {})
88
+ # Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
89
+ def self.post(id, params = {}, opts = {})
90
90
  request_stripe_object(
91
91
  method: :post,
92
- path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/return", { id: CGI.escape(id) }),
92
+ path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/post", { id: CGI.escape(id) }),
93
93
  params: params,
94
94
  opts: opts
95
95
  )
96
96
  end
97
97
 
98
- # Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
99
- def fail(params = {}, opts = {})
98
+ # Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
99
+ def post(params = {}, opts = {})
100
100
  @resource.request_stripe_object(
101
101
  method: :post,
102
- path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/fail", { id: CGI.escape(@resource["id"]) }),
102
+ path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/post", { id: CGI.escape(@resource["id"]) }),
103
103
  params: params,
104
104
  opts: opts
105
105
  )
106
106
  end
107
107
 
108
- # Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
109
- def post(params = {}, opts = {})
110
- @resource.request_stripe_object(
108
+ # Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
109
+ def self.return_outbound_payment(id, params = {}, opts = {})
110
+ request_stripe_object(
111
111
  method: :post,
112
- path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/post", { id: CGI.escape(@resource["id"]) }),
112
+ path: format("/v1/test_helpers/treasury/outbound_payments/%<id>s/return", { id: CGI.escape(id) }),
113
113
  params: params,
114
114
  opts: opts
115
115
  )
@@ -75,41 +75,41 @@ module Stripe
75
75
  )
76
76
  end
77
77
 
78
- # Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
79
- def self.post(outbound_transfer, params = {}, opts = {})
80
- request_stripe_object(
78
+ # Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
79
+ def fail(params = {}, opts = {})
80
+ @resource.request_stripe_object(
81
81
  method: :post,
82
- path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(outbound_transfer) }),
82
+ path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/fail", { outbound_transfer: CGI.escape(@resource["id"]) }),
83
83
  params: params,
84
84
  opts: opts
85
85
  )
86
86
  end
87
87
 
88
- # Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
89
- def self.return_outbound_transfer(outbound_transfer, params = {}, opts = {})
88
+ # Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
89
+ def self.post(outbound_transfer, params = {}, opts = {})
90
90
  request_stripe_object(
91
91
  method: :post,
92
- path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(outbound_transfer) }),
92
+ path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(outbound_transfer) }),
93
93
  params: params,
94
94
  opts: opts
95
95
  )
96
96
  end
97
97
 
98
- # Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
99
- def fail(params = {}, opts = {})
98
+ # Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
99
+ def post(params = {}, opts = {})
100
100
  @resource.request_stripe_object(
101
101
  method: :post,
102
- path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/fail", { outbound_transfer: CGI.escape(@resource["id"]) }),
102
+ path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(@resource["id"]) }),
103
103
  params: params,
104
104
  opts: opts
105
105
  )
106
106
  end
107
107
 
108
- # Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
109
- def post(params = {}, opts = {})
110
- @resource.request_stripe_object(
108
+ # Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
109
+ def self.return_outbound_transfer(outbound_transfer, params = {}, opts = {})
110
+ request_stripe_object(
111
111
  method: :post,
112
- path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/post", { outbound_transfer: CGI.escape(@resource["id"]) }),
112
+ path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(outbound_transfer) }),
113
113
  params: params,
114
114
  opts: opts
115
115
  )
@@ -12,6 +12,10 @@ require "stripe/resources/apps/secret"
12
12
  require "stripe/resources/balance"
13
13
  require "stripe/resources/balance_transaction"
14
14
  require "stripe/resources/bank_account"
15
+ require "stripe/resources/billing/meter"
16
+ require "stripe/resources/billing/meter_event"
17
+ require "stripe/resources/billing/meter_event_adjustment"
18
+ require "stripe/resources/billing/meter_event_summary"
15
19
  require "stripe/resources/billing_portal/configuration"
16
20
  require "stripe/resources/billing_portal/session"
17
21
  require "stripe/resources/capability"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "10.12.0-beta.1"
4
+ VERSION = "10.13.0-beta.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.12.0.pre.beta.1
4
+ version: 10.13.0.pre.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-29 00:00:00.000000000 Z
11
+ date: 2024-03-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
14
14
  for details.
@@ -67,6 +67,10 @@ files:
67
67
  - lib/stripe/resources/balance.rb
68
68
  - lib/stripe/resources/balance_transaction.rb
69
69
  - lib/stripe/resources/bank_account.rb
70
+ - lib/stripe/resources/billing/meter.rb
71
+ - lib/stripe/resources/billing/meter_event.rb
72
+ - lib/stripe/resources/billing/meter_event_adjustment.rb
73
+ - lib/stripe/resources/billing/meter_event_summary.rb
70
74
  - lib/stripe/resources/billing_portal/configuration.rb
71
75
  - lib/stripe/resources/billing_portal/session.rb
72
76
  - lib/stripe/resources/capability.rb