@commercelayer/sdk 5.34.4 → 5.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,14 +2,14 @@ import * as api from './api';
2
2
  import type { ApiError } from './error';
3
3
  import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
4
4
  import { type ResourcesInitConfig } from './resource';
5
- declare const OPEN_API_SCHEMA_VERSION = "5.0.0";
5
+ declare const OPEN_API_SCHEMA_VERSION = "5.2.0";
6
6
  export { OPEN_API_SCHEMA_VERSION };
7
7
  type SdkConfig = {};
8
8
  type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
9
9
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
10
10
  declare class CommerceLayerClient {
11
11
  #private;
12
- readonly openApiSchemaVersion = "5.0.0";
12
+ readonly openApiSchemaVersion = "5.2.0";
13
13
  addresses: api.Addresses;
14
14
  adjustments: api.Adjustments;
15
15
  adyen_gateways: api.AdyenGateways;
@@ -45,7 +45,7 @@ const resource_1 = __importDefault(require("./resource"));
45
45
  const debug_1 = __importDefault(require("./debug"));
46
46
  const debug = (0, debug_1.default)('commercelayer');
47
47
  // Autogenerated schema version number, do not remove this line
48
- const OPEN_API_SCHEMA_VERSION = '5.0.0';
48
+ const OPEN_API_SCHEMA_VERSION = '5.2.0';
49
49
  exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
50
50
  class CommerceLayerClient {
51
51
  // ##__CL_RESOURCES_DEF_STOP__##
@@ -1,8 +1,8 @@
1
1
  import { ApiResource } from '../resource';
2
2
  import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
3
  import type { QueryParamsList } from '../query';
4
- import type { EventCallback } from './event_callbacks';
5
4
  import type { Webhook } from './webhooks';
5
+ import type { EventCallback } from './event_callbacks';
6
6
  type EventType = 'events';
7
7
  type EventRel = ResourceRel & {
8
8
  type: EventType;
@@ -10,13 +10,13 @@ type EventRel = ResourceRel & {
10
10
  interface Event extends Resource {
11
11
  readonly type: EventType;
12
12
  name: string;
13
- last_event_callbacks?: EventCallback[] | null;
14
13
  webhooks?: Webhook[] | null;
14
+ last_event_callbacks?: EventCallback[] | null;
15
15
  }
16
16
  declare class Events extends ApiResource<Event> {
17
17
  static readonly TYPE: EventType;
18
- last_event_callbacks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
19
18
  webhooks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Webhook>>;
19
+ last_event_callbacks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
20
20
  isEvent(resource: any): resource is Event;
21
21
  relationship(id: string | ResourceId | null): EventRel;
22
22
  type(): EventType;
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const resource_1 = require("../resource");
4
4
  class Events extends resource_1.ApiResource {
5
- async last_event_callbacks(eventId, params, options) {
6
- const _eventId = eventId.id || eventId;
7
- return this.resources.fetch({ type: 'event_callbacks' }, `events/${_eventId}/last_event_callbacks`, params, options);
8
- }
9
5
  async webhooks(eventId, params, options) {
10
6
  const _eventId = eventId.id || eventId;
11
7
  return this.resources.fetch({ type: 'webhooks' }, `events/${_eventId}/webhooks`, params, options);
12
8
  }
9
+ async last_event_callbacks(eventId, params, options) {
10
+ const _eventId = eventId.id || eventId;
11
+ return this.resources.fetch({ type: 'event_callbacks' }, `events/${_eventId}/last_event_callbacks`, params, options);
12
+ }
13
13
  isEvent(resource) {
14
14
  return resource.type && (resource.type === Events.TYPE);
15
15
  }
@@ -24,6 +24,8 @@ type SkuRel = ResourceRel & {
24
24
  };
25
25
  interface OrderSubscriptionItem extends Resource {
26
26
  readonly type: OrderSubscriptionItemType;
27
+ sku_code?: string | null;
28
+ bundle_code?: string | null;
27
29
  quantity: number;
28
30
  unit_amount_cents?: number | null;
29
31
  unit_amount_float?: number | null;
@@ -35,6 +37,7 @@ interface OrderSubscriptionItem extends Resource {
35
37
  item?: Adjustment | Bundle | Sku | null;
36
38
  sku?: Sku | null;
37
39
  bundle?: Bundle | null;
40
+ adjustment?: Adjustment | null;
38
41
  source_line_item?: LineItem | null;
39
42
  }
40
43
  interface OrderSubscriptionItemCreate extends ResourceCreate {
@@ -46,6 +49,7 @@ interface OrderSubscriptionItemCreate extends ResourceCreate {
46
49
  item: AdjustmentRel | BundleRel | SkuRel;
47
50
  sku?: SkuRel | null;
48
51
  bundle?: BundleRel | null;
52
+ adjustment?: AdjustmentRel | null;
49
53
  }
50
54
  interface OrderSubscriptionItemUpdate extends ResourceUpdate {
51
55
  sku_code?: string | null;
@@ -30,6 +30,7 @@ interface OrderSubscription extends Resource {
30
30
  status: 'draft' | 'inactive' | 'active' | 'cancelled';
31
31
  frequency: string;
32
32
  activate_by_source_order?: boolean | null;
33
+ place_target_order?: boolean | null;
33
34
  customer_email?: string | null;
34
35
  starts_at?: string | null;
35
36
  expires_at?: string | null;
@@ -38,7 +39,6 @@ interface OrderSubscription extends Resource {
38
39
  occurrencies?: number | null;
39
40
  errors_count?: number | null;
40
41
  succeeded_on_last_run?: boolean | null;
41
- options?: Record<string, any> | null;
42
42
  market?: Market | null;
43
43
  subscription_model?: SubscriptionModel | null;
44
44
  source_order?: Order | null;
@@ -54,14 +54,16 @@ interface OrderSubscription extends Resource {
54
54
  interface OrderSubscriptionCreate extends ResourceCreate {
55
55
  frequency: string;
56
56
  activate_by_source_order?: boolean | null;
57
+ place_target_order?: boolean | null;
57
58
  starts_at?: string | null;
58
59
  expires_at?: string | null;
59
- options?: Record<string, any> | null;
60
60
  market?: MarketRel | null;
61
61
  source_order: OrderRel;
62
62
  }
63
63
  interface OrderSubscriptionUpdate extends ResourceUpdate {
64
64
  frequency?: string | null;
65
+ activate_by_source_order?: boolean | null;
66
+ place_target_order?: boolean | null;
65
67
  expires_at?: string | null;
66
68
  next_run_at?: string | null;
67
69
  _activate?: boolean | null;
@@ -22,6 +22,7 @@ interface Organization extends Resource {
22
22
  max_concurrent_cleanups?: number | null;
23
23
  order_number_editable_test?: boolean | null;
24
24
  order_number_editable_live?: boolean | null;
25
+ config?: Record<string, any> | null;
25
26
  }
26
27
  declare class Organizations extends ApiSingleton<Organization> {
27
28
  static readonly TYPE: OrganizationType;
@@ -8,6 +8,9 @@ import type { PriceVolumeTier } from './price_volume_tiers';
8
8
  import type { PriceFrequencyTier } from './price_frequency_tiers';
9
9
  import type { Attachment } from './attachments';
10
10
  import type { Version } from './versions';
11
+ import type { Customer } from './customers';
12
+ import type { Market } from './markets';
13
+ import type { StockLocation } from './stock_locations';
11
14
  type PriceType = 'prices';
12
15
  type PriceRel = ResourceRel & {
13
16
  type: PriceType;
@@ -38,6 +41,9 @@ interface Price extends Resource {
38
41
  price_frequency_tiers?: PriceFrequencyTier[] | null;
39
42
  attachments?: Attachment[] | null;
40
43
  versions?: Version[] | null;
44
+ jwt_customer?: Customer | null;
45
+ jwt_markets?: Market[] | null;
46
+ jwt_stock_locations?: StockLocation[] | null;
41
47
  }
42
48
  interface PriceCreate extends ResourceCreate {
43
49
  sku_code?: string | null;
@@ -67,6 +73,9 @@ declare class Prices extends ApiResource<Price> {
67
73
  price_frequency_tiers(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceFrequencyTier>>;
68
74
  attachments(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
69
75
  versions(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
76
+ jwt_customer(priceId: string | Price, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
77
+ jwt_markets(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
78
+ jwt_stock_locations(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLocation>>;
70
79
  isPrice(resource: any): resource is Price;
71
80
  relationship(id: string | ResourceId | null): PriceRel;
72
81
  type(): PriceType;
@@ -39,6 +39,18 @@ class Prices extends resource_1.ApiResource {
39
39
  const _priceId = priceId.id || priceId;
40
40
  return this.resources.fetch({ type: 'versions' }, `prices/${_priceId}/versions`, params, options);
41
41
  }
42
+ async jwt_customer(priceId, params, options) {
43
+ const _priceId = priceId.id || priceId;
44
+ return this.resources.fetch({ type: 'customers' }, `prices/${_priceId}/jwt_customer`, params, options);
45
+ }
46
+ async jwt_markets(priceId, params, options) {
47
+ const _priceId = priceId.id || priceId;
48
+ return this.resources.fetch({ type: 'markets' }, `prices/${_priceId}/jwt_markets`, params, options);
49
+ }
50
+ async jwt_stock_locations(priceId, params, options) {
51
+ const _priceId = priceId.id || priceId;
52
+ return this.resources.fetch({ type: 'stock_locations' }, `prices/${_priceId}/jwt_stock_locations`, params, options);
53
+ }
42
54
  isPrice(resource) {
43
55
  return resource.type && (resource.type === Prices.TYPE);
44
56
  }
@@ -10,6 +10,7 @@ import type { ShippingMethod, ShippingMethodType } from './shipping_methods';
10
10
  import type { DeliveryLeadTime } from './delivery_lead_times';
11
11
  import type { StockLineItem } from './stock_line_items';
12
12
  import type { StockTransfer } from './stock_transfers';
13
+ import type { LineItem } from './line_items';
13
14
  import type { CarrierAccount } from './carrier_accounts';
14
15
  import type { Parcel } from './parcels';
15
16
  import type { Attachment } from './attachments';
@@ -72,6 +73,7 @@ interface Shipment extends Resource {
72
73
  delivery_lead_time?: DeliveryLeadTime | null;
73
74
  stock_line_items?: StockLineItem[] | null;
74
75
  stock_transfers?: StockTransfer[] | null;
76
+ line_items?: LineItem[] | null;
75
77
  available_shipping_methods?: ShippingMethod[] | null;
76
78
  carrier_accounts?: CarrierAccount[] | null;
77
79
  parcels?: Parcel[] | null;
@@ -122,6 +124,7 @@ declare class Shipments extends ApiResource<Shipment> {
122
124
  delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
123
125
  stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
124
126
  stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
127
+ line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItem>>;
125
128
  available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>>;
126
129
  carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
127
130
  parcels(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
@@ -51,6 +51,10 @@ class Shipments extends resource_1.ApiResource {
51
51
  const _shipmentId = shipmentId.id || shipmentId;
52
52
  return this.resources.fetch({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options);
53
53
  }
54
+ async line_items(shipmentId, params, options) {
55
+ const _shipmentId = shipmentId.id || shipmentId;
56
+ return this.resources.fetch({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options);
57
+ }
54
58
  async available_shipping_methods(shipmentId, params, options) {
55
59
  const _shipmentId = shipmentId.id || shipmentId;
56
60
  return this.resources.fetch({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options);
@@ -2,14 +2,14 @@ import * as api from './api';
2
2
  import type { ApiError } from './error';
3
3
  import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
4
4
  import { type ResourcesInitConfig } from './resource';
5
- declare const OPEN_API_SCHEMA_VERSION = "5.0.0";
5
+ declare const OPEN_API_SCHEMA_VERSION = "5.2.0";
6
6
  export { OPEN_API_SCHEMA_VERSION };
7
7
  type SdkConfig = {};
8
8
  type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
9
9
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
10
10
  declare class CommerceLayerClient {
11
11
  #private;
12
- readonly openApiSchemaVersion = "5.0.0";
12
+ readonly openApiSchemaVersion = "5.2.0";
13
13
  addresses: api.Addresses;
14
14
  adjustments: api.Adjustments;
15
15
  adyen_gateways: api.AdyenGateways;
@@ -16,7 +16,7 @@ import ResourceAdapter from './resource';
16
16
  import Debug from './debug';
17
17
  const debug = Debug('commercelayer');
18
18
  // Autogenerated schema version number, do not remove this line
19
- const OPEN_API_SCHEMA_VERSION = '5.0.0';
19
+ const OPEN_API_SCHEMA_VERSION = '5.2.0';
20
20
  export { OPEN_API_SCHEMA_VERSION };
21
21
  class CommerceLayerClient {
22
22
  // ##__CL_RESOURCES_DEF_STOP__##
@@ -1,8 +1,8 @@
1
1
  import { ApiResource } from '../resource';
2
2
  import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
3
  import type { QueryParamsList } from '../query';
4
- import type { EventCallback } from './event_callbacks';
5
4
  import type { Webhook } from './webhooks';
5
+ import type { EventCallback } from './event_callbacks';
6
6
  type EventType = 'events';
7
7
  type EventRel = ResourceRel & {
8
8
  type: EventType;
@@ -10,13 +10,13 @@ type EventRel = ResourceRel & {
10
10
  interface Event extends Resource {
11
11
  readonly type: EventType;
12
12
  name: string;
13
- last_event_callbacks?: EventCallback[] | null;
14
13
  webhooks?: Webhook[] | null;
14
+ last_event_callbacks?: EventCallback[] | null;
15
15
  }
16
16
  declare class Events extends ApiResource<Event> {
17
17
  static readonly TYPE: EventType;
18
- last_event_callbacks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
19
18
  webhooks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Webhook>>;
19
+ last_event_callbacks(eventId: string | Event, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
20
20
  isEvent(resource: any): resource is Event;
21
21
  relationship(id: string | ResourceId | null): EventRel;
22
22
  type(): EventType;
@@ -1,13 +1,13 @@
1
1
  import { ApiResource } from '../resource';
2
2
  class Events extends ApiResource {
3
- async last_event_callbacks(eventId, params, options) {
4
- const _eventId = eventId.id || eventId;
5
- return this.resources.fetch({ type: 'event_callbacks' }, `events/${_eventId}/last_event_callbacks`, params, options);
6
- }
7
3
  async webhooks(eventId, params, options) {
8
4
  const _eventId = eventId.id || eventId;
9
5
  return this.resources.fetch({ type: 'webhooks' }, `events/${_eventId}/webhooks`, params, options);
10
6
  }
7
+ async last_event_callbacks(eventId, params, options) {
8
+ const _eventId = eventId.id || eventId;
9
+ return this.resources.fetch({ type: 'event_callbacks' }, `events/${_eventId}/last_event_callbacks`, params, options);
10
+ }
11
11
  isEvent(resource) {
12
12
  return resource.type && (resource.type === Events.TYPE);
13
13
  }
@@ -24,6 +24,8 @@ type SkuRel = ResourceRel & {
24
24
  };
25
25
  interface OrderSubscriptionItem extends Resource {
26
26
  readonly type: OrderSubscriptionItemType;
27
+ sku_code?: string | null;
28
+ bundle_code?: string | null;
27
29
  quantity: number;
28
30
  unit_amount_cents?: number | null;
29
31
  unit_amount_float?: number | null;
@@ -35,6 +37,7 @@ interface OrderSubscriptionItem extends Resource {
35
37
  item?: Adjustment | Bundle | Sku | null;
36
38
  sku?: Sku | null;
37
39
  bundle?: Bundle | null;
40
+ adjustment?: Adjustment | null;
38
41
  source_line_item?: LineItem | null;
39
42
  }
40
43
  interface OrderSubscriptionItemCreate extends ResourceCreate {
@@ -46,6 +49,7 @@ interface OrderSubscriptionItemCreate extends ResourceCreate {
46
49
  item: AdjustmentRel | BundleRel | SkuRel;
47
50
  sku?: SkuRel | null;
48
51
  bundle?: BundleRel | null;
52
+ adjustment?: AdjustmentRel | null;
49
53
  }
50
54
  interface OrderSubscriptionItemUpdate extends ResourceUpdate {
51
55
  sku_code?: string | null;
@@ -30,6 +30,7 @@ interface OrderSubscription extends Resource {
30
30
  status: 'draft' | 'inactive' | 'active' | 'cancelled';
31
31
  frequency: string;
32
32
  activate_by_source_order?: boolean | null;
33
+ place_target_order?: boolean | null;
33
34
  customer_email?: string | null;
34
35
  starts_at?: string | null;
35
36
  expires_at?: string | null;
@@ -38,7 +39,6 @@ interface OrderSubscription extends Resource {
38
39
  occurrencies?: number | null;
39
40
  errors_count?: number | null;
40
41
  succeeded_on_last_run?: boolean | null;
41
- options?: Record<string, any> | null;
42
42
  market?: Market | null;
43
43
  subscription_model?: SubscriptionModel | null;
44
44
  source_order?: Order | null;
@@ -54,14 +54,16 @@ interface OrderSubscription extends Resource {
54
54
  interface OrderSubscriptionCreate extends ResourceCreate {
55
55
  frequency: string;
56
56
  activate_by_source_order?: boolean | null;
57
+ place_target_order?: boolean | null;
57
58
  starts_at?: string | null;
58
59
  expires_at?: string | null;
59
- options?: Record<string, any> | null;
60
60
  market?: MarketRel | null;
61
61
  source_order: OrderRel;
62
62
  }
63
63
  interface OrderSubscriptionUpdate extends ResourceUpdate {
64
64
  frequency?: string | null;
65
+ activate_by_source_order?: boolean | null;
66
+ place_target_order?: boolean | null;
65
67
  expires_at?: string | null;
66
68
  next_run_at?: string | null;
67
69
  _activate?: boolean | null;
@@ -22,6 +22,7 @@ interface Organization extends Resource {
22
22
  max_concurrent_cleanups?: number | null;
23
23
  order_number_editable_test?: boolean | null;
24
24
  order_number_editable_live?: boolean | null;
25
+ config?: Record<string, any> | null;
25
26
  }
26
27
  declare class Organizations extends ApiSingleton<Organization> {
27
28
  static readonly TYPE: OrganizationType;
@@ -8,6 +8,9 @@ import type { PriceVolumeTier } from './price_volume_tiers';
8
8
  import type { PriceFrequencyTier } from './price_frequency_tiers';
9
9
  import type { Attachment } from './attachments';
10
10
  import type { Version } from './versions';
11
+ import type { Customer } from './customers';
12
+ import type { Market } from './markets';
13
+ import type { StockLocation } from './stock_locations';
11
14
  type PriceType = 'prices';
12
15
  type PriceRel = ResourceRel & {
13
16
  type: PriceType;
@@ -38,6 +41,9 @@ interface Price extends Resource {
38
41
  price_frequency_tiers?: PriceFrequencyTier[] | null;
39
42
  attachments?: Attachment[] | null;
40
43
  versions?: Version[] | null;
44
+ jwt_customer?: Customer | null;
45
+ jwt_markets?: Market[] | null;
46
+ jwt_stock_locations?: StockLocation[] | null;
41
47
  }
42
48
  interface PriceCreate extends ResourceCreate {
43
49
  sku_code?: string | null;
@@ -67,6 +73,9 @@ declare class Prices extends ApiResource<Price> {
67
73
  price_frequency_tiers(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceFrequencyTier>>;
68
74
  attachments(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
69
75
  versions(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
76
+ jwt_customer(priceId: string | Price, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
77
+ jwt_markets(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
78
+ jwt_stock_locations(priceId: string | Price, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLocation>>;
70
79
  isPrice(resource: any): resource is Price;
71
80
  relationship(id: string | ResourceId | null): PriceRel;
72
81
  type(): PriceType;
@@ -37,6 +37,18 @@ class Prices extends ApiResource {
37
37
  const _priceId = priceId.id || priceId;
38
38
  return this.resources.fetch({ type: 'versions' }, `prices/${_priceId}/versions`, params, options);
39
39
  }
40
+ async jwt_customer(priceId, params, options) {
41
+ const _priceId = priceId.id || priceId;
42
+ return this.resources.fetch({ type: 'customers' }, `prices/${_priceId}/jwt_customer`, params, options);
43
+ }
44
+ async jwt_markets(priceId, params, options) {
45
+ const _priceId = priceId.id || priceId;
46
+ return this.resources.fetch({ type: 'markets' }, `prices/${_priceId}/jwt_markets`, params, options);
47
+ }
48
+ async jwt_stock_locations(priceId, params, options) {
49
+ const _priceId = priceId.id || priceId;
50
+ return this.resources.fetch({ type: 'stock_locations' }, `prices/${_priceId}/jwt_stock_locations`, params, options);
51
+ }
40
52
  isPrice(resource) {
41
53
  return resource.type && (resource.type === Prices.TYPE);
42
54
  }
@@ -10,6 +10,7 @@ import type { ShippingMethod, ShippingMethodType } from './shipping_methods';
10
10
  import type { DeliveryLeadTime } from './delivery_lead_times';
11
11
  import type { StockLineItem } from './stock_line_items';
12
12
  import type { StockTransfer } from './stock_transfers';
13
+ import type { LineItem } from './line_items';
13
14
  import type { CarrierAccount } from './carrier_accounts';
14
15
  import type { Parcel } from './parcels';
15
16
  import type { Attachment } from './attachments';
@@ -72,6 +73,7 @@ interface Shipment extends Resource {
72
73
  delivery_lead_time?: DeliveryLeadTime | null;
73
74
  stock_line_items?: StockLineItem[] | null;
74
75
  stock_transfers?: StockTransfer[] | null;
76
+ line_items?: LineItem[] | null;
75
77
  available_shipping_methods?: ShippingMethod[] | null;
76
78
  carrier_accounts?: CarrierAccount[] | null;
77
79
  parcels?: Parcel[] | null;
@@ -122,6 +124,7 @@ declare class Shipments extends ApiResource<Shipment> {
122
124
  delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
123
125
  stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
124
126
  stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
127
+ line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItem>>;
125
128
  available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>>;
126
129
  carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
127
130
  parcels(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
@@ -49,6 +49,10 @@ class Shipments extends ApiResource {
49
49
  const _shipmentId = shipmentId.id || shipmentId;
50
50
  return this.resources.fetch({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options);
51
51
  }
52
+ async line_items(shipmentId, params, options) {
53
+ const _shipmentId = shipmentId.id || shipmentId;
54
+ return this.resources.fetch({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options);
55
+ }
52
56
  async available_shipping_methods(shipmentId, params, options) {
53
57
  const _shipmentId = shipmentId.id || shipmentId;
54
58
  return this.resources.fetch({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options);