@equisoft/equisoft-connect-sdk-typescript 13.9.0 → 13.9.1-snapshot.20240714042739

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.
@@ -46,6 +46,7 @@ src/models/ContextUser.ts
46
46
  src/models/ContextUserContext.ts
47
47
  src/models/CredentialDto.ts
48
48
  src/models/CredentialsResponse.ts
49
+ src/models/DatabaseDatabaseChargebeeCustomerCreatedResponse.ts
49
50
  src/models/DatabaseSetDistributorPayload.ts
50
51
  src/models/DatabaseState.ts
51
52
  src/models/DatabaseUpdateStatePayload.ts
package/.tool-versions CHANGED
@@ -1,3 +1,3 @@
1
1
  java temurin-17.0.11+9
2
- nodejs 20.15.0
2
+ nodejs 20.15.1
3
3
  yarn 1.22.4
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { DatabaseSetDistributorPayload, DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
13
+ import type { DatabaseDatabaseChargebeeCustomerCreatedResponse, DatabaseSetDistributorPayload, DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
14
+ export interface CreateChargebeeCustomerRequest {
15
+ databaseUuid: string;
16
+ }
14
17
  export interface GetDatabaseRequest {
15
18
  databaseUuid: string;
16
19
  }
@@ -45,6 +48,14 @@ export interface UpdateUserRequest {
45
48
  *
46
49
  */
47
50
  export declare class DatabasesApi extends runtime.BaseAPI {
51
+ /**
52
+ * Create a ChargeBee customer for the database
53
+ */
54
+ createChargebeeCustomerRaw(requestParameters: CreateChargebeeCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DatabaseDatabaseChargebeeCustomerCreatedResponse>>;
55
+ /**
56
+ * Create a ChargeBee customer for the database
57
+ */
58
+ createChargebeeCustomer(requestParameters: CreateChargebeeCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DatabaseDatabaseChargebeeCustomerCreatedResponse>;
48
59
  /**
49
60
  * Get a database
50
61
  */
@@ -29,6 +29,42 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class DatabasesApi extends runtime.BaseAPI {
32
+ /**
33
+ * Create a ChargeBee customer for the database
34
+ */
35
+ createChargebeeCustomerRaw(requestParameters, initOverrides) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters.databaseUuid === null || requestParameters.databaseUuid === undefined) {
38
+ throw new runtime.RequiredError('databaseUuid', 'Required parameter requestParameters.databaseUuid was null or undefined when calling createChargebeeCustomer.');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ if (this.configuration && this.configuration.accessToken) {
43
+ // oauth required
44
+ const token = this.configuration.accessToken;
45
+ const tokenString = yield token("OAuth2", ["crm:database"]);
46
+ if (tokenString) {
47
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
48
+ }
49
+ }
50
+ const response = yield this.request({
51
+ path: `/crm/api/v1/databases/{databaseUuid}/chargebeeCustomer`.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters.databaseUuid))),
52
+ method: 'POST',
53
+ headers: headerParameters,
54
+ query: queryParameters,
55
+ }, initOverrides);
56
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON)(jsonValue));
57
+ });
58
+ }
59
+ /**
60
+ * Create a ChargeBee customer for the database
61
+ */
62
+ createChargebeeCustomer(requestParameters, initOverrides) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ const response = yield this.createChargebeeCustomerRaw(requestParameters, initOverrides);
65
+ return yield response.value();
66
+ });
67
+ }
32
68
  /**
33
69
  * Get a database
34
70
  */
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { DatabaseSetDistributorPayload, DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
13
+ import type { DatabaseDatabaseChargebeeCustomerCreatedResponse, DatabaseSetDistributorPayload, DatabaseUpdateStatePayload, DatabasesDatabase, DatabasesListDatabasesResponse, UsersListUsersResponse, UsersUpdateUserPayload, UsersUser } from '../models/index';
14
+ export interface CreateChargebeeCustomerRequest {
15
+ databaseUuid: string;
16
+ }
14
17
  export interface GetDatabaseRequest {
15
18
  databaseUuid: string;
16
19
  }
@@ -45,6 +48,14 @@ export interface UpdateUserRequest {
45
48
  *
46
49
  */
47
50
  export declare class DatabasesApi extends runtime.BaseAPI {
51
+ /**
52
+ * Create a ChargeBee customer for the database
53
+ */
54
+ createChargebeeCustomerRaw(requestParameters: CreateChargebeeCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DatabaseDatabaseChargebeeCustomerCreatedResponse>>;
55
+ /**
56
+ * Create a ChargeBee customer for the database
57
+ */
58
+ createChargebeeCustomer(requestParameters: CreateChargebeeCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DatabaseDatabaseChargebeeCustomerCreatedResponse>;
48
59
  /**
49
60
  * Get a database
50
61
  */
@@ -21,11 +21,47 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { DatabaseSetDistributorPayloadToJSON, DatabaseUpdateStatePayloadToJSON, DatabasesDatabaseFromJSON, DatabasesListDatabasesResponseFromJSON, UsersListUsersResponseFromJSON, UsersUpdateUserPayloadToJSON, UsersUserFromJSON, } from '../models/index';
24
+ import { DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON, DatabaseSetDistributorPayloadToJSON, DatabaseUpdateStatePayloadToJSON, DatabasesDatabaseFromJSON, DatabasesListDatabasesResponseFromJSON, UsersListUsersResponseFromJSON, UsersUpdateUserPayloadToJSON, UsersUserFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class DatabasesApi extends runtime.BaseAPI {
29
+ /**
30
+ * Create a ChargeBee customer for the database
31
+ */
32
+ createChargebeeCustomerRaw(requestParameters, initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters.databaseUuid === null || requestParameters.databaseUuid === undefined) {
35
+ throw new runtime.RequiredError('databaseUuid', 'Required parameter requestParameters.databaseUuid was null or undefined when calling createChargebeeCustomer.');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ if (this.configuration && this.configuration.accessToken) {
40
+ // oauth required
41
+ const token = this.configuration.accessToken;
42
+ const tokenString = yield token("OAuth2", ["crm:database"]);
43
+ if (tokenString) {
44
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
45
+ }
46
+ }
47
+ const response = yield this.request({
48
+ path: `/crm/api/v1/databases/{databaseUuid}/chargebeeCustomer`.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters.databaseUuid))),
49
+ method: 'POST',
50
+ headers: headerParameters,
51
+ query: queryParameters,
52
+ }, initOverrides);
53
+ return new runtime.JSONApiResponse(response, (jsonValue) => DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON(jsonValue));
54
+ });
55
+ }
56
+ /**
57
+ * Create a ChargeBee customer for the database
58
+ */
59
+ createChargebeeCustomer(requestParameters, initOverrides) {
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ const response = yield this.createChargebeeCustomerRaw(requestParameters, initOverrides);
62
+ return yield response.value();
63
+ });
64
+ }
29
65
  /**
30
66
  * Get a database
31
67
  */
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Equisoft /connect API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface DatabaseDatabaseChargebeeCustomerCreatedResponse
16
+ */
17
+ export interface DatabaseDatabaseChargebeeCustomerCreatedResponse {
18
+ /**
19
+ * Created ChargeBee customer ID
20
+ * @type {string}
21
+ * @memberof DatabaseDatabaseChargebeeCustomerCreatedResponse
22
+ */
23
+ chargebeeCustomerId: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the DatabaseDatabaseChargebeeCustomerCreatedResponse interface.
27
+ */
28
+ export declare function instanceOfDatabaseDatabaseChargebeeCustomerCreatedResponse(value: object): boolean;
29
+ export declare function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON(json: any): DatabaseDatabaseChargebeeCustomerCreatedResponse;
30
+ export declare function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatabaseDatabaseChargebeeCustomerCreatedResponse;
31
+ export declare function DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON(value?: DatabaseDatabaseChargebeeCustomerCreatedResponse | null): any;
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Equisoft /connect API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
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
+ * Check if a given object implements the DatabaseDatabaseChargebeeCustomerCreatedResponse interface.
16
+ */
17
+ export function instanceOfDatabaseDatabaseChargebeeCustomerCreatedResponse(value) {
18
+ let isInstance = true;
19
+ isInstance = isInstance && "chargebeeCustomerId" in value;
20
+ return isInstance;
21
+ }
22
+ export function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON(json) {
23
+ return DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped(json, false);
24
+ }
25
+ export function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped(json, ignoreDiscriminator) {
26
+ if ((json === undefined) || (json === null)) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'chargebeeCustomerId': json['chargebeeCustomerId'],
31
+ };
32
+ }
33
+ export function DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON(value) {
34
+ if (value === undefined) {
35
+ return undefined;
36
+ }
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return {
41
+ 'chargebeeCustomerId': value.chargebeeCustomerId,
42
+ };
43
+ }
@@ -27,6 +27,12 @@ export interface ErrorResponse {
27
27
  * @memberof ErrorResponse
28
28
  */
29
29
  errorDescription?: string | null;
30
+ /**
31
+ * Hint.
32
+ * @type {string}
33
+ * @memberof ErrorResponse
34
+ */
35
+ hint?: string | null;
30
36
  }
