Skip to content

Commit

Permalink
abuzuhri#685 removed unnecessary MarketplaceIds object
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Venclovas committed Apr 23, 2024
1 parent a6b11f4 commit 17172fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using FikaAmazonAPI.Search;
using FikaAmazonAPI.Utils;
using System;
using System.Collections.Generic;
using static FikaAmazonAPI.AmazonSpApiSDK.Models.Reports.CreateReportScheduleSpecification;
using static FikaAmazonAPI.Utils.Constants;

Expand All @@ -11,7 +12,7 @@ public class ParameterCreateReportScheduleSpecification : ParameterBased
{
public ReportOptions reportOptions { get; set; }
public ReportTypes reportType { get; set; }
public MarketplaceIds marketplaceIds { get; set; }
public List<string> marketplaceIds { get; set; }
public PeriodEnum period { get; set; }
public DateTime? nextReportCreationTime { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using FikaAmazonAPI.Search;
using FikaAmazonAPI.Utils;
using System;
using System.Collections.Generic;
using static FikaAmazonAPI.Utils.Constants;

namespace FikaAmazonAPI.Parameter.Report
Expand All @@ -12,6 +13,6 @@ public class ParameterCreateReportSpecification : ParameterBased
public ReportTypes reportType { get; set; }
public DateTime? dataStartTime { get; set; }
public DateTime? dataEndTime { get; set; }
public MarketplaceIds marketplaceIds { get; set; }
public List<string> marketplaceIds { get; set; }
}
}
6 changes: 3 additions & 3 deletions Source/FikaAmazonAPI/Services/ReportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public async Task<string> CreateReportAsync(ParameterCreateReportSpecification c
{
if (createReportSpecification.marketplaceIds == null || createReportSpecification.marketplaceIds.Count == 0)
{
createReportSpecification.marketplaceIds = new MarketplaceIds();
createReportSpecification.marketplaceIds = new List<string>();
createReportSpecification.marketplaceIds.Add(AmazonCredential.MarketPlace.ID);
}
await CreateAuthorizedRequestAsync(ReportApiUrls.CreateReport, RestSharp.Method.Post, null, createReportSpecification, cancellationToken: cancellationToken);
Expand Down Expand Up @@ -295,7 +295,7 @@ public async Task<string> CreateReportAndDownloadFileAsync(ReportTypes reportTyp
var parameters = new ParameterCreateReportSpecification();
parameters.reportType = reportType;

parameters.marketplaceIds = new MarketplaceIds();
parameters.marketplaceIds = new List<string>();

if (marketplaces == null || marketplaces.Count() == 0)
{
Expand Down Expand Up @@ -355,7 +355,7 @@ public async Task<IList<string>> DownloadExistingReportAndDownloadFileAsync(Repo
parameters.reportTypes = new List<ReportTypes>();
parameters.reportTypes.Add(reportTypes);

parameters.marketplaceIds = new MarketplaceIds();
parameters.marketplaceIds = new List<string>();
parameters.marketplaceIds.Add(AmazonCredential.MarketPlace.ID);


Expand Down
9 changes: 0 additions & 9 deletions Source/FikaAmazonAPI/Utils/MarketplaceIds.cs

This file was deleted.

0 comments on commit 17172fa

Please sign in to comment.