Skip to content

Commit 033b9f2

Browse files
committed
2 parents 263fe50 + c93e8fc commit 033b9f2

File tree

14 files changed

+381
-118
lines changed

14 files changed

+381
-118
lines changed

Source/FikaAmazonAPI.SampleCode/CustomMessageReceiver.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,21 @@ public void NewMessageRevicedTriger(NotificationMessageResponce message)
1717
//Your Code here
1818
}
1919
}
20+
21+
public class CustomMessageRecieverWithResult : IMessageReceiverWithResult
22+
{
23+
public void ErrorCatch(Exception ex)
24+
{
25+
//Your code here
26+
}
27+
28+
public bool NewMessageRevicedTriger(NotificationMessageResponce message)
29+
{
30+
Console.Write(".");
31+
//Your Code here
32+
33+
// Return true to acknowledge and delete the message from queue, false to leave it in the queue.
34+
return false;
35+
}
36+
}
2037
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInbound/ShipmentStatus.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ public enum ShipmentStatus
8989
/// Enum READY_TO_SHIP for value: READY_TO_SHIP
9090
/// </summary>
9191
[EnumMember(Value = "READY_TO_SHIP")]
92-
READY_TO_SHIP = 11
92+
READY_TO_SHIP = 11,
93+
[EnumMember(Value = "ABANDONED")]
94+
ABANDONED = 12,
95+
[EnumMember(Value = "MIXED")]
96+
MIXED = 13,
97+
[EnumMember(Value = "UNCONFIRMED")]
98+
UNCONFIRMED = 14
9399
}
94100

95101
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInboundv20240320/AvailabilityType.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInboundv20240320
1616
{
1717
/// <summary>
18-
/// Identifies type of Delivery Window Availability. Values: AVAILABLE, CONGESTED
18+
/// Identifies type of Delivery Window Availability. Values: AVAILABLE, CONGESTED, BLOCKED, DISCOUNTED
1919
/// </summary>
2020
/// <value>Identifies type of Delivery Window Availability. Values: AVAILABLE, CONGESTED
2121

@@ -26,7 +26,11 @@ public enum AvailabilityType
2626
AVAILABLE = 1,
2727

2828
[EnumMember(Value = "CONGESTED")]
29-
CONGESTED = 2
29+
CONGESTED = 2,
30+
[EnumMember(Value = "BLOCKED")]
31+
BLOCKED = 3,
32+
[EnumMember(Value = "DISCOUNTED")]
33+
DISCOUNTED = 4
3034
}
3135

3236
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/Event.cs

Lines changed: 97 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,145 @@
44
using System.Collections.Generic;
55
using System.Runtime.Serialization;
66
using Newtonsoft.Json;
7+
using System.ComponentModel.DataAnnotations;
78

8-
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2 {
9+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2
10+
{
911

1012
/// <summary>
1113
/// A tracking event.
1214
/// </summary>
1315
[DataContract]
14-
public class Event {
16+
public partial class Event : IEquatable<Event>, IValidatableObject
17+
{
1518
/// <summary>
1619
/// Gets or Sets EventCode
1720
/// </summary>
18-
[DataMember(Name="eventCode", EmitDefaultValue=false)]
21+
[DataMember(Name = "eventCode", EmitDefaultValue = false)]
1922
[JsonProperty(PropertyName = "eventCode")]
20-
public EventCode EventCode { get; set; }
23+
public EventCode? EventCode { get; set; }
2124

2225
/// <summary>
2326
/// Gets or Sets Location
2427
/// </summary>
25-
[DataMember(Name="location", EmitDefaultValue=false)]
28+
[DataMember(Name = "location", EmitDefaultValue = false)]
2629
[JsonProperty(PropertyName = "location")]
2730
public Location Location { get; set; }
2831

2932
/// <summary>
3033
/// The ISO 8601 formatted timestamp of the event.
3134
/// </summary>
3235
/// <value>The ISO 8601 formatted timestamp of the event.</value>
33-
[DataMember(Name="eventTime", EmitDefaultValue=false)]
36+
[DataMember(Name = "eventTime", EmitDefaultValue = false)]
3437
[JsonProperty(PropertyName = "eventTime")]
3538
public DateTime? EventTime { get; set; }
3639

40+
/// <summary>
41+
/// Gets or Sets ShipmentType
42+
/// </summary>
43+
[DataMember(Name = "shipmentType", EmitDefaultValue = false)]
44+
[JsonProperty(PropertyName = "shipmentType", NullValueHandling = NullValueHandling.Ignore)]
45+
public ShipmentType? ShipmentType { get; set; }
46+
3747

3848
/// <summary>
39-
/// Get the string presentation of the object
49+
/// Returns the string presentation of the object
4050
/// </summary>
4151
/// <returns>String presentation of the object</returns>
42-
public override string ToString() {
52+
public override string ToString()
53+
{
4354
var sb = new StringBuilder();
4455
sb.Append("class Event {\n");
4556
sb.Append(" EventCode: ").Append(EventCode).Append("\n");
4657
sb.Append(" Location: ").Append(Location).Append("\n");
4758
sb.Append(" EventTime: ").Append(EventTime).Append("\n");
59+
sb.Append(" ShipmentType: ").Append(ShipmentType).Append("\n");
4860
sb.Append("}\n");
4961
return sb.ToString();
5062
}
5163

64+
/// <summary>
65+
/// Returns true if objects are equal
66+
/// </summary>
67+
/// <param name="input">Object to be compared</param>
68+
/// <returns>Boolean</returns>
69+
public override bool Equals(object input)
70+
{
71+
return this.Equals(input as Event);
72+
}
73+
74+
/// <summary>
75+
/// Returns true if ModelEvent instances are equal
76+
/// </summary>
77+
/// <param name="input">Instance of ModelEvent to be compared</param>
78+
/// <returns>Boolean</returns>
79+
public bool Equals(Event input)
80+
{
81+
if (input == null)
82+
return false;
83+
84+
return
85+
(
86+
this.EventCode == input.EventCode ||
87+
(this.EventCode != null &&
88+
this.EventCode.Equals(input.EventCode))
89+
) &&
90+
(
91+
this.Location == input.Location ||
92+
(this.Location != null &&
93+
this.Location.Equals(input.Location))
94+
) &&
95+
(
96+
this.EventTime == input.EventTime ||
97+
(this.EventTime != null &&
98+
this.EventTime.Equals(input.EventTime))
99+
) &&
100+
(
101+
this.ShipmentType == input.ShipmentType ||
102+
(this.ShipmentType != null &&
103+
this.ShipmentType.Equals(input.ShipmentType))
104+
);
105+
}
106+
107+
/// <summary>
108+
/// Gets the hash code
109+
/// </summary>
110+
/// <returns>Hash code</returns>
111+
public override int GetHashCode()
112+
{
113+
unchecked // Overflow is fine, just wrap
114+
{
115+
int hashCode = 41;
116+
if (this.EventCode != null)
117+
hashCode = hashCode * 59 + this.EventCode.GetHashCode();
118+
if (this.Location != null)
119+
hashCode = hashCode * 59 + this.Location.GetHashCode();
120+
if (this.EventTime != null)
121+
hashCode = hashCode * 59 + this.EventTime.GetHashCode();
122+
if (this.ShipmentType != null)
123+
hashCode = hashCode * 59 + this.ShipmentType.GetHashCode();
124+
return hashCode;
125+
}
126+
}
127+
128+
/// <summary>
129+
/// To validate all properties of the instance
130+
/// </summary>
131+
/// <param name="validationContext">Validation context</param>
132+
/// <returns>Validation Result</returns>
133+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
134+
{
135+
yield break;
136+
}
137+
52138
/// <summary>
53139
/// Get the JSON string presentation of the object
54140
/// </summary>
55141
/// <returns>JSON string presentation of the object</returns>
56-
public string ToJson() {
142+
public string ToJson()
143+
{
57144
return JsonConvert.SerializeObject(this, Formatting.Indented);
58145
}
59146

60-
}
147+
}
61148
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/EventCode.cs

Lines changed: 83 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,98 @@
44
using System.Collections.Generic;
55
using System.Runtime.Serialization;
66
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Converters;
78

8-
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2 {
9+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2
10+
{
911

1012
/// <summary>
1113
/// The tracking event type.
1214
/// </summary>
1315
[DataContract]
14-
public class EventCode {
1516

17+
/// <summary>
18+
/// The tracking event type.
19+
/// </summary>
20+
/// <value>The tracking event type.</value>
21+
[JsonConverter(typeof(StringEnumConverter))]
22+
public enum EventCode
23+
{
1624
/// <summary>
17-
/// Get the string presentation of the object
25+
/// Enum ReadyForReceive for value: ReadyForReceive
1826
/// </summary>
19-
/// <returns>String presentation of the object</returns>
20-
public override string ToString() {
21-
var sb = new StringBuilder();
22-
sb.Append("class EventCode {\n");
23-
sb.Append("}\n");
24-
return sb.ToString();
25-
}
26-
27+
[EnumMember(Value = "ReadyForReceive")]
28+
ReadyForReceive = 1,
29+
/// <summary>
30+
/// Enum PickupDone for value: PickupDone
31+
/// </summary>
32+
[EnumMember(Value = "PickupDone")]
33+
PickupDone = 2,
34+
/// <summary>
35+
/// Enum Delivered for value: Delivered
36+
/// </summary>
37+
[EnumMember(Value = "Delivered")]
38+
Delivered = 3,
39+
/// <summary>
40+
/// Enum Departed for value: Departed
41+
/// </summary>
42+
[EnumMember(Value = "Departed")]
43+
Departed = 4,
44+
/// <summary>
45+
/// Enum DeliveryAttempted for value: DeliveryAttempted
46+
/// </summary>
47+
[EnumMember(Value = "DeliveryAttempted")]
48+
DeliveryAttempted = 5,
49+
/// <summary>
50+
/// Enum Lost for value: Lost
51+
/// </summary>
52+
[EnumMember(Value = "Lost")]
53+
Lost = 6,
54+
/// <summary>
55+
/// Enum OutForDelivery for value: OutForDelivery
56+
/// </summary>
57+
[EnumMember(Value = "OutForDelivery")]
58+
OutForDelivery = 7,
59+
/// <summary>
60+
/// Enum ArrivedAtCarrierFacility for value: ArrivedAtCarrierFacility
61+
/// </summary>
62+
[EnumMember(Value = "ArrivedAtCarrierFacility")]
63+
ArrivedAtCarrierFacility = 8,
64+
/// <summary>
65+
/// Enum Rejected for value: Rejected
66+
/// </summary>
67+
[EnumMember(Value = "Rejected")]
68+
Rejected = 9,
69+
/// <summary>
70+
/// Enum Undeliverable for value: Undeliverable
71+
/// </summary>
72+
[EnumMember(Value = "Undeliverable")]
73+
Undeliverable = 10,
74+
/// <summary>
75+
/// Enum PickupCancelled for value: PickupCancelled
76+
/// </summary>
77+
[EnumMember(Value = "PickupCancelled")]
78+
PickupCancelled = 11,
79+
/// <summary>
80+
/// Enum ReturnInitiated for value: ReturnInitiated
81+
/// </summary>
82+
[EnumMember(Value = "ReturnInitiated")]
83+
ReturnInitiated = 12,
84+
/// <summary>
85+
/// Enum AvailableForPickup for value: AvailableForPickup
86+
/// </summary>
87+
[EnumMember(Value = "AvailableForPickup")]
88+
AvailableForPickup = 13,
89+
/// <summary>
90+
/// Enum RecipientRequestedAlternateDeliveryTiming for value: RecipientRequestedAlternateDeliveryTiming
91+
/// </summary>
92+
[EnumMember(Value = "RecipientRequestedAlternateDeliveryTiming")]
93+
RecipientRequestedAlternateDeliveryTiming = 14,
2794
/// <summary>
28-
/// Get the JSON string presentation of the object
95+
/// Enum PackageReceivedByCarrier for value: PackageReceivedByCarrier
2996
/// </summary>
30-
/// <returns>JSON string presentation of the object</returns>
31-
public string ToJson() {
32-
return JsonConvert.SerializeObject(this, Formatting.Indented);
33-
}
97+
[EnumMember(Value = "PackageReceivedByCarrier")]
98+
PackageReceivedByCarrier = 15
99+
}
34100

35-
}
36-
}
101+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Text;
3+
using System.Collections;
4+
using System.Collections.Generic;
5+
using System.Runtime.Serialization;
6+
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Converters;
8+
9+
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2 {
10+
11+
/// <summary>
12+
/// Shipment type.
13+
/// </summary>
14+
/// <value>Shipment type.</value>
15+
[JsonConverter(typeof(StringEnumConverter))]
16+
public enum ShipmentType
17+
{
18+
19+
[EnumMember(Value = "FORWARD")]
20+
FORWARD = 1,
21+
22+
[EnumMember(Value = "RETURNS")]
23+
RETURNS = 2
24+
}
25+
26+
}
27+
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
using FikaAmazonAPI.Search;
2+
using Newtonsoft.Json;
3+
using Newtonsoft.Json.Converters;
24
using System;
5+
using static FikaAmazonAPI.AmazonSpApiSDK.Models.Finances.Model.RelatedIdentifier;
36

47
namespace FikaAmazonAPI.Parameter.Finance
58
{
@@ -8,8 +11,20 @@ public class ParameterListFinancialTransactions20240619 : ParameterBased
811
public DateTime postedAfter { get; set; }
912
public DateTime? postedBefore { get; set; }
1013
public string? marketplaceId { get; set; }
14+
/// <summary>
15+
/// The status of the transaction.Possible values:
16+
/// `DEFERRED`: the transaction is currently deferred.
17+
/// `RELEASED`: the transaction is currently released.
18+
/// `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
19+
/// </summary>
20+
public string? transactionStatus { get; set; }
21+
/// <summary>
22+
/// Possible values:`FINANCIAL_EVENT_GROUP_ID`: the financial event group ID associated with the transaction.
23+
///*Note: FINANCIAL_EVENT_GROUP_ID is the only `relatedIdentifier` with filtering capabilities at the moment. While other `relatedIdentifier` values will be included in the response when available, they cannot be used for filtering purposes.
24+
/// </summary>
25+
public string? relatedIdentifierName { get; set; }
26+
public string? relatedIdentifierValue { get; set; }
1127
public string nextToken { get; set; }
1228
public int? MaxNumberOfPages { get; set; }
1329
}
14-
1530
}

0 commit comments

Comments
 (0)