checkout-sdk-node
Advanced tools
Comparing version 1.0.18 to 1.0.19
@@ -1,1 +0,1 @@ | ||
{"processes":{"45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a":{"parent":"ea796444-d4ce-459b-9abc-c6271d38441a","children":[]},"ea796444-d4ce-459b-9abc-c6271d38441a":{"parent":null,"children":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"]}},"files":{"/home/travis/build/checkout/checkout-sdk-node/src/services/errors.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/config.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/services/http.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/services/validation.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/payments/payments.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/sources/sources.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/tokens/tokens.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/instruments/instruments.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/webhooks/webhooks.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/events/events.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/disputes/disputes.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/files/files.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/reconciliation/reconciliation.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/customers/customers.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/api/hosted-payments/hosted-payments.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/Checkout.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"],"/home/travis/build/checkout/checkout-sdk-node/src/index.js":["45e373fd-e5cb-4b5c-9b4c-ec4abcd4735a"]},"externalIds":{}} | ||
{"processes":{"0a833763-a3b3-4204-bbfd-382a541ea5aa":{"parent":null,"children":["98e49427-0680-40d9-9977-d985e41d0bf5"]},"98e49427-0680-40d9-9977-d985e41d0bf5":{"parent":"0a833763-a3b3-4204-bbfd-382a541ea5aa","children":[]}},"files":{"/home/travis/build/checkout/checkout-sdk-node/src/services/errors.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/config.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/services/http.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/services/validation.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/payments/payments.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/sources/sources.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/tokens/tokens.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/instruments/instruments.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/webhooks/webhooks.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/events/events.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/disputes/disputes.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/files/files.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/reconciliation/reconciliation.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/customers/customers.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/api/hosted-payments/hosted-payments.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/Checkout.js":["98e49427-0680-40d9-9977-d985e41d0bf5"],"/home/travis/build/checkout/checkout-sdk-node/src/index.js":["98e49427-0680-40d9-9977-d985e41d0bf5"]},"externalIds":{}} |
@@ -10,2 +10,6 @@ import { config } from '../../Checkout'; | ||
getStatementCsv: (statementId: String) => Promise<Object>; | ||
getPaymentsActions: (body: Object) => Promise<Object>; | ||
getPaymentsAction: (actionId: String) => Promise<Object>; | ||
getPaymentsActionsCsv: (body: Object) => Promise<Object>; | ||
getAction: (actionId: String) => Promise<Object>; | ||
} |
@@ -120,3 +120,3 @@ "use strict"; | ||
* @param {Object} body Reconciliation request body. | ||
* @return {Promise<Object>} A promise to the request reconciliation response. | ||
* @return {Promise<Buffer>} A promise to the request reconciliation response. | ||
*/ | ||
@@ -200,3 +200,3 @@ | ||
* @param {String} statementId Statement id. | ||
* @return {Promise<Object>} A promise to the request reconciliation response. | ||
* @return {Promise<Buffer>} A promise to the request reconciliation response. | ||
*/ | ||
@@ -228,3 +228,142 @@ | ||
} | ||
/** | ||
* Returns all associated payment actions that impact your balance within the parameters you specify | ||
* | ||
* @memberof Reconciliation | ||
* @param {Object} body Reconciliation request body. | ||
* @return {Promise<Object>} A promise to the request reconciliation response. | ||
*/ | ||
getPaymentsActions(body) { | ||
var _this6 = this; | ||
return _asyncToGenerator(function* () { | ||
try { | ||
let url = `${_this6.config.host}/reporting/actions`; | ||
if (body) { | ||
const queryString = Object.keys(body).map(key => `${key}=${body[key]}`).join('&'); | ||
url += `?${queryString}`; | ||
} | ||
const response = yield (0, _http.default)(_nodeFetch.default, { | ||
timeout: _this6.config.timeout, | ||
agent: _this6.config.agent | ||
}, { | ||
method: 'get', | ||
url, | ||
headers: { | ||
Authorization: _this6.config.sk | ||
} | ||
}); | ||
return yield response.json; | ||
} catch (err) { | ||
const error = yield (0, _errors.determineError)(err); | ||
throw error; | ||
} | ||
})(); | ||
} | ||
/** | ||
* Returns the reconciliation data of the payment action | ||
* | ||
* @memberof Reconciliation | ||
* @param {String} actionsId Action id. | ||
* @return {Promise<Object>} A promise to the request reconciliation response. | ||
*/ | ||
getPaymentsAction(actionsId) { | ||
var _this7 = this; | ||
return _asyncToGenerator(function* () { | ||
try { | ||
const response = yield (0, _http.default)(_nodeFetch.default, { | ||
timeout: _this7.config.timeout, | ||
agent: _this7.config.agent | ||
}, { | ||
method: 'get', | ||
url: `${_this7.config.host}/reporting/payments/actions/${actionsId}`, | ||
headers: { | ||
Authorization: _this7.config.sk | ||
} | ||
}); | ||
return yield response.json; | ||
} catch (err) { | ||
const error = yield (0, _errors.determineError)(err); | ||
throw error; | ||
} | ||
})(); | ||
} | ||
/** | ||
* Returns a CSV report containing all payments within your specified parameters | ||
* | ||
* @memberof Reconciliation | ||
* @param {Object} body Reconciliation request body. | ||
* @return {Promise<Buffer>} A promise to the request reconciliation response. | ||
*/ | ||
getPaymentsActionsCsv(body) { | ||
var _this8 = this; | ||
return _asyncToGenerator(function* () { | ||
try { | ||
let url = `${_this8.config.host}/reporting/actions/download`; | ||
if (body) { | ||
const queryString = Object.keys(body).map(key => `${key}=${body[key]}`).join('&'); | ||
url += `?${queryString}`; | ||
} | ||
const response = yield (0, _http.default)(_nodeFetch.default, { | ||
timeout: _this8.config.timeout, | ||
agent: _this8.config.agent, | ||
csv: true | ||
}, { | ||
method: 'get', | ||
url, | ||
headers: { | ||
Authorization: _this8.config.sk | ||
} | ||
}); | ||
return yield response.csv; | ||
} catch (err) { | ||
const error = yield (0, _errors.determineError)(err); | ||
throw error; | ||
} | ||
})(); | ||
} | ||
/** | ||
* Returns the reconciliation data of a payment action | ||
* | ||
* @memberof Reconciliation | ||
* @param {String} actionId Action id. | ||
* @return {Promise<Object>} A promise to the request reconciliation response. | ||
*/ | ||
getAction(actionId) { | ||
var _this9 = this; | ||
return _asyncToGenerator(function* () { | ||
try { | ||
const response = yield (0, _http.default)(_nodeFetch.default, { | ||
timeout: _this9.config.timeout, | ||
agent: _this9.config.agent | ||
}, { | ||
method: 'get', | ||
url: `${_this9.config.host}/reporting/actions/${actionId}`, | ||
headers: { | ||
Authorization: _this9.config.sk | ||
} | ||
}); | ||
return yield response.json; | ||
} catch (err) { | ||
const error = yield (0, _errors.determineError)(err); | ||
throw error; | ||
} | ||
})(); | ||
} | ||
} | ||
@@ -231,0 +370,0 @@ |
{ | ||
"name": "checkout-sdk-node", | ||
"version": "1.0.18", | ||
"version": "1.0.19", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
296434
2487