This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91cca19
commit 8ee0dc9
Showing
4 changed files
with
23 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { amazonMarketplaces } from '@scaleleap/amazon-marketplaces' | ||
import { BaseConfig } from '@scaleleap/config' | ||
|
||
import { HttpClient } from '../../src' | ||
|
||
export class Config extends BaseConfig { | ||
public readonly AWS_ACCESS_KEY_ID = this.get('AWS_ACCESS_KEY_ID').required().asString() | ||
private readonly AWS_ACCESS_KEY_ID = this.get('AWS_ACCESS_KEY_ID').required().asString() | ||
|
||
private readonly MWS_AUTH_TOKEN = this.get('MWS_AUTH_TOKEN').required().asString() | ||
|
||
public readonly MWS_AUTH_TOKEN = this.get('MWS_AUTH_TOKEN').required().asString() | ||
private readonly SECRET_KEY = this.get('SECRET_KEY').required().asString() | ||
|
||
public readonly SECRET_KEY = this.get('SECRET_KEY').required().asString() | ||
private readonly SELLER_ID = this.get('SELLER_ID').required().asString() | ||
|
||
public readonly SELLER_ID = this.get('SELLER_ID').required().asString() | ||
public createHttpClient() { | ||
return new HttpClient({ | ||
marketplace: amazonMarketplaces.CA, | ||
awsAccessKeyId: this.AWS_ACCESS_KEY_ID, | ||
mwsAuthToken: this.MWS_AUTH_TOKEN, | ||
secretKey: this.SECRET_KEY, | ||
sellerId: this.SELLER_ID, | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters