Skip to content
Merged
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 @@ -11,6 +11,7 @@
{
private AmazonCredential Credentials { get; set; }

public AppIntegrationsServiceV20240401 AppIntegrationsServiceV20240401 => this._AppIntegrationsServiceV20240401 ?? throw _NoCredentials;
public OrderService Orders => this._Orders ?? throw _NoCredentials;
public ReportService Reports => this._Reports ?? throw _NoCredentials;
public SolicitationService Solicitations => this._Solicitations ?? throw _NoCredentials;
Expand Down Expand Up @@ -49,6 +50,7 @@

public VendorTransactionStatusService VendorTransactionStatus => this._VendorTransactionStatus ?? throw _NoCredentials;

private AppIntegrationsServiceV20240401 _AppIntegrationsServiceV20240401 { get; set; }
private OrderService _Orders { get; set; }
private ReportService _Reports { get; set; }
private SolicitationService _Solicitations { get; set; }
Expand Down Expand Up @@ -89,7 +91,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)

Check warning on line 94 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.
{
this.Authenticate(Credentials);
this.RefNumber = RefNumber;
Expand All @@ -111,6 +113,7 @@
this.Credentials = Credentials;

this._Authorization = new AuthorizationService(this.Credentials);
this._AppIntegrationsServiceV20240401 = new AppIntegrationsServiceV20240401(this.Credentials);
this._Orders = new OrderService(this.Credentials);
this._Reports = new ReportService(this.Credentials);
this._Solicitations = new SolicitationService(this.Credentials);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
/*
* The Selling Partner API for third party application integrations.
*
* With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
*
* OpenAPI spec version: 2024-04-01
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;

namespace FikaAmazonAPI.AmazonSpApiSDK.Models.AppIntegrationsV20240401
{
/// <summary>
/// The request for the &#x60;createNotification&#x60; operation.
/// </summary>
[DataContract]
public partial class CreateNotificationRequest : IEquatable<CreateNotificationRequest>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="CreateNotificationRequest" /> class.
/// </summary>
[JsonConstructorAttribute]
public CreateNotificationRequest() { }
/// <summary>
/// Initializes a new instance of the <see cref="CreateNotificationRequest" /> class.
/// </summary>
/// <param name="templateId">The unique identifier of the notification template you used to onboard your application. (required).</param>
/// <param name="notificationParameters">The parameters specified in the template you used to onboard your application. (required).</param>
/// <param name="marketplaceId">An encrypted marketplace identifier for the posted notification..</param>
public CreateNotificationRequest(string templateId = default(string), NotificationParameters notificationParameters = default(NotificationParameters), string marketplaceId = default(string))
{
// to ensure "templateId" is required (not null)
if (templateId == null)
{
throw new InvalidDataException("templateId is a required property for CreateNotificationRequest and cannot be null");
}
else
{
this.TemplateId = templateId;
}
// to ensure "notificationParameters" is required (not null)
if (notificationParameters == null)
{
throw new InvalidDataException("notificationParameters is a required property for CreateNotificationRequest and cannot be null");
}
else
{
this.NotificationParameters = notificationParameters;
}
this.MarketplaceId = marketplaceId;
}

/// <summary>
/// The unique identifier of the notification template you used to onboard your application.
/// </summary>
/// <value>The unique identifier of the notification template you used to onboard your application.</value>
[DataMember(Name="templateId", EmitDefaultValue=false)]
public string TemplateId { get; set; }

/// <summary>
/// The parameters specified in the template you used to onboard your application.
/// </summary>
/// <value>The parameters specified in the template you used to onboard your application.</value>
[DataMember(Name="notificationParameters", EmitDefaultValue=false)]
public NotificationParameters NotificationParameters { get; set; }

/// <summary>
/// An encrypted marketplace identifier for the posted notification.
/// </summary>
/// <value>An encrypted marketplace identifier for the posted notification.</value>
[DataMember(Name="marketplaceId", EmitDefaultValue=false)]
public string MarketplaceId { 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 CreateNotificationRequest {\n");
sb.Append(" TemplateId: ").Append(TemplateId).Append("\n");
sb.Append(" NotificationParameters: ").Append(NotificationParameters).Append("\n");
sb.Append(" MarketplaceId: ").Append(MarketplaceId).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 CreateNotificationRequest);
}

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

return
(
this.TemplateId == input.TemplateId ||
(this.TemplateId != null &&
this.TemplateId.Equals(input.TemplateId))
) &&
(
this.NotificationParameters == input.NotificationParameters ||
(this.NotificationParameters != null &&
this.NotificationParameters.Equals(input.NotificationParameters))
) &&
(
this.MarketplaceId == input.MarketplaceId ||
(this.MarketplaceId != null &&
this.MarketplaceId.Equals(input.MarketplaceId))
);
}

/// <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.TemplateId != null)
hashCode = hashCode * 59 + this.TemplateId.GetHashCode();
if (this.NotificationParameters != null)
hashCode = hashCode * 59 + this.NotificationParameters.GetHashCode();
if (this.MarketplaceId != null)
hashCode = hashCode * 59 + this.MarketplaceId.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,124 @@
/*
* The Selling Partner API for third party application integrations.
*
* With the AppIntegrations API v2024-04-01, you can send notifications to Amazon Selling Partners and display the notifications in Seller Central.
*
* OpenAPI spec version: 2024-04-01
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

using System;
using System.Text;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;

namespace FikaAmazonAPI.AmazonSpApiSDK.Models.AppIntegrationsV20240401
{
/// <summary>
/// The response for the &#x60;createNotification&#x60; operation.
/// </summary>
[DataContract]
public partial class CreateNotificationResponse : IEquatable<CreateNotificationResponse>, IValidatableObject
{

public CreateNotificationResponse()
{
this.NotificationId = default(string);
}

/// <summary>
/// Initializes a new instance of the <see cref="CreateNotificationResponse" /> class.
/// </summary>
/// <param name="notificationId">The unique identifier assigned to each notification..</param>
public CreateNotificationResponse(string notificationId = default(string))
{
this.NotificationId = notificationId;
}

/// <summary>
/// The unique identifier assigned to each notification.
/// </summary>
/// <value>The unique identifier assigned to each notification.</value>
[DataMember(Name="notificationId", EmitDefaultValue=false)]
public string NotificationId { 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 CreateNotificationResponse {\n");
sb.Append(" NotificationId: ").Append(NotificationId).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 CreateNotificationResponse);
}

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

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

/// <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.NotificationId != null)
hashCode = hashCode * 59 + this.NotificationId.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