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.18.0 #349

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.17.0"
".": "2.18.0"
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 2.18.0 (2024-03-07)

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

### Features

* **api:** add legal_structure enum member ([#350](https://github.com/Modern-Treasury/modern-treasury-node/issues/350)) ([9b0d264](https://github.com/Modern-Treasury/modern-treasury-node/commit/9b0d2644f3fb302fb21438db80b05ef091f5e81e))


### Chores

* **docs:** mention install from git repo ([#348](https://github.com/Modern-Treasury/modern-treasury-node/issues/348)) ([2059850](https://github.com/Modern-Treasury/modern-treasury-node/commit/2059850d97544230b5b693c76ec4b2f9dce31e36))
* fix error handler in readme ([#351](https://github.com/Modern-Treasury/modern-treasury-node/issues/351)) ([9945dc2](https://github.com/Modern-Treasury/modern-treasury-node/commit/9945dc2044abb688d9facbd5f536f3ad4bdc0b1f))


### Documentation

* **readme:** fix https proxy example ([#352](https://github.com/Modern-Treasury/modern-treasury-node/issues/352)) ([142890f](https://github.com/Modern-Treasury/modern-treasury-node/commit/142890f21d48ce288c038439cfc4dc9d83eaf8f8))
* remove extraneous --save and yarn install instructions ([#353](https://github.com/Modern-Treasury/modern-treasury-node/issues/353)) ([085dae2](https://github.com/Modern-Treasury/modern-treasury-node/commit/085dae29b1478576f31c791e29e26fa675417209))
* use [@deprecated](https://github.com/deprecated) decorator for deprecated params ([#354](https://github.com/Modern-Treasury/modern-treasury-node/issues/354)) ([e8e2144](https://github.com/Modern-Treasury/modern-treasury-node/commit/e8e21442db2464df3f047da24f5cd92d8c61621a))

## 2.17.0 (2024-02-29)

Full Changelog: [v2.16.0...v2.17.0](https://github.com/Modern-Treasury/modern-treasury-node/compare/v2.16.0...v2.17.0)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you’d like to use the repository from source, you can either install from g
To install via git:

```bash
npm install --save git+ssh://git@github.com:Modern-Treasury/modern-treasury-node.git
npm install git+ssh://git@github.com:Modern-Treasury/modern-treasury-node.git
```

Alternatively, to link a local copy of the repo:
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ The REST API documentation can be found [on docs.moderntreasury.com](https://doc
## Installation

```sh
npm install --save modern-treasury
# or
yarn add modern-treasury
npm install modern-treasury
```

## Usage
Expand Down Expand Up @@ -128,7 +126,7 @@ a subclass of `APIError` will be thrown:
async function main() {
const externalAccount = await modernTreasury.externalAccounts
.create({ counterparty_id: 'missing' })
.catch((err) => {
.catch(async (err) => {
if (err instanceof ModernTreasury.APIError) {
console.log(err.status); // 400
console.log(err.name); // BadRequestError
Expand Down Expand Up @@ -300,7 +298,7 @@ If you would like to disable or customize this behavior, for example to use the
<!-- prettier-ignore -->
```ts
import http from 'http';
import HttpsProxyAgent from 'https-proxy-agent';
import { HttpsProxyAgent } from 'https-proxy-agent';

// Configure the default for all requests:
const modernTreasury = new ModernTreasury({
Expand All @@ -309,9 +307,8 @@ const modernTreasury = new ModernTreasury({

// Override per-request:
await modernTreasury.externalAccounts.list({
baseURL: 'http://localhost:8080/test-api',
httpAgent: new http.Agent({ keepAlive: false }),
})
});
```

## Semantic Versioning
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.17.0",
"version": "2.18.0",
"description": "The official TypeScript library for the Modern Treasury API",
"author": "Modern Treasury <sdk-feedback@moderntreasury.com>",
"types": "dist/index.d.ts",
Expand Down
16 changes: 8 additions & 8 deletions src/resources/bulk-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ export namespace BulkRequestCreateParams {
accounting?: PaymentOrderAsyncCreateRequest.Accounting;

/**
* The ID of one of your accounting categories. Note that these will only be
* accessible if your accounting system has been connected.
* @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;

/**
* The ID of one of your accounting ledger classes. Note that these will only be
* accessible if your accounting system has been connected.
* @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 @@ -1177,14 +1177,14 @@ export namespace BulkRequestCreateParams {
accounting?: PaymentOrderUpdateRequestWithID.Accounting;

/**
* The ID of one of your accounting categories. Note that these will only be
* accessible if your accounting system has been connected.
* @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;

/**
* The ID of one of your accounting ledger classes. Note that these will only be
* accessible if your accounting system has been connected.
* @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
14 changes: 13 additions & 1 deletion src/resources/connection-legal-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@ export namespace ConnectionLegalEntityCreateParams {
*/
legal_entity_type?: 'business' | 'individual';

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down Expand Up @@ -217,7 +229,7 @@ export namespace ConnectionLegalEntityCreateParams {
/**
* The types of this address.
*/
address_types?: Array<string>;
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}
Expand Down
14 changes: 13 additions & 1 deletion src/resources/counterparties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,18 @@ export namespace CounterpartyCreateParams {
*/
last_name?: string | null;

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down Expand Up @@ -686,7 +698,7 @@ export namespace CounterpartyCreateParams {
/**
* The types of this address.
*/
address_types?: Array<string>;
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}
Expand Down
40 changes: 38 additions & 2 deletions src/resources/legal-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ export interface LegalEntity {
*/
legal_entity_type?: 'business' | 'individual' | 'joint';

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* This field will be true if this object exists in the live environment or false
* if it exists in the test environment.
Expand Down Expand Up @@ -153,7 +165,7 @@ export namespace LegalEntity {
/**
* The types of this address.
*/
address_types: Array<string>;
address_types: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

/**
* Country code conforms to [ISO 3166-1 alpha-2]
Expand Down Expand Up @@ -287,6 +299,18 @@ export interface LegalEntityCreateParams {
*/
last_name?: string | null;

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down Expand Up @@ -328,7 +352,7 @@ export namespace LegalEntityCreateParams {
/**
* The types of this address.
*/
address_types?: Array<string>;
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}
Expand Down Expand Up @@ -400,6 +424,18 @@ export interface LegalEntityUpdateParams {
*/
last_name?: string | null;

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down
28 changes: 26 additions & 2 deletions src/resources/legal-entity-associations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ export namespace LegalEntityAssociation {
*/
legal_entity_type?: 'business' | 'individual' | 'joint';

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* This field will be true if this object exists in the live environment or false
* if it exists in the test environment.
Expand Down Expand Up @@ -152,7 +164,7 @@ export namespace LegalEntityAssociation {
/**
* The types of this address.
*/
address_types: Array<string>;
address_types: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

/**
* Country code conforms to [ISO 3166-1 alpha-2]
Expand Down Expand Up @@ -321,6 +333,18 @@ export namespace LegalEntityAssociationCreateParams {
*/
legal_entity_type?: 'business' | 'individual';

/**
* The business's legal structure.
*/
legal_structure?:
| 'corporation'
| 'llc'
| 'non_profit'
| 'partnership'
| 'sole_proprietorship'
| 'trust'
| null;

/**
* Additional data represented as key-value pairs. Both the key and value must be
* strings.
Expand Down Expand Up @@ -362,7 +386,7 @@ export namespace LegalEntityAssociationCreateParams {
/**
* The types of this address.
*/
address_types?: Array<string>;
address_types?: Array<'business' | 'mailing' | 'other' | 'po_box' | 'residential'>;

line2?: string | null;
}
Expand Down
9 changes: 5 additions & 4 deletions src/resources/payment-orders/payment-orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ export interface PaymentOrder {
accounting: PaymentOrder.Accounting;

/**
* The ID of one of your accounting categories. Note that these will only be
* accessible if your accounting system has been connected.
* @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;

/**
* The ID of one of your accounting ledger classes. Note that these will only be
* accessible if your accounting system has been connected.
* @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 @@ -484,6 +484,7 @@ export namespace PaymentOrder {
| 'column_reversal_pair_transfer_id'
| 'column_transfer_id'
| 'cross_river_payment_id'
| 'cross_river_service_message'
| 'cross_river_transaction_id'
| 'currencycloud_conversion_id'
| 'currencycloud_payment_id'
Expand Down
1 change: 1 addition & 0 deletions src/resources/payment-references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export interface PaymentReference {
| 'column_reversal_pair_transfer_id'
| 'column_transfer_id'
| 'cross_river_payment_id'
| 'cross_river_service_message'
| 'cross_river_transaction_id'
| 'currencycloud_conversion_id'
| 'currencycloud_payment_id'
Expand Down
1 change: 1 addition & 0 deletions src/resources/returns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export namespace ReturnObject {
| 'column_reversal_pair_transfer_id'
| 'column_transfer_id'
| 'cross_river_payment_id'
| 'cross_river_service_message'
| 'cross_river_transaction_id'
| 'currencycloud_conversion_id'
| 'currencycloud_payment_id'
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.17.0'; // x-release-please-version
export const VERSION = '2.18.0'; // x-release-please-version
7 changes: 4 additions & 3 deletions tests/api-resources/connection-legal-entities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ describe('resource connectionLegalEntities', () => {
date_of_birth: '2019-12-27',
business_name: 'string',
doing_business_as_names: ['string', 'string', 'string'],
legal_structure: 'corporation',
phone_numbers: [{ phone_number: 'string' }, { phone_number: 'string' }, { phone_number: 'string' }],
email: 'string',
website: 'string',
metadata: { key: 'value', foo: 'bar', modern: 'treasury' },
addresses: [
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -46,7 +47,7 @@ describe('resource connectionLegalEntities', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand All @@ -55,7 +56,7 @@ describe('resource connectionLegalEntities', () => {
country: 'string',
},
{
address_types: ['string', 'string', 'string'],
address_types: ['business', 'mailing', 'other'],
line1: 'string',
line2: 'string',
locality: 'string',
Expand Down
Loading
Loading