You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
180 lines
6.6 KiB
C#
180 lines
6.6 KiB
C#
/*
|
|
* Amazon Shipping API
|
|
*
|
|
* The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
|
|
*
|
|
* OpenAPI spec version: v2
|
|
*
|
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
*/
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.IO;
|
|
using System.Runtime.Serialization;
|
|
using System.Text;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Amazon.SellingPartnerApiSDK.AmazonSpApiSDK.Models.ShippingV2
|
|
{
|
|
/// <summary>
|
|
/// The payload for the OneClickShipment API.
|
|
/// </summary>
|
|
[DataContract]
|
|
public partial class OneClickShipmentResult : IEquatable<OneClickShipmentResult>, IValidatableObject
|
|
{
|
|
/// <summary>
|
|
/// Gets or Sets ShipmentId
|
|
/// </summary>
|
|
[DataMember(Name="shipmentId", EmitDefaultValue=false)]
|
|
public string ShipmentId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or Sets PackageDocumentDetails
|
|
/// </summary>
|
|
[DataMember(Name="packageDocumentDetails", EmitDefaultValue=false)]
|
|
public PackageDocumentDetailList PackageDocumentDetails { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or Sets Promise
|
|
/// </summary>
|
|
[DataMember(Name="promise", EmitDefaultValue=false)]
|
|
public Promise Promise { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or Sets Carrier
|
|
/// </summary>
|
|
[DataMember(Name="carrier", EmitDefaultValue=false)]
|
|
public Carrier Carrier { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or Sets Service
|
|
/// </summary>
|
|
[DataMember(Name="service", EmitDefaultValue=false)]
|
|
public Service Service { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or Sets TotalCharge
|
|
/// </summary>
|
|
[DataMember(Name="totalCharge", EmitDefaultValue=false)]
|
|
public Currency TotalCharge { get; set; }
|
|
|
|
/// <summary>
|
|
/// Returns 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 OneClickShipmentResult {\n");
|
|
sb.Append(" ShipmentId: ").Append(ShipmentId).Append("\n");
|
|
sb.Append(" PackageDocumentDetails: ").Append(PackageDocumentDetails).Append("\n");
|
|
sb.Append(" Promise: ").Append(Promise).Append("\n");
|
|
sb.Append(" Carrier: ").Append(Carrier).Append("\n");
|
|
sb.Append(" Service: ").Append(Service).Append("\n");
|
|
sb.Append(" TotalCharge: ").Append(TotalCharge).Append("\n");
|
|
sb.Append("}\n");
|
|
return sb.ToString();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the JSON string presentation of the object
|
|
/// </summary>
|
|
/// <returns>JSON string presentation of the object</returns>
|
|
public virtual string ToJson()
|
|
{
|
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns true if objects are equal
|
|
/// </summary>
|
|
/// <param name="input">Object to be compared</param>
|
|
/// <returns>Boolean</returns>
|
|
public override bool Equals(object input)
|
|
{
|
|
return this.Equals(input as OneClickShipmentResult);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns true if OneClickShipmentResult instances are equal
|
|
/// </summary>
|
|
/// <param name="input">Instance of OneClickShipmentResult to be compared</param>
|
|
/// <returns>Boolean</returns>
|
|
public bool Equals(OneClickShipmentResult input)
|
|
{
|
|
if (input == null)
|
|
return false;
|
|
|
|
return
|
|
(
|
|
this.ShipmentId == input.ShipmentId ||
|
|
(this.ShipmentId != null &&
|
|
this.ShipmentId.Equals(input.ShipmentId))
|
|
) &&
|
|
(
|
|
this.PackageDocumentDetails == input.PackageDocumentDetails ||
|
|
(this.PackageDocumentDetails != null &&
|
|
this.PackageDocumentDetails.Equals(input.PackageDocumentDetails))
|
|
) &&
|
|
(
|
|
this.Promise == input.Promise ||
|
|
(this.Promise != null &&
|
|
this.Promise.Equals(input.Promise))
|
|
) &&
|
|
(
|
|
this.Carrier == input.Carrier ||
|
|
(this.Carrier != null &&
|
|
this.Carrier.Equals(input.Carrier))
|
|
) &&
|
|
(
|
|
this.Service == input.Service ||
|
|
(this.Service != null &&
|
|
this.Service.Equals(input.Service))
|
|
) &&
|
|
(
|
|
this.TotalCharge == input.TotalCharge ||
|
|
(this.TotalCharge != null &&
|
|
this.TotalCharge.Equals(input.TotalCharge))
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the hash code
|
|
/// </summary>
|
|
/// <returns>Hash code</returns>
|
|
public override int GetHashCode()
|
|
{
|
|
unchecked // Overflow is fine, just wrap
|
|
{
|
|
int hashCode = 41;
|
|
if (this.ShipmentId != null)
|
|
hashCode = hashCode * 59 + this.ShipmentId.GetHashCode();
|
|
if (this.PackageDocumentDetails != null)
|
|
hashCode = hashCode * 59 + this.PackageDocumentDetails.GetHashCode();
|
|
if (this.Promise != null)
|
|
hashCode = hashCode * 59 + this.Promise.GetHashCode();
|
|
if (this.Carrier != null)
|
|
hashCode = hashCode * 59 + this.Carrier.GetHashCode();
|
|
if (this.Service != null)
|
|
hashCode = hashCode * 59 + this.Service.GetHashCode();
|
|
if (this.TotalCharge != null)
|
|
hashCode = hashCode * 59 + this.TotalCharge.GetHashCode();
|
|
return hashCode;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To validate all properties of the instance
|
|
/// </summary>
|
|
/// <param name="validationContext">Validation context</param>
|
|
/// <returns>Validation Result</returns>
|
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
|
{
|
|
yield break;
|
|
}
|
|
}
|
|
|
|
}
|