@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,143 @@
|
|
|
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 { Breakdown } from './Breakdown.js'
|
|
16
|
+
import { Context } from './Context.js'
|
|
17
|
+
import { Currency } from './Currency.js'
|
|
18
|
+
import { Item } from './Item.js'
|
|
19
|
+
import { MarketplaceDetails } from './MarketplaceDetails.js'
|
|
20
|
+
import { RelatedIdentifier } from './RelatedIdentifier.js'
|
|
21
|
+
import { SellingPartnerMetadata } from './SellingPartnerMetadata.js'
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The Transaction model module.
|
|
25
|
+
* @module finances_2024_06_19/model/Transaction
|
|
26
|
+
* @version 2024-06-19
|
|
27
|
+
*/
|
|
28
|
+
export class Transaction {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>Transaction</code>.
|
|
31
|
+
* Contains all information related to the transaction.
|
|
32
|
+
* @alias module:finances_2024_06_19/model/Transaction
|
|
33
|
+
* @class
|
|
34
|
+
*/
|
|
35
|
+
constructor () {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a <code>Transaction</code> from a plain JavaScript object, optionally creating a new instance.
|
|
40
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
41
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
42
|
+
* @param {module:finances_2024_06_19/model/Transaction} obj Optional instance to populate.
|
|
43
|
+
* @return {module:finances_2024_06_19/model/Transaction} The populated <code>Transaction</code> instance.
|
|
44
|
+
*/
|
|
45
|
+
static constructFromObject (data, obj) {
|
|
46
|
+
if (data) {
|
|
47
|
+
switch (typeof data) {
|
|
48
|
+
case 'string':
|
|
49
|
+
obj = String(data)
|
|
50
|
+
break
|
|
51
|
+
case 'number':
|
|
52
|
+
obj = Number(data)
|
|
53
|
+
break
|
|
54
|
+
case 'boolean':
|
|
55
|
+
obj = Boolean(data)
|
|
56
|
+
break
|
|
57
|
+
}
|
|
58
|
+
obj = obj || new Transaction()
|
|
59
|
+
if (data.hasOwnProperty('sellingPartnerMetadata')) { obj.sellingPartnerMetadata = SellingPartnerMetadata.constructFromObject(data.sellingPartnerMetadata) }
|
|
60
|
+
if (data.hasOwnProperty('relatedIdentifiers')) { obj.relatedIdentifiers = ApiClient.convertToType(data.relatedIdentifiers, [RelatedIdentifier]) }
|
|
61
|
+
if (data.hasOwnProperty('transactionType')) { obj.transactionType = ApiClient.convertToType(data.transactionType, 'String') }
|
|
62
|
+
if (data.hasOwnProperty('transactionId')) { obj.transactionId = ApiClient.convertToType(data.transactionId, 'String') }
|
|
63
|
+
if (data.hasOwnProperty('transactionStatus')) { obj.transactionStatus = ApiClient.convertToType(data.transactionStatus, 'String') }
|
|
64
|
+
if (data.hasOwnProperty('description')) { obj.description = ApiClient.convertToType(data.description, 'String') }
|
|
65
|
+
if (data.hasOwnProperty('postedDate')) { obj.postedDate = ApiClient.convertToType(data.postedDate, 'Date') }
|
|
66
|
+
if (data.hasOwnProperty('totalAmount')) { obj.totalAmount = Currency.constructFromObject(data.totalAmount) }
|
|
67
|
+
if (data.hasOwnProperty('marketplaceDetails')) { obj.marketplaceDetails = MarketplaceDetails.constructFromObject(data.marketplaceDetails) }
|
|
68
|
+
if (data.hasOwnProperty('items')) { obj.items = ApiClient.convertToType(data.items, [Item]) }
|
|
69
|
+
if (data.hasOwnProperty('contexts')) { obj.contexts = ApiClient.convertToType(data.contexts, [Context]) }
|
|
70
|
+
if (data.hasOwnProperty('breakdowns')) { obj.breakdowns = ApiClient.convertToType(data.breakdowns, [Breakdown]) }
|
|
71
|
+
}
|
|
72
|
+
return obj
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @member {module:finances_2024_06_19/model/SellingPartnerMetadata} sellingPartnerMetadata
|
|
78
|
+
*/
|
|
79
|
+
Transaction.prototype.sellingPartnerMetadata = undefined
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Related business identifiers of the transaction.
|
|
83
|
+
* @member {Array.<module:finances_2024_06_19/model/RelatedIdentifier>} relatedIdentifiers
|
|
84
|
+
*/
|
|
85
|
+
Transaction.prototype.relatedIdentifiers = undefined
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The type of transaction. Possible values: * Shipment
|
|
89
|
+
* @member {String} transactionType
|
|
90
|
+
*/
|
|
91
|
+
Transaction.prototype.transactionType = undefined
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The unique identifier for the transaction.
|
|
95
|
+
* @member {String} transactionId
|
|
96
|
+
*/
|
|
97
|
+
Transaction.prototype.transactionId = undefined
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* 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.
|
|
101
|
+
* @member {String} transactionStatus
|
|
102
|
+
*/
|
|
103
|
+
Transaction.prototype.transactionStatus = undefined
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Describes the reasons for the transaction. Example: 'Order Payment','Refund Order'
|
|
107
|
+
* @member {String} description
|
|
108
|
+
*/
|
|
109
|
+
Transaction.prototype.description = undefined
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).
|
|
113
|
+
* @member {Date} postedDate
|
|
114
|
+
*/
|
|
115
|
+
Transaction.prototype.postedDate = undefined
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @member {module:finances_2024_06_19/model/Currency} totalAmount
|
|
119
|
+
*/
|
|
120
|
+
Transaction.prototype.totalAmount = undefined
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @member {module:finances_2024_06_19/model/MarketplaceDetails} marketplaceDetails
|
|
124
|
+
*/
|
|
125
|
+
Transaction.prototype.marketplaceDetails = undefined
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* List of items in the transaction
|
|
129
|
+
* @member {Array.<module:finances_2024_06_19/model/Item>} items
|
|
130
|
+
*/
|
|
131
|
+
Transaction.prototype.items = undefined
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* List of additional Information about the item.
|
|
135
|
+
* @member {Array.<module:finances_2024_06_19/model/Context>} contexts
|
|
136
|
+
*/
|
|
137
|
+
Transaction.prototype.contexts = undefined
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* A list of breakdowns that detail how the total amount is calculated for the transaction.
|
|
141
|
+
* @member {Array.<module:finances_2024_06_19/model/Breakdown>} breakdowns
|
|
142
|
+
*/
|
|
143
|
+
Transaction.prototype.breakdowns = undefined
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { Transaction } from './Transaction.js'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The TransactionsPayload model module.
|
|
19
|
+
* @module finances_2024_06_19/model/TransactionsPayload
|
|
20
|
+
* @version 2024-06-19
|
|
21
|
+
*/
|
|
22
|
+
export class TransactionsPayload {
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new <code>TransactionsPayload</code>.
|
|
25
|
+
* The payload for the `listTransactions` operation.
|
|
26
|
+
* @alias module:finances_2024_06_19/model/TransactionsPayload
|
|
27
|
+
* @class
|
|
28
|
+
*/
|
|
29
|
+
constructor () {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a <code>TransactionsPayload</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/TransactionsPayload} obj Optional instance to populate.
|
|
37
|
+
* @return {module:finances_2024_06_19/model/TransactionsPayload} The populated <code>TransactionsPayload</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 TransactionsPayload()
|
|
53
|
+
if (data.hasOwnProperty('nextToken')) { obj.nextToken = ApiClient.convertToType(data.nextToken, 'String') }
|
|
54
|
+
if (data.hasOwnProperty('transactions')) { obj.transactions = ApiClient.convertToType(data.transactions, [Transaction]) }
|
|
55
|
+
}
|
|
56
|
+
return obj
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* When present and not empty, pass this string token in the next request to return the next response page.
|
|
62
|
+
* @member {String} nextToken
|
|
63
|
+
*/
|
|
64
|
+
TransactionsPayload.prototype.nextToken = undefined
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Contains transactions within a given time period.
|
|
68
|
+
* @member {Array.<module:finances_2024_06_19/model/Transaction>} transactions
|
|
69
|
+
*/
|
|
70
|
+
TransactionsPayload.prototype.transactions = undefined
|