Skip to content

Commit 414fd7c

Browse files
committed
add sample
1 parent 94eaccf commit 414fd7c

File tree

4 files changed

+20
-88
lines changed

4 files changed

+20
-88
lines changed

Source/FikaAmazonAPI.Sample/FeedsSample.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ public void SubmitFeedPRICING()
131131

132132
var outPut = amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);
133133

134-
var reportOutpit = outPut.Url;
134+
var reportOutput = outPut.Url;
135+
136+
137+
var processingReport = amazonConnection.Feed.GetFeedDocumentProcessingReport(reportOutput);
135138
}
136139
}
137140
}

Source/FikaAmazonAPI.Sample/Program.cs

Lines changed: 9 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -45,94 +45,23 @@ static async Task Main(string[] args)
4545
IsActiveLimitRate = true
4646
});
4747

48-
var dddd= amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_FBA_INVENTORY_AGED_DATA);
49-
50-
var parameters = new ParameterListFinancialEvents();
51-
parameters.PostedAfter = new DateTime(2021, 12, 1);
52-
var fEvents = amazonConnection.Financial.ListFinancialEvents(parameters);
5348

54-
//var rb=amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_FBA_STORAGE_FEE_CHARGES_DATA,DateTime.UtcNow.AddDays(-60), DateTime.UtcNow.AddDays(-1));
55-
56-
GetEligibleShipmentServicesRequest getEligibleShipmentServicesRequest = new GetEligibleShipmentServicesRequest()
49+
while (true)
5750
{
58-
ShippingOfferingFilter = new ShippingOfferingFilter()
59-
{
60-
CarrierWillPickUp = CarrierWillPickUpOption.CarrierWillPickUp,
61-
DeliveryExperience = DeliveryExperienceOption.NoTracking,
62-
IncludePackingSlipWithLabel = true,
63-
IncludeComplexShippingOptions = false
64-
},
65-
ShipmentRequestDetails = new ShipmentRequestDetails()
51+
var data = amazonConnection.ProductPricing.GetItemOffers(new FikaAmazonAPI.Parameter.ProductPricing.ParameterGetItemOffers()
6652
{
53+
ItemCondition = ItemCondition.New,
54+
MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
55+
Asin = "B000JNAMJ2"
56+
});
57+
Console.Write(".");
58+
}
6759

68-
AmazonOrderId = "22-333333-3333333333",
69-
ItemList = new ItemList()
70-
{
71-
new Item()
72-
{
73-
ItemDescription ="AAAAA",
74-
Quantity=1,
75-
OrderItemId="11111111"
76-
77-
}
78-
},
79-
ShipFromAddress =new Address()
80-
{
81-
AddressLine1 ="addd",
82-
City="AAAA",
83-
DistrictOrCounty="",
84-
85-
Name="TEST",
86-
PostalCode="97122",
87-
CountryCode="AE",
88-
Phone="+97150999999"
89-
},
90-
PackageDimensions=new PackageDimensions()
91-
{
92-
Height =1,
93-
Length=1,
94-
Width=1,
95-
Unit=UnitOfLength.Centimeters
96-
},
97-
Weight=new Weight(1,UnitOfWeight.G),
98-
ShippingServiceOptions=new ShippingServiceOptions()
99-
{
100-
DeliveryExperience=DeliveryExperienceType.NoTracking,
101-
CarrierWillPickUp=false
102-
103-
}
104-
},
105-
106-
};
107-
108-
var result=amazonConnection.MerchantFulfillment.GetEligibleShipmentServices(getEligibleShipmentServicesRequest);
10960

110-
//createdSince cannot be after createdUntil
111-
DateTime createdSince = DateTime.UtcNow.AddDays(-60);
112-
DateTime createdUntil = DateTime.UtcNow;
113-
114-
var data222221 = amazonConnection.Reports.DownloadExistingReportAndDownloadFile(
115-
ReportTypes.GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2,
116-
createdSince,
117-
createdUntil);
118-
119-
120-
//while (true)
121-
//{
122-
// var fromDate = DateTime.UtcNow.AddDays(-3);
123-
// var toDate = DateTime.UtcNow.AddDays(-1);
124-
// var ddddd = amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA, fromDate, toDate);
125-
// Console.WriteLine(ddddd);
126-
//}
127-
128-
129-
DateTime startDate11 = new DateTime(2021, 10, 03);
130-
var data111 = amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_SELLER_FEEDBACK_DATA, startDate11, null, null);
13161

62+
var dddd= amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_FBA_INVENTORY_AGED_DATA);
13263

133-
var marketplaceById = MarketPlace.GetMarketPlaceByID("A2VIGQ35RCS4UG");
13464

135-
13665

13766
Console.ReadLine();
13867

Source/FikaAmazonAPI/FikaAmazonAPI.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<Product>CSharp Amazon Sp API</Product>
88
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
99
<LangVersion>8.0</LangVersion>
10-
<Version>1.0.32</Version>
11-
<AssemblyVersion>1.0.32</AssemblyVersion>
12-
<FileVersion>1.0.32</FileVersion>
10+
<Version>1.0.33</Version>
11+
<AssemblyVersion>1.0.33</AssemblyVersion>
12+
<FileVersion>1.0.33</FileVersion>
1313
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
1414
<PackageProjectUrl>https://github.com/abuzuhri/Amazon-SP-API-CSharp</PackageProjectUrl>
1515
<PackageLicenseExpression>MIT</PackageLicenseExpression>

Source/FikaAmazonAPI/Services/FinancialService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public IList<FinancialEventGroup> ListFinancialEventGroups(ParameterListFinancia
3636
return list;
3737
}
3838

39-
private ListFinancialEventGroupsPayload GetFinancialEventGroupListByNextToken(string nextToken)
39+
public ListFinancialEventGroupsPayload GetFinancialEventGroupListByNextToken(string nextToken)
4040
{
4141
List<KeyValuePair<string, string>> queryParameters = new List<KeyValuePair<string, string>>();
4242
queryParameters.Add(new KeyValuePair<string, string>("NextToken", nextToken));
@@ -48,21 +48,21 @@ private ListFinancialEventGroupsPayload GetFinancialEventGroupListByNextToken(st
4848
}
4949

5050

51-
private FinancialEvents ListFinancialEventsByGroupId(string eventGroupId)
51+
public FinancialEvents ListFinancialEventsByGroupId(string eventGroupId)
5252
{
5353
CreateAuthorizedRequest(FinanceApiUrls.ListFinancialEventsByGroupId(eventGroupId), RestSharp.Method.GET);
5454
var response = ExecuteRequest<ListFinancialEventsResponse>();
5555
return response.Payload.FinancialEvents;
5656
}
5757

58-
private FinancialEvents ListFinancialEventsByOrderId(string orderId)
58+
public FinancialEvents ListFinancialEventsByOrderId(string orderId)
5959
{
6060
CreateAuthorizedRequest(FinanceApiUrls.ListFinancialEventsByOrderId(orderId), RestSharp.Method.GET);
6161
var response = ExecuteRequest<ListFinancialEventsResponse>();
6262
return response.Payload.FinancialEvents;
6363
}
6464

65-
private FinancialEvents ListFinancialEvents()
65+
public FinancialEvents ListFinancialEvents()
6666
{
6767
CreateAuthorizedRequest(FinanceApiUrls.ListFinancialEvents, RestSharp.Method.GET);
6868
var response = ExecuteRequest<ListFinancialEventsResponse>();

0 commit comments

Comments
 (0)