diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index ab1f4116..01767fc0 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.71.5"
+ ".": "4.71.6"
}
diff --git a/.stats.yml b/.stats.yml
index f2253470..1e64c91b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-95a3d7780935a38e0cf076d4ad2d68bd1a5641bced8398d972db2e92751d364a.yml
openapi_spec_hash: 9ebe818c4ad4f2d9c4e473b5192d7544
-config_hash: 3dc5bc1df028fc7301fb2ada9846f038
+config_hash: 54edf41f0377bc235f622fdaa7405f22
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8b5cedd..ea4f48c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 4.71.6 (2025-04-07)
+
+Full Changelog: [v4.71.5...v4.71.6](https://github.com/orbcorp/orb-node/compare/v4.71.5...v4.71.6)
+
+### Bug Fixes
+
+* **api:** naming for sync_payment_methods methods ([#589](https://github.com/orbcorp/orb-node/issues/589)) ([f55a908](https://github.com/orbcorp/orb-node/commit/f55a908e9eedf1b0bfcb1ca4ab53397100cc4d0b))
+
## 4.71.5 (2025-04-04)
Full Changelog: [v4.71.4...v4.71.5](https://github.com/orbcorp/orb-node/compare/v4.71.4...v4.71.5)
diff --git a/api.md b/api.md
index c9764db2..e107791d 100644
--- a/api.md
+++ b/api.md
@@ -67,8 +67,8 @@ Methods:
- client.customers.delete(customerId) -> void
- client.customers.fetch(customerId) -> Customer
- client.customers.fetchByExternalId(externalCustomerId) -> Customer
-- client.customers.syncPaymentMethodsFromGateway(externalCustomerId) -> void
-- client.customers.syncPaymentMethodsFromGatewayByExternalCustomerId(customerId) -> void
+- client.customers.syncPaymentMethodsFromGateway(customerId) -> void
+- client.customers.syncPaymentMethodsFromGatewayByExternalCustomerId(externalCustomerId) -> void
- client.customers.updateByExternalId(id, { ...params }) -> Customer
## Costs
diff --git a/package.json b/package.json
index 7c29f4ed..bcd8b456 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
- "version": "4.71.5",
+ "version": "4.71.6",
"description": "The official TypeScript library for the Orb API",
"author": "Orb ",
"types": "dist/index.d.ts",
diff --git a/src/resources/customers/customers.ts b/src/resources/customers/customers.ts
index 07bd895f..0a8f4f27 100644
--- a/src/resources/customers/customers.ts
+++ b/src/resources/customers/customers.ts
@@ -146,14 +146,11 @@ export class Customers extends APIResource {
*
* **Note**: This functionality is currently only available for Stripe.
*/
- syncPaymentMethodsFromGateway(
- externalCustomerId: string,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- return this._client.post(
- `/customers/external_customer_id/${externalCustomerId}/sync_payment_methods_from_gateway`,
- { ...options, headers: { Accept: '*/*', ...options?.headers } },
- );
+ syncPaymentMethodsFromGateway(customerId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return this._client.post(`/customers/${customerId}/sync_payment_methods_from_gateway`, {
+ ...options,
+ headers: { Accept: '*/*', ...options?.headers },
+ });
}
/**
@@ -165,13 +162,13 @@ export class Customers extends APIResource {
* **Note**: This functionality is currently only available for Stripe.
*/
syncPaymentMethodsFromGatewayByExternalCustomerId(
- customerId: string,
+ externalCustomerId: string,
options?: Core.RequestOptions,
): Core.APIPromise {
- return this._client.post(`/customers/${customerId}/sync_payment_methods_from_gateway`, {
- ...options,
- headers: { Accept: '*/*', ...options?.headers },
- });
+ return this._client.post(
+ `/customers/external_customer_id/${externalCustomerId}/sync_payment_methods_from_gateway`,
+ { ...options, headers: { Accept: '*/*', ...options?.headers } },
+ );
}
/**
diff --git a/src/version.ts b/src/version.ts
index 30d441de..15a6d62e 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '4.71.5'; // x-release-please-version
+export const VERSION = '4.71.6'; // x-release-please-version
diff --git a/tests/api-resources/customers/customers.test.ts b/tests/api-resources/customers/customers.test.ts
index 47f72824..a589298b 100644
--- a/tests/api-resources/customers/customers.test.ts
+++ b/tests/api-resources/customers/customers.test.ts
@@ -167,7 +167,7 @@ describe('resource customers', () => {
});
test('syncPaymentMethodsFromGateway', async () => {
- const responsePromise = client.customers.syncPaymentMethodsFromGateway('external_customer_id');
+ const responsePromise = client.customers.syncPaymentMethodsFromGateway('customer_id');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -180,14 +180,13 @@ describe('resource customers', () => {
test('syncPaymentMethodsFromGateway: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- client.customers.syncPaymentMethodsFromGateway('external_customer_id', {
- path: '/_stainless_unknown_path',
- }),
+ client.customers.syncPaymentMethodsFromGateway('customer_id', { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Orb.NotFoundError);
});
test('syncPaymentMethodsFromGatewayByExternalCustomerId', async () => {
- const responsePromise = client.customers.syncPaymentMethodsFromGatewayByExternalCustomerId('customer_id');
+ const responsePromise =
+ client.customers.syncPaymentMethodsFromGatewayByExternalCustomerId('external_customer_id');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -200,7 +199,7 @@ describe('resource customers', () => {
test('syncPaymentMethodsFromGatewayByExternalCustomerId: request options instead of params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- client.customers.syncPaymentMethodsFromGatewayByExternalCustomerId('customer_id', {
+ client.customers.syncPaymentMethodsFromGatewayByExternalCustomerId('external_customer_id', {
path: '/_stainless_unknown_path',
}),
).rejects.toThrow(Orb.NotFoundError);