Skip to content

Commit 528a953

Browse files
authored
Update SDK to make order allocations array optional (#57)
1 parent 96fd639 commit 528a953

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.17.0] - 2022-01-11
9+
10+
### Changed
11+
12+
- Set the order allocatations array as optional.
13+
814
## [1.16.1] - 2022-01-07
915

1016
### Changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patch-technology/patch",
3-
"version": "1.16.1",
3+
"version": "1.17.0",
44
"description": "Node.js wrapper for the Patch API",
55
"license": "MIT",
66
"repository": {

src/ApiClient.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import superagent from 'superagent';
99
import querystring from 'query-string';
1010

1111
class ApiClient {
12-
constructor(basePath = 'https://api.patch.io') {
13-
this.basePath = basePath.replace(/\/+$/, '');
12+
constructor() {
13+
this.basePath = 'https://api.patch.io'.replace(/\/+$/, '');
1414
this.authentications = {
1515
bearer_auth: { type: 'bearer' }
1616
};
1717

1818
this.defaultHeaders = {
19-
'User-Agent': 'patch-node/1.16.1'
19+
'User-Agent': 'patch-node/1.17.0'
2020
};
2121

2222
/**

src/model/Order.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class Order {
1717
allocationState,
1818
priceCentsUsd,
1919
patchFeeCentsUsd,
20-
allocations,
2120
metadata
2221
) {
2322
Order.initialize(
@@ -29,7 +28,6 @@ class Order {
2928
allocationState,
3029
priceCentsUsd,
3130
patchFeeCentsUsd,
32-
allocations,
3331
metadata
3432
);
3533
}
@@ -43,7 +41,6 @@ class Order {
4341
allocationState,
4442
priceCentsUsd,
4543
patchFeeCentsUsd,
46-
allocations,
4744
metadata
4845
) {
4946
obj['id'] = id;
@@ -53,7 +50,6 @@ class Order {
5350
obj['allocation_state'] = allocationState;
5451
obj['price_cents_usd'] = priceCentsUsd;
5552
obj['patch_fee_cents_usd'] = patchFeeCentsUsd;
56-
obj['allocations'] = allocations;
5753
obj['metadata'] = metadata;
5854
}
5955

0 commit comments

Comments
 (0)