Skip to content

Commit 31a1cd4

Browse files
authored
Improve automatic generation (#38)
* No diff * Remove private models * Bump version
1 parent d9bac10 commit 31a1cd4

File tree

4 files changed

+44
-4
lines changed

4 files changed

+44
-4
lines changed

Diff for: package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

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

Diff for: src/ApiClient.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ApiClient {
1616
};
1717

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

2222
/**

Diff for: src/model/CreateSuccessResponse.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* Patch API V1
3+
* The core API used to integrate with Patch's service
4+
*
5+
* Contact: [email protected]
6+
*/
7+
8+
import ApiClient from '../ApiClient';
9+
10+
class CreateSuccessResponse {
11+
constructor(success, error) {
12+
CreateSuccessResponse.initialize(this, success, error);
13+
}
14+
15+
static initialize(obj, success, error) {
16+
obj['success'] = success;
17+
obj['error'] = error;
18+
}
19+
20+
static constructFromObject(data, obj) {
21+
if (data) {
22+
obj = obj || new CreateSuccessResponse();
23+
24+
if (data.hasOwnProperty('success')) {
25+
obj['success'] = ApiClient.convertToType(data['success'], 'Boolean');
26+
}
27+
28+
if (data.hasOwnProperty('error')) {
29+
obj['error'] = ApiClient.convertToType(data['error'], Object);
30+
}
31+
}
32+
return obj;
33+
}
34+
}
35+
36+
CreateSuccessResponse.prototype['success'] = undefined;
37+
38+
CreateSuccessResponse.prototype['error'] = undefined;
39+
40+
export default CreateSuccessResponse;

0 commit comments

Comments
 (0)