Skip to content

Commit eb4b045

Browse files
committed
feat: adding estimated import charges in shipments
1 parent e844ad7 commit eb4b045

File tree

185 files changed

+16529
-1327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+16529
-1327
lines changed

.openapi-generator/FILES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ ShipEngineSDK/Model/CreateAndValidateShipment.cs
9696
ShipEngineSDK/Model/CreateBatchRequest.cs
9797
ShipEngineSDK/Model/CreateBatchRequestBody.cs
9898
ShipEngineSDK/Model/CreateBatchResponseBody.cs
99+
ShipEngineSDK/Model/CreateCombinedLabelDocumentRequestBody.cs
100+
ShipEngineSDK/Model/CreateCombinedLabelDocumentResponseBodyYaml.cs
99101
ShipEngineSDK/Model/CreateLabelFromRateRequestBody.cs
100102
ShipEngineSDK/Model/CreateLabelFromRateResponseBody.cs
101103
ShipEngineSDK/Model/CreateLabelFromShipmentRequestBody.cs
@@ -113,6 +115,7 @@ ShipEngineSDK/Model/CreateReturnLabelResponseBody.cs
113115
ShipEngineSDK/Model/CreateShipmentResponseBodyFields.cs
114116
ShipEngineSDK/Model/CreateShipmentsRequestBody.cs
115117
ShipEngineSDK/Model/CreateShipmentsResponseBody.cs
118+
ShipEngineSDK/Model/CreateTagRequestBody.cs
116119
ShipEngineSDK/Model/CreateTagResponseBody.cs
117120
ShipEngineSDK/Model/CreateWarehouseRequestBody.cs
118121
ShipEngineSDK/Model/CreateWarehouseResponseBody.cs
@@ -138,6 +141,7 @@ ShipEngineSDK/Model/ErrorSource.cs
138141
ShipEngineSDK/Model/ErrorType.cs
139142
ShipEngineSDK/Model/ErrorWithLabelIdResponseBody.cs
140143
ShipEngineSDK/Model/EstimateRatesRequestBody.cs
144+
ShipEngineSDK/Model/EstimatedImportCharges.cs
141145
ShipEngineSDK/Model/FedexAccountSettings.cs
142146
ShipEngineSDK/Model/FedexAccountSettingsRequestBody.cs
143147
ShipEngineSDK/Model/FedexPickupType.cs
@@ -424,6 +428,8 @@ docs/models/CreateAndValidateShipment.md
424428
docs/models/CreateBatchRequest.md
425429
docs/models/CreateBatchRequestBody.md
426430
docs/models/CreateBatchResponseBody.md
431+
docs/models/CreateCombinedLabelDocumentRequestBody.md
432+
docs/models/CreateCombinedLabelDocumentResponseBodyYaml.md
427433
docs/models/CreateLabelFromRateRequestBody.md
428434
docs/models/CreateLabelFromRateResponseBody.md
429435
docs/models/CreateLabelFromShipmentRequestBody.md
@@ -441,6 +447,7 @@ docs/models/CreateReturnLabelResponseBody.md
441447
docs/models/CreateShipmentResponseBodyFields.md
442448
docs/models/CreateShipmentsRequestBody.md
443449
docs/models/CreateShipmentsResponseBody.md
450+
docs/models/CreateTagRequestBody.md
444451
docs/models/CreateTagResponseBody.md
445452
docs/models/CreateWarehouseRequestBody.md
446453
docs/models/CreateWarehouseResponseBody.md
@@ -466,6 +473,7 @@ docs/models/ErrorSource.md
466473
docs/models/ErrorType.md
467474
docs/models/ErrorWithLabelIdResponseBody.md
468475
docs/models/EstimateRatesRequestBody.md
476+
docs/models/EstimatedImportCharges.md
469477
docs/models/FedexAccountSettings.md
470478
docs/models/FedexAccountSettingsRequestBody.md
471479
docs/models/FedexPickupType.md

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,13 @@ Fixed handling of No Content responses
223223
### Changed
224224

