@cirrobio/api-client 0.0.12-alpha → 0.0.13-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +1 -0
- package/README.md +1 -1
- package/dist/apis/BillingApi.d.ts +3 -3
- package/dist/apis/BillingApi.js +6 -6
- package/dist/models/BillingAccountRequest.d.ts +70 -0
- package/dist/models/BillingAccountRequest.js +71 -0
- package/dist/models/Contact.d.ts +4 -4
- package/dist/models/Contact.js +5 -8
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +11 -8
- package/src/models/BillingAccountRequest.ts +139 -0
- package/src/models/Contact.ts +8 -12
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @cirrobio/api-client@0.0.
|
|
39
|
+
npm install @cirrobio/api-client@0.0.13-alpha --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BillingAccount, CreateResponse } from '../models/index';
|
|
13
|
+
import type { BillingAccount, BillingAccountRequest, CreateResponse } from '../models/index';
|
|
14
14
|
export interface CreateBillingAccountRequest {
|
|
15
|
-
|
|
15
|
+
billingAccountRequest: BillingAccountRequest;
|
|
16
16
|
}
|
|
17
17
|
export interface DeleteBillingAccountRequest {
|
|
18
18
|
billingAccountId: string;
|
|
@@ -22,7 +22,7 @@ export interface GetBillingAccountsRequest {
|
|
|
22
22
|
}
|
|
23
23
|
export interface UpdateBillingAccountRequest {
|
|
24
24
|
billingAccountId: string;
|
|
25
|
-
|
|
25
|
+
billingAccountRequest: BillingAccountRequest;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
*
|
package/dist/apis/BillingApi.js
CHANGED
|
@@ -85,8 +85,8 @@ var BillingApi = /** @class */ (function (_super) {
|
|
|
85
85
|
return __generator(this, function (_a) {
|
|
86
86
|
switch (_a.label) {
|
|
87
87
|
case 0:
|
|
88
|
-
if (requestParameters.
|
|
89
|
-
throw new runtime.RequiredError('
|
|
88
|
+
if (requestParameters.billingAccountRequest === null || requestParameters.billingAccountRequest === undefined) {
|
|
89
|
+
throw new runtime.RequiredError('billingAccountRequest', 'Required parameter requestParameters.billingAccountRequest was null or undefined when calling createBillingAccount.');
|
|
90
90
|
}
|
|
91
91
|
queryParameters = {};
|
|
92
92
|
headerParameters = {};
|
|
@@ -105,7 +105,7 @@ var BillingApi = /** @class */ (function (_super) {
|
|
|
105
105
|
method: 'POST',
|
|
106
106
|
headers: headerParameters,
|
|
107
107
|
query: queryParameters,
|
|
108
|
-
body: (0, index_1.
|
|
108
|
+
body: (0, index_1.BillingAccountRequestToJSON)(requestParameters.billingAccountRequest),
|
|
109
109
|
}, initOverrides)];
|
|
110
110
|
case 3:
|
|
111
111
|
response = _a.sent();
|
|
@@ -304,8 +304,8 @@ var BillingApi = /** @class */ (function (_super) {
|
|
|
304
304
|
if (requestParameters.billingAccountId === null || requestParameters.billingAccountId === undefined) {
|
|
305
305
|
throw new runtime.RequiredError('billingAccountId', 'Required parameter requestParameters.billingAccountId was null or undefined when calling updateBillingAccount.');
|
|
306
306
|
}
|
|
307
|
-
if (requestParameters.
|
|
308
|
-
throw new runtime.RequiredError('
|
|
307
|
+
if (requestParameters.billingAccountRequest === null || requestParameters.billingAccountRequest === undefined) {
|
|
308
|
+
throw new runtime.RequiredError('billingAccountRequest', 'Required parameter requestParameters.billingAccountRequest was null or undefined when calling updateBillingAccount.');
|
|
309
309
|
}
|
|
310
310
|
queryParameters = {};
|
|
311
311
|
headerParameters = {};
|
|
@@ -324,7 +324,7 @@ var BillingApi = /** @class */ (function (_super) {
|
|
|
324
324
|
method: 'PUT',
|
|
325
325
|
headers: headerParameters,
|
|
326
326
|
query: queryParameters,
|
|
327
|
-
body: (0, index_1.
|
|
327
|
+
body: (0, index_1.BillingAccountRequestToJSON)(requestParameters.billingAccountRequest),
|
|
328
328
|
}, initOverrides)];
|
|
329
329
|
case 3:
|
|
330
330
|
response = _a.sent();
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cirro Data
|
|
3
|
+
* Cirro Data Platform service API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: latest
|
|
6
|
+
* Contact: support@cirro.bio
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { BillingMethod } from './BillingMethod';
|
|
13
|
+
import type { Contact } from './Contact';
|
|
14
|
+
import type { CustomerType } from './CustomerType';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface BillingAccountRequest
|
|
19
|
+
*/
|
|
20
|
+
export interface BillingAccountRequest {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof BillingAccountRequest
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {Array<Contact>}
|
|
30
|
+
* @memberof BillingAccountRequest
|
|
31
|
+
*/
|
|
32
|
+
contacts: Array<Contact>;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {CustomerType}
|
|
36
|
+
* @memberof BillingAccountRequest
|
|
37
|
+
*/
|
|
38
|
+
customerType: CustomerType;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {BillingMethod}
|
|
42
|
+
* @memberof BillingAccountRequest
|
|
43
|
+
*/
|
|
44
|
+
billingMethod: BillingMethod;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof BillingAccountRequest
|
|
49
|
+
*/
|
|
50
|
+
primaryBudgetNumber: string;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof BillingAccountRequest
|
|
55
|
+
*/
|
|
56
|
+
owner: string;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {Array<string>}
|
|
60
|
+
* @memberof BillingAccountRequest
|
|
61
|
+
*/
|
|
62
|
+
sharedWith: Array<string>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Check if a given object implements the BillingAccountRequest interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfBillingAccountRequest(value: object): boolean;
|
|
68
|
+
export declare function BillingAccountRequestFromJSON(json: any): BillingAccountRequest;
|
|
69
|
+
export declare function BillingAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingAccountRequest;
|
|
70
|
+
export declare function BillingAccountRequestToJSON(value?: BillingAccountRequest | null): any;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Cirro Data
|
|
6
|
+
* Cirro Data Platform service API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: latest
|
|
9
|
+
* Contact: support@cirro.bio
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.BillingAccountRequestToJSON = exports.BillingAccountRequestFromJSONTyped = exports.BillingAccountRequestFromJSON = exports.instanceOfBillingAccountRequest = void 0;
|
|
17
|
+
var BillingMethod_1 = require("./BillingMethod");
|
|
18
|
+
var Contact_1 = require("./Contact");
|
|
19
|
+
var CustomerType_1 = require("./CustomerType");
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the BillingAccountRequest interface.
|
|
22
|
+
*/
|
|
23
|
+
function instanceOfBillingAccountRequest(value) {
|
|
24
|
+
var isInstance = true;
|
|
25
|
+
isInstance = isInstance && "name" in value;
|
|
26
|
+
isInstance = isInstance && "contacts" in value;
|
|
27
|
+
isInstance = isInstance && "customerType" in value;
|
|
28
|
+
isInstance = isInstance && "billingMethod" in value;
|
|
29
|
+
isInstance = isInstance && "primaryBudgetNumber" in value;
|
|
30
|
+
isInstance = isInstance && "owner" in value;
|
|
31
|
+
isInstance = isInstance && "sharedWith" in value;
|
|
32
|
+
return isInstance;
|
|
33
|
+
}
|
|
34
|
+
exports.instanceOfBillingAccountRequest = instanceOfBillingAccountRequest;
|
|
35
|
+
function BillingAccountRequestFromJSON(json) {
|
|
36
|
+
return BillingAccountRequestFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
exports.BillingAccountRequestFromJSON = BillingAccountRequestFromJSON;
|
|
39
|
+
function BillingAccountRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if ((json === undefined) || (json === null)) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'name': json['name'],
|
|
45
|
+
'contacts': (json['contacts'].map(Contact_1.ContactFromJSON)),
|
|
46
|
+
'customerType': (0, CustomerType_1.CustomerTypeFromJSON)(json['customerType']),
|
|
47
|
+
'billingMethod': (0, BillingMethod_1.BillingMethodFromJSON)(json['billingMethod']),
|
|
48
|
+
'primaryBudgetNumber': json['primaryBudgetNumber'],
|
|
49
|
+
'owner': json['owner'],
|
|
50
|
+
'sharedWith': json['sharedWith'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.BillingAccountRequestFromJSONTyped = BillingAccountRequestFromJSONTyped;
|
|
54
|
+
function BillingAccountRequestToJSON(value) {
|
|
55
|
+
if (value === undefined) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
if (value === null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
'name': value.name,
|
|
63
|
+
'contacts': (value.contacts.map(Contact_1.ContactToJSON)),
|
|
64
|
+
'customerType': (0, CustomerType_1.CustomerTypeToJSON)(value.customerType),
|
|
65
|
+
'billingMethod': (0, BillingMethod_1.BillingMethodToJSON)(value.billingMethod),
|
|
66
|
+
'primaryBudgetNumber': value.primaryBudgetNumber,
|
|
67
|
+
'owner': value.owner,
|
|
68
|
+
'sharedWith': value.sharedWith,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
exports.BillingAccountRequestToJSON = BillingAccountRequestToJSON;
|
package/dist/models/Contact.d.ts
CHANGED
|
@@ -20,25 +20,25 @@ export interface Contact {
|
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof Contact
|
|
22
22
|
*/
|
|
23
|
-
name
|
|
23
|
+
name?: string;
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof Contact
|
|
28
28
|
*/
|
|
29
|
-
organization
|
|
29
|
+
organization?: string;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof Contact
|
|
34
34
|
*/
|
|
35
|
-
email
|
|
35
|
+
email?: string;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof Contact
|
|
40
40
|
*/
|
|
41
|
-
phone
|
|
41
|
+
phone?: string;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Check if a given object implements the Contact interface.
|
package/dist/models/Contact.js
CHANGED
|
@@ -14,15 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.ContactToJSON = exports.ContactFromJSONTyped = exports.ContactFromJSON = exports.instanceOfContact = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
17
18
|
/**
|
|
18
19
|
* Check if a given object implements the Contact interface.
|
|
19
20
|
*/
|
|
20
21
|
function instanceOfContact(value) {
|
|
21
22
|
var isInstance = true;
|
|
22
|
-
isInstance = isInstance && "name" in value;
|
|
23
|
-
isInstance = isInstance && "organization" in value;
|
|
24
|
-
isInstance = isInstance && "email" in value;
|
|
25
|
-
isInstance = isInstance && "phone" in value;
|
|
26
23
|
return isInstance;
|
|
27
24
|
}
|
|
28
25
|
exports.instanceOfContact = instanceOfContact;
|
|
@@ -35,10 +32,10 @@ function ContactFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
32
|
return json;
|
|
36
33
|
}
|
|
37
34
|
return {
|
|
38
|
-
'name': json['name'],
|
|
39
|
-
'organization': json['organization'],
|
|
40
|
-
'email': json['email'],
|
|
41
|
-
'phone': json['phone'],
|
|
35
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
36
|
+
'organization': !(0, runtime_1.exists)(json, 'organization') ? undefined : json['organization'],
|
|
37
|
+
'email': !(0, runtime_1.exists)(json, 'email') ? undefined : json['email'],
|
|
38
|
+
'phone': !(0, runtime_1.exists)(json, 'phone') ? undefined : json['phone'],
|
|
42
39
|
};
|
|
43
40
|
}
|
|
44
41
|
exports.ContactFromJSONTyped = ContactFromJSONTyped;
|
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./BillingAccount"), exports);
|
|
20
|
+
__exportStar(require("./BillingAccountRequest"), exports);
|
|
20
21
|
__exportStar(require("./BillingMethod"), exports);
|
|
21
22
|
__exportStar(require("./BudgetPeriod"), exports);
|
|
22
23
|
__exportStar(require("./CloudAccount"), exports);
|
package/package.json
CHANGED
package/src/apis/BillingApi.ts
CHANGED
|
@@ -16,17 +16,20 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
BillingAccount,
|
|
19
|
+
BillingAccountRequest,
|
|
19
20
|
CreateResponse,
|
|
20
21
|
} from '../models/index';
|
|
21
22
|
import {
|
|
22
23
|
BillingAccountFromJSON,
|
|
23
24
|
BillingAccountToJSON,
|
|
25
|
+
BillingAccountRequestFromJSON,
|
|
26
|
+
BillingAccountRequestToJSON,
|
|
24
27
|
CreateResponseFromJSON,
|
|
25
28
|
CreateResponseToJSON,
|
|
26
29
|
} from '../models/index';
|
|
27
30
|
|
|
28
31
|
export interface CreateBillingAccountRequest {
|
|
29
|
-
|
|
32
|
+
billingAccountRequest: BillingAccountRequest;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
export interface DeleteBillingAccountRequest {
|
|
@@ -39,7 +42,7 @@ export interface GetBillingAccountsRequest {
|
|
|
39
42
|
|
|
40
43
|
export interface UpdateBillingAccountRequest {
|
|
41
44
|
billingAccountId: string;
|
|
42
|
-
|
|
45
|
+
billingAccountRequest: BillingAccountRequest;
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
/**
|
|
@@ -52,8 +55,8 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
52
55
|
* Create billing account
|
|
53
56
|
*/
|
|
54
57
|
async createBillingAccountRaw(requestParameters: CreateBillingAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateResponse>> {
|
|
55
|
-
if (requestParameters.
|
|
56
|
-
throw new runtime.RequiredError('
|
|
58
|
+
if (requestParameters.billingAccountRequest === null || requestParameters.billingAccountRequest === undefined) {
|
|
59
|
+
throw new runtime.RequiredError('billingAccountRequest','Required parameter requestParameters.billingAccountRequest was null or undefined when calling createBillingAccount.');
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
const queryParameters: any = {};
|
|
@@ -75,7 +78,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
75
78
|
method: 'POST',
|
|
76
79
|
headers: headerParameters,
|
|
77
80
|
query: queryParameters,
|
|
78
|
-
body:
|
|
81
|
+
body: BillingAccountRequestToJSON(requestParameters.billingAccountRequest),
|
|
79
82
|
}, initOverrides);
|
|
80
83
|
|
|
81
84
|
return new runtime.JSONApiResponse(response, (jsonValue) => CreateResponseFromJSON(jsonValue));
|
|
@@ -213,8 +216,8 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
213
216
|
throw new runtime.RequiredError('billingAccountId','Required parameter requestParameters.billingAccountId was null or undefined when calling updateBillingAccount.');
|
|
214
217
|
}
|
|
215
218
|
|
|
216
|
-
if (requestParameters.
|
|
217
|
-
throw new runtime.RequiredError('
|
|
219
|
+
if (requestParameters.billingAccountRequest === null || requestParameters.billingAccountRequest === undefined) {
|
|
220
|
+
throw new runtime.RequiredError('billingAccountRequest','Required parameter requestParameters.billingAccountRequest was null or undefined when calling updateBillingAccount.');
|
|
218
221
|
}
|
|
219
222
|
|
|
220
223
|
const queryParameters: any = {};
|
|
@@ -236,7 +239,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
236
239
|
method: 'PUT',
|
|
237
240
|
headers: headerParameters,
|
|
238
241
|
query: queryParameters,
|
|
239
|
-
body:
|
|
242
|
+
body: BillingAccountRequestToJSON(requestParameters.billingAccountRequest),
|
|
240
243
|
}, initOverrides);
|
|
241
244
|
|
|
242
245
|
return new runtime.VoidApiResponse(response);
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Cirro Data
|
|
5
|
+
* Cirro Data Platform service API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: latest
|
|
8
|
+
* Contact: support@cirro.bio
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import type { BillingMethod } from './BillingMethod';
|
|
17
|
+
import {
|
|
18
|
+
BillingMethodFromJSON,
|
|
19
|
+
BillingMethodFromJSONTyped,
|
|
20
|
+
BillingMethodToJSON,
|
|
21
|
+
} from './BillingMethod';
|
|
22
|
+
import type { Contact } from './Contact';
|
|
23
|
+
import {
|
|
24
|
+
ContactFromJSON,
|
|
25
|
+
ContactFromJSONTyped,
|
|
26
|
+
ContactToJSON,
|
|
27
|
+
} from './Contact';
|
|
28
|
+
import type { CustomerType } from './CustomerType';
|
|
29
|
+
import {
|
|
30
|
+
CustomerTypeFromJSON,
|
|
31
|
+
CustomerTypeFromJSONTyped,
|
|
32
|
+
CustomerTypeToJSON,
|
|
33
|
+
} from './CustomerType';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @interface BillingAccountRequest
|
|
39
|
+
*/
|
|
40
|
+
export interface BillingAccountRequest {
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof BillingAccountRequest
|
|
45
|
+
*/
|
|
46
|
+
name: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {Array<Contact>}
|
|
50
|
+
* @memberof BillingAccountRequest
|
|
51
|
+
*/
|
|
52
|
+
contacts: Array<Contact>;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {CustomerType}
|
|
56
|
+
* @memberof BillingAccountRequest
|
|
57
|
+
*/
|
|
58
|
+
customerType: CustomerType;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {BillingMethod}
|
|
62
|
+
* @memberof BillingAccountRequest
|
|
63
|
+
*/
|
|
64
|
+
billingMethod: BillingMethod;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof BillingAccountRequest
|
|
69
|
+
*/
|
|
70
|
+
primaryBudgetNumber: string;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof BillingAccountRequest
|
|
75
|
+
*/
|
|
76
|
+
owner: string;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {Array<string>}
|
|
80
|
+
* @memberof BillingAccountRequest
|
|
81
|
+
*/
|
|
82
|
+
sharedWith: Array<string>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Check if a given object implements the BillingAccountRequest interface.
|
|
87
|
+
*/
|
|
88
|
+
export function instanceOfBillingAccountRequest(value: object): boolean {
|
|
89
|
+
let isInstance = true;
|
|
90
|
+
isInstance = isInstance && "name" in value;
|
|
91
|
+
isInstance = isInstance && "contacts" in value;
|
|
92
|
+
isInstance = isInstance && "customerType" in value;
|
|
93
|
+
isInstance = isInstance && "billingMethod" in value;
|
|
94
|
+
isInstance = isInstance && "primaryBudgetNumber" in value;
|
|
95
|
+
isInstance = isInstance && "owner" in value;
|
|
96
|
+
isInstance = isInstance && "sharedWith" in value;
|
|
97
|
+
|
|
98
|
+
return isInstance;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function BillingAccountRequestFromJSON(json: any): BillingAccountRequest {
|
|
102
|
+
return BillingAccountRequestFromJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function BillingAccountRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingAccountRequest {
|
|
106
|
+
if ((json === undefined) || (json === null)) {
|
|
107
|
+
return json;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'name': json['name'],
|
|
112
|
+
'contacts': ((json['contacts'] as Array<any>).map(ContactFromJSON)),
|
|
113
|
+
'customerType': CustomerTypeFromJSON(json['customerType']),
|
|
114
|
+
'billingMethod': BillingMethodFromJSON(json['billingMethod']),
|
|
115
|
+
'primaryBudgetNumber': json['primaryBudgetNumber'],
|
|
116
|
+
'owner': json['owner'],
|
|
117
|
+
'sharedWith': json['sharedWith'],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function BillingAccountRequestToJSON(value?: BillingAccountRequest | null): any {
|
|
122
|
+
if (value === undefined) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
if (value === null) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'name': value.name,
|
|
131
|
+
'contacts': ((value.contacts as Array<any>).map(ContactToJSON)),
|
|
132
|
+
'customerType': CustomerTypeToJSON(value.customerType),
|
|
133
|
+
'billingMethod': BillingMethodToJSON(value.billingMethod),
|
|
134
|
+
'primaryBudgetNumber': value.primaryBudgetNumber,
|
|
135
|
+
'owner': value.owner,
|
|
136
|
+
'sharedWith': value.sharedWith,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
package/src/models/Contact.ts
CHANGED
|
@@ -24,25 +24,25 @@ export interface Contact {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof Contact
|
|
26
26
|
*/
|
|
27
|
-
name
|
|
27
|
+
name?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof Contact
|
|
32
32
|
*/
|
|
33
|
-
organization
|
|
33
|
+
organization?: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof Contact
|
|
38
38
|
*/
|
|
39
|
-
email
|
|
39
|
+
email?: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof Contact
|
|
44
44
|
*/
|
|
45
|
-
phone
|
|
45
|
+
phone?: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -50,10 +50,6 @@ export interface Contact {
|
|
|
50
50
|
*/
|
|
51
51
|
export function instanceOfContact(value: object): boolean {
|
|
52
52
|
let isInstance = true;
|
|
53
|
-
isInstance = isInstance && "name" in value;
|
|
54
|
-
isInstance = isInstance && "organization" in value;
|
|
55
|
-
isInstance = isInstance && "email" in value;
|
|
56
|
-
isInstance = isInstance && "phone" in value;
|
|
57
53
|
|
|
58
54
|
return isInstance;
|
|
59
55
|
}
|
|
@@ -68,10 +64,10 @@ export function ContactFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
|
|
|
68
64
|
}
|
|
69
65
|
return {
|
|
70
66
|
|
|
71
|
-
'name': json['name'],
|
|
72
|
-
'organization': json['organization'],
|
|
73
|
-
'email': json['email'],
|
|
74
|
-
'phone': json['phone'],
|
|
67
|
+
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
68
|
+
'organization': !exists(json, 'organization') ? undefined : json['organization'],
|
|
69
|
+
'email': !exists(json, 'email') ? undefined : json['email'],
|
|
70
|
+
'phone': !exists(json, 'phone') ? undefined : json['phone'],
|
|
75
71
|
};
|
|
76
72
|
}
|
|
77
73
|
|