31
37
  /**
32
38
  * Check if a given object implements the ErrorResponse interface.
@@ -29,6 +29,7 @@ export function ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
29
29
  return {
30
30
  'error': !exists(json, 'error') ? undefined : json['error'],
31
31
  'errorDescription': !exists(json, 'error_description') ? undefined : json['error_description'],
32
+ 'hint': !exists(json, 'hint') ? undefined : json['hint'],
32
33
  };
33
34
  }
34
35
  export function ErrorResponseToJSON(value) {
@@ -41,5 +42,6 @@ export function ErrorResponseToJSON(value) {
41
42
  return {
42
43
  'error': value.error,
43
44
  'error_description': value.errorDescription,
45
+ 'hint': value.hint,
44
46
  };
45
47
  }
@@ -25,6 +25,7 @@ export * from './ContextUser';
25
25
  export * from './ContextUserContext';
26
26
  export * from './CredentialDto';
27
27
  export * from './CredentialsResponse';
28
+ export * from './DatabaseDatabaseChargebeeCustomerCreatedResponse';
28
29
  export * from './DatabaseSetDistributorPayload';
29
30
  export * from './DatabaseState';
30
31
  export * from './DatabaseUpdateStatePayload';
@@ -27,6 +27,7 @@ export * from './ContextUser';
27
27
  export * from './ContextUserContext';
28
28
  export * from './CredentialDto';
29
29
  export * from './CredentialsResponse';
30
+ export * from './DatabaseDatabaseChargebeeCustomerCreatedResponse';
30
31
  export * from './DatabaseSetDistributorPayload';
31
32
  export * from './DatabaseState';
32
33
  export * from './DatabaseUpdateStatePayload';
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Equisoft /connect API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface DatabaseDatabaseChargebeeCustomerCreatedResponse
16
+ */
17
+ export interface DatabaseDatabaseChargebeeCustomerCreatedResponse {
18
+ /**
19
+ * Created ChargeBee customer ID
20
+ * @type {string}
21
+ * @memberof DatabaseDatabaseChargebeeCustomerCreatedResponse
22
+ */
23
+ chargebeeCustomerId: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the DatabaseDatabaseChargebeeCustomerCreatedResponse interface.
27
+ */
28
+ export declare function instanceOfDatabaseDatabaseChargebeeCustomerCreatedResponse(value: object): boolean;
29
+ export declare function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON(json: any): DatabaseDatabaseChargebeeCustomerCreatedResponse;
30
+ export declare function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatabaseDatabaseChargebeeCustomerCreatedResponse;
31
+ export declare function DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON(value?: DatabaseDatabaseChargebeeCustomerCreatedResponse | null): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Equisoft /connect API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: latest
9
+ *
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.DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON = exports.DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped = exports.DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON = exports.instanceOfDatabaseDatabaseChargebeeCustomerCreatedResponse = void 0;
17
+ /**
18
+ * Check if a given object implements the DatabaseDatabaseChargebeeCustomerCreatedResponse interface.
19
+ */
20
+ function instanceOfDatabaseDatabaseChargebeeCustomerCreatedResponse(value) {
21
+ let isInstance = true;
22
+ isInstance = isInstance && "chargebeeCustomerId" in value;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfDatabaseDatabaseChargebeeCustomerCreatedResponse = instanceOfDatabaseDatabaseChargebeeCustomerCreatedResponse;
26
+ function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON(json) {
27
+ return DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped(json, false);
28
+ }
29
+ exports.DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON = DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON;
30
+ function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'chargebeeCustomerId': json['chargebeeCustomerId'],
36
+ };
37
+ }
38
+ exports.DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped = DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped;
39
+ function DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON(value) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ 'chargebeeCustomerId': value.chargebeeCustomerId,
48
+ };
49
+ }
50
+ exports.DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON = DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON;
@@ -27,6 +27,12 @@ export interface ErrorResponse {
27
27
  * @memberof ErrorResponse
28
28
  */
29
29
  errorDescription?: string | null;
30
+ /**
31
+ * Hint.
32
+ * @type {string}
33
+ * @memberof ErrorResponse
34
+ */
35
+ hint?: string | null;
30
36
  }
