Skip to content

Commit 6810166

Browse files
authored
Merge pull request #2 from ifcore/amzn-main
Sync with Amazon Repo, Update to sellingpartnerapi-aa-java version 2.0
2 parents 66bcacc + a591c73 commit 6810166

File tree

83 files changed

+22284
-6022
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+22284
-6022
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
* Dependency updates (not okhttp and apache httpcomponents - sadly)
44
* Attach sources to jar
5-
* Fix Bug in SignableRequestImpl
65
* Define ItemAttributes of Catalog API as hashmap containing arrays of jsonObjects
76
* bugfix for stackoverflow error caused by networkInterceptors in async methods
87

8+
# Update instructions
9+
10+
to update this repository with changes by Amazon:
11+
12+
* add a git remote for the amazon repo: `git remote add amazon git@github.com:amzn/selling-partner-api-models.git`
13+
* create a new branch and perform a git merge: `git merge amazon/main`
14+
915
## Selling Partner API Models
1016
This repository contains Swagger models for developers to use to create software to call Selling Partner APIs. Developers can use [swagger codegen](https://github.com/swagger-api/swagger-codegen) to generate client libraries from these models. Please refer to [selling-partner-api-docs](https://github.com/amzn/selling-partner-api-docs) for additional documentation and read the [Selling Partner API Developer Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md) for instructions to get started.
1117

clients/sellingpartner-api-aa-csharp/README.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,36 +38,9 @@ restRequest = new LWAAuthorizationSigner(lwaAuthorizationCredentials).Sign(restR
3838
```
3939
Note the IRestRequest reference is treated as **mutable** when signed.
4040

41-
## AWSSigV4Signer
42-
Signs a request with [AWS Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
43-
using the provided AWS developer account credentials.
44-
45-
*Example*
46-
```
47-
using RestSharp;
48-
using Amazon.SellingPartnerAPIAA;
49-
50-
string resource = "/my/api/path";
51-
RestClient restClient = new RestClient("https://...");
52-
IRestRequest restRequest = new RestRequest(resource, Method.GET);
53-
54-
AWSAuthenticationCredentials awsAuthenticationCredentials = new AWSAuthenticationCredentials
55-
{
56-
AccessKeyId = "..."
57-
SecretKey = "..."
58-
Region = "..."
59-
};
60-
61-
restRequest = new AWSSigV4Signer(awsAuthenticationCredentials)
62-
.Sign(restRequest, restClient.BaseUrl.Host);
63-
```
64-
Note the IRestRequest reference is treated as **mutable** when signed.
65-
6641
## RateLimitConfiguration
67-
6842
Interface to set and get rateLimit configurations that are used with RateLimiter. RateLimiter is used on client side to restrict the rate at which requests are made. RateLimiter Configuration takes Permit, rate which requests are made and TimeOut
6943

70-
7144
*Example*
7245
```
7346
RateLimitConfiguration rateLimitConfig = new RateLimitConfigurationOnRequests
@@ -78,6 +51,23 @@ RateLimitConfiguration rateLimitConfig = new RateLimitConfigurationOnRequests
7851
7952
```
8053

54+
## Exception
55+
This package returns a custom LWAException when there is an error returned during LWA authorization. LWAException provides additional details like errorCode and errorDescription to help fix the issue.
56+
57+
*Example*
58+
```
59+
catch (LWAException e)
60+
{
61+
Console.WriteLine("LWA Exception when calling Selling partner API");
62+
Console.WriteLine(e.getErrorCode());
63+
Console.WriteLine(e.getErrorMessage());
64+
Console.WriteLine(e.Message);
65+
}
66+
```
67+
68+
## Version
69+
Selling Partner API Authentication/Authorization Library version 2.0.
70+
8171
## Resources
8272
This package features Mustache templates designed for use with [swagger codegen](https://swagger.io/tools/swagger-codegen/).
8373
When you build Selling Partner API Swagger models with these templates, they help generate a rich SDK with functionality to invoke Selling Partner APIs built in. The templates are located in *resources/swagger-codegen*.
Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.SellingPartnerAPIAA", "src\Amazon.SellingPartnerAPIAA\Amazon.SellingPartnerAPIAA.csproj", "{64339397-3AAB-49D3-8B50-7A467B16D545}"
5-
EndProject
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.SellingPartnerAPIAATests", "test\Amazon.SellingPartnerAPIAATests\Amazon.SellingPartnerAPIAATests.csproj", "{12B130EB-1087-4F88-BDFA-3088868C0A46}"
7-
EndProject
8-
Global
9-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10-
Debug|Any CPU = Debug|Any CPU
11-
Release|Any CPU = Release|Any CPU
12-
EndGlobalSection
13-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{64339397-3AAB-49D3-8B50-7A467B16D545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{64339397-3AAB-49D3-8B50-7A467B16D545}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{64339397-3AAB-49D3-8B50-7A467B16D545}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{64339397-3AAB-49D3-8B50-7A467B16D545}.Release|Any CPU.Build.0 = Release|Any CPU
18-
{12B130EB-1087-4F88-BDFA-3088868C0A46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19-
{12B130EB-1087-4F88-BDFA-3088868C0A46}.Debug|Any CPU.Build.0 = Debug|Any CPU
20-
{12B130EB-1087-4F88-BDFA-3088868C0A46}.Release|Any CPU.ActiveCfg = Release|Any CPU
21-
{12B130EB-1087-4F88-BDFA-3088868C0A46}.Release|Any CPU.Build.0 = Release|Any CPU
22-
EndGlobalSection
23-
EndGlobal
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.SellingPartnerAPIAA", "src\Amazon.SellingPartnerAPIAA\Amazon.SellingPartnerAPIAA.csproj", "{64339397-3AAB-49D3-8B50-7A467B16D545}"
5+
EndProject
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.SellingPartnerAPIAATests", "test\Amazon.SellingPartnerAPIAATests\Amazon.SellingPartnerAPIAATests.csproj", "{12B130EB-1087-4F88-BDFA-3088868C0A46}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{64339397-3AAB-49D3-8B50-7A467B16D545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{64339397-3AAB-49D3-8B50-7A467B16D545}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{64339397-3AAB-49D3-8B50-7A467B16D545}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{64339397-3AAB-49D3-8B50-7A467B16D545}.Release|Any CPU.Build.0 = Release|Any CPU
18+
{12B130EB-1087-4F88-BDFA-3088868C0A46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{12B130EB-1087-4F88-BDFA-3088868C0A46}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{12B130EB-1087-4F88-BDFA-3088868C0A46}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{12B130EB-1087-4F88-BDFA-3088868C0A46}.Release|Any CPU.Build.0 = Release|Any CPU
22+
EndGlobalSection
23+
GlobalSection(MonoDevelopProperties) = preSolution
24+
version = 2.0
25+
EndGlobalSection
26+
EndGlobal

clients/sellingpartner-api-aa-csharp/src/Amazon.SellingPartnerAPIAA/AWSAuthenticationCredentials.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

clients/sellingpartner-api-aa-csharp/src/Amazon.SellingPartnerAPIAA/AWSSigV4Signer.cs

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)