@amazon-sp-api-release/amazon-sp-api-sdk-js 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/helper/DefaultRateLimitMap.mjs +1 -0
- package/index.js +1 -0
- package/package.json +1 -1
- package/src/finances_2024_06_19/ApiClient.js +827 -0
- package/src/finances_2024_06_19/api/DefaultApi.js +125 -0
- package/src/finances_2024_06_19/index.js +168 -0
- package/src/finances_2024_06_19/model/AmazonPayContext.js +76 -0
- package/src/finances_2024_06_19/model/Breakdown.js +76 -0
- package/src/finances_2024_06_19/model/BusinessContext.js +76 -0
- package/src/finances_2024_06_19/model/Context.js +308 -0
- package/src/finances_2024_06_19/model/Currency.js +69 -0
- package/src/finances_2024_06_19/model/DeferredContext.js +69 -0
- package/src/finances_2024_06_19/model/Error.js +80 -0
- package/src/finances_2024_06_19/model/ErrorList.js +65 -0
- package/src/finances_2024_06_19/model/Item.js +93 -0
- package/src/finances_2024_06_19/model/ItemRelatedIdentifier.js +101 -0
- package/src/finances_2024_06_19/model/ListTransactionsResponse.js +62 -0
- package/src/finances_2024_06_19/model/MarketplaceDetails.js +69 -0
- package/src/finances_2024_06_19/model/PaymentsContext.js +83 -0
- package/src/finances_2024_06_19/model/ProductContext.js +83 -0
- package/src/finances_2024_06_19/model/RelatedIdentifier.js +137 -0
- package/src/finances_2024_06_19/model/SellingPartnerMetadata.js +76 -0
- package/src/finances_2024_06_19/model/TimeRangeContext.js +69 -0
- package/src/finances_2024_06_19/model/Transaction.js +143 -0
- package/src/finances_2024_06_19/model/TransactionsPayload.js +70 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Selling Partner API for Finances
|
|
3
|
+
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-06-19
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { ApiClient } from '../ApiClient.js'
|
|
15
|
+
import { ErrorList } from '../model/ErrorList.js'
|
|
16
|
+
import { ListTransactionsResponse } from '../model/ListTransactionsResponse.js'
|
|
17
|
+
import { SuperagentRateLimiter } from '../../../helper/SuperagentRateLimiter.mjs'
|
|
18
|
+
import { DefaultRateLimitFetcher } from '../../../helper/DefaultRateLimitFetcher.mjs'
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Default service.
|
|
22
|
+
* @module finances_2024_06_19/api/DefaultApi
|
|
23
|
+
* @version 2024-06-19
|
|
24
|
+
*/
|
|
25
|
+
export class DefaultApi {
|
|
26
|
+
// Private memeber stores the default rate limiters
|
|
27
|
+
#defaultRateLimiterMap
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new DefaultApi.
|
|
31
|
+
* @alias module:finances_2024_06_19/api/DefaultApi
|
|
32
|
+
* @class
|
|
33
|
+
* @param {module:finances_2024_06_19/ApiClient} [apiClient] Optional API client implementation to use,
|
|
34
|
+
* default to {@link module:finances_2024_06_19/ApiClient#instance} if unspecified.
|
|
35
|
+
*/
|
|
36
|
+
constructor (apiClient) {
|
|
37
|
+
this.apiClient = apiClient || ApiClient.instance
|
|
38
|
+
this.initializeDefaultRateLimiterMap()
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initialize rate limiters for API operations
|
|
43
|
+
*/
|
|
44
|
+
initializeDefaultRateLimiterMap () {
|
|
45
|
+
this.#defaultRateLimiterMap = new Map()
|
|
46
|
+
const defaultRateLimitFetcher = new DefaultRateLimitFetcher()
|
|
47
|
+
const operations = [
|
|
48
|
+
'DefaultApi-listTransactions'
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
for (const operation of operations) {
|
|
52
|
+
const config = defaultRateLimitFetcher.getLimit(operation)
|
|
53
|
+
this.#defaultRateLimiterMap.set(operation, new SuperagentRateLimiter(config))
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Get rate limiter for a specific operation
|
|
59
|
+
* @param {String} operation name
|
|
60
|
+
*/
|
|
61
|
+
getRateLimiter (operation) {
|
|
62
|
+
return this.#defaultRateLimiterMap.get(operation)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
|
|
67
|
+
* @param {Date} postedAfter The response includes financial events posted on or after this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request.
|
|
68
|
+
* @param {Object} opts Optional parameters
|
|
69
|
+
* @param {Date} opts.postedBefore A date used for selecting transactions posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
|
|
70
|
+
* @param {String} opts.marketplaceId The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
|
71
|
+
* @param {String} opts.transactionStatus The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
|
|
72
|
+
* @param {String} opts.nextToken A string token returned in the response of your previous request.
|
|
73
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:finances_2024_06_19/model/ListTransactionsResponse} and HTTP response
|
|
74
|
+
*/
|
|
75
|
+
listTransactionsWithHttpInfo (postedAfter, opts) {
|
|
76
|
+
opts = opts || {}
|
|
77
|
+
const postBody = null
|
|
78
|
+
|
|
79
|
+
// verify the required parameter 'postedAfter' is set
|
|
80
|
+
if (postedAfter === undefined || postedAfter === null) {
|
|
81
|
+
throw new Error("Missing the required parameter 'postedAfter' when calling listTransactions")
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const pathParams = {
|
|
85
|
+
}
|
|
86
|
+
const queryParams = {
|
|
87
|
+
postedAfter,
|
|
88
|
+
postedBefore: opts.postedBefore,
|
|
89
|
+
marketplaceId: opts.marketplaceId,
|
|
90
|
+
transactionStatus: opts.transactionStatus,
|
|
91
|
+
nextToken: opts.nextToken
|
|
92
|
+
}
|
|
93
|
+
const headerParams = {
|
|
94
|
+
}
|
|
95
|
+
const formParams = {
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const contentTypes = []
|
|
99
|
+
const accepts = ['application/json']
|
|
100
|
+
const returnType = ListTransactionsResponse
|
|
101
|
+
|
|
102
|
+
return this.apiClient.callApi('DefaultApi-listTransactions',
|
|
103
|
+
'/finances/2024-06-19/transactions', 'GET',
|
|
104
|
+
pathParams, queryParams, headerParams, formParams, postBody,
|
|
105
|
+
contentTypes, accepts, returnType, this.getRateLimiter('DefaultApi-listTransactions')
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
|
|
111
|
+
* @param {Date} postedAfter The response includes financial events posted on or after this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request.
|
|
112
|
+
* @param {Object} opts Optional parameters
|
|
113
|
+
* @param {Date} opts.postedBefore A date used for selecting transactions posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no transactions are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes.
|
|
114
|
+
* @param {String} opts.marketplaceId The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
|
115
|
+
* @param {String} opts.transactionStatus The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
|
|
116
|
+
* @param {String} opts.nextToken A string token returned in the response of your previous request.
|
|
117
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:finances_2024_06_19/model/ListTransactionsResponse}
|
|
118
|
+
*/
|
|
119
|
+
listTransactions (postedAfter, opts) {
|
|
120
|
+
return this.listTransactionsWithHttpInfo(postedAfter, opts)
|
|
121
|
+
.then(function (response_and_data) {
|
|
122
|
+
return response_and_data.data
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Selling Partner API for Finances
|
|
3
|
+
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-06-19
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { ApiClient } from './ApiClient.js'
|
|
15
|
+
import { AmazonPayContext } from './model/AmazonPayContext.js'
|
|
16
|
+
import { Breakdown } from './model/Breakdown.js'
|
|
17
|
+
import { BusinessContext } from './model/BusinessContext.js'
|
|
18
|
+
import { Context } from './model/Context.js'
|
|
19
|
+
import { Currency } from './model/Currency.js'
|
|
20
|
+
import { DeferredContext } from './model/DeferredContext.js'
|
|
21
|
+
import { Error } from './model/Error.js'
|
|
22
|
+
import { ErrorList } from './model/ErrorList.js'
|
|
23
|
+
import { Item } from './model/Item.js'
|
|
24
|
+
import { ItemRelatedIdentifier } from './model/ItemRelatedIdentifier.js'
|
|
25
|
+
import { ListTransactionsResponse } from './model/ListTransactionsResponse.js'
|
|
26
|
+
import { MarketplaceDetails } from './model/MarketplaceDetails.js'
|
|
27
|
+
import { PaymentsContext } from './model/PaymentsContext.js'
|
|
28
|
+
import { ProductContext } from './model/ProductContext.js'
|
|
29
|
+
import { RelatedIdentifier } from './model/RelatedIdentifier.js'
|
|
30
|
+
import { SellingPartnerMetadata } from './model/SellingPartnerMetadata.js'
|
|
31
|
+
import { TimeRangeContext } from './model/TimeRangeContext.js'
|
|
32
|
+
import { Transaction } from './model/Transaction.js'
|
|
33
|
+
import { TransactionsPayload } from './model/TransactionsPayload.js'
|
|
34
|
+
import { DefaultApi } from './api/DefaultApi.js'
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes..<br>
|
|
38
|
+
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
|
|
39
|
+
* @module finances_2024_06_19/index
|
|
40
|
+
* @version 2024-06-19
|
|
41
|
+
*/
|
|
42
|
+
export {
|
|
43
|
+
/**
|
|
44
|
+
* The ApiClient constructor.
|
|
45
|
+
* @property {module:finances_2024_06_19/ApiClient}
|
|
46
|
+
*/
|
|
47
|
+
ApiClient,
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The AmazonPayContext model constructor.
|
|
51
|
+
* @property {module:finances_2024_06_19/model/AmazonPayContext}
|
|
52
|
+
*/
|
|
53
|
+
AmazonPayContext,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The Breakdown model constructor.
|
|
57
|
+
* @property {module:finances_2024_06_19/model/Breakdown}
|
|
58
|
+
*/
|
|
59
|
+
Breakdown,
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The BusinessContext model constructor.
|
|
63
|
+
* @property {module:finances_2024_06_19/model/BusinessContext}
|
|
64
|
+
*/
|
|
65
|
+
BusinessContext,
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The Context model constructor.
|
|
69
|
+
* @property {module:finances_2024_06_19/model/Context}
|
|
70
|
+
*/
|
|
71
|
+
Context,
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The Currency model constructor.
|
|
75
|
+
* @property {module:finances_2024_06_19/model/Currency}
|
|
76
|
+
*/
|
|
77
|
+
Currency,
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The DeferredContext model constructor.
|
|
81
|
+
* @property {module:finances_2024_06_19/model/DeferredContext}
|
|
82
|
+
*/
|
|
83
|
+
DeferredContext,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The Error model constructor.
|
|
87
|
+
* @property {module:finances_2024_06_19/model/Error}
|
|
88
|
+
*/
|
|
89
|
+
Error,
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The ErrorList model constructor.
|
|
93
|
+
* @property {module:finances_2024_06_19/model/ErrorList}
|
|
94
|
+
*/
|
|
95
|
+
ErrorList,
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The Item model constructor.
|
|
99
|
+
* @property {module:finances_2024_06_19/model/Item}
|
|
100
|
+
*/
|
|
101
|
+
Item,
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The ItemRelatedIdentifier model constructor.
|
|
105
|
+
* @property {module:finances_2024_06_19/model/ItemRelatedIdentifier}
|
|
106
|
+
*/
|
|
107
|
+
ItemRelatedIdentifier,
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The ListTransactionsResponse model constructor.
|
|
111
|
+
* @property {module:finances_2024_06_19/model/ListTransactionsResponse}
|
|
112
|
+
*/
|
|
113
|
+
ListTransactionsResponse,
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The MarketplaceDetails model constructor.
|
|
117
|
+
* @property {module:finances_2024_06_19/model/MarketplaceDetails}
|
|
118
|
+
*/
|
|
119
|
+
MarketplaceDetails,
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The PaymentsContext model constructor.
|
|
123
|
+
* @property {module:finances_2024_06_19/model/PaymentsContext}
|
|
124
|
+
*/
|
|
125
|
+
PaymentsContext,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The ProductContext model constructor.
|
|
129
|
+
* @property {module:finances_2024_06_19/model/ProductContext}
|
|
130
|
+
*/
|
|
131
|
+
ProductContext,
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The RelatedIdentifier model constructor.
|
|
135
|
+
* @property {module:finances_2024_06_19/model/RelatedIdentifier}
|
|
136
|
+
*/
|
|
137
|
+
RelatedIdentifier,
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The SellingPartnerMetadata model constructor.
|
|
141
|
+
* @property {module:finances_2024_06_19/model/SellingPartnerMetadata}
|
|
142
|
+
*/
|
|
143
|
+
SellingPartnerMetadata,
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The TimeRangeContext model constructor.
|
|
147
|
+
* @property {module:finances_2024_06_19/model/TimeRangeContext}
|
|
148
|
+
*/
|
|
149
|
+
TimeRangeContext,
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The Transaction model constructor.
|
|
153
|
+
* @property {module:finances_2024_06_19/model/Transaction}
|
|
154
|
+
*/
|
|
155
|
+
Transaction,
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The TransactionsPayload model constructor.
|
|
159
|
+
* @property {module:finances_2024_06_19/model/TransactionsPayload}
|
|
160
|
+
*/
|
|
161
|
+
TransactionsPayload,
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The DefaultApi service constructor.
|
|
165
|
+
* @property {module:finances_2024_06_19/api/DefaultApi}
|
|
166
|
+
*/
|
|
167
|
+
DefaultApi
|
|
168
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Selling Partner API for Finances
|
|
3
|
+
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-06-19
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { ApiClient } from '../ApiClient.js'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The AmazonPayContext model module.
|
|
18
|
+
* @module finances_2024_06_19/model/AmazonPayContext
|
|
19
|
+
* @version 2024-06-19
|
|
20
|
+
*/
|
|
21
|
+
export class AmazonPayContext {
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new <code>AmazonPayContext</code>.
|
|
24
|
+
* Additional information related to Amazon Pay.
|
|
25
|
+
* @alias module:finances_2024_06_19/model/AmazonPayContext
|
|
26
|
+
* @class
|
|
27
|
+
*/
|
|
28
|
+
constructor () {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a <code>AmazonPayContext</code> from a plain JavaScript object, optionally creating a new instance.
|
|
33
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
34
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
35
|
+
* @param {module:finances_2024_06_19/model/AmazonPayContext} obj Optional instance to populate.
|
|
36
|
+
* @return {module:finances_2024_06_19/model/AmazonPayContext} The populated <code>AmazonPayContext</code> instance.
|
|
37
|
+
*/
|
|
38
|
+
static constructFromObject (data, obj) {
|
|
39
|
+
if (data) {
|
|
40
|
+
switch (typeof data) {
|
|
41
|
+
case 'string':
|
|
42
|
+
obj = String(data)
|
|
43
|
+
break
|
|
44
|
+
case 'number':
|
|
45
|
+
obj = Number(data)
|
|
46
|
+
break
|
|
47
|
+
case 'boolean':
|
|
48
|
+
obj = Boolean(data)
|
|
49
|
+
break
|
|
50
|
+
}
|
|
51
|
+
obj = obj || new AmazonPayContext()
|
|
52
|
+
if (data.hasOwnProperty('storeName')) { obj.storeName = ApiClient.convertToType(data.storeName, 'String') }
|
|
53
|
+
if (data.hasOwnProperty('orderType')) { obj.orderType = ApiClient.convertToType(data.orderType, 'String') }
|
|
54
|
+
if (data.hasOwnProperty('channel')) { obj.channel = ApiClient.convertToType(data.channel, 'String') }
|
|
55
|
+
}
|
|
56
|
+
return obj
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Store name related to transaction.
|
|
62
|
+
* @member {String} storeName
|
|
63
|
+
*/
|
|
64
|
+
AmazonPayContext.prototype.storeName = undefined
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Order type of the transaction.
|
|
68
|
+
* @member {String} orderType
|
|
69
|
+
*/
|
|
70
|
+
AmazonPayContext.prototype.orderType = undefined
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Channel details of related transaction.
|
|
74
|
+
* @member {String} channel
|
|
75
|
+
*/
|
|
76
|
+
AmazonPayContext.prototype.channel = undefined
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Selling Partner API for Finances
|
|
3
|
+
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-06-19
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { ApiClient } from '../ApiClient.js'
|
|
15
|
+
import { Currency } from './Currency.js'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The Breakdown model module.
|
|
19
|
+
* @module finances_2024_06_19/model/Breakdown
|
|
20
|
+
* @version 2024-06-19
|
|
21
|
+
*/
|
|
22
|
+
export class Breakdown {
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new <code>Breakdown</code>.
|
|
25
|
+
* Breakdown provides details regarding the money movement under the financial transaction. Breakdowns get categorized further into breakdown types, breakdown amounts, and further breakdowns into a hierarchical structure.
|
|
26
|
+
* @alias module:finances_2024_06_19/model/Breakdown
|
|
27
|
+
* @class
|
|
28
|
+
*/
|
|
29
|
+
constructor () {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a <code>Breakdown</code> from a plain JavaScript object, optionally creating a new instance.
|
|
34
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
35
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
36
|
+
* @param {module:finances_2024_06_19/model/Breakdown} obj Optional instance to populate.
|
|
37
|
+
* @return {module:finances_2024_06_19/model/Breakdown} The populated <code>Breakdown</code> instance.
|
|
38
|
+
*/
|
|
39
|
+
static constructFromObject (data, obj) {
|
|
40
|
+
if (data) {
|
|
41
|
+
switch (typeof data) {
|
|
42
|
+
case 'string':
|
|
43
|
+
obj = String(data)
|
|
44
|
+
break
|
|
45
|
+
case 'number':
|
|
46
|
+
obj = Number(data)
|
|
47
|
+
break
|
|
48
|
+
case 'boolean':
|
|
49
|
+
obj = Boolean(data)
|
|
50
|
+
break
|
|
51
|
+
}
|
|
52
|
+
obj = obj || new Breakdown()
|
|
53
|
+
if (data.hasOwnProperty('breakdownType')) { obj.breakdownType = ApiClient.convertToType(data.breakdownType, 'String') }
|
|
54
|
+
if (data.hasOwnProperty('breakdownAmount')) { obj.breakdownAmount = Currency.constructFromObject(data.breakdownAmount) }
|
|
55
|
+
if (data.hasOwnProperty('breakdowns')) { obj.breakdowns = ApiClient.convertToType(data.breakdowns, [Breakdown]) }
|
|
56
|
+
}
|
|
57
|
+
return obj
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The type of charge.
|
|
63
|
+
* @member {String} breakdownType
|
|
64
|
+
*/
|
|
65
|
+
Breakdown.prototype.breakdownType = undefined
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @member {module:finances_2024_06_19/model/Currency} breakdownAmount
|
|
69
|
+
*/
|
|
70
|
+
Breakdown.prototype.breakdownAmount = undefined
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A list of breakdowns that detail how the total amount is calculated for the transaction.
|
|
74
|
+
* @member {Array.<module:finances_2024_06_19/model/Breakdown>} breakdowns
|
|
75
|
+
*/
|
|
76
|
+
Breakdown.prototype.breakdowns = undefined
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Selling Partner API for Finances
|
|
3
|
+
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-06-19
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { ApiClient } from '../ApiClient.js'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The BusinessContext model module.
|
|
18
|
+
* @module finances_2024_06_19/model/BusinessContext
|
|
19
|
+
* @version 2024-06-19
|
|
20
|
+
*/
|
|
21
|
+
export class BusinessContext {
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new <code>BusinessContext</code>.
|
|
24
|
+
* Information about the line of business associated with a transaction.
|
|
25
|
+
* @alias module:finances_2024_06_19/model/BusinessContext
|
|
26
|
+
* @class
|
|
27
|
+
*/
|
|
28
|
+
constructor () {
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a <code>BusinessContext</code> from a plain JavaScript object, optionally creating a new instance.
|
|
33
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
34
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
35
|
+
* @param {module:finances_2024_06_19/model/BusinessContext} obj Optional instance to populate.
|
|
36
|
+
* @return {module:finances_2024_06_19/model/BusinessContext} The populated <code>BusinessContext</code> instance.
|
|
37
|
+
*/
|
|
38
|
+
static constructFromObject (data, obj) {
|
|
39
|
+
if (data) {
|
|
40
|
+
switch (typeof data) {
|
|
41
|
+
case 'string':
|
|
42
|
+
obj = String(data)
|
|
43
|
+
break
|
|
44
|
+
case 'number':
|
|
45
|
+
obj = Number(data)
|
|
46
|
+
break
|
|
47
|
+
case 'boolean':
|
|
48
|
+
obj = Boolean(data)
|
|
49
|
+
break
|
|
50
|
+
}
|
|
51
|
+
obj = obj || new BusinessContext()
|
|
52
|
+
if (data.hasOwnProperty('storeName')) { obj.storeName = ApiClient.convertToType(data.storeName, 'String') }
|
|
53
|
+
}
|
|
54
|
+
return obj
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Allowed values for the <code>storeName</code> property.
|
|
60
|
+
* @enum {String}
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
BusinessContext.StoreNameEnum = {
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* value: "AMAZON_HAUL"
|
|
67
|
+
* @const
|
|
68
|
+
*/
|
|
69
|
+
AMAZON_HAUL: 'AMAZON_HAUL'
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The store name associated with the transaction.
|
|
74
|
+
* @member {module:finances_2024_06_19/model/BusinessContext.StoreNameEnum} storeName
|
|
75
|
+
*/
|
|
76
|
+
BusinessContext.prototype.storeName = undefined
|