31
37
  /**
32
38
  * Check if a given object implements the ErrorResponse interface.
@@ -34,6 +34,7 @@ function ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
34
34
  return {
35
35
  'error': !(0, runtime_1.exists)(json, 'error') ? undefined : json['error'],
36
36
  'errorDescription': !(0, runtime_1.exists)(json, 'error_description') ? undefined : json['error_description'],
37
+ 'hint': !(0, runtime_1.exists)(json, 'hint') ? undefined : json['hint'],
37
38
  };
38
39
  }
39
40
  exports.ErrorResponseFromJSONTyped = ErrorResponseFromJSONTyped;
@@ -47,6 +48,7 @@ function ErrorResponseToJSON(value) {
47
48
  return {
48
49
  'error': value.error,
49
50
  'error_description': value.errorDescription,
51
+ 'hint': value.hint,
50
52
  };
51
53
  }
52
54
  exports.ErrorResponseToJSON = ErrorResponseToJSON;
@@ -25,6 +25,7 @@ export * from './ContextUser';
25
25
  export * from './ContextUserContext';
26
26
  export * from './CredentialDto';
27
27
  export * from './CredentialsResponse';
28
+ export * from './DatabaseDatabaseChargebeeCustomerCreatedResponse';
28
29
  export * from './DatabaseSetDistributorPayload';
29
30
  export * from './DatabaseState';
30
31
  export * from './DatabaseUpdateStatePayload';
@@ -43,6 +43,7 @@ __exportStar(require("./ContextUser"), exports);
43
43
  __exportStar(require("./ContextUserContext"), exports);
44
44
  __exportStar(require("./CredentialDto"), exports);
45
45
  __exportStar(require("./CredentialsResponse"), exports);
46
+ __exportStar(require("./DatabaseDatabaseChargebeeCustomerCreatedResponse"), exports);
46
47
  __exportStar(require("./DatabaseSetDistributorPayload"), exports);
47
48
  __exportStar(require("./DatabaseState"), exports);
48
49
  __exportStar(require("./DatabaseUpdateStatePayload"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/equisoft-connect-sdk-typescript",
3
- "version": "13.9.0",
3
+ "version": "13.9.1-snapshot.20240714042739",
4
4
  "description": "OpenAPI client for @equisoft/equisoft-connect-sdk-typescript",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -15,6 +15,7 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ DatabaseDatabaseChargebeeCustomerCreatedResponse,
18
19
  DatabaseSetDistributorPayload,
19
20
  DatabaseUpdateStatePayload,
20
21
  DatabasesDatabase,
@@ -25,6 +26,8 @@ import type {
25
26
  UsersUser,
26
27
  } from '../models/index';
27
28
  import {
29
+ DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON,
30
+ DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON,
28
31
  DatabaseSetDistributorPayloadFromJSON,
29
32
  DatabaseSetDistributorPayloadToJSON,
30
33
  DatabaseUpdateStatePayloadFromJSON,
@@ -43,6 +46,10 @@ import {
43
46
  UsersUserToJSON,
44
47
  } from '../models/index';
45
48
 
49
+ export interface CreateChargebeeCustomerRequest {
50
+ databaseUuid: string;
51
+ }
52
+
46
53
  export interface GetDatabaseRequest {
47
54
  databaseUuid: string;
48
55
  }
@@ -86,6 +93,45 @@ export interface UpdateUserRequest {
86
93
  */
