-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/abuzuhri/Amazon-SP-API-CSharp
- Loading branch information
Showing
17 changed files
with
172 additions
and
16 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Messaging/InvoiceRequest.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,70 @@ | ||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Messaging | ||
{ | ||
using System; | ||
using System.Linq; | ||
using System.Text; | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
[DataContract] | ||
public partial class InvoiceRequest : IEquatable<InvoiceRequest>, IValidatableObject | ||
{ | ||
public InvoiceRequest(List<Attachment> attachments = default(List<Attachment>), DateTime? coverageStartDate = default(DateTime?), DateTime? coverageEndDate = default(DateTime?)) | ||
{ | ||
this.Attachments = attachments; | ||
} | ||
|
||
[DataMember(Name = "attachments", EmitDefaultValue = false)] | ||
public List<Attachment> Attachments { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
sb.Append("class InvoiceRequest {\n"); | ||
sb.Append(" Attachments: ").Append(Attachments).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
public virtual string ToJson() | ||
{ | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
public override bool Equals(object input) | ||
{ | ||
return this.Equals(input as InvoiceRequest); | ||
} | ||
|
||
public bool Equals(InvoiceRequest input) | ||
{ | ||
if (input == null) | ||
return false; | ||
|
||
return | ||
( | ||
this.Attachments == input.Attachments || | ||
this.Attachments != null && | ||
this.Attachments.SequenceEqual(input.Attachments) | ||
); | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (this.Attachments != null) | ||
hashCode = hashCode * 59 + this.Attachments.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) | ||
{ | ||
yield break; | ||
} | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Messaging/InvoiceResponse.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,74 @@ | ||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Messaging | ||
{ | ||
using System; | ||
using System.Text; | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
[DataContract] | ||
public partial class InvoiceResponse : IEquatable<InvoiceResponse>, IValidatableObject | ||
{ | ||
public InvoiceResponse(ErrorList errors = default(ErrorList)) | ||
{ | ||
this.Errors = errors; | ||
} | ||
|
||
public InvoiceResponse() | ||
{ | ||
this.Errors = default(ErrorList); | ||
} | ||
|
||
[DataMember(Name = "errors", EmitDefaultValue = false)] | ||
public ErrorList Errors { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
sb.Append("class InvoiceResponse {\n"); | ||
sb.Append(" Errors: ").Append(Errors).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
public virtual string ToJson() | ||
{ | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
public override bool Equals(object input) | ||
{ | ||
return this.Equals(input as InvoiceResponse); | ||
} | ||
|
||
public bool Equals(InvoiceResponse input) | ||
{ | ||
if (input == null) | ||
return false; | ||
|
||
return | ||
( | ||
this.Errors == input.Errors || | ||
(this.Errors != null && | ||
this.Errors.Equals(input.Errors)) | ||
); | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
unchecked | ||
{ | ||
int hashCode = 41; | ||
if (this.Errors != null) | ||
hashCode = hashCode * 59 + this.Errors.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) | ||
{ | ||
yield break; | ||
} | ||
} | ||
} |
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
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
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