225225
- Marked v2 methods as obsolete
226+
227+
## 3.0.1
228+
229+
### Added
230+
231+
- Created new EstimatedImportCharges model for commercial invoices for international shipments.
232+
233+
### Changed
234+
235+
- Extend shipment endpoints to request, create, update and delete estimated import charges.

README.md

Lines changed: 96 additions & 94 deletions
Large diffs are not rendered by default.

ShipEngineSDK/Api/LabelsApi.cs

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,27 @@ namespace ShipEngineSDK;
2424
/// </summary>
2525
public partial interface IShipEngine
2626
{
27+
/// <summary>
28+
/// Created Combined Label Document Download a combined label file
29+
/// </summary>
30+
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
31+
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
32+
/// <param name="createCombinedLabelDocumentRequestBody"></param>
33+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
34+
/// <returns>Task of ApiResponse (CreateCombinedLabelDocumentResponseBodyYaml)</returns>
35+
Task<CreateCombinedLabelDocumentResponseBodyYaml> CreateCombinedLabelDocument(CreateCombinedLabelDocumentRequestBody createCombinedLabelDocumentRequestBody, CancellationToken cancellationToken = default);
36+
37+
/// <summary>
38+
/// Created Combined Label Document Download a combined label file
39+
/// </summary>
40+
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
41+
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
42+
/// <param name="methodClient">HttpClient to use for the request</param>
43+
/// <param name="createCombinedLabelDocumentRequestBody"></param>
44+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
45+
/// <returns>Task of ApiResponse (CreateCombinedLabelDocumentResponseBodyYaml)</returns>
46+
Task<CreateCombinedLabelDocumentResponseBodyYaml> CreateCombinedLabelDocument(HttpClient methodClient, CreateCombinedLabelDocumentRequestBody createCombinedLabelDocumentRequestBody, CancellationToken cancellationToken = default);
47+
2748
/// <summary>
2849
/// Purchase Label Purchase and print a label for shipment
2950
/// </summary>
@@ -256,6 +277,48 @@ public partial interface IShipEngine
256277
/// </summary>
257278
public partial class ShipEngine
258279
{
280+
/// <summary>
281+
/// Created Combined Label Document Download a combined label file
282+
/// </summary>
283+
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
284+
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
285+
/// <param name="createCombinedLabelDocumentRequestBody"></param>
286+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
287+
/// <returns>Task of ApiResponse (CreateCombinedLabelDocumentResponseBodyYaml)</returns>
288+
public Task<CreateCombinedLabelDocumentResponseBodyYaml> CreateCombinedLabelDocument(CreateCombinedLabelDocumentRequestBody createCombinedLabelDocumentRequestBody, CancellationToken cancellationToken = default)
289+
{
290+
return CreateCombinedLabelDocument(_client, createCombinedLabelDocumentRequestBody, cancellationToken);
291+
}
292+
293+
/// <summary>
294+
/// Created Combined Label Document Download a combined label file
295+
/// </summary>
296+
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
297+
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
298+
/// <param name="methodClient">HttpClient to use for the request</param>
299+
/// <param name="createCombinedLabelDocumentRequestBody"></param>
300+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
301+
/// <returns>Task of ApiResponse (CreateCombinedLabelDocumentResponseBodyYaml)</returns>
302+
public async Task<CreateCombinedLabelDocumentResponseBodyYaml> CreateCombinedLabelDocument(HttpClient methodClient, CreateCombinedLabelDocumentRequestBody createCombinedLabelDocumentRequestBody, CancellationToken cancellationToken = default)
303+
{
304+
// verify the required parameter 'createCombinedLabelDocumentRequestBody' is set
305+
if (createCombinedLabelDocumentRequestBody == null)
306+
{
307+
throw new ArgumentNullException(nameof(createCombinedLabelDocumentRequestBody));
308+
}
309+
310+
311+
RequestOptions requestOptions = new("/v1/documents/combined_labels");
312+
313+
requestOptions.Data = JsonSerializer.Serialize(createCombinedLabelDocumentRequestBody, JsonSerializerOptions);
314+
315+
requestOptions.Operation = "LabelsApi.CreateCombinedLabelDocument";
316+
317+
var result = await SendHttpRequestAsync<CreateCombinedLabelDocumentResponseBodyYaml>(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
318+
319+
return result;
320+
}
321+
259322
/// <summary>
260323
/// Purchase Label Purchase and print a label for shipment
261324
/// </summary>

ShipEngineSDK/Api/TagsApi.cs

Lines changed: 73 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,46 @@ namespace ShipEngineSDK;
2525
public partial interface IShipEngine
2626
{
2727
/// <summary>
28-
/// Create a New Tag Create a new Tag for customizing how you track your shipments
28+
/// Create a New Tag Create a new tag for customizing how you track your shipments.
29+
/// </summary>
30+
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
31+
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
32+
/// <param name="createTagRequestBody"></param>
33+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
34+
/// <returns>Task of ApiResponse (CreateTagResponseBody)</returns>
35+
Task<CreateTagResponseBody> CreateTag(CreateTagRequestBody createTagRequestBody, CancellationToken cancellationToken = default);
36+
37+
/// <summary>
38+
/// Create a New Tag Create a new tag for customizing how you track your shipments.
39+
/// </summary>
40+
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
41+
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
42+
/// <param name="methodClient">HttpClient to use for the request</param>
43+
/// <param name="createTagRequestBody"></param>
44+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
45+
/// <returns>Task of ApiResponse (CreateTagResponseBody)</returns>
46+
Task<CreateTagResponseBody> CreateTag(HttpClient methodClient, CreateTagRequestBody createTagRequestBody, CancellationToken cancellationToken = default);
47+
48+
/// <summary>
49+
/// Create a New Tag Create a new tag for customizing how you track your shipments (deprecated - use POST /v1/tags instead)
2950
/// </summary>
3051
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
3152
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
3253
/// <param name="tagName"></param>
3354
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
3455
/// <returns>Task of ApiResponse (CreateTagResponseBody)</returns>
35-
Task<CreateTagResponseBody> CreateTag(string tagName, CancellationToken cancellationToken = default);
56+
Task<CreateTagResponseBody> CreateTag_0(string tagName, CancellationToken cancellationToken = default);
3657

3758
/// <summary>
38-
/// Create a New Tag Create a new Tag for customizing how you track your shipments
59+
/// Create a New Tag Create a new tag for customizing how you track your shipments (deprecated - use POST /v1/tags instead)
3960
/// </summary>
4061
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
4162
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
4263
/// <param name="methodClient">HttpClient to use for the request</param>
4364
/// <param name="tagName"></param>
4465
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
4566
/// <returns>Task of ApiResponse (CreateTagResponseBody)</returns>
46-
Task<CreateTagResponseBody> CreateTag(HttpClient methodClient, string tagName, CancellationToken cancellationToken = default);
67+
Task<CreateTagResponseBody> CreateTag_0(HttpClient methodClient, string tagName, CancellationToken cancellationToken = default);
4768

4869
/// <summary>
4970
/// Delete Tag Delete a tag that is no longer needed
@@ -116,28 +137,70 @@ public partial interface IShipEngine
116137
public partial class ShipEngine
117138
{
118139
/// <summary>
119-
/// Create a New Tag Create a new Tag for customizing how you track your shipments
140+
/// Create a New Tag Create a new tag for customizing how you track your shipments.
141+
/// </summary>
142+
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
143+
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
144+
/// <param name="createTagRequestBody"></param>
145+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
146+
/// <returns>Task of ApiResponse (CreateTagResponseBody)</returns>
147+
public Task<CreateTagResponseBody> CreateTag(CreateTagRequestBody createTagRequestBody, CancellationToken cancellationToken = default)
148+
{
149+
return CreateTag(_client, createTagRequestBody, cancellationToken);
150+
}
151+
152+
/// <summary>
153+
/// Create a New Tag Create a new tag for customizing how you track your shipments.
154+
/// </summary>
155+
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
156+
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
157+
/// <param name="methodClient">HttpClient to use for the request</param>
158+
/// <param name="createTagRequestBody"></param>
159+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
160+
/// <returns>Task of ApiResponse (CreateTagResponseBody)</returns>
161+
public async Task<CreateTagResponseBody> CreateTag(HttpClient methodClient, CreateTagRequestBody createTagRequestBody, CancellationToken cancellationToken = default)
162+
{
163+
// verify the required parameter 'createTagRequestBody' is set
164+
if (createTagRequestBody == null)
165+
{
166+
throw new ArgumentNullException(nameof(createTagRequestBody));
167+
}
168+
169+
170+
RequestOptions requestOptions = new("/v1/tags");
171+
172+
requestOptions.Data = JsonSerializer.Serialize(createTagRequestBody, JsonSerializerOptions);
173+
174+
requestOptions.Operation = "TagsApi.CreateTag";
175+
176+
var result = await SendHttpRequestAsync<CreateTagResponseBody>(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
177+
178+
return result;
179+
}
180+
181+
/// <summary>
182+
/// Create a New Tag Create a new tag for customizing how you track your shipments (deprecated - use POST /v1/tags instead)
120183
/// </summary>
121184
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
122185
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
123186
/// <param name="tagName"></param>
124187
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
125188
/// <returns>Task of ApiResponse (CreateTagResponseBody)</returns>
126-
public Task<CreateTagResponseBody> CreateTag(string tagName, CancellationToken cancellationToken = default)
189+
public Task<CreateTagResponseBody> CreateTag_0(string tagName, CancellationToken cancellationToken = default)
127190
{
128-
return CreateTag(_client, tagName, cancellationToken);
191+
return CreateTag_0(_client, tagName, cancellationToken);
129192
}
130193

131194
/// <summary>
132-
/// Create a New Tag Create a new Tag for customizing how you track your shipments
195+
/// Create a New Tag Create a new tag for customizing how you track your shipments (deprecated - use POST /v1/tags instead)
133196
/// </summary>
134197
/// <exception cref="System.ArgumentNullException">Thrown when required argument is null</exception>
135198
/// <exception cref="ShipEngineSDK.ShipEngineException">Thrown when fails to make API call</exception>
136199
/// <param name="methodClient">HttpClient to use for the request</param>
137200
/// <param name="tagName"></param>
138201
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
139202
/// <returns>Task of ApiResponse (CreateTagResponseBody)</returns>
140-
public async Task<CreateTagResponseBody> CreateTag(HttpClient methodClient, string tagName, CancellationToken cancellationToken = default)
203+
public async Task<CreateTagResponseBody> CreateTag_0(HttpClient methodClient, string tagName, CancellationToken cancellationToken = default)
141204
{
142205
// verify the required parameter 'tagName' is set
143206
if (tagName == null)
@@ -150,7 +213,7 @@ public async Task<CreateTagResponseBody> CreateTag(HttpClient methodClient, stri
150213

151214
requestOptions.PathParameters.Add("tag_name", ClientUtils.ParameterToString(tagName)); // path parameter
152215

153-
requestOptions.Operation = "TagsApi.CreateTag";
216+
requestOptions.Operation = "TagsApi.CreateTag_0";
154217

155218
var result = await SendHttpRequestAsync<CreateTagResponseBody>(HttpMethods.Post, requestOptions, methodClient, _config, cancellationToken);
156219

0 commit comments

Comments
 (0)