-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #768 from TManITtech/main
Fixed bugs getting orders with PII and Debug logging. Added getAdditionalInputs to the Shipping API v2.
- Loading branch information
Showing
9 changed files
with
127 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/GetAdditionalInputsRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using Newtonsoft.Json; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2 | ||
{ | ||
[DataContract] | ||
public class GetAdditionalInputsRequest | ||
{ | ||
/// <summary> | ||
/// The request token returned in the response to the getRates operation. | ||
/// </summary> | ||
[DataMember(Name = "requestToken", EmitDefaultValue = false)] | ||
[JsonProperty(PropertyName = "requestToken")] | ||
public string RequestToken { get; set; } | ||
|
||
/// <summary> | ||
/// The rate identifier for the shipping offering (rate) returned in the response to the getRates operation. | ||
/// </summary> | ||
[DataMember(Name = "rateId", EmitDefaultValue = false)] | ||
[JsonProperty(PropertyName = "rateId")] | ||
public string RateId { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Get the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
sb.Append("class " + nameof(GetAdditionalInputsRequest) + " {\n"); | ||
sb.Append($" {nameof(RequestToken)}: ").Append(RequestToken).Append("\n"); | ||
sb.Append($" {nameof(RateId)}: ").Append(RateId).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Get the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public string ToJson() | ||
{ | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
} | ||
|
||
} |
69 changes: 36 additions & 33 deletions
69
Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/GetAdditionalInputsResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,47 @@ | ||
using System; | ||
using System.Text; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2 { | ||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2 | ||
{ | ||
|
||
/// <summary> | ||
/// The response schema for the getAdditionalInputs operation. | ||
/// </summary> | ||
[DataContract] | ||
public class GetAdditionalInputsResponse { | ||
/// <summary> | ||
/// Gets or Sets Payload | ||
/// The response schema for the getAdditionalInputs operation. | ||
/// </summary> | ||
[DataMember(Name="payload", EmitDefaultValue=false)] | ||
[JsonProperty(PropertyName = "payload")] | ||
public GetAdditionalInputsResult Payload { get; set; } | ||
[DataContract] | ||
public class GetAdditionalInputsResponse | ||
{ | ||
/// <summary> | ||
/// Gets or Sets Payload | ||
/// See: https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-reference#getadditionalinputsresponse | ||
/// </summary> | ||
[DataMember(Name = "payload", EmitDefaultValue = false)] | ||
[JsonProperty(PropertyName = "payload", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)] | ||
public GetAdditionalInputsResult Payload { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Get the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() { | ||
var sb = new StringBuilder(); | ||
sb.Append("class GetAdditionalInputsResponse {\n"); | ||
sb.Append(" Payload: ").Append(Payload).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
/// <summary> | ||
/// Get the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
sb.Append("class GetAdditionalInputsResponse {\n"); | ||
sb.Append(" Payload: ").Append(Payload).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Get the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public string ToJson() | ||
{ | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
/// <summary> | ||
/// Get the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public string ToJson() { | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters