Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Source/FikaAmazonAPI/AmazonConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
private AmazonCredential Credentials { get; set; }
public AppIntegrationsServiceV20240401 AppIntegrationsServiceV20240401 => this._AppIntegrationsServiceV20240401 ?? throw _NoCredentials;
public OrderService Orders => this._Orders ?? throw _NoCredentials;
public OrderServiceV20260101 OrdersV20260101 => this._OrdersV20260101 ?? throw _NoCredentials;
public ReportService Reports => this._Reports ?? throw _NoCredentials;
public SolicitationService Solicitations => this._Solicitations ?? throw _NoCredentials;
public FinancialService Financial => this._Financials ?? throw _NoCredentials;
Expand Down Expand Up @@ -57,6 +58,7 @@

private AppIntegrationsServiceV20240401 _AppIntegrationsServiceV20240401 { get; set; }
private OrderService _Orders { get; set; }
private OrderServiceV20260101 _OrdersV20260101 { get; set; }
private ReportService _Reports { get; set; }
private SolicitationService _Solicitations { get; set; }
private FinancialService _Financials { get; set; }
Expand Down Expand Up @@ -98,7 +100,7 @@
private UnauthorizedAccessException _NoCredentials = new UnauthorizedAccessException($"Error, you cannot make calls to Amazon without credentials!");

public string RefNumber { get; set; }
public AmazonConnection(AmazonCredential Credentials, string RefNumber = null, CultureInfo? cultureInfo = null, ILoggerFactory? loggerFactory = null)

Check warning on line 103 in Source/FikaAmazonAPI/AmazonConnection.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 103 in Source/FikaAmazonAPI/AmazonConnection.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
_loggerFactory = loggerFactory;
this.Authenticate(Credentials);
Expand All @@ -123,6 +125,7 @@
this._Authorization = new AuthorizationService(this.Credentials, _loggerFactory);
this._AppIntegrationsServiceV20240401 = new AppIntegrationsServiceV20240401(this.Credentials, _loggerFactory);
this._Orders = new OrderService(this.Credentials, _loggerFactory);
this._OrdersV20260101 = new OrderServiceV20260101(this.Credentials, _loggerFactory);
this._Reports = new ReportService(this.Credentials, _loggerFactory);
this._Solicitations = new SolicitationService(this.Credentials, _loggerFactory);
this._Financials = new FinancialService(this.Credentials, _loggerFactory);
Expand Down
350 changes: 350 additions & 0 deletions Source/FikaAmazonAPI/AmazonSpApiSDK/Models/OrdersV20260101/Address.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using System.Text;

namespace FikaAmazonAPI.AmazonSpApiSDK.Models.OrdersV20260101
{
/// <summary>
/// Additional address components that provide more detailed location information, helping with precise delivery routing.
/// </summary>
[DataContract]
public partial class AddressExtendedFields : IEquatable<AddressExtendedFields>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="AddressExtendedFields" /> class.
/// </summary>
public AddressExtendedFields() { }

/// <summary>
/// Initializes a new instance of the <see cref="AddressExtendedFields" /> class.
/// </summary>
/// <param name="streetName">The name of the street.</param>
/// <param name="streetNumber">The house, building, or property number associated with the location's street address.</param>
/// <param name="complement">The floor number / unit number.</param>
/// <param name="neighborhood">The neighborhood. This value is only used in some countries (such as Brazil).</param>
public AddressExtendedFields(string streetName = default,
string streetNumber = default,
string complement = default,
string neighborhood = default)
{
this.StreetName = streetName;
this.StreetNumber = streetNumber;
this.Complement = complement;
this.Neighborhood = neighborhood;
}

/// <summary>
/// The name of the street.
/// </summary>
/// <value>The name of the street.</value>
[DataMember(Name = "streetName", EmitDefaultValue = false)]
public string StreetName { get; set; }

/// <summary>
/// The house, building, or property number associated with the location's street address.
/// </summary>
/// <value>The house, building, or property number associated with the location's street address.</value>
[DataMember(Name = "streetNumber", EmitDefaultValue = false)]
public string StreetNumber { get; set; }

/// <summary>
/// The floor number / unit number.
/// </summary>
/// <value>The floor number / unit number.</value>
[DataMember(Name = "complement", EmitDefaultValue = false)]
public string Complement { get; set; }

/// <summary>
/// The neighborhood. This value is only used in some countries (such as Brazil).
/// </summary>
/// <value>The neighborhood. This value is only used in some countries (such as Brazil).</value>
[DataMember(Name = "neighborhood", EmitDefaultValue = false)]
public string Neighborhood { 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 AddressExtendedFields {\n");
sb.Append(" StreetName: ").Append(StreetName).Append("\n");
sb.Append(" StreetNumber: ").Append(StreetNumber).Append("\n");
sb.Append(" Complement: ").Append(Complement).Append("\n");
sb.Append(" Neighborhood: ").Append(Neighborhood).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 AddressExtendedFields);
}

/// <summary>
/// Returns true if AddressExtendedFields instances are equal
/// </summary>
/// <param name="input">Instance of AddressExtendedFields to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(AddressExtendedFields input)
{
if (input == null)
return false;

return
(
this.StreetName == input.StreetName ||
(this.StreetName != null &&
this.StreetName.Equals(input.StreetName))
) &&
(
this.StreetNumber == input.StreetNumber ||
(this.StreetNumber != null &&
this.StreetNumber.Equals(input.StreetNumber))
) &&
(
this.Complement == input.Complement ||
(this.Complement != null &&
this.Complement.Equals(input.Complement))
) &&
(
this.Neighborhood == input.Neighborhood ||
(this.Neighborhood != null &&
this.Neighborhood.Equals(input.Neighborhood))
);
}

/// <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.StreetName != null)
hashCode = hashCode * 59 + this.StreetName.GetHashCode();
if (this.StreetNumber != null)
hashCode = hashCode * 59 + this.StreetNumber.GetHashCode();
if (this.Complement != null)
hashCode = hashCode * 59 + this.Complement.GetHashCode();
if (this.Neighborhood != null)
hashCode = hashCode * 59 + this.Neighborhood.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;
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace FikaAmazonAPI.AmazonSpApiSDK.Models.OrdersV20260101
{
/// <summary>
/// The type of location.
/// </summary>
/// <value>The type of location.</value>
[JsonConverter(typeof(StringEnumConverter))]
public enum AddressTypeEnum
{
/// <summary>
/// Value for RESIDENTIAL
/// </summary>
[EnumMember(Value = "RESIDENTIAL")]
RESIDENTIAL = 1,

/// <summary>
/// Value for COMMERCIAL
/// </summary>
[EnumMember(Value = "COMMERCIAL")]
COMMERCIAL = 2,

/// <summary>
/// Value for PICKUP_POINT
/// </summary>
[EnumMember(Value = "PICKUP_POINT")]
PICKUP_POINT = 3,

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace FikaAmazonAPI.AmazonSpApiSDK.Models.OrdersV20260101
{
/// <summary>
/// The kind of alternative identifier
/// </summary>
/// <value>The kind of alternative identifier</value>
[JsonConverter(typeof(StringEnumConverter))]
public enum AliasTypeEnum

Check warning on line 15 in Source/FikaAmazonAPI/AmazonSpApiSDK/Models/OrdersV20260101/AliasTypeEnum.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this enumeration to remove the 'Enum' suffix.

See more on https://sonarcloud.io/project/issues?id=abuzuhri_Amazon-SP-API-CSharp&issues=AZ1q-cClb2zIfKUBbm6s&open=AZ1q-cClb2zIfKUBbm6s&pullRequest=922
{
/// <summary>
/// Value for SELLER_ORDER_ID
/// </summary>
[EnumMember(Value = "SELLER_ORDER_ID")]
SELLER_ORDER_ID = 1,

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Runtime.Serialization;
using System.Text;

namespace FikaAmazonAPI.AmazonSpApiSDK.Models.OrdersV20260101
{
/// <summary>
/// Other order that has a direct relationship to order, such as replacement or exchange order.
/// </summary>
[DataContract]
public partial class AssociatedOrder : IEquatable<AssociatedOrder>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="AssociatedOrder" /> class.
/// </summary>
public AssociatedOrder() { }

/// <summary>
/// Initializes a new instance of the <see cref="AssociatedOrder" /> class.
/// </summary>
/// <param name="orderId">The unique identifier of the related order that is associated with the current order.</param>
/// <param name="associationType">The relationship between the current order and the associated order.</param>
public AssociatedOrder(string orderId = default, OrderAssociationTypeEnum? associationType = default)
{
this.OrderId = orderId;
this.AssociationType = associationType;
}


/// <summary>
/// The unique identifier of the related order that is associated with the current order.
/// </summary>
/// <value>The unique identifier of the related order that is associated with the current order.</value>
[DataMember(Name = "orderId", EmitDefaultValue = false)]
public string OrderId { get; set; }

/// <summary>
/// The relationship between the current order and the associated order. Possible values: REPLACEMENT_ORIGINAL_ID, EXCHANGE_ORIGINAL_ID
/// </summary>
/// <value>The relationship between the current order and the associated order. Possible values: REPLACEMENT_ORIGINAL_ID, EXCHANGE_ORIGINAL_ID</value>
[DataMember(Name = "associationType", EmitDefaultValue = false)]
public OrderAssociationTypeEnum? AssociationType { 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 AssociatedOrder {\n");
sb.Append(" OrderId: ").Append(OrderId).Append("\n");
sb.Append(" AssociationType: ").Append(AssociationType).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 AssociatedOrder);
}

/// <summary>
/// Returns true if AssociatedOrder instances are equal
/// </summary>
/// <param name="input">Instance of AssociatedOrder to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(AssociatedOrder input)
{
if (input == null)
return false;

return
(
this.OrderId == input.OrderId ||
(this.OrderId != null &&
this.OrderId.Equals(input.OrderId))
) &&
(
this.AssociationType == input.AssociationType ||
(this.AssociationType != null &&
this.AssociationType.Equals(input.AssociationType))
);
}

/// <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.OrderId != null)
hashCode = hashCode * 59 + this.OrderId.GetHashCode();
if (this.AssociationType != null)
hashCode = hashCode * 59 + this.AssociationType.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;
}
}

}
Loading
Loading