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.33.2 #514

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.33.1"
".": "2.33.2"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 158
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury-d9dd2a4af66300f520a77524c0062719e35fe8eec09019d45142030cf740846f.yml
configured_endpoints: 161
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury-63f171a4d171d84f8b763471fd457f94d4f1611bf1a5799bf96e481064948edb.yml
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 2.33.2 (2025-01-22)

Full Changelog: [v2.33.1...v2.33.2](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.33.1...v2.33.2)

### Chores

* **api:** adds new APIs for LedgerAccountSettlement LedgerEntries ([#518](https://github.com/Modern-Treasury/modern-treasury-node/issues/518)) ([a519519](https://github.com/Modern-Treasury/modern-treasury-node/commit/a51951958e4d05391aec25ecfc11bd22a0d86abf))
* **internal:** add test ([#515](https://github.com/Modern-Treasury/modern-treasury-node/issues/515)) ([c8b598a](https://github.com/Modern-Treasury/modern-treasury-node/commit/c8b598a3dd5f37f157f437b51331a06cce42d525))
* **types:** add `| undefined` to client options properties ([#513](https://github.com/Modern-Treasury/modern-treasury-node/issues/513)) ([17d306a](https://github.com/Modern-Treasury/modern-treasury-node/commit/17d306aa0c75b787ea899a84f1a70eb7654615c7))


### Documentation

* update deprecation messages ([#517](https://github.com/Modern-Treasury/modern-treasury-node/issues/517)) ([52f370e](https://github.com/Modern-Treasury/modern-treasury-node/commit/52f370e8e1b758a6372f5297f3be4fd25d49be1c))

## 2.33.1 (2025-01-08)

Full Changelog: [v2.33.0...v2.33.1](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.33.0...v2.33.1)
Expand Down
18 changes: 13 additions & 5 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ Methods:
- <code title="get /api/ledger_transactions/{id}">client.ledgerTransactions.<a href="./src/resources/ledger-transactions/ledger-transactions.ts">retrieve</a>(id) -> LedgerTransaction</code>
- <code title="patch /api/ledger_transactions/{id}">client.ledgerTransactions.<a href="./src/resources/ledger-transactions/ledger-transactions.ts">update</a>(id, { ...params }) -> LedgerTransaction</code>
- <code title="get /api/ledger_transactions">client.ledgerTransactions.<a href="./src/resources/ledger-transactions/ledger-transactions.ts">list</a>({ ...params }) -> LedgerTransactionsPage</code>
- <code title="post /api/ledger_transactions/{id}/partial_post">client.ledgerTransactions.<a href="./src/resources/ledger-transactions/ledger-transactions.ts">createPartialPost</a>(id, { ...params }) -> LedgerTransaction</code>
- <code title="post /api/ledger_transactions/{id}/reversal">client.ledgerTransactions.<a href="./src/resources/ledger-transactions/ledger-transactions.ts">createReversal</a>(id, { ...params }) -> LedgerTransaction</code>

## Versions
Expand Down Expand Up @@ -511,14 +512,21 @@ Methods:

Types:

- <code><a href="./src/resources/ledger-account-settlements.ts">LedgerAccountSettlement</a></code>
- <code><a href="./src/resources/ledger-account-settlements/ledger-account-settlements.ts">LedgerAccountSettlement</a></code>

Methods:

- <code title="post /api/ledger_account_settlements">client.ledgerAccountSettlements.<a href="./src/resources/ledger-account-settlements.ts">create</a>({ ...params }) -> LedgerAccountSettlement</code>
- <code title="get /api/ledger_account_settlements/{id}">client.ledgerAccountSettlements.<a href="./src/resources/ledger-account-settlements.ts">retrieve</a>(id) -> LedgerAccountSettlement</code>
- <code title="patch /api/ledger_account_settlements/{id}">client.ledgerAccountSettlements.<a href="./src/resources/ledger-account-settlements.ts">update</a>(id, { ...params }) -> LedgerAccountSettlement</code>
- <code title="get /api/ledger_account_settlements">client.ledgerAccountSettlements.<a href="./src/resources/ledger-account-settlements.ts">list</a>({ ...params }) -> LedgerAccountSettlementsPage</code>
- <code title="post /api/ledger_account_settlements">client.ledgerAccountSettlements.<a href="./src/resources/ledger-account-settlements/ledger-account-settlements.ts">create</a>({ ...params }) -> LedgerAccountSettlement</code>
- <code title="get /api/ledger_account_settlements/{id}">client.ledgerAccountSettlements.<a href="./src/resources/ledger-account-settlements/ledger-account-settlements.ts">retrieve</a>(id) -> LedgerAccountSettlement</code>
- <code title="patch /api/ledger_account_settlements/{id}">client.ledgerAccountSettlements.<a href="./src/resources/ledger-account-settlements/ledger-account-settlements.ts">update</a>(id, { ...params }) -> LedgerAccountSettlement</code>
- <code title="get /api/ledger_account_settlements">client.ledgerAccountSettlements.<a href="./src/resources/ledger-account-settlements/ledger-account-settlements.ts">list</a>({ ...params }) -> LedgerAccountSettlementsPage</code>

## AccountEntries

Methods:

- <code title="patch /api/ledger_account_settlements/{id}/ledger_entries">client.ledgerAccountSettlements.accountEntries.<a href="./src/resources/ledger-account-settlements/account-entries.ts">update</a>(id, { ...params }) -> void</code>
- <code title="delete /api/ledger_account_settlements/{id}/ledger_entries">client.ledgerAccountSettlements.accountEntries.<a href="./src/resources/ledger-account-settlements/account-entries.ts">del</a>(id, { ...params }) -> void</code>

# ForeignExchangeQuotes

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": "modern-treasury",
"version": "2.33.1",
"version": "2.33.2",
"description": "The official TypeScript library for the Modern Treasury API",
"author": "Modern Treasury <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
28 changes: 15 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,6 @@ import {
LedgerAccountCategoryRetrieveParams,
LedgerAccountCategoryUpdateParams,
} from './resources/ledger-account-categories';
import {
LedgerAccountSettlement,
LedgerAccountSettlementCreateParams,
LedgerAccountSettlementListParams,
LedgerAccountSettlementUpdateParams,
LedgerAccountSettlements,
LedgerAccountSettlementsPage,
} from './resources/ledger-account-settlements';
import {
LedgerAccountStatementCreateParams,
LedgerAccountStatementCreateResponse,
Expand Down Expand Up @@ -247,9 +239,18 @@ import {
Invoices,
InvoicesPage,
} from './resources/invoices/invoices';
import {
LedgerAccountSettlement,
LedgerAccountSettlementCreateParams,
LedgerAccountSettlementListParams,
LedgerAccountSettlementUpdateParams,
LedgerAccountSettlements,
LedgerAccountSettlementsPage,
} from './resources/ledger-account-settlements/ledger-account-settlements';
import {
LedgerTransaction,
LedgerTransactionCreateParams,
LedgerTransactionCreatePartialPostParams,
LedgerTransactionCreateReversalParams,
LedgerTransactionListParams,
LedgerTransactionUpdateParams,
Expand Down Expand Up @@ -306,15 +307,15 @@ export interface ClientOptions {
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
* much longer than this timeout before the promise succeeds or fails.
*/
timeout?: number;
timeout?: number | undefined;

/**
* An HTTP agent used to manage HTTP(S) connections.
*
* If not provided, an agent will be constructed by default in the Node.js environment,
* otherwise no agent is used.
*/
httpAgent?: Agent;
httpAgent?: Agent | undefined;

/**
* Specify a custom `fetch` function implementation.
Expand All @@ -330,23 +331,23 @@ export interface ClientOptions {
*
* @default 2
*/
maxRetries?: number;
maxRetries?: number | undefined;

/**
* Default headers to include with every request to the API.
*
* These can be removed in individual requests by explicitly setting the
* header to `undefined` or `null` in request options.
*/
defaultHeaders?: Core.Headers;
defaultHeaders?: Core.Headers | undefined;

/**
* Default query parameters to include with every request to the API.
*
* These can be removed in individual requests by explicitly setting the
* param to `undefined` in request options.
*/
defaultQuery?: Core.DefaultQuery;
defaultQuery?: Core.DefaultQuery | undefined;
}

/**
Expand Down Expand Up @@ -775,6 +776,7 @@ export declare namespace ModernTreasury {
type LedgerTransactionCreateParams as LedgerTransactionCreateParams,
type LedgerTransactionUpdateParams as LedgerTransactionUpdateParams,
type LedgerTransactionListParams as LedgerTransactionListParams,
type LedgerTransactionCreatePartialPostParams as LedgerTransactionCreatePartialPostParams,
type LedgerTransactionCreateReversalParams as LedgerTransactionCreateReversalParams,
};

Expand Down
10 changes: 6 additions & 4 deletions src/resources/bulk-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ export namespace BulkRequestCreateParams {
accounting?: PaymentOrderAsyncCreateRequest.Accounting;

/**
* @deprecated: The ID of one of your accounting categories. Note that these will
* @deprecated The ID of one of your accounting categories. Note that these will
* only be accessible if your accounting system has been connected.
*/
accounting_category_id?: string | null;

/**
* @deprecated: The ID of one of your accounting ledger classes. Note that these
* @deprecated The ID of one of your accounting ledger classes. Note that these
* will only be accessible if your accounting system has been connected.
*/
accounting_ledger_class_id?: string | null;
Expand Down Expand Up @@ -743,6 +743,7 @@ export namespace BulkRequestCreateParams {
| 'nz_national_clearing_code'
| 'pl_national_clearing_code'
| 'se_bankgiro_clearing_code'
| 'sg_interbank_clearing_code'
| 'swift'
| 'za_national_clearing_code';

Expand Down Expand Up @@ -1276,13 +1277,13 @@ export namespace BulkRequestCreateParams {
accounting?: PaymentOrderUpdateRequestWithID.Accounting;

/**
* @deprecated: The ID of one of your accounting categories. Note that these will
* @deprecated The ID of one of your accounting categories. Note that these will
* only be accessible if your accounting system has been connected.
*/
accounting_category_id?: string | null;

/**
* @deprecated: The ID of one of your accounting ledger classes. Note that these
* @deprecated The ID of one of your accounting ledger classes. Note that these
* will only be accessible if your accounting system has been connected.
*/
accounting_ledger_class_id?: string | null;
Expand Down Expand Up @@ -1748,6 +1749,7 @@ export namespace BulkRequestCreateParams {
| 'nz_national_clearing_code'
| 'pl_national_clearing_code'
| 'se_bankgiro_clearing_code'
| 'sg_interbank_clearing_code'
| 'swift'
| 'za_national_clearing_code';

Expand Down
1 change: 1 addition & 0 deletions src/resources/counterparties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ export namespace CounterpartyCreateParams {
| 'nz_national_clearing_code'
| 'pl_national_clearing_code'
| 'se_bankgiro_clearing_code'
| 'sg_interbank_clearing_code'
| 'swift'
| 'za_national_clearing_code';

Expand Down
1 change: 1 addition & 0 deletions src/resources/external-accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ export namespace ExternalAccountCreateParams {
| 'nz_national_clearing_code'
| 'pl_national_clearing_code'
| 'se_bankgiro_clearing_code'
| 'sg_interbank_clearing_code'
| 'swift'
| 'za_national_clearing_code';

Expand Down
1 change: 1 addition & 0 deletions src/resources/incoming-payment-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export interface IncomingPaymentDetail {
| 'nz_national_clearing_code'
| 'pl_national_clearing_code'
| 'se_bankgiro_clearing_code'
| 'sg_interbank_clearing_code'
| 'swift'
| 'za_national_clearing_code'
| null;
Expand Down
3 changes: 2 additions & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export {
type LedgerAccountSettlementCreateParams,
type LedgerAccountSettlementUpdateParams,
type LedgerAccountSettlementListParams,
} from './ledger-account-settlements';
} from './ledger-account-settlements/ledger-account-settlements';
export {
LedgerAccountStatements,
type LedgerAccountStatementCreateResponse,
Expand Down Expand Up @@ -167,6 +167,7 @@ export {
type LedgerTransactionCreateParams,
type LedgerTransactionUpdateParams,
type LedgerTransactionListParams,
type LedgerTransactionCreatePartialPostParams,
type LedgerTransactionCreateReversalParams,
} from './ledger-transactions/ledger-transactions';
export {
Expand Down
10 changes: 6 additions & 4 deletions src/resources/internal-accounts/balance-reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export namespace BalanceReport {
* The specific type of balance reported. One of `opening_ledger`,
* `closing_ledger`, `current_ledger`, `opening_available`,
* `opening_available_next_business_day`, `closing_available`, `current_available`,
* or `other`.
* 'previously_closed_book', or `other`.
*/
balance_type:
| 'closing_available'
Expand All @@ -155,7 +155,8 @@ export namespace BalanceReport {
| 'opening_available'
| 'opening_available_next_business_day'
| 'opening_ledger'
| 'other';
| 'other'
| 'previously_closed_book';

created_at: string;

Expand Down Expand Up @@ -228,7 +229,7 @@ export namespace BalanceReportCreateParams {
* The specific type of balance reported. One of `opening_ledger`,
* `closing_ledger`, `current_ledger`, `opening_available`,
* `opening_available_next_business_day`, `closing_available`, `current_available`,
* or `other`.
* 'previously_closed_book', or `other`.
*/
balance_type:
| 'closing_available'
Expand All @@ -238,7 +239,8 @@ export namespace BalanceReportCreateParams {
| 'opening_available'
| 'opening_available_next_business_day'
| 'opening_ledger'
| 'other';
| 'other'
| 'previously_closed_book';

/**
* The code used by the bank when reporting this specific balance.
Expand Down
51 changes: 51 additions & 0 deletions src/resources/ledger-account-settlements/account-entries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../../resource';
import * as Core from '../../core';

export class AccountEntries extends APIResource {
/**
* Add ledger entries to a draft ledger account settlement.
*/
update(id: string, body: AccountEntryUpdateParams, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.patch(`/api/ledger_account_settlements/${id}/ledger_entries`, {
body,
...options,
headers: { Accept: '*/*', ...options?.headers },
});
}

/**
* Remove ledger entries from a draft ledger account settlement.
*/
del(id: string, body: AccountEntryDeleteParams, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/api/ledger_account_settlements/${id}/ledger_entries`, {
body,
...options,
headers: { Accept: '*/*', ...options?.headers },
});
}
}

export interface AccountEntryUpdateParams {
/**
* The ids of the ledger entries that are to be added or removed from the ledger
* account settlement.
*/
ledger_entry_ids: Array<string> | null;
}

export interface AccountEntryDeleteParams {
/**
* The ids of the ledger entries that are to be added or removed from the ledger
* account settlement.
*/
ledger_entry_ids: Array<unknown> | null;
}

export declare namespace AccountEntries {
export {
type AccountEntryUpdateParams as AccountEntryUpdateParams,
type AccountEntryDeleteParams as AccountEntryDeleteParams,
};
}
15 changes: 15 additions & 0 deletions src/resources/ledger-account-settlements/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export {
AccountEntries,
type AccountEntryUpdateParams,
type AccountEntryDeleteParams,
} from './account-entries';
export {
LedgerAccountSettlementsPage,
LedgerAccountSettlements,
type LedgerAccountSettlement,
type LedgerAccountSettlementCreateParams,
type LedgerAccountSettlementUpdateParams,
type LedgerAccountSettlementListParams,
} from './ledger-account-settlements';
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../resource';
import { isRequestOptions } from '../core';
import * as Core from '../core';
import { Page, type PageParams } from '../pagination';
import { APIResource } from '../../resource';
import { isRequestOptions } from '../../core';
import * as Core from '../../core';
import * as AccountEntriesAPI from './account-entries';
import { AccountEntries, AccountEntryDeleteParams, AccountEntryUpdateParams } from './account-entries';
import { Page, type PageParams } from '../../pagination';

export class LedgerAccountSettlements extends APIResource {
accountEntries: AccountEntriesAPI.AccountEntries = new AccountEntriesAPI.AccountEntries(this._client);

/**
* Create a ledger account settlement.
*/
Expand Down Expand Up @@ -270,6 +274,7 @@ export interface LedgerAccountSettlementListParams extends PageParams {
}

LedgerAccountSettlements.LedgerAccountSettlementsPage = LedgerAccountSettlementsPage;
LedgerAccountSettlements.AccountEntries = AccountEntries;

export declare namespace LedgerAccountSettlements {
export {
Expand All @@ -279,4 +284,10 @@ export declare namespace LedgerAccountSettlements {
type LedgerAccountSettlementUpdateParams as LedgerAccountSettlementUpdateParams,
type LedgerAccountSettlementListParams as LedgerAccountSettlementListParams,
};

export {
AccountEntries as AccountEntries,
type AccountEntryUpdateParams as AccountEntryUpdateParams,
type AccountEntryDeleteParams as AccountEntryDeleteParams,
};
}
Loading
Loading