87
94
  export class DatabasesApi extends runtime.BaseAPI {
88
95
 
96
+ /**
97
+ * Create a ChargeBee customer for the database
98
+ */
99
+ async createChargebeeCustomerRaw(requestParameters: CreateChargebeeCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DatabaseDatabaseChargebeeCustomerCreatedResponse>> {
100
+ if (requestParameters.databaseUuid === null || requestParameters.databaseUuid === undefined) {
101
+ throw new runtime.RequiredError('databaseUuid','Required parameter requestParameters.databaseUuid was null or undefined when calling createChargebeeCustomer.');
102
+ }
103
+
104
+ const queryParameters: any = {};
105
+
106
+ const headerParameters: runtime.HTTPHeaders = {};
107
+
108
+ if (this.configuration && this.configuration.accessToken) {
109
+ // oauth required
110
+ const token = this.configuration.accessToken;
111
+ const tokenString = await token("OAuth2", ["crm:database"]);
112
+ if (tokenString) {
113
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
114
+ }
115
+ }
116
+
117
+ const response = await this.request({
118
+ path: `/crm/api/v1/databases/{databaseUuid}/chargebeeCustomer`.replace(`{${"databaseUuid"}}`, encodeURIComponent(String(requestParameters.databaseUuid))),
119
+ method: 'POST',
120
+ headers: headerParameters,
121
+ query: queryParameters,
122
+ }, initOverrides);
123
+
124
+ return new runtime.JSONApiResponse(response, (jsonValue) => DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON(jsonValue));
125
+ }
126
+
127
+ /**
128
+ * Create a ChargeBee customer for the database
129
+ */
130
+ async createChargebeeCustomer(requestParameters: CreateChargebeeCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DatabaseDatabaseChargebeeCustomerCreatedResponse> {
131
+ const response = await this.createChargebeeCustomerRaw(requestParameters, initOverrides);
132
+ return await response.value();
133
+ }
134
+
89
135
  /**
90
136
  * Get a database
91
137
  */
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Equisoft /connect API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface DatabaseDatabaseChargebeeCustomerCreatedResponse
20
+ */
21
+ export interface DatabaseDatabaseChargebeeCustomerCreatedResponse {
22
+ /**
23
+ * Created ChargeBee customer ID
24
+ * @type {string}
25
+ * @memberof DatabaseDatabaseChargebeeCustomerCreatedResponse
26
+ */
27
+ chargebeeCustomerId: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the DatabaseDatabaseChargebeeCustomerCreatedResponse interface.
32
+ */
33
+ export function instanceOfDatabaseDatabaseChargebeeCustomerCreatedResponse(value: object): boolean {
34
+ let isInstance = true;
35
+ isInstance = isInstance && "chargebeeCustomerId" in value;
36
+
37
+ return isInstance;
38
+ }
39
+
40
+ export function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSON(json: any): DatabaseDatabaseChargebeeCustomerCreatedResponse {
41
+ return DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped(json, false);
42
+ }
43
+
44
+ export function DatabaseDatabaseChargebeeCustomerCreatedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatabaseDatabaseChargebeeCustomerCreatedResponse {
45
+ if ((json === undefined) || (json === null)) {
46
+ return json;
47
+ }
48
+ return {
49
+
50
+ 'chargebeeCustomerId': json['chargebeeCustomerId'],
51
+ };
52
+ }
53
+
54
+ export function DatabaseDatabaseChargebeeCustomerCreatedResponseToJSON(value?: DatabaseDatabaseChargebeeCustomerCreatedResponse | null): any {
55
+ if (value === undefined) {
56
+ return undefined;
57
+ }
58
+ if (value === null) {
59
+ return null;
60
+ }
61
+ return {
62
+
63
+ 'chargebeeCustomerId': value.chargebeeCustomerId,
64
+ };
65
+ }
66
+
@@ -31,6 +31,12 @@ export interface ErrorResponse {
31
31
  * @memberof ErrorResponse
32
32
  */
33
33
  errorDescription?: string | null;
34
+ /**
35
+ * Hint.
36
+ * @type {string}
37
+ * @memberof ErrorResponse
38
+ */
39
+ hint?: string | null;
34
40
  }
35
41
 
36
42
  /**
@@ -54,6 +60,7 @@ export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
54
60
 
55
61
  'error': !exists(json, 'error') ? undefined : json['error'],
56
62
  'errorDescription': !exists(json, 'error_description') ? undefined : json['error_description'],
63
+ 'hint': !exists(json, 'hint') ? undefined : json['hint'],
57
64
  };
58
65
  }
59
66
 
@@ -68,6 +75,7 @@ export function ErrorResponseToJSON(value?: ErrorResponse | null): any {
68
75
 
69
76
  'error': value.error,
70
77
  'error_description': value.errorDescription,
78
+ 'hint': value.hint,
71
79
  };
72
80
  }
73
81
 
@@ -27,6 +27,7 @@ export * from './ContextUser';
27
27
  export * from './ContextUserContext';
28
28
  export * from './CredentialDto';
29
29
  export * from './CredentialsResponse';
30
+ export * from './DatabaseDatabaseChargebeeCustomerCreatedResponse';
30
31
  export * from './DatabaseSetDistributorPayload';
31
32
  export * from './DatabaseState';
32
33
  export * from './DatabaseUpdateStatePayload';