Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 2.7.0 #199

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 @@
{
".": "2.6.1"
".": "2.7.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 89
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb-762f50aa6ea13f42e719339aa5cb31233984499720a7be832182357f949927a1.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb-03945a99974ac1e7218fd458dceef31887a249cc048bcbbbe3828c1d893f95ea.yml
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.7.0 (2024-05-13)

Full Changelog: [v2.6.1...v2.7.0](https://github.com/orbcorp/orb-node/compare/v2.6.1...v2.7.0)

### Features

* **api:** updates ([#200](https://github.com/orbcorp/orb-node/issues/200)) ([61505d5](https://github.com/orbcorp/orb-node/commit/61505d5f0beaa363f95c797a73f135c4da9a0735))


### Chores

* **docs:** add SECURITY.md ([#198](https://github.com/orbcorp/orb-node/issues/198)) ([794c13f](https://github.com/orbcorp/orb-node/commit/794c13f0928bdec7dce33e57fc08150a79ee2c8a))

## 2.6.1 (2024-05-10)

Full Changelog: [v2.6.0...v2.6.1](https://github.com/orbcorp/orb-node/compare/v2.6.0...v2.6.1)
Expand Down
27 changes: 27 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Security Policy

## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at [email protected].

## Responsible Disclosure

We appreciate the efforts of security researchers and individuals who help us maintain the security of
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
before making any information public.

## Reporting Non-SDK Related Security Issues

If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by Orb please follow the respective company's security reporting guidelines.

### Orb Terms and Policies

Please contact [email protected] for any questions or concerns regarding security of our services.

---

Thank you for helping us keep the SDKs and systems they interact with secure.
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": "2.6.1",
"version": "2.7.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
10 changes: 4 additions & 6 deletions src/resources/events/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,10 @@ export class Events extends APIResource {
* We validate the following:
*
* - Exactly one of `customer_id` and `external_customer_id` should be specified.
* - If specified, `customer_id` must identify a Customer resource within Orb. We
* do not support sending events for customers that have not been provisioned.
* Similarly, if specified, `external_customer_id` must be an identifier that is
* associated with an Orb Customer resource. Note: During our initial integration
* period, this enforcement will be temporarily turned into a warning to ensure
* smooth customer migration.
* - If the `customer_id` is specified, the customer in Orb must exist.
* - If the `external_customer_id` is specified, the customer in Orb does not need
* to exist. Events will be attributed to any future customers with the
* `external_customer_id` on subscription creation.
* - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
* in the future. This timestamp should be sent in UTC timezone (no timezone
* offset).
Expand Down
4 changes: 2 additions & 2 deletions src/resources/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ export interface SubscriptionCreateParams {

net_terms?: number | null;

per_credit_overage_amount?: string | null;
per_credit_overage_amount?: number | null;

/**
* The plan that the given subscription should be switched to. Note that either
Expand Down Expand Up @@ -4827,7 +4827,7 @@ export interface SubscriptionSchedulePlanChangeParams {
*/
invoicing_threshold?: string | null;

per_credit_overage_amount?: string | null;
per_credit_overage_amount?: number | null;

/**
* The plan that the given subscription should be switched to. Note that either
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 = '2.6.1'; // x-release-please-version
export const VERSION = '2.7.0'; // x-release-please-version
2 changes: 1 addition & 1 deletion tests/api-resources/alerts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('resource alerts', () => {
cursor: 'string',
customer_id: 'string',
external_customer_id: 'string',
limit: 0,
limit: 1,
subscription_id: 'string',
},
{ path: '/_stainless_unknown_path' },
Expand Down
4 changes: 2 additions & 2 deletions tests/api-resources/coupons/coupons.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('resource coupons', () => {
discount: { discount_type: 'percentage', percentage_discount: 0 },
redemption_code: 'HALFOFF',
duration_in_months: 12,
max_redemptions: 0,
max_redemptions: 1,
});
});

Expand All @@ -52,7 +52,7 @@ describe('resource coupons', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
orb.coupons.list(
{ cursor: 'string', limit: 0, redemption_code: 'string', show_archived: true },
{ cursor: 'string', limit: 1, redemption_code: 'string', show_archived: true },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Orb.NotFoundError);
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/coupons/subscriptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('resource subscriptions', () => {
await expect(
orb.coupons.subscriptions.list(
'string',
{ cursor: 'string', limit: 0 },
{ cursor: 'string', limit: 1 },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Orb.NotFoundError);
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/credit-notes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('resource creditNotes', () => {
test('list: request options and 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(
orb.creditNotes.list({ cursor: 'string', limit: 0 }, { path: '/_stainless_unknown_path' }),
orb.creditNotes.list({ cursor: 'string', limit: 1 }, { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Orb.NotFoundError);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/customers/balance-transactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('resource balanceTransactions', () => {
'string',
{
cursor: 'string',
limit: 0,
limit: 1,
'operation_time[gt]': '2019-12-27T18:11:19.117Z',
'operation_time[gte]': '2019-12-27T18:11:19.117Z',
'operation_time[lt]': '2019-12-27T18:11:19.117Z',
Expand Down
4 changes: 2 additions & 2 deletions tests/api-resources/customers/credits/credits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('resource credits', () => {
await expect(
orb.customers.credits.list(
'string',
{ currency: 'string', cursor: 'string', limit: 0 },
{ currency: 'string', cursor: 'string', limit: 1 },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Orb.NotFoundError);
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('resource credits', () => {
await expect(
orb.customers.credits.listByExternalId(
'string',
{ currency: 'string', cursor: 'string', limit: 0 },
{ currency: 'string', cursor: 'string', limit: 1 },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Orb.NotFoundError);
Expand Down
4 changes: 2 additions & 2 deletions tests/api-resources/customers/credits/ledger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('resource ledger', () => {
cursor: 'string',
entry_status: 'committed',
entry_type: 'increment',
limit: 0,
limit: 1,
minimum_amount: 'string',
},
{ path: '/_stainless_unknown_path' },
Expand Down Expand Up @@ -147,7 +147,7 @@ describe('resource ledger', () => {
cursor: 'string',
entry_status: 'committed',
entry_type: 'increment',
limit: 0,
limit: 1,
minimum_amount: 'string',
},
{ path: '/_stainless_unknown_path' },
Expand Down
4 changes: 2 additions & 2 deletions tests/api-resources/customers/credits/top-ups.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('resource topUps', () => {
await expect(
orb.customers.credits.topUps.list(
'string',
{ cursor: 'string', limit: 0 },
{ cursor: 'string', limit: 1 },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Orb.NotFoundError);
Expand Down Expand Up @@ -167,7 +167,7 @@ describe('resource topUps', () => {
await expect(
orb.customers.credits.topUps.listByExternalId(
'string',
{ cursor: 'string', limit: 0 },
{ cursor: 'string', limit: 1 },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Orb.NotFoundError);
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/customers/customers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('resource customers', () => {
'created_at[lt]': '2019-12-27T18:11:19.117Z',
'created_at[lte]': '2019-12-27T18:11:19.117Z',
cursor: 'string',
limit: 0,
limit: 1,
},
{ path: '/_stainless_unknown_path' },
),
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/events/backfills.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('resource backfills', () => {
test('list: request options and 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(
orb.events.backfills.list({ cursor: 'string', limit: 0 }, { path: '/_stainless_unknown_path' }),
orb.events.backfills.list({ cursor: 'string', limit: 1 }, { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Orb.NotFoundError);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/invoices.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ describe('resource invoices', () => {
'invoice_date[lt]': '2019-12-27T18:11:19.117Z',
'invoice_date[lte]': '2019-12-27T18:11:19.117Z',
is_recurring: true,
limit: 0,
limit: 1,
status: ['draft', 'issued', 'paid'],
subscription_id: 'string',
},
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/items.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('resource items', () => {
test('list: request options and 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(
orb.items.list({ cursor: 'string', limit: 0 }, { path: '/_stainless_unknown_path' }),
orb.items.list({ cursor: 'string', limit: 1 }, { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Orb.NotFoundError);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('resource metrics', () => {
'created_at[lt]': '2019-12-27T18:11:19.117Z',
'created_at[lte]': '2019-12-27T18:11:19.117Z',
cursor: 'string',
limit: 0,
limit: 1,
},
{ path: '/_stainless_unknown_path' },
),
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/plans/plans.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('resource plans', () => {
'created_at[lt]': '2019-12-27T18:11:19.117Z',
'created_at[lte]': '2019-12-27T18:11:19.117Z',
cursor: 'string',
limit: 0,
limit: 1,
status: 'active',
},
{ path: '/_stainless_unknown_path' },
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/prices/prices.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('resource prices', () => {
test('list: request options and 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(
orb.prices.list({ cursor: 'string', limit: 0 }, { path: '/_stainless_unknown_path' }),
orb.prices.list({ cursor: 'string', limit: 1 }, { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Orb.NotFoundError);
});

Expand Down
8 changes: 4 additions & 4 deletions tests/api-resources/subscriptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('resource subscriptions', () => {
invoicing_threshold: 'string',
metadata: { foo: 'string' },
net_terms: 0,
per_credit_overage_amount: 'string',
per_credit_overage_amount: 0,
plan_id: 'ZMwNQefe7J3ecf7W',
price_overrides: [
{
Expand Down Expand Up @@ -178,7 +178,7 @@ describe('resource subscriptions', () => {
cursor: 'string',
customer_id: 'string',
external_customer_id: 'string',
limit: 0,
limit: 1,
status: 'active',
},
{ path: '/_stainless_unknown_path' },
Expand Down Expand Up @@ -280,7 +280,7 @@ describe('resource subscriptions', () => {
'string',
{
cursor: 'string',
limit: 0,
limit: 1,
'start_date[gt]': '2019-12-27T18:11:19.117Z',
'start_date[gte]': '2019-12-27T18:11:19.117Z',
'start_date[lt]': '2019-12-27T18:11:19.117Z',
Expand Down Expand Up @@ -526,7 +526,7 @@ describe('resource subscriptions', () => {
external_plan_id: 'ZMwNQefe7J3ecf7W',
initial_phase_order: 2,
invoicing_threshold: '10.00',
per_credit_overage_amount: 'string',
per_credit_overage_amount: 0,
plan_id: 'ZMwNQefe7J3ecf7W',
price_overrides: [
{
Expand Down