Skip to content

Commit 7aba6f8

Browse files
authored
Merge pull request #83 from jsaxdev/main
Started working on Listings Items API
2 parents ffce1c5 + 4ef8d4b commit 7aba6f8

29 files changed

+4658
-17
lines changed

Source/FikaAmazonAPI.SampleCode/SandboxOrderSample.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ public void GetOrderTestCase200()
1919
{
2020
var orders = amazonConnection.Orders.GetOrders
2121
(
22-
new FikaAmazonAPI.Parameter.Order.ParameterOrderList()
23-
{
24-
TestCase = Constants.TestCase200
25-
}
22+
new FikaAmazonAPI.Parameter.Order.ParameterOrderList(Constants.TestCase200)
2623
);
2724
}
2825
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Api/ListingsItems/ListingsApi.cs

Lines changed: 1076 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
/*
2+
* Selling Partner API for Listings Items
3+
*
4+
* The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide).
5+
*
6+
* OpenAPI spec version: 2021-08-01
7+
*
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
using System;
12+
using System.Linq;
13+
using System.IO;
14+
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
23+
24+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ListingsItems
25+
{
26+
/// <summary>
27+
/// Error response returned when the request is unsuccessful.
28+
/// </summary>
29+
[DataContract]
30+
public partial class Error : IEquatable<Error>, IValidatableObject
31+
{
32+
/// <summary>
33+
/// Initializes a new instance of the <see cref="Error" /> class.
34+
/// </summary>
35+
[JsonConstructorAttribute]
36+
protected Error() { }
37+
/// <summary>
38+
/// Initializes a new instance of the <see cref="Error" /> class.
39+
/// </summary>
40+
/// <param name="code">An error code that identifies the type of error that occurred. (required).</param>
41+
/// <param name="message">A message that describes the error condition. (required).</param>
42+
/// <param name="details">Additional details that can help the caller understand or fix the issue..</param>
43+
public Error(string code = default(string), string message = default(string), string details = default(string))
44+
{
45+
// to ensure "code" is required (not null)
46+
if (code == null)
47+
{
48+
throw new InvalidDataException("code is a required property for Error and cannot be null");
49+
}
50+
else
51+
{
52+
this.Code = code;
53+
}
54+
// to ensure "message" is required (not null)
55+
if (message == null)
56+
{
57+
throw new InvalidDataException("message is a required property for Error and cannot be null");
58+
}
59+
else
60+
{
61+
this.Message = message;
62+
}
63+
this.Details = details;
64+
}
65+
66+
/// <summary>
67+
/// An error code that identifies the type of error that occurred.
68+
/// </summary>
69+
/// <value>An error code that identifies the type of error that occurred.</value>
70+
[DataMember(Name="code", EmitDefaultValue=false)]
71+
public string Code { get; set; }
72+
73+
/// <summary>
74+
/// A message that describes the error condition.
75+
/// </summary>
76+
/// <value>A message that describes the error condition.</value>
77+
[DataMember(Name="message", EmitDefaultValue=false)]
78+
public string Message { get; set; }
79+
80+
/// <summary>
81+
/// Additional details that can help the caller understand or fix the issue.
82+
/// </summary>
83+
/// <value>Additional details that can help the caller understand or fix the issue.</value>
84+
[DataMember(Name="details", EmitDefaultValue=false)]
85+
public string Details { get; set; }
86+
87+
/// <summary>
88+
/// Returns the string presentation of the object
89+
/// </summary>
90+
/// <returns>String presentation of the object</returns>
91+
public override string ToString()
92+
{
93+
var sb = new StringBuilder();
94+
sb.Append("class Error {\n");
95+
sb.Append(" Code: ").Append(Code).Append("\n");
96+
sb.Append(" Message: ").Append(Message).Append("\n");
97+
sb.Append(" Details: ").Append(Details).Append("\n");
98+
sb.Append("}\n");
99+
return sb.ToString();
100+
}
101+
102+
/// <summary>
103+
/// Returns the JSON string presentation of the object
104+
/// </summary>
105+
/// <returns>JSON string presentation of the object</returns>
106+
public virtual string ToJson()
107+
{
108+
return JsonConvert.SerializeObject(this, Formatting.Indented);
109+
}
110+
111+
/// <summary>
112+
/// Returns true if objects are equal
113+
/// </summary>
114+
/// <param name="input">Object to be compared</param>
115+
/// <returns>Boolean</returns>
116+
public override bool Equals(object input)
117+
{
118+
return this.Equals(input as Error);
119+
}
120+
121+
/// <summary>
122+
/// Returns true if Error instances are equal
123+
/// </summary>
124+
/// <param name="input">Instance of Error to be compared</param>
125+
/// <returns>Boolean</returns>
126+
public bool Equals(Error input)
127+
{
128+
if (input == null)
129+
return false;
130+
131+
return
132+
(
133+
this.Code == input.Code ||
134+
(this.Code != null &&
135+
this.Code.Equals(input.Code))
136+
) &&
137+
(
138+
this.Message == input.Message ||
139+
(this.Message != null &&
140+
this.Message.Equals(input.Message))
141+
) &&
142+
(
143+
this.Details == input.Details ||
144+
(this.Details != null &&
145+
this.Details.Equals(input.Details))
146+
);
147+
}
148+
149+
/// <summary>
150+
/// Gets the hash code
151+
/// </summary>
152+
/// <returns>Hash code</returns>
153+
public override int GetHashCode()
154+
{
155+
unchecked // Overflow is fine, just wrap
156+
{
157+
int hashCode = 41;
158+
if (this.Code != null)
159+
hashCode = hashCode * 59 + this.Code.GetHashCode();
160+
if (this.Message != null)
161+
hashCode = hashCode * 59 + this.Message.GetHashCode();
162+
if (this.Details != null)
163+
hashCode = hashCode * 59 + this.Details.GetHashCode();
164+
return hashCode;
165+
}
166+
}
167+
168+
/// <summary>
169+
/// To validate all properties of the instance
170+
/// </summary>
171+
/// <param name="validationContext">Validation context</param>
172+
/// <returns>Validation Result</returns>
173+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
174+
{
175+
yield break;
176+
}
177+
}
178+
179+
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
/*
2+
* Selling Partner API for Listings Items
3+
*
4+
* The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide).
5+
*
6+
* OpenAPI spec version: 2021-08-01
7+
*
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
using System;
12+
using System.Linq;
13+
using System.IO;
14+
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
23+
24+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ListingsItems
25+
{
26+
/// <summary>
27+
/// A list of error responses returned when a request is unsuccessful.
28+
/// </summary>
29+
[DataContract]
30+
public partial class ErrorList : IEquatable<ErrorList>, IValidatableObject
31+
{
32+
/// <summary>
33+
/// Initializes a new instance of the <see cref="ErrorList" /> class.
34+
/// </summary>
35+
[JsonConstructorAttribute]
36+
protected ErrorList() { }
37+
/// <summary>
38+
/// Initializes a new instance of the <see cref="ErrorList" /> class.
39+
/// </summary>
40+
/// <param name="errors">errors (required).</param>
41+
public ErrorList(List<Error> errors = default(List<Error>))
42+
{
43+
// to ensure "errors" is required (not null)
44+
if (errors == null)
45+
{
46+
throw new InvalidDataException("errors is a required property for ErrorList and cannot be null");
47+
}
48+
else
49+
{
50+
this.Errors = errors;
51+
}
52+
}
53+
54+
/// <summary>
55+
/// Gets or Sets Errors
56+
/// </summary>
57+
[DataMember(Name="errors", EmitDefaultValue=false)]
58+
public List<Error> Errors { get; set; }
59+
60+
/// <summary>
61+
/// Returns the string presentation of the object
62+
/// </summary>
63+
/// <returns>String presentation of the object</returns>
64+
public override string ToString()
65+
{
66+
var sb = new StringBuilder();
67+
sb.Append("class ErrorList {\n");
68+
sb.Append(" Errors: ").Append(Errors).Append("\n");
69+
sb.Append("}\n");
70+
return sb.ToString();
71+
}
72+
73+
/// <summary>
74+
/// Returns the JSON string presentation of the object
75+
/// </summary>
76+
/// <returns>JSON string presentation of the object</returns>
77+
public virtual string ToJson()
78+
{
79+
return JsonConvert.SerializeObject(this, Formatting.Indented);
80+
}
81+
82+
/// <summary>
83+
/// Returns true if objects are equal
84+
/// </summary>
85+
/// <param name="input">Object to be compared</param>
86+
/// <returns>Boolean</returns>
87+
public override bool Equals(object input)
88+
{
89+
return this.Equals(input as ErrorList);
90+
}
91+
92+
/// <summary>
93+
/// Returns true if ErrorList instances are equal
94+
/// </summary>
95+
/// <param name="input">Instance of ErrorList to be compared</param>
96+
/// <returns>Boolean</returns>
97+
public bool Equals(ErrorList input)
98+
{
99+
if (input == null)
100+
return false;
101+
102+
return
103+
(
104+
this.Errors == input.Errors ||
105+
this.Errors != null &&
106+
this.Errors.SequenceEqual(input.Errors)
107+
);
108+
}
109+
110+
/// <summary>
111+
/// Gets the hash code
112+
/// </summary>
113+
/// <returns>Hash code</returns>
114+
public override int GetHashCode()
115+
{
116+
unchecked // Overflow is fine, just wrap
117+
{
118+
int hashCode = 41;
119+
if (this.Errors != null)
120+
hashCode = hashCode * 59 + this.Errors.GetHashCode();
121+
return hashCode;
122+
}
123+
}
124+
125+
/// <summary>
126+
/// To validate all properties of the instance
127+
/// </summary>
128+
/// <param name="validationContext">Validation context</param>
129+
/// <returns>Validation Result</returns>
130+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
131+
{
132+
yield break;
133+
}
134+
}
135+
136+
}

0 commit comments

Comments
 (0)