Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.71.5"
".": "4.71.6"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Methods:
- <code title="delete /customers/{customer_id}">client.customers.<a href="./src/resources/customers/customers.ts">delete</a>(customerId) -> void</code>
- <code title="get /customers/{customer_id}">client.customers.<a href="./src/resources/customers/customers.ts">fetch</a>(customerId) -> Customer</code>
- <code title="get /customers/external_customer_id/{external_customer_id}">client.customers.<a href="./src/resources/customers/customers.ts">fetchByExternalId</a>(externalCustomerId) -> Customer</code>
- <code title="post /customers/external_customer_id/{external_customer_id}/sync_payment_methods_from_gateway">client.customers.<a href="./src/resources/customers/customers.ts">syncPaymentMethodsFromGateway</a>(externalCustomerId) -> void</code>
- <code title="post /customers/{customer_id}/sync_payment_methods_from_gateway">client.customers.<a href="./src/resources/customers/customers.ts">syncPaymentMethodsFromGatewayByExternalCustomerId</a>(customerId) -> void</code>
- <code title="post /customers/{customer_id}/sync_payment_methods_from_gateway">client.customers.<a href="./src/resources/customers/customers.ts">syncPaymentMethodsFromGateway</a>(customerId) -> void</code>
- <code title="post /customers/external_customer_id/{external_customer_id}/sync_payment_methods_from_gateway">client.customers.<a href="./src/resources/customers/customers.ts">syncPaymentMethodsFromGatewayByExternalCustomerId</a>(externalCustomerId) -> void</code>
- <code title="put /customers/external_customer_id/{external_customer_id}">client.customers.<a href="./src/resources/customers/customers.ts">updateByExternalId</a>(id, { ...params }) -> Customer</code>

## Costs
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <team@withorb.com>",
"types": "dist/index.d.ts",
Expand Down
23 changes: 10 additions & 13 deletions src/resources/customers/customers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
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<void> {
return this._client.post(`/customers/${customerId}/sync_payment_methods_from_gateway`, {
...options,
headers: { Accept: '*/*', ...options?.headers },
});
}

/**
Expand All @@ -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<void> {
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 } },
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '4.71.5'; // x-release-please-version
export const VERSION = '4.71.6'; // x-release-please-version
11 changes: 5 additions & 6 deletions tests/api-resources/customers/customers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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);
Expand Down