Skip to content

Commit edc1f3b

Browse files
committed
Release 2.4.2
1 parent 03132ab commit edc1f3b

Some content is hidden

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

42 files changed

+505
-719
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [v2.4.2](https://github.com/uphold/uphold-sdk-javascript/releases/tag/v2.4.2) (2020-05-19)
4+
- Fix sorting on paginator [\#34](https://github.com/uphold/uphold-sdk-javascript/pull/34) ([pgom](https://github.com/pgom))
5+
- Update dependencies [\#33](https://github.com/uphold/uphold-sdk-javascript/pull/33) ([heberbranco](https://github.com/heberbranco))
6+
37
## [v2.4.1](https://github.com/uphold/uphold-sdk-javascript/releases/tag/v2.4.1) (2020-04-14)
48
- Remove user-agent default header [\#31](https://github.com/uphold/uphold-sdk-javascript/pull/31) ([pgom](https://github.com/pgom))
59

dist/browser/uphold-sdk-javascript.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core/actions/account.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
'use strict';
1+
"use strict";
22

3-
Object.defineProperty(exports, "__esModule", {
4-
value: true
5-
});
3+
exports.__esModule = true;
64
exports.getAccount = getAccount;
75
exports.getAccounts = getAccounts;
6+
87
function getAccount(accountId, options) {
98
return this.api(`/me/accounts/${accountId}`, options);
109
}

dist/core/actions/card-address.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
'use strict';
1+
"use strict";
22

3-
Object.defineProperty(exports, "__esModule", {
4-
value: true
5-
});
3+
exports.__esModule = true;
64
exports.createCardAddress = createCardAddress;
75
exports.getCardAddresses = getCardAddresses;
86

9-
var _lodash = require('lodash.merge');
10-
11-
var _lodash2 = _interopRequireDefault(_lodash);
7+
var _merge = _interopRequireDefault(require("lodash/merge"));
128

139
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1410

1511
function createCardAddress(cardId, network, options) {
16-
return this.api(`/me/cards/${cardId}/addresses`, (0, _lodash2.default)({
12+
return this.api(`/me/cards/${cardId}/addresses`, (0, _merge.default)({
1713
body: {
18-
network: network
14+
network
1915
},
2016
method: 'post'
2117
}, options));
Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,75 @@
1-
'use strict';
2-
3-
Object.defineProperty(exports, "__esModule", {
4-
value: true
5-
});
6-
7-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1+
"use strict";
82

3+
exports.__esModule = true;
94
exports.cancelCardTransaction = cancelCardTransaction;
105
exports.commitCardTransaction = commitCardTransaction;
116
exports.createCardTransaction = createCardTransaction;
127
exports.getCardTransactions = getCardTransactions;
138
exports.resendCardTransaction = resendCardTransaction;
149

15-
var _lodash = require('lodash.merge');
16-
17-
var _lodash2 = _interopRequireDefault(_lodash);
10+
var _merge = _interopRequireDefault(require("lodash/merge"));
1811

1912
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2013

2114
function cancelCardTransaction(cardId, transactionId, options) {
22-
return this.api(`/me/cards/${cardId}/transactions/${transactionId}/cancel`, _extends({
15+
return this.api(`/me/cards/${cardId}/transactions/${transactionId}/cancel`, Object.assign({
2316
method: 'post'
2417
}, options));
25-
}
18+
} // eslint-disable-next-line max-params
2619

27-
// eslint-disable-next-line max-params
28-
function commitCardTransaction(cardId, transactionId, _ref, otp, options) {
29-
let message = _ref.message,
30-
securityCode = _ref.securityCode;
3120

32-
options = (0, _lodash2.default)({
21+
function commitCardTransaction(cardId, transactionId, {
22+
message,
23+
securityCode
24+
}, otp, options) {
25+
options = (0, _merge.default)({
3326
body: {
34-
message: message,
35-
securityCode: securityCode
27+
message,
28+
securityCode
3629
},
3730
method: 'post'
3831
}, options);
3932

4033
if (otp) {
41-
options.headers = _extends({
34+
options.headers = Object.assign({
4235
'otp-token': otp
4336
}, options.headers);
4437
}
4538

4639
return this.api(`/me/cards/${cardId}/transactions/${transactionId}/commit`, options);
47-
}
48-
49-
// eslint-disable-next-line max-params
50-
function createCardTransaction(cardId, _ref2, commit, otp, options) {
51-
let amount = _ref2.amount,
52-
currency = _ref2.currency,
53-
destination = _ref2.destination,
54-
origin = _ref2.origin,
55-
message = _ref2.message,
56-
securityCode = _ref2.securityCode;
57-
58-
options = (0, _lodash2.default)({
40+
} // eslint-disable-next-line max-params
41+
42+
43+
function createCardTransaction(cardId, {
44+
amount,
45+
currency,
46+
destination,
47+
message,
48+
origin,
49+
securityCode
50+
}, commit, otp, options) {
51+
options = (0, _merge.default)({
5952
body: {
6053
denomination: {
61-
amount: amount,
62-
currency: currency
54+
amount,
55+
currency
6356
},
64-
destination: destination,
65-
message: message,
66-
origin: origin,
67-
securityCode: securityCode
57+
destination,
58+
message,
59+
origin,
60+
securityCode
6861
},
6962
method: 'post'
7063
}, options);
7164

7265
if (commit) {
73-
options.queryParams = _extends({
66+
options.queryParams = Object.assign({
7467
commit: true
7568
}, options.queryParams);
7669
}
7770

7871
if (otp) {
79-
options.headers = _extends({
72+
options.headers = Object.assign({
8073
'otp-token': otp
8174
}, options.headers);
8275
}
@@ -89,7 +82,7 @@ function getCardTransactions(cardId, page, itemsPerPage, options) {
8982
}
9083

9184
function resendCardTransaction(cardId, transactionId, options) {
92-
return this.api(`/me/cards/${cardId}/transactions/${transactionId}/resend`, _extends({
85+
return this.api(`/me/cards/${cardId}/transactions/${transactionId}/resend`, Object.assign({
9386
method: 'post'
9487
}, options));
9588
}

dist/core/actions/card.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
'use strict';
1+
"use strict";
22

3-
Object.defineProperty(exports, "__esModule", {
4-
value: true
5-
});
3+
exports.__esModule = true;
64
exports.createCard = createCard;
75
exports.getCard = getCard;
86
exports.getCards = getCards;
97
exports.updateCard = updateCard;
108

11-
var _lodash = require('lodash.merge');
12-
13-
var _lodash2 = _interopRequireDefault(_lodash);
9+
var _merge = _interopRequireDefault(require("lodash/merge"));
1410

1511
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1612

1713
function createCard(currency, label, options) {
18-
return this.api('/me/cards', (0, _lodash2.default)({
14+
return this.api('/me/cards', (0, _merge.default)({
1915
body: {
20-
currency: currency,
21-
label: label
16+
currency,
17+
label
2218
},
2319
method: 'post'
2420
}, options));
@@ -33,9 +29,9 @@ function getCards(page, itemsPerPage, options) {
3329
}
3430

3531
function updateCard(cardId, label, options) {
36-
return this.api(`/me/cards/${cardId}`, (0, _lodash2.default)({
32+
return this.api(`/me/cards/${cardId}`, (0, _merge.default)({
3733
body: {
38-
label: label
34+
label
3935
},
4036
method: 'patch'
4137
}, options));

dist/core/actions/contact.js

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
1-
'use strict';
1+
"use strict";
22

3-
Object.defineProperty(exports, "__esModule", {
4-
value: true
5-
});
3+
exports.__esModule = true;
64
exports.createContact = createContact;
75
exports.getContact = getContact;
86
exports.getContacts = getContacts;
97
exports.updateContact = updateContact;
108

11-
var _lodash = require('lodash.merge');
12-
13-
var _lodash2 = _interopRequireDefault(_lodash);
9+
var _merge = _interopRequireDefault(require("lodash/merge"));
1410

1511
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1612

17-
function createContact(_ref, options) {
18-
let addresses = _ref.addresses,
19-
company = _ref.company,
20-
emails = _ref.emails,
21-
firstName = _ref.firstName,
22-
lastName = _ref.lastName;
23-
24-
return this.api('/me/contacts', (0, _lodash2.default)({
13+
function createContact({
14+
addresses,
15+
company,
16+
emails,
17+
firstName,
18+
lastName
19+
}, options) {
20+
return this.api('/me/contacts', (0, _merge.default)({
2521
body: {
26-
addresses: addresses,
27-
company: company,
28-
emails: emails,
29-
firstName: firstName,
30-
lastName: lastName
22+
addresses,
23+
company,
24+
emails,
25+
firstName,
26+
lastName
3127
},
3228
method: 'post'
3329
}, options));
@@ -41,20 +37,20 @@ function getContacts(options) {
4137
return this.api('/me/contacts', options);
4238
}
4339

44-
function updateContact(contactId, _ref2, options) {
45-
let addresses = _ref2.addresses,
46-
company = _ref2.company,
47-
emails = _ref2.emails,
48-
firstName = _ref2.firstName,
49-
lastName = _ref2.lastName;
50-
51-
return this.api(`/me/contacts/${contactId}`, (0, _lodash2.default)({
40+
function updateContact(contactId, {
41+
addresses,
42+
company,
43+
emails,
44+
firstName,
45+
lastName
46+
}, options) {
47+
return this.api(`/me/contacts/${contactId}`, (0, _merge.default)({
5248
body: {
53-
addresses: addresses,
54-
company: company,
55-
emails: emails,
56-
firstName: firstName,
57-
lastName: lastName
49+
addresses,
50+
company,
51+
emails,
52+
firstName,
53+
lastName
5854
},
5955
method: 'patch'
6056
}, options));

dist/core/actions/document.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
'use strict';
1+
"use strict";
22

3-
Object.defineProperty(exports, "__esModule", {
4-
value: true
5-
});
3+
exports.__esModule = true;
64
exports.createDocument = createDocument;
75
exports.getDocuments = getDocuments;
86

9-
var _lodash = require('lodash.merge');
10-
11-
var _lodash2 = _interopRequireDefault(_lodash);
7+
var _merge = _interopRequireDefault(require("lodash/merge"));
128

139
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1410

1511
function createDocument(type, value, options) {
16-
return this.api('/me/documents', (0, _lodash2.default)({
12+
return this.api('/me/documents', (0, _merge.default)({
1713
body: {
18-
type: type,
19-
value: value
14+
type,
15+
value
2016
},
2117
method: 'post'
2218
}, options));

0 commit comments

Comments
 (0)