Skip to content

Commit b67ccd4

Browse files
committed
remove test code
1 parent dbeb48d commit b67ccd4

File tree

1 file changed

+1
-101
lines changed

1 file changed

+1
-101
lines changed

Source/FikaAmazonAPI.SampleCode/Program.cs

Lines changed: 1 addition & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using FikaAmazonAPI.Parameter.ListingItem;
2-
using Microsoft.Extensions.Configuration;
1+
using Microsoft.Extensions.Configuration;
32
using static FikaAmazonAPI.Utils.Constants;
43

54
namespace FikaAmazonAPI.SampleCode
@@ -27,34 +26,6 @@ static async Task Main(string[] args)
2726
SellerID = config.GetSection("FikaAmazonAPI:SellerId").Value,
2827
IsDebugMode = true
2928
});
30-
31-
AmazonConnection amazonConnectionUsingAProxy = new AmazonConnection(new AmazonCredential()
32-
{
33-
AccessKey = config.GetSection("FikaAmazonAPI:AccessKey").Value,
34-
SecretKey = config.GetSection("FikaAmazonAPI:SecretKey").Value,
35-
RoleArn = config.GetSection("FikaAmazonAPI:RoleArn").Value,
36-
ClientId = config.GetSection("FikaAmazonAPI:ClientId").Value,
37-
ClientSecret = config.GetSection("FikaAmazonAPI:ClientSecret").Value,
38-
RefreshToken = config.GetSection("FikaAmazonAPI:RefreshToken").Value,
39-
MarketPlaceID = config.GetSection("FikaAmazonAPI:MarketPlaceID").Value,
40-
SellerID = config.GetSection("FikaAmazonAPI:SellerId").Value,
41-
IsDebugMode = true,
42-
ProxyAddress = config.GetSection("FikaAmazonAPI:ProxyAddress").Value,
43-
});
44-
45-
var search = amazonConnection.ProductType.SearchDefinitionsProductTypes(new Parameter.ProductTypes.SearchDefinitionsProductTypesParameter
46-
{
47-
keywords = new[] { "pet" }
48-
});
49-
50-
var def = amazonConnection.ProductType.GetDefinitionsProductType(
51-
new Parameter.ProductTypes.GetDefinitionsProductTypeParameter()
52-
{
53-
productType = search.ProductTypes?.FirstOrDefault()?.Name ?? "",
54-
locale = AmazonSpApiSDK.Models.ProductTypes.LocaleEnum.en_US,
55-
56-
});
57-
5829

5930
var x = amazonConnection.CatalogItem.GetCatalogItem202204(new FikaAmazonAPI.Parameter.CatalogItems.ParameterGetCatalogItem()
6031
{
@@ -71,77 +42,6 @@ static async Task Main(string[] args)
7142

7243
}
7344
});
74-
x.Attributes.Remove("street_date");
75-
x.Attributes.Add("storage_instructions", new[] { new {
76-
value="not applicable"//, unit="Hertz"
77-
78-
}});
79-
x.Attributes.Add("number_of_boxes", new[] { new {
80-
value=1//, unit="Hertz"
81-
82-
}});
83-
84-
x.Attributes.Add("country_of_origin", new[] { new {
85-
value= "UK"//, unit="Hertz"
86-
87-
}});
88-
89-
x.Attributes.Add("use_by_recommendation", new[] { new {
90-
value= "not applicable"//, unit="Hertz"
91-
92-
}});
93-
94-
x.Attributes.Add("product_description", new[] { new {
95-
value= ""//, unit="Hertz"
96-
97-
}});
98-
x.Attributes.Add("purchasable_offer", new object[] {
99-
new{
100-
currency= amazonConnection.GetCurrentMarketplace.CurrencyCode,
101-
our_price=new []
102-
{ new{
103-
schedule =new[]
104-
{ new {
105-
value_with_tax= 59.99M
106-
}
107-
}}
108-
}
109-
}
110-
});
111-
112-
x.Attributes.Add("fulfillment_availability",
113-
new object[] { new { fulfillment_channel_code = "DEFAULT",
114-
quantity = 10 } });
115-
//x.Attributes["vat_level"] = new[] { new {
116-
// value ="registration_not_required"//, unit="Hertz"
117-
118-
// }};
119-
x.Attributes.Add("condition_type", new[] { new {
120-
value= "new_new"//, unit="Hertz"
121-
122-
}});
123-
x.Attributes.Remove("variation_theme");
124-
x.Attributes.Remove("generic_keyword"); x.Attributes.Remove("vat_level");
125-
126-
127-
128-
// var r = new object[] { new{ value = DateTime.Now } };
129-
// x.Attributes.Add("street_date", System.Text.Json.JsonSerializer.Serialize( new[] { new { value = DateTime.Now } }));//= System.Text.Json.JsonSerializer.Serialize(r);
130-
var putrequest = new ListingsItemPutRequest()
131-
{
132-
attributes = x.Attributes,
133-
productType = def.ProductType,
134-
requirements = Requirements.LISTING
135-
};
136-
137-
var y = amazonConnection.ListingsItem.PutListingsItem(
138-
new ParameterPutListingItem()
139-
{
140-
listingsItemPutRequest = putrequest,
141-
sku = "71683-001",
142-
sellerId = amazonConnection.GetCurrentSellerID
143-
});
144-
14545

14646

14747
Console.ReadLine();

0 commit comments

Comments
 (0)