@shipengine/js-api 0.21.0 → 0.22.1
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/index.js +6 -0
- package/index.mjs +6 -0
- package/package.json +1 -1
- package/rate-cards/api.d.ts +1 -0
package/index.js
CHANGED
|
@@ -3288,6 +3288,9 @@ class RateCardsAPI {
|
|
|
3288
3288
|
`/v1/rate_cards?carrier_ids=${carrierIds.toString()}`
|
|
3289
3289
|
);
|
|
3290
3290
|
};
|
|
3291
|
+
this.get = (rateCardId) => {
|
|
3292
|
+
return this.client.get(`/v1/rate_cards/${rateCardId}`);
|
|
3293
|
+
};
|
|
3291
3294
|
this.create = (rateCardInput) => {
|
|
3292
3295
|
return this.client.post("/v1/rate_cards", rateCardInput);
|
|
3293
3296
|
};
|
|
@@ -3296,6 +3299,9 @@ class RateCardsAPI {
|
|
|
3296
3299
|
};
|
|
3297
3300
|
this.download = (rateCardId) => {
|
|
3298
3301
|
return this.client.get(`/v1/rate_cards/${rateCardId}/rates/download`, {
|
|
3302
|
+
headers: {
|
|
3303
|
+
Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
3304
|
+
},
|
|
3299
3305
|
responseType: "blob"
|
|
3300
3306
|
});
|
|
3301
3307
|
};
|
package/index.mjs
CHANGED
|
@@ -3284,6 +3284,9 @@ class RateCardsAPI {
|
|
|
3284
3284
|
`/v1/rate_cards?carrier_ids=${carrierIds.toString()}`
|
|
3285
3285
|
);
|
|
3286
3286
|
};
|
|
3287
|
+
this.get = (rateCardId) => {
|
|
3288
|
+
return this.client.get(`/v1/rate_cards/${rateCardId}`);
|
|
3289
|
+
};
|
|
3287
3290
|
this.create = (rateCardInput) => {
|
|
3288
3291
|
return this.client.post("/v1/rate_cards", rateCardInput);
|
|
3289
3292
|
};
|
|
@@ -3292,6 +3295,9 @@ class RateCardsAPI {
|
|
|
3292
3295
|
};
|
|
3293
3296
|
this.download = (rateCardId) => {
|
|
3294
3297
|
return this.client.get(`/v1/rate_cards/${rateCardId}/rates/download`, {
|
|
3298
|
+
headers: {
|
|
3299
|
+
Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
3300
|
+
},
|
|
3295
3301
|
responseType: "blob"
|
|
3296
3302
|
});
|
|
3297
3303
|
};
|
package/package.json
CHANGED
package/rate-cards/api.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare class RateCardsAPI {
|
|
|
6
6
|
list: (carrierIds: string[]) => Promise<import("axios").AxiosResponse<{
|
|
7
7
|
rateCards: RateCard[];
|
|
8
8
|
}, any>>;
|
|
9
|
+
get: (rateCardId: string) => Promise<import("axios").AxiosResponse<RateCard, any>>;
|
|
9
10
|
create: (rateCardInput: RateCardInput) => Promise<import("axios").AxiosResponse<RateCard, any>>;
|
|
10
11
|
update: (rateCard: RateCard) => Promise<import("axios").AxiosResponse<RateCard, any>>;
|
|
11
12
|
download: (rateCardId: string) => Promise<import("axios").AxiosResponse<Blob, any>>;
|