Skip to content

Commit 8cf1bc4

Browse files
chore(internal): codegen related update (#236)
1 parent ad10a69 commit 8cf1bc4

5 files changed

Lines changed: 25 additions & 20 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 103
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-95a3d7780935a38e0cf076d4ad2d68bd1a5641bced8398d972db2e92751d364a.yml
33
openapi_spec_hash: 9ebe818c4ad4f2d9c4e473b5192d7544
4-
config_hash: 3dc5bc1df028fc7301fb2ada9846f038
4+
config_hash: 54edf41f0377bc235f622fdaa7405f22

lib/orb/resources/customers.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,18 @@ def fetch_by_external_id(external_customer_id, params = {})
227227
#
228228
# **Note**: This functionality is currently only available for Stripe.
229229
#
230-
# @overload sync_payment_methods_from_gateway(external_customer_id, request_options: {})
230+
# @overload sync_payment_methods_from_gateway(customer_id, request_options: {})
231231
#
232-
# @param external_customer_id [String]
232+
# @param customer_id [String]
233233
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
234234
#
235235
# @return [nil]
236236
#
237237
# @see Orb::Models::CustomerSyncPaymentMethodsFromGatewayParams
238-
def sync_payment_methods_from_gateway(external_customer_id, params = {})
238+
def sync_payment_methods_from_gateway(customer_id, params = {})
239239
@client.request(
240240
method: :post,
241-
path: [
242-
"customers/external_customer_id/%1$s/sync_payment_methods_from_gateway",
243-
external_customer_id
244-
],
241+
path: ["customers/%1$s/sync_payment_methods_from_gateway", customer_id],
245242
model: NilClass,
246243
options: params[:request_options]
247244
)
@@ -254,18 +251,21 @@ def sync_payment_methods_from_gateway(external_customer_id, params = {})
254251
#
255252
# **Note**: This functionality is currently only available for Stripe.
256253
#
257-
# @overload sync_payment_methods_from_gateway_by_external_customer_id(customer_id, request_options: {})
254+
# @overload sync_payment_methods_from_gateway_by_external_customer_id(external_customer_id, request_options: {})
258255
#
259-
# @param customer_id [String]
256+
# @param external_customer_id [String]
260257
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
261258
#
262259
# @return [nil]
263260
#
264261
# @see Orb::Models::CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIDParams
265-
def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, params = {})
262+
def sync_payment_methods_from_gateway_by_external_customer_id(external_customer_id, params = {})
266263
@client.request(
267264
method: :post,
268-
path: ["customers/%1$s/sync_payment_methods_from_gateway", customer_id],
265+
path: [
266+
"customers/external_customer_id/%1$s/sync_payment_methods_from_gateway",
267+
external_customer_id
268+
],
269269
model: NilClass,
270270
options: params[:request_options]
271271
)

rbi/lib/orb/resources/customers.rbi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,12 @@ module Orb
482482
# **Note**: This functionality is currently only available for Stripe.
483483
sig do
484484
params(
485-
external_customer_id: String,
485+
customer_id: String,
486486
request_options: T.nilable(T.any(Orb::RequestOptions, Orb::Internal::AnyHash))
487487
)
488488
.void
489489
end
490-
def sync_payment_methods_from_gateway(external_customer_id, request_options: {}); end
490+
def sync_payment_methods_from_gateway(customer_id, request_options: {}); end
491491

492492
# Sync Orb's payment methods for the customer with their gateway.
493493
#
@@ -497,12 +497,16 @@ module Orb
497497
# **Note**: This functionality is currently only available for Stripe.
498498
sig do
499499
params(
500-
customer_id: String,
500+
external_customer_id: String,
501501
request_options: T.nilable(T.any(Orb::RequestOptions, Orb::Internal::AnyHash))
502502
)
503503
.void
504504
end
505-
def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, request_options: {}); end
505+
def sync_payment_methods_from_gateway_by_external_customer_id(
506+
external_customer_id,
507+
request_options: {}
508+
)
509+
end
506510

507511
# This endpoint is used to update customer details given an `external_customer_id`
508512
# (see [Customer ID Aliases](/events-and-metrics/customer-aliases)). Note that the

sig/orb/resources/customers.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ module Orb
7777
) -> Orb::Models::Customer
7878

7979
def sync_payment_methods_from_gateway: (
80-
String external_customer_id,
80+
String customer_id,
8181
?request_options: Orb::request_opts
8282
) -> nil
8383

8484
def sync_payment_methods_from_gateway_by_external_customer_id: (
85-
String customer_id,
85+
String external_customer_id,
8686
?request_options: Orb::request_opts
8787
) -> nil
8888

test/orb/resources/customers_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,16 @@ def test_fetch_by_external_id
194194
end
195195

196196
def test_sync_payment_methods_from_gateway
197-
response = @orb.customers.sync_payment_methods_from_gateway("external_customer_id")
197+
response = @orb.customers.sync_payment_methods_from_gateway("customer_id")
198198

199199
assert_pattern do
200200
response => nil
201201
end
202202
end
203203

204204
def test_sync_payment_methods_from_gateway_by_external_customer_id
205-
response = @orb.customers.sync_payment_methods_from_gateway_by_external_customer_id("customer_id")
205+
response =
206+
@orb.customers.sync_payment_methods_from_gateway_by_external_customer_id("external_customer_id")
206207

207208
assert_pattern do
208209
response => nil

0 commit comments

Comments
 (0)