-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds project_id to orders and estimates (#3)
* update readme * regenerated code * bump version to 1.1.0
- Loading branch information
Showing
43 changed files
with
1,022 additions
and
773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# OpenAPI Code gen artifacts | ||
.openapi-generator | ||
.openapi-generator-ignore | ||
/node_modules | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dist | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
"trailingComma": "none", | ||
"semi": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [1.1.0] - 2020-08-19 | ||
|
||
### Added | ||
|
||
- `project_id` optional field to `order` creation | ||
- `metadata` optional field to `order` creation | ||
- `project_id` optional field to `estimate` creation | ||
- changelog file | ||
|
||
## [1.0.0] - 2020-07-31 | ||
|
||
### Added | ||
|
||
- This is the first official release of Patch's Node library. | ||
|
||
## [1.0.0-rc.2] - 2020-07-30 | ||
|
||
### Added | ||
|
||
- Pre-commit styling with Prettier | ||
|
||
### Changed | ||
|
||
- Corrects readme usage instructions | ||
- Upgrades old version of superagent | ||
|
||
### Removed | ||
|
||
- Removes @babel/cli as a dependency | ||
|
||
## [1.0.0-rc.1] - 2020-07-29 | ||
|
||
### Added | ||
|
||
- Patch's first pre-release of our core javascript client library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de | |
* Contact: [email protected] | ||
*/ | ||
class Allocation { | ||
constructor() { | ||
Allocation.initialize(this); | ||
constructor(id, production, massG) { | ||
Allocation.initialize(this, id, production, massG); | ||
} | ||
|
||
static initialize(obj) {} | ||
static initialize(obj, id, production, massG) { | ||
obj['id'] = id; | ||
obj['production'] = production; | ||
obj['mass_g'] = massG; | ||
} | ||
|
||
static constructFromObject(data, obj) { | ||
if (data) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de | |
* Contact: [email protected] | ||
*/ | ||
class Estimate { | ||
constructor() { | ||
Estimate.initialize(this); | ||
constructor(id, production, type) { | ||
Estimate.initialize(this, id, production, type); | ||
} | ||
|
||
static initialize(obj) {} | ||
static initialize(obj, id, production, type) { | ||
obj['id'] = id; | ||
obj['production'] = production; | ||
obj['type'] = type; | ||
} | ||
|
||
static constructFromObject(data, obj) { | ||
if (data) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,20 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de | |
* Contact: [email protected] | ||
*/ | ||
class Order { | ||
constructor() { | ||
Order.initialize(this); | ||
constructor(id, massG, production, state, allocationState, priceCentsUsd, allocations, metadata) { | ||
Order.initialize(this, id, massG, production, state, allocationState, priceCentsUsd, allocations, metadata); | ||
} | ||
|
||
static initialize(obj) {} | ||
static initialize(obj, id, massG, production, state, allocationState, priceCentsUsd, allocations, metadata) { | ||
obj['id'] = id; | ||
obj['mass_g'] = massG; | ||
obj['production'] = production; | ||
obj['state'] = state; | ||
obj['allocation_state'] = allocationState; | ||
obj['price_cents_usd'] = priceCentsUsd; | ||
obj['allocations'] = allocations; | ||
obj['metadata'] = metadata; | ||
} | ||
|
||
static constructFromObject(data, obj) { | ||
if (data) { | ||
|
@@ -55,6 +64,10 @@ class Order { | |
if (data.hasOwnProperty('allocations')) { | ||
obj['allocations'] = _ApiClient.default.convertToType(data['allocations'], [_Allocation.default]); | ||
} | ||
|
||
if (data.hasOwnProperty('metadata')) { | ||
obj['metadata'] = _ApiClient.default.convertToType(data['metadata'], Object); | ||
} | ||
} | ||
|
||
return obj; | ||
|
@@ -69,5 +82,6 @@ Order.prototype['state'] = undefined; | |
Order.prototype['allocation_state'] = undefined; | ||
Order.prototype['price_cents_usd'] = undefined; | ||
Order.prototype['allocations'] = undefined; | ||
Order.prototype['metadata'] = undefined; | ||
var _default = Order; | ||
exports.default = _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de | |
* Contact: [email protected] | ||
*/ | ||
class Preference { | ||
constructor() { | ||
Preference.initialize(this); | ||
constructor(id, allocationPercentage, project) { | ||
Preference.initialize(this, id, allocationPercentage, project); | ||
} | ||
|
||
static initialize(obj) {} | ||
static initialize(obj, id, allocationPercentage, project) { | ||
obj['id'] = id; | ||
obj['allocation_percentage'] = allocationPercentage; | ||
obj['project'] = project; | ||
} | ||
|
||
static constructFromObject(data, obj) { | ||
if (data) { | ||
|
Oops, something went wrong.