@zippendo/sdk 1.1.3 → 1.2.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.
- package/dist/apis/ShipmentsApi.d.ts +2 -2
- package/dist/apis/ShipmentsApi.js +2 -2
- package/dist/esm/apis/ShipmentsApi.d.ts +2 -2
- package/dist/esm/apis/ShipmentsApi.js +2 -2
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.d.ts +2 -0
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.js +2 -0
- package/dist/esm/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/esm/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.js +1 -3
- package/dist/esm/models/CreateShipmentRequest.d.ts +14 -1
- package/dist/esm/models/CreateShipmentRequest.js +6 -3
- package/dist/esm/models/CreateShipmentRequestCarrierSettings.d.ts +1 -1
- package/dist/esm/models/CreateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/esm/models/CreateShipmentRequestDroppoint.js +54 -0
- package/dist/esm/models/CreateShipmentRequestParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/esm/models/CreateShipmentRequestParcelsInnerOrderLinesInner.js +1 -3
- package/dist/esm/models/GetOrder200ResponseShipmentsInner.d.ts +6 -0
- package/dist/esm/models/GetOrder200ResponseShipmentsInner.js +2 -0
- package/dist/esm/models/ListApiTokens401Response.d.ts +2 -0
- package/dist/esm/models/ListApiTokens401Response.js +2 -0
- package/dist/esm/models/SendShipment422Response.d.ts +2 -0
- package/dist/esm/models/SendShipment422Response.js +2 -0
- package/dist/esm/models/UpdateOrgRequest.d.ts +6 -0
- package/dist/esm/models/UpdateOrgRequest.js +2 -0
- package/dist/esm/models/UpdateShipmentRequest.d.ts +10 -3
- package/dist/esm/models/UpdateShipmentRequest.js +6 -3
- package/dist/esm/models/UpdateShipmentRequestCarrierSettings.d.ts +53 -0
- package/dist/esm/models/UpdateShipmentRequestCarrierSettings.js +57 -0
- package/dist/esm/models/UpdateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/esm/models/UpdateShipmentRequestDroppoint.js +54 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.d.ts +2 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.js +2 -0
- package/dist/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.js +1 -3
- package/dist/models/CreateShipmentRequest.d.ts +14 -1
- package/dist/models/CreateShipmentRequest.js +6 -3
- package/dist/models/CreateShipmentRequestCarrierSettings.d.ts +1 -1
- package/dist/models/CreateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/models/CreateShipmentRequestDroppoint.js +61 -0
- package/dist/models/CreateShipmentRequestParcelsInnerOrderLinesInner.d.ts +2 -2
- package/dist/models/CreateShipmentRequestParcelsInnerOrderLinesInner.js +1 -3
- package/dist/models/GetOrder200ResponseShipmentsInner.d.ts +6 -0
- package/dist/models/GetOrder200ResponseShipmentsInner.js +2 -0
- package/dist/models/ListApiTokens401Response.d.ts +2 -0
- package/dist/models/ListApiTokens401Response.js +2 -0
- package/dist/models/SendShipment422Response.d.ts +2 -0
- package/dist/models/SendShipment422Response.js +2 -0
- package/dist/models/UpdateOrgRequest.d.ts +6 -0
- package/dist/models/UpdateOrgRequest.js +2 -0
- package/dist/models/UpdateShipmentRequest.d.ts +10 -3
- package/dist/models/UpdateShipmentRequest.js +6 -3
- package/dist/models/UpdateShipmentRequestCarrierSettings.d.ts +53 -0
- package/dist/models/UpdateShipmentRequestCarrierSettings.js +64 -0
- package/dist/models/UpdateShipmentRequestDroppoint.d.ts +51 -0
- package/dist/models/UpdateShipmentRequestDroppoint.js +61 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/CreateShipmentRequest.md +4 -0
- package/docs/CreateShipmentRequestCarrierSettings.md +1 -0
- package/docs/CreateShipmentRequestDroppoint.md +41 -0
- package/docs/GetOrder200ResponseShipmentsInner.md +2 -0
- package/docs/ShipmentsApi.md +1 -1
- package/docs/UpdateOrgRequest.md +2 -0
- package/docs/UpdateShipmentRequest.md +3 -1
- package/docs/UpdateShipmentRequestCarrierSettings.md +40 -0
- package/docs/UpdateShipmentRequestDroppoint.md +41 -0
- package/package.json +1 -1
- package/src/apis/ShipmentsApi.ts +2 -2
- package/src/models/BatchSendShipments200ResponseResultsInner.ts +2 -0
- package/src/models/CreateShipment201ResponseParcelsInnerOrderLinesInner.ts +3 -4
- package/src/models/CreateShipmentRequest.ts +25 -3
- package/src/models/CreateShipmentRequestCarrierSettings.ts +1 -1
- package/src/models/CreateShipmentRequestDroppoint.ts +100 -0
- package/src/models/CreateShipmentRequestParcelsInnerOrderLinesInner.ts +3 -4
- package/src/models/GetOrder200ResponseShipmentsInner.ts +8 -0
- package/src/models/ListApiTokens401Response.ts +2 -0
- package/src/models/SendShipment422Response.ts +2 -0
- package/src/models/UpdateOrgRequest.ts +8 -0
- package/src/models/UpdateShipmentRequest.ts +25 -10
- package/src/models/UpdateShipmentRequestCarrierSettings.ts +101 -0
- package/src/models/UpdateShipmentRequestDroppoint.ts +100 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateShipmentRequestDroppoint
|
|
3
|
+
|
|
4
|
+
Display details of the selected service point, stored alongside `servicePointId`. Used when applying a service-point shipping rule (whose parameters otherwise replace the stored droppoint).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`address` | string
|
|
13
|
+
`coordinates` | [Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>](ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner.md)
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { UpdateShipmentRequestDroppoint } from '@zippendo/sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"id": sp_pn_4521,
|
|
23
|
+
"name": Føtex Nørrebro,
|
|
24
|
+
"address": Nørrebrogade 20, 2200 København N,
|
|
25
|
+
"coordinates": [55.6987,12.5501],
|
|
26
|
+
} satisfies UpdateShipmentRequestDroppoint
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateShipmentRequestDroppoint
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
package/package.json
CHANGED
package/src/apis/ShipmentsApi.ts
CHANGED
|
@@ -421,7 +421,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
|
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
/**
|
|
424
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
424
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
425
425
|
* Create shipment
|
|
426
426
|
*/
|
|
427
427
|
async createShipmentRaw(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>> {
|
|
@@ -432,7 +432,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
|
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
/**
|
|
435
|
-
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
435
|
+
* Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
|
|
436
436
|
* Create shipment
|
|
437
437
|
*/
|
|
438
438
|
async createShipment(requestParameters: CreateShipmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response> {
|
|
@@ -108,6 +108,7 @@ export const BatchSendShipments200ResponseResultsInnerCodeEnum = {
|
|
|
108
108
|
BrandHasRecords: 'BRAND_HAS_RECORDS',
|
|
109
109
|
UserNotFound: 'USER_NOT_FOUND',
|
|
110
110
|
UserExists: 'USER_EXISTS',
|
|
111
|
+
TermsNotAccepted: 'TERMS_NOT_ACCEPTED',
|
|
111
112
|
MemberNotFound: 'MEMBER_NOT_FOUND',
|
|
112
113
|
MemberSelfBrandRestriction: 'MEMBER_SELF_BRAND_RESTRICTION',
|
|
113
114
|
RoleNotFound: 'ROLE_NOT_FOUND',
|
|
@@ -136,6 +137,7 @@ export const BatchSendShipments200ResponseResultsInnerCodeEnum = {
|
|
|
136
137
|
ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
|
|
137
138
|
ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
|
|
138
139
|
ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
|
|
140
|
+
ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
|
|
139
141
|
ParcelNotFound: 'PARCEL_NOT_FOUND',
|
|
140
142
|
ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
|
|
141
143
|
PickupNotFound: 'PICKUP_NOT_FOUND',
|
|
@@ -26,11 +26,11 @@ export interface CreateShipment201ResponseParcelsInnerOrderLinesInner {
|
|
|
26
26
|
*/
|
|
27
27
|
id?: string;
|
|
28
28
|
/**
|
|
29
|
-
* Stock keeping unit of the product.
|
|
29
|
+
* Stock keeping unit of the product. Optional — not every webshop assigns SKUs.
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof CreateShipment201ResponseParcelsInnerOrderLinesInner
|
|
32
32
|
*/
|
|
33
|
-
sku
|
|
33
|
+
sku?: string | null;
|
|
34
34
|
/**
|
|
35
35
|
* Number of units in this order line.
|
|
36
36
|
* @type {number}
|
|
@@ -85,7 +85,6 @@ export interface CreateShipment201ResponseParcelsInnerOrderLinesInner {
|
|
|
85
85
|
* Check if a given object implements the CreateShipment201ResponseParcelsInnerOrderLinesInner interface.
|
|
86
86
|
*/
|
|
87
87
|
export function instanceOfCreateShipment201ResponseParcelsInnerOrderLinesInner(value: object): value is CreateShipment201ResponseParcelsInnerOrderLinesInner {
|
|
88
|
-
if (!('sku' in value) || value['sku'] === undefined) return false;
|
|
89
88
|
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
90
89
|
return true;
|
|
91
90
|
}
|
|
@@ -101,7 +100,7 @@ export function CreateShipment201ResponseParcelsInnerOrderLinesInnerFromJSONType
|
|
|
101
100
|
return {
|
|
102
101
|
|
|
103
102
|
'id': json['id'] == null ? undefined : json['id'],
|
|
104
|
-
'sku': json['sku'],
|
|
103
|
+
'sku': json['sku'] === undefined ? undefined : json['sku'] === null ? null : json['sku'],
|
|
105
104
|
'quantity': json['quantity'],
|
|
106
105
|
'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'],
|
|
107
106
|
'unitPrice': json['unitPrice'] === undefined ? undefined : json['unitPrice'] === null ? null : json['unitPrice'],
|
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
CreateShipmentRequestCarrierSettingsToJSON,
|
|
28
28
|
CreateShipmentRequestCarrierSettingsToJSONTyped,
|
|
29
29
|
} from './CreateShipmentRequestCarrierSettings';
|
|
30
|
+
import type { CreateShipmentRequestDroppoint } from './CreateShipmentRequestDroppoint';
|
|
31
|
+
import {
|
|
32
|
+
CreateShipmentRequestDroppointFromJSON,
|
|
33
|
+
CreateShipmentRequestDroppointFromJSONTyped,
|
|
34
|
+
CreateShipmentRequestDroppointToJSON,
|
|
35
|
+
CreateShipmentRequestDroppointToJSONTyped,
|
|
36
|
+
} from './CreateShipmentRequestDroppoint';
|
|
30
37
|
import type { CreateShipmentRequestPartiesInner } from './CreateShipmentRequestPartiesInner';
|
|
31
38
|
import {
|
|
32
39
|
CreateShipmentRequestPartiesInnerFromJSON,
|
|
@@ -83,7 +90,7 @@ export interface CreateShipmentRequest {
|
|
|
83
90
|
* @type {CreateShipmentRequestCarrierSettings}
|
|
84
91
|
* @memberof CreateShipmentRequest
|
|
85
92
|
*/
|
|
86
|
-
carrierSettings
|
|
93
|
+
carrierSettings?: CreateShipmentRequestCarrierSettings;
|
|
87
94
|
/**
|
|
88
95
|
* Parcels to include. Optional when orderId is provided.
|
|
89
96
|
* @type {Array<CreateShipmentRequestParcelsInner>}
|
|
@@ -126,6 +133,18 @@ export interface CreateShipmentRequest {
|
|
|
126
133
|
* @memberof CreateShipmentRequest
|
|
127
134
|
*/
|
|
128
135
|
documentPrinterId?: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* Create the shipment from this shipping rule: carrier settings and the sender address derive from the rule (explicit carrierSettings and addressId are then ignored).
|
|
138
|
+
* @type {string}
|
|
139
|
+
* @memberof CreateShipmentRequest
|
|
140
|
+
*/
|
|
141
|
+
shippingRuleId?: string;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {CreateShipmentRequestDroppoint}
|
|
145
|
+
* @memberof CreateShipmentRequest
|
|
146
|
+
*/
|
|
147
|
+
droppoint?: CreateShipmentRequestDroppoint;
|
|
129
148
|
}
|
|
130
149
|
|
|
131
150
|
|
|
@@ -159,7 +178,6 @@ export type CreateShipmentRequestStatusEnum = typeof CreateShipmentRequestStatus
|
|
|
159
178
|
*/
|
|
160
179
|
export function instanceOfCreateShipmentRequest(value: object): value is CreateShipmentRequest {
|
|
161
180
|
if (!('type' in value) || value['type'] === undefined) return false;
|
|
162
|
-
if (!('carrierSettings' in value) || value['carrierSettings'] === undefined) return false;
|
|
163
181
|
return true;
|
|
164
182
|
}
|
|
165
183
|
|
|
@@ -178,7 +196,7 @@ export function CreateShipmentRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
178
196
|
'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
|
|
179
197
|
'parties': json['parties'] == null ? undefined : ((json['parties'] as Array<any>).map(CreateShipmentRequestPartiesInnerFromJSON)),
|
|
180
198
|
'type': json['type'],
|
|
181
|
-
'carrierSettings': CreateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
|
|
199
|
+
'carrierSettings': json['carrierSettings'] == null ? undefined : CreateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
|
|
182
200
|
'parcels': json['parcels'] == null ? undefined : ((json['parcels'] as Array<any>).map(CreateShipmentRequestParcelsInnerFromJSON)),
|
|
183
201
|
'pickupDetails': json['pickupDetails'] === undefined ? undefined : json['pickupDetails'] === null ? null : CreateShipmentRequestPickupDetailsFromJSON(json['pickupDetails']),
|
|
184
202
|
'termOfTrade': json['termOfTrade'] == null ? undefined : json['termOfTrade'],
|
|
@@ -186,6 +204,8 @@ export function CreateShipmentRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
186
204
|
'orderId': json['orderId'] === undefined ? undefined : json['orderId'] === null ? null : json['orderId'],
|
|
187
205
|
'labelPrinterId': json['labelPrinterId'] === undefined ? undefined : json['labelPrinterId'] === null ? null : json['labelPrinterId'],
|
|
188
206
|
'documentPrinterId': json['documentPrinterId'] === undefined ? undefined : json['documentPrinterId'] === null ? null : json['documentPrinterId'],
|
|
207
|
+
'shippingRuleId': json['shippingRuleId'] == null ? undefined : json['shippingRuleId'],
|
|
208
|
+
'droppoint': json['droppoint'] == null ? undefined : CreateShipmentRequestDroppointFromJSON(json['droppoint']),
|
|
189
209
|
};
|
|
190
210
|
}
|
|
191
211
|
|
|
@@ -213,6 +233,8 @@ export function CreateShipmentRequestToJSONTyped(value?: CreateShipmentRequest |
|
|
|
213
233
|
'orderId': value['orderId'],
|
|
214
234
|
'labelPrinterId': value['labelPrinterId'],
|
|
215
235
|
'documentPrinterId': value['documentPrinterId'],
|
|
236
|
+
'shippingRuleId': value['shippingRuleId'],
|
|
237
|
+
'droppoint': CreateShipmentRequestDroppointToJSON(value['droppoint']),
|
|
216
238
|
};
|
|
217
239
|
}
|
|
218
240
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zippendo Public API
|
|
5
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zippendo.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner } from './ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner';
|
|
17
|
+
import {
|
|
18
|
+
ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON,
|
|
19
|
+
ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSONTyped,
|
|
20
|
+
ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON,
|
|
21
|
+
ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSONTyped,
|
|
22
|
+
} from './ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Display details of the selected service point, stored alongside `servicePointId`. Used with a service-point shipping rule.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CreateShipmentRequestDroppoint
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateShipmentRequestDroppoint {
|
|
30
|
+
/**
|
|
31
|
+
* Identifier of the selected service point.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateShipmentRequestDroppoint
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Display name of the service point.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateShipmentRequestDroppoint
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Formatted address of the service point.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateShipmentRequestDroppoint
|
|
46
|
+
*/
|
|
47
|
+
address: string;
|
|
48
|
+
/**
|
|
49
|
+
* Latitude/longitude of the service point.
|
|
50
|
+
* @type {Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>}
|
|
51
|
+
* @memberof CreateShipmentRequestDroppoint
|
|
52
|
+
*/
|
|
53
|
+
coordinates?: Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the CreateShipmentRequestDroppoint interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfCreateShipmentRequestDroppoint(value: object): value is CreateShipmentRequestDroppoint {
|
|
60
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
61
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
62
|
+
if (!('address' in value) || value['address'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CreateShipmentRequestDroppointFromJSON(json: any): CreateShipmentRequestDroppoint {
|
|
67
|
+
return CreateShipmentRequestDroppointFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CreateShipmentRequestDroppointFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateShipmentRequestDroppoint {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'name': json['name'],
|
|
78
|
+
'address': json['address'],
|
|
79
|
+
'coordinates': json['coordinates'] == null ? undefined : ((json['coordinates'] as Array<any>).map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerFromJSON)),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function CreateShipmentRequestDroppointToJSON(json: any): CreateShipmentRequestDroppoint {
|
|
84
|
+
return CreateShipmentRequestDroppointToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function CreateShipmentRequestDroppointToJSONTyped(value?: CreateShipmentRequestDroppoint | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'id': value['id'],
|
|
95
|
+
'name': value['name'],
|
|
96
|
+
'address': value['address'],
|
|
97
|
+
'coordinates': value['coordinates'] == null ? undefined : ((value['coordinates'] as Array<any>).map(ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInnerToJSON)),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -26,11 +26,11 @@ export interface CreateShipmentRequestParcelsInnerOrderLinesInner {
|
|
|
26
26
|
*/
|
|
27
27
|
id?: string;
|
|
28
28
|
/**
|
|
29
|
-
* Stock keeping unit of the product.
|
|
29
|
+
* Stock keeping unit of the product. Optional — not every webshop assigns SKUs.
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof CreateShipmentRequestParcelsInnerOrderLinesInner
|
|
32
32
|
*/
|
|
33
|
-
sku
|
|
33
|
+
sku?: string | null;
|
|
34
34
|
/**
|
|
35
35
|
* Number of units in this order line.
|
|
36
36
|
* @type {number}
|
|
@@ -85,7 +85,6 @@ export interface CreateShipmentRequestParcelsInnerOrderLinesInner {
|
|
|
85
85
|
* Check if a given object implements the CreateShipmentRequestParcelsInnerOrderLinesInner interface.
|
|
86
86
|
*/
|
|
87
87
|
export function instanceOfCreateShipmentRequestParcelsInnerOrderLinesInner(value: object): value is CreateShipmentRequestParcelsInnerOrderLinesInner {
|
|
88
|
-
if (!('sku' in value) || value['sku'] === undefined) return false;
|
|
89
88
|
if (!('quantity' in value) || value['quantity'] === undefined) return false;
|
|
90
89
|
return true;
|
|
91
90
|
}
|
|
@@ -101,7 +100,7 @@ export function CreateShipmentRequestParcelsInnerOrderLinesInnerFromJSONTyped(js
|
|
|
101
100
|
return {
|
|
102
101
|
|
|
103
102
|
'id': json['id'] == null ? undefined : json['id'],
|
|
104
|
-
'sku': json['sku'],
|
|
103
|
+
'sku': json['sku'] === undefined ? undefined : json['sku'] === null ? null : json['sku'],
|
|
105
104
|
'quantity': json['quantity'],
|
|
106
105
|
'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'],
|
|
107
106
|
'unitPrice': json['unitPrice'] === undefined ? undefined : json['unitPrice'] === null ? null : json['unitPrice'],
|
|
@@ -77,6 +77,12 @@ export interface GetOrder200ResponseShipmentsInner {
|
|
|
77
77
|
* @memberof GetOrder200ResponseShipmentsInner
|
|
78
78
|
*/
|
|
79
79
|
carrierSettings: ListShipments200ResponseDataInnerCarrierSettings;
|
|
80
|
+
/**
|
|
81
|
+
* Selected carrier service point identifier.
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @memberof GetOrder200ResponseShipmentsInner
|
|
84
|
+
*/
|
|
85
|
+
servicePointId?: string | null;
|
|
80
86
|
/**
|
|
81
87
|
* Timestamp when the shipment was created.
|
|
82
88
|
* @type {string}
|
|
@@ -159,6 +165,7 @@ export function GetOrder200ResponseShipmentsInnerFromJSONTyped(json: any, ignore
|
|
|
159
165
|
'type': json['type'],
|
|
160
166
|
'tracking': json['tracking'] === undefined ? undefined : json['tracking'] === null ? null : CreateShipment201ResponseTrackingFromJSON(json['tracking']),
|
|
161
167
|
'carrierSettings': ListShipments200ResponseDataInnerCarrierSettingsFromJSON(json['carrierSettings']),
|
|
168
|
+
'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
|
|
162
169
|
'createdAt': json['createdAt'],
|
|
163
170
|
'updatedAt': json['updatedAt'],
|
|
164
171
|
'shippingRuleId': json['shippingRuleId'] === undefined ? undefined : json['shippingRuleId'] === null ? null : json['shippingRuleId'],
|
|
@@ -183,6 +190,7 @@ export function GetOrder200ResponseShipmentsInnerToJSONTyped(value?: GetOrder200
|
|
|
183
190
|
'type': value['type'],
|
|
184
191
|
'tracking': CreateShipment201ResponseTrackingToJSON(value['tracking']),
|
|
185
192
|
'carrierSettings': ListShipments200ResponseDataInnerCarrierSettingsToJSON(value['carrierSettings']),
|
|
193
|
+
'servicePointId': value['servicePointId'],
|
|
186
194
|
'createdAt': value['createdAt'],
|
|
187
195
|
'updatedAt': value['updatedAt'],
|
|
188
196
|
'shippingRuleId': value['shippingRuleId'],
|
|
@@ -79,6 +79,7 @@ export const ListApiTokens401ResponseCodeEnum = {
|
|
|
79
79
|
BrandHasRecords: 'BRAND_HAS_RECORDS',
|
|
80
80
|
UserNotFound: 'USER_NOT_FOUND',
|
|
81
81
|
UserExists: 'USER_EXISTS',
|
|
82
|
+
TermsNotAccepted: 'TERMS_NOT_ACCEPTED',
|
|
82
83
|
MemberNotFound: 'MEMBER_NOT_FOUND',
|
|
83
84
|
MemberSelfBrandRestriction: 'MEMBER_SELF_BRAND_RESTRICTION',
|
|
84
85
|
RoleNotFound: 'ROLE_NOT_FOUND',
|
|
@@ -107,6 +108,7 @@ export const ListApiTokens401ResponseCodeEnum = {
|
|
|
107
108
|
ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
|
|
108
109
|
ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
|
|
109
110
|
ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
|
|
111
|
+
ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
|
|
110
112
|
ParcelNotFound: 'PARCEL_NOT_FOUND',
|
|
111
113
|
ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
|
|
112
114
|
PickupNotFound: 'PICKUP_NOT_FOUND',
|
|
@@ -93,6 +93,7 @@ export const SendShipment422ResponseCodeEnum = {
|
|
|
93
93
|
BrandHasRecords: 'BRAND_HAS_RECORDS',
|
|
94
94
|
UserNotFound: 'USER_NOT_FOUND',
|
|
95
95
|
UserExists: 'USER_EXISTS',
|
|
96
|
+
TermsNotAccepted: 'TERMS_NOT_ACCEPTED',
|
|
96
97
|
MemberNotFound: 'MEMBER_NOT_FOUND',
|
|
97
98
|
MemberSelfBrandRestriction: 'MEMBER_SELF_BRAND_RESTRICTION',
|
|
98
99
|
RoleNotFound: 'ROLE_NOT_FOUND',
|
|
@@ -121,6 +122,7 @@ export const SendShipment422ResponseCodeEnum = {
|
|
|
121
122
|
ShipmentDocumentNotFound: 'SHIPMENT_DOCUMENT_NOT_FOUND',
|
|
122
123
|
ShipmentAlreadySent: 'SHIPMENT_ALREADY_SENT',
|
|
123
124
|
ShipmentInvalidState: 'SHIPMENT_INVALID_STATE',
|
|
125
|
+
ShipmentServicePointRequired: 'SHIPMENT_SERVICE_POINT_REQUIRED',
|
|
124
126
|
ParcelNotFound: 'PARCEL_NOT_FOUND',
|
|
125
127
|
ParcelInvalidSplit: 'PARCEL_INVALID_SPLIT',
|
|
126
128
|
PickupNotFound: 'PICKUP_NOT_FOUND',
|
|
@@ -55,6 +55,12 @@ export interface UpdateOrgRequest {
|
|
|
55
55
|
* @memberof UpdateOrgRequest
|
|
56
56
|
*/
|
|
57
57
|
overageEnabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Billing/contact phone number
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof UpdateOrgRequest
|
|
62
|
+
*/
|
|
63
|
+
phone?: string | null;
|
|
58
64
|
/**
|
|
59
65
|
* Billing email for invoices
|
|
60
66
|
* @type {string}
|
|
@@ -143,6 +149,7 @@ export function UpdateOrgRequestFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
143
149
|
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
144
150
|
'vatNumber': json['vatNumber'] === undefined ? undefined : json['vatNumber'] === null ? null : json['vatNumber'],
|
|
145
151
|
'overageEnabled': json['overageEnabled'] == null ? undefined : json['overageEnabled'],
|
|
152
|
+
'phone': json['phone'] === undefined ? undefined : json['phone'] === null ? null : json['phone'],
|
|
146
153
|
'billingEmail': json['billingEmail'] === undefined ? undefined : json['billingEmail'] === null ? null : json['billingEmail'],
|
|
147
154
|
'companyName': json['companyName'] === undefined ? undefined : json['companyName'] === null ? null : json['companyName'],
|
|
148
155
|
'addressLine1': json['addressLine1'] === undefined ? undefined : json['addressLine1'] === null ? null : json['addressLine1'],
|
|
@@ -171,6 +178,7 @@ export function UpdateOrgRequestToJSONTyped(value?: UpdateOrgRequest | null, ign
|
|
|
171
178
|
'currency': value['currency'],
|
|
172
179
|
'vatNumber': value['vatNumber'],
|
|
173
180
|
'overageEnabled': value['overageEnabled'],
|
|
181
|
+
'phone': value['phone'],
|
|
174
182
|
'billingEmail': value['billingEmail'],
|
|
175
183
|
'companyName': value['companyName'],
|
|
176
184
|
'addressLine1': value['addressLine1'],
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
CreateShipmentRequestPickupDetailsToJSON,
|
|
21
21
|
CreateShipmentRequestPickupDetailsToJSONTyped,
|
|
22
22
|
} from './CreateShipmentRequestPickupDetails';
|
|
23
|
-
import type {
|
|
23
|
+
import type { UpdateShipmentRequestDroppoint } from './UpdateShipmentRequestDroppoint';
|
|
24
24
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from './
|
|
25
|
+
UpdateShipmentRequestDroppointFromJSON,
|
|
26
|
+
UpdateShipmentRequestDroppointFromJSONTyped,
|
|
27
|
+
UpdateShipmentRequestDroppointToJSON,
|
|
28
|
+
UpdateShipmentRequestDroppointToJSONTyped,
|
|
29
|
+
} from './UpdateShipmentRequestDroppoint';
|
|
30
30
|
import type { CreateShipmentRequestPartiesInner } from './CreateShipmentRequestPartiesInner';
|
|
31
31
|
import {
|
|
32
32
|
CreateShipmentRequestPartiesInnerFromJSON,
|
|
@@ -34,6 +34,13 @@ import {
|
|
|
34
34
|
CreateShipmentRequestPartiesInnerToJSON,
|
|
35
35
|
CreateShipmentRequestPartiesInnerToJSONTyped,
|
|
36
36
|
} from './CreateShipmentRequestPartiesInner';
|
|
37
|
+
import type { UpdateShipmentRequestCarrierSettings } from './UpdateShipmentRequestCarrierSettings';
|
|
38
|
+
import {
|
|
39
|
+
UpdateShipmentRequestCarrierSettingsFromJSON,
|
|
40
|
+
UpdateShipmentRequestCarrierSettingsFromJSONTyped,
|
|
41
|
+
UpdateShipmentRequestCarrierSettingsToJSON,
|
|
42
|
+
UpdateShipmentRequestCarrierSettingsToJSONTyped,
|
|
43
|
+
} from './UpdateShipmentRequestCarrierSettings';
|
|
37
44
|
import type { CreateShipmentRequestParcelsInner } from './CreateShipmentRequestParcelsInner';
|
|
38
45
|
import {
|
|
39
46
|
CreateShipmentRequestParcelsInnerFromJSON,
|
|
@@ -80,10 +87,10 @@ export interface UpdateShipmentRequest {
|
|
|
80
87
|
type?: UpdateShipmentRequestTypeEnum;
|
|
81
88
|
/**
|
|
82
89
|
*
|
|
83
|
-
* @type {
|
|
90
|
+
* @type {UpdateShipmentRequestCarrierSettings}
|
|
84
91
|
* @memberof UpdateShipmentRequest
|
|
85
92
|
*/
|
|
86
|
-
carrierSettings?:
|
|
93
|
+
carrierSettings?: UpdateShipmentRequestCarrierSettings;
|
|
87
94
|
/**
|
|
88
95
|
* Parcels to include. Optional when orderId is provided.
|
|
89
96
|
* @type {Array<CreateShipmentRequestParcelsInner>}
|
|
@@ -132,6 +139,12 @@ export interface UpdateShipmentRequest {
|
|
|
132
139
|
* @memberof UpdateShipmentRequest
|
|
133
140
|
*/
|
|
134
141
|
shippingRuleId?: string | null;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {UpdateShipmentRequestDroppoint}
|
|
145
|
+
* @memberof UpdateShipmentRequest
|
|
146
|
+
*/
|
|
147
|
+
droppoint?: UpdateShipmentRequestDroppoint;
|
|
135
148
|
}
|
|
136
149
|
|
|
137
150
|
|
|
@@ -182,7 +195,7 @@ export function UpdateShipmentRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
182
195
|
'servicePointId': json['servicePointId'] === undefined ? undefined : json['servicePointId'] === null ? null : json['servicePointId'],
|
|
183
196
|
'parties': json['parties'] == null ? undefined : ((json['parties'] as Array<any>).map(CreateShipmentRequestPartiesInnerFromJSON)),
|
|
184
197
|
'type': json['type'] == null ? undefined : json['type'],
|
|
185
|
-
'carrierSettings': json['carrierSettings'] == null ? undefined :
|
|
198
|
+
'carrierSettings': json['carrierSettings'] == null ? undefined : UpdateShipmentRequestCarrierSettingsFromJSON(json['carrierSettings']),
|
|
186
199
|
'parcels': json['parcels'] == null ? undefined : ((json['parcels'] as Array<any>).map(CreateShipmentRequestParcelsInnerFromJSON)),
|
|
187
200
|
'pickupDetails': json['pickupDetails'] === undefined ? undefined : json['pickupDetails'] === null ? null : CreateShipmentRequestPickupDetailsFromJSON(json['pickupDetails']),
|
|
188
201
|
'termOfTrade': json['termOfTrade'] == null ? undefined : json['termOfTrade'],
|
|
@@ -191,6 +204,7 @@ export function UpdateShipmentRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
191
204
|
'labelPrinterId': json['labelPrinterId'] === undefined ? undefined : json['labelPrinterId'] === null ? null : json['labelPrinterId'],
|
|
192
205
|
'documentPrinterId': json['documentPrinterId'] === undefined ? undefined : json['documentPrinterId'] === null ? null : json['documentPrinterId'],
|
|
193
206
|
'shippingRuleId': json['shippingRuleId'] === undefined ? undefined : json['shippingRuleId'] === null ? null : json['shippingRuleId'],
|
|
207
|
+
'droppoint': json['droppoint'] == null ? undefined : UpdateShipmentRequestDroppointFromJSON(json['droppoint']),
|
|
194
208
|
};
|
|
195
209
|
}
|
|
196
210
|
|
|
@@ -210,7 +224,7 @@ export function UpdateShipmentRequestToJSONTyped(value?: UpdateShipmentRequest |
|
|
|
210
224
|
'servicePointId': value['servicePointId'],
|
|
211
225
|
'parties': value['parties'] == null ? undefined : ((value['parties'] as Array<any>).map(CreateShipmentRequestPartiesInnerToJSON)),
|
|
212
226
|
'type': value['type'],
|
|
213
|
-
'carrierSettings':
|
|
227
|
+
'carrierSettings': UpdateShipmentRequestCarrierSettingsToJSON(value['carrierSettings']),
|
|
214
228
|
'parcels': value['parcels'] == null ? undefined : ((value['parcels'] as Array<any>).map(CreateShipmentRequestParcelsInnerToJSON)),
|
|
215
229
|
'pickupDetails': CreateShipmentRequestPickupDetailsToJSON(value['pickupDetails']),
|
|
216
230
|
'termOfTrade': value['termOfTrade'],
|
|
@@ -219,6 +233,7 @@ export function UpdateShipmentRequestToJSONTyped(value?: UpdateShipmentRequest |
|
|
|
219
233
|
'labelPrinterId': value['labelPrinterId'],
|
|
220
234
|
'documentPrinterId': value['documentPrinterId'],
|
|
221
235
|
'shippingRuleId': value['shippingRuleId'],
|
|
236
|
+
'droppoint': UpdateShipmentRequestDroppointToJSON(value['droppoint']),
|
|
222
237
|
};
|
|
223
238
|
}
|
|
224
239
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zippendo Public API
|
|
5
|
+
* Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zippendo.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { CreateShippingRuleRequestAdditionalParametersValue } from './CreateShippingRuleRequestAdditionalParametersValue';
|
|
17
|
+
import {
|
|
18
|
+
CreateShippingRuleRequestAdditionalParametersValueFromJSON,
|
|
19
|
+
CreateShippingRuleRequestAdditionalParametersValueFromJSONTyped,
|
|
20
|
+
CreateShippingRuleRequestAdditionalParametersValueToJSON,
|
|
21
|
+
CreateShippingRuleRequestAdditionalParametersValueToJSONTyped,
|
|
22
|
+
} from './CreateShippingRuleRequestAdditionalParametersValue';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UpdateShipmentRequestCarrierSettings
|
|
28
|
+
*/
|
|
29
|
+
export interface UpdateShipmentRequestCarrierSettings {
|
|
30
|
+
/**
|
|
31
|
+
* Identifier of the carrier to use.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
34
|
+
*/
|
|
35
|
+
carrierId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Identifier of the carrier product/service.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
40
|
+
*/
|
|
41
|
+
productId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Additional service codes requested from the carrier.
|
|
44
|
+
* @type {Array<string>}
|
|
45
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
46
|
+
*/
|
|
47
|
+
services: Array<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Carrier-specific extra parameters as key/value pairs.
|
|
50
|
+
* @type {{ [key: string]: CreateShippingRuleRequestAdditionalParametersValue; }}
|
|
51
|
+
* @memberof UpdateShipmentRequestCarrierSettings
|
|
52
|
+
*/
|
|
53
|
+
additionalParameters: { [key: string]: CreateShippingRuleRequestAdditionalParametersValue; };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the UpdateShipmentRequestCarrierSettings interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfUpdateShipmentRequestCarrierSettings(value: object): value is UpdateShipmentRequestCarrierSettings {
|
|
60
|
+
if (!('carrierId' in value) || value['carrierId'] === undefined) return false;
|
|
61
|
+
if (!('productId' in value) || value['productId'] === undefined) return false;
|
|
62
|
+
if (!('services' in value) || value['services'] === undefined) return false;
|
|
63
|
+
if (!('additionalParameters' in value) || value['additionalParameters'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function UpdateShipmentRequestCarrierSettingsFromJSON(json: any): UpdateShipmentRequestCarrierSettings {
|
|
68
|
+
return UpdateShipmentRequestCarrierSettingsFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function UpdateShipmentRequestCarrierSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateShipmentRequestCarrierSettings {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'carrierId': json['carrierId'],
|
|
78
|
+
'productId': json['productId'],
|
|
79
|
+
'services': json['services'],
|
|
80
|
+
'additionalParameters': (mapValues(json['additionalParameters'], CreateShippingRuleRequestAdditionalParametersValueFromJSON)),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function UpdateShipmentRequestCarrierSettingsToJSON(json: any): UpdateShipmentRequestCarrierSettings {
|
|
85
|
+
return UpdateShipmentRequestCarrierSettingsToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function UpdateShipmentRequestCarrierSettingsToJSONTyped(value?: UpdateShipmentRequestCarrierSettings | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'carrierId': value['carrierId'],
|
|
96
|
+
'productId': value['productId'],
|
|
97
|
+
'services': value['services'],
|
|
98
|
+
'additionalParameters': (mapValues(value['additionalParameters'], CreateShippingRuleRequestAdditionalParametersValueToJSON)),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|