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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## v9.1.0 (2026-10-29)

- Adds `manufacturer_product_id` and `standardized_product_id` to the `CustomsItem` model and create parameters, including customs items nested in `CustomsInfo` create parameters
- Adds `TaxIdentifier` model (with `address`) and `tax_identifiers` to the `Shipment` model
- Adds `address` to the shipment tax identifier create parameters

## v9.0.0 (2026-10-27)

See our [Upgrade Guide](UPGRADE_GUIDE.md#upgrading-from-8x-to-90) for more details.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@easypost/api",
"description": "EasyPost Node Client Library",
"version": "9.0.0",
"version": "9.1.0",
"author": "Easypost Engineering <oss@easypost.com>",
"homepage": "https://easypost.com",
"exports": {
Expand Down
3 changes: 2 additions & 1 deletion src/models/customs_info.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import CustomsItem from './customs_item';
import EasyPostObject from './easypost_object';

/**
Expand All @@ -9,7 +10,7 @@ export default class CustomsInfo extends EasyPostObject {
declare content_explanation?: string | null;
declare contents_type?: string | null;
declare customs_certify?: boolean | null;
declare customs_items?: unknown[] | null;
declare customs_items?: CustomsItem[] | null;
declare customs_signer?: string | null;
declare declaration?: string | null;
declare eel_pfc?: string | null;
Expand Down
2 changes: 2 additions & 0 deletions src/models/customs_item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ export default class CustomsItem extends EasyPostObject {
declare currency?: string | null;
declare description?: string | null;
declare hs_tariff_number?: string | null;
declare manufacturer_product_id?: string | null;
declare origin_country?: string | null;
declare quantity?: number | null;
declare standardized_product_id?: string | null;
declare value?: number | null;
declare weight?: number | null;
}
2 changes: 2 additions & 0 deletions src/models/shipment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Parcel from './parcel';
import PostageLabel from './postage_label';
import Rate from './rate';
import ScanForm from './scan_form';
import TaxIdentifier from './tax_identifier';
import Tracker from './tracker';

/**
Expand Down Expand Up @@ -37,6 +38,7 @@ export default class Shipment extends EasyPostObject {
declare scan_form?: ScanForm | null;
declare selected_rate?: Rate | null;
declare status?: string | null;
declare tax_identifiers?: TaxIdentifier[] | null;
declare to_address?: Address | null;
declare tracker?: Tracker | null;
declare tracking_code?: string | null;
Expand Down
13 changes: 13 additions & 0 deletions src/models/tax_identifier.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Address from './address';

/**
* A TaxIdentifier represents tax information used by carriers for a {@link Shipment}.
* @public
*/
export default class TaxIdentifier {
declare address?: Address | null;
declare entity?: string | null;
declare issuing_country?: string | null;
declare tax_id?: string | null;
declare tax_id_type?: string | null;
}
4 changes: 3 additions & 1 deletion src/services/customs_info_service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import type EasyPostClient from '../easypost';
import CustomsInfo from '../models/customs_info';
import CustomsItem from '../models/customs_item';
import baseService from './base_service';
import type { CustomsItemCreateParameters } from './customs_item_service';

export type CustomsItemInput = Record<string, unknown>;
export type CustomsItemInput = CustomsItemCreateParameters | CustomsItem;

export type CustomsInfoCreateParameters = Record<string, unknown> & {
eel_pfc?: string | null;
Expand Down
4 changes: 3 additions & 1 deletion src/services/customs_item_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import baseService from './base_service';
import CustomsItem from '../models/customs_item';
import type EasyPostClient from '../easypost';

type CustomsItemCreateParameters = Record<string, unknown> & {
export type CustomsItemCreateParameters = Record<string, unknown> & {
description?: string | null;
quantity?: number | null;
value?: number | null;
Expand All @@ -11,6 +11,8 @@ type CustomsItemCreateParameters = Record<string, unknown> & {
code?: string | null;
origin_country?: string | null;
currency?: string | null;
manufacturer_product_id?: string | null;
standardized_product_id?: string | null;
};

export default (easypostClient: EasyPostClient) =>
Expand Down
3 changes: 2 additions & 1 deletion src/services/shipment_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type ShipmentTaxIdentifier = Record<string, unknown> & {
tax_id?: string | null;
tax_id_type?: string | null;
issuing_country?: string | null;
address?: AddressCreateParameters | Address | null;
};

type ShipmentLineItem = Record<string, unknown> & {
Expand Down Expand Up @@ -48,7 +49,7 @@ export default (easypostClient: EasyPostClient) =>
*/
class ShipmentService extends baseService(easypostClient) {
/**
static async createAndBuyLuma(params: ShipmentCreateParameters): Promise<unknown> {
* Create a {@link Shipment shipment}.
* See {@link https://docs.easypost.com/docs/shipments#create-a-shipment EasyPost API Documentation} for more information.
* @param {Object} params - The parameters to create a shipment with.
* @returns {Shipment} - The created shipment.
Expand Down
Loading