@blues-inc/notehub-js 6.0.0-beta.9 → 6.1.0

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.
Files changed (160) hide show
  1. package/README.md +268 -250
  2. package/dist/ApiClient.js +150 -150
  3. package/dist/api/AlertApi.js +22 -22
  4. package/dist/api/AuthorizationApi.js +31 -31
  5. package/dist/api/BillingAccountApi.js +106 -16
  6. package/dist/api/DeviceApi.js +397 -341
  7. package/dist/api/EventApi.js +118 -118
  8. package/dist/api/ExternalDevicesApi.js +41 -41
  9. package/dist/api/JobsApi.js +438 -0
  10. package/dist/api/MonitorApi.js +52 -52
  11. package/dist/api/ProjectApi.js +403 -403
  12. package/dist/api/RouteApi.js +83 -83
  13. package/dist/api/UsageApi.js +67 -67
  14. package/dist/api/WebhookApi.js +51 -51
  15. package/dist/index.js +91 -0
  16. package/dist/model/AWSRoleConfig.js +14 -14
  17. package/dist/model/AddDeviceToFleetsRequest.js +8 -8
  18. package/dist/model/Alert.js +74 -76
  19. package/dist/model/AlertDataInner.js +36 -36
  20. package/dist/model/AlertNotificationsInner.js +18 -18
  21. package/dist/model/AwsRoute.js +70 -70
  22. package/dist/model/AzureRoute.js +43 -43
  23. package/dist/model/BillingAccount.js +21 -21
  24. package/dist/model/BillingAccountRole.js +9 -9
  25. package/dist/model/BlynkRoute.js +28 -28
  26. package/dist/model/Body.js +5 -5
  27. package/dist/model/CancelJobRun200Response.js +111 -0
  28. package/dist/model/CellularPlan.js +34 -34
  29. package/dist/model/CloneProjectRequest.js +20 -20
  30. package/dist/model/Contact.js +22 -22
  31. package/dist/model/CreateFleetRequest.js +20 -20
  32. package/dist/model/CreateJob201Response.js +115 -0
  33. package/dist/model/CreateMonitor.js +127 -128
  34. package/dist/model/CreateProductRequest.js +22 -22
  35. package/dist/model/CreateProjectRequest.js +16 -16
  36. package/dist/model/CreateUpdateRepository.js +17 -17
  37. package/dist/model/CurrentFirmware.js +12 -12
  38. package/dist/model/DFUEnv.js +12 -12
  39. package/dist/model/DFUState.js +65 -65
  40. package/dist/model/DataField.js +7 -7
  41. package/dist/model/DataSetField.js +19 -19
  42. package/dist/model/DataUsage.js +14 -14
  43. package/dist/model/DatacakeRoute.js +35 -35
  44. package/dist/model/DeleteDeviceFromFleetsRequest.js +8 -8
  45. package/dist/model/DeleteJob200Response.js +111 -0
  46. package/dist/model/DeleteNotefilesRequest.js +7 -7
  47. package/dist/model/Device.js +106 -107
  48. package/dist/model/DeviceDfuHistory.js +19 -20
  49. package/dist/model/DeviceDfuHistoryCurrent.js +32 -32
  50. package/dist/model/DeviceDfuHistoryPage.js +12 -13
  51. package/dist/model/DeviceDfuStateMachine.js +24 -25
  52. package/dist/model/DeviceDfuStateMachineNode.js +22 -22
  53. package/dist/model/DeviceDfuStatus.js +20 -20
  54. package/dist/model/DeviceDfuStatusPage.js +12 -13
  55. package/dist/model/DeviceSession.js +221 -221
  56. package/dist/model/DeviceTowerInfo.js +14 -14
  57. package/dist/model/DeviceUsage.js +32 -32
  58. package/dist/model/DfuActionRequest.js +7 -7
  59. package/dist/model/EmailNotification.js +7 -7
  60. package/dist/model/EnvTreeJsonNode.js +67 -69
  61. package/dist/model/EnvVar.js +18 -18
  62. package/dist/model/EnvironmentVariables.js +8 -8
  63. package/dist/model/Error.js +31 -31
  64. package/dist/model/Event.js +248 -248
  65. package/dist/model/Filter.js +16 -16
  66. package/dist/model/Firmware.js +49 -49
  67. package/dist/model/FirmwareInfo.js +82 -60
  68. package/dist/model/Fleet.js +38 -38
  69. package/dist/model/FleetConnectivityAssurance.js +5 -5
  70. package/dist/model/GetAlerts200Response.js +14 -15
  71. package/dist/model/GetBillingAccount200Response.js +137 -0
  72. package/dist/model/GetBillingAccount200ResponsePlan.js +141 -0
  73. package/dist/model/GetBillingAccountBalanceHistory200Response.js +111 -0
  74. package/dist/model/GetBillingAccountBalanceHistory200ResponseDataInner.js +130 -0
  75. package/dist/model/GetBillingAccounts200Response.js +9 -10
  76. package/dist/model/GetDataUsage200Response.js +12 -13
  77. package/dist/model/GetDataUsage200ResponseDataInner.js +43 -44
  78. package/dist/model/GetDbNote200Response.js +13 -13
  79. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +16 -16
  80. package/dist/model/GetDeviceFleets200Response.js +11 -12
  81. package/dist/model/GetDeviceHealthLog200Response.js +11 -12
  82. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
  83. package/dist/model/GetDeviceLatestEvents200Response.js +9 -10
  84. package/dist/model/GetDevicePlans200Response.js +9 -10
  85. package/dist/model/GetDevicePublicKey200Response.js +16 -16
  86. package/dist/model/GetDevicePublicKeys200Response.js +16 -17
  87. package/dist/model/GetDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
  88. package/dist/model/GetDeviceSessions200Response.js +16 -17
  89. package/dist/model/GetDevices200Response.js +16 -17
  90. package/dist/model/GetEvents200Response.js +20 -21
  91. package/dist/model/GetEventsByCursor200Response.js +23 -24
  92. package/dist/model/GetJobRuns200Response.js +131 -0
  93. package/dist/model/GetJobs200Response.js +131 -0
  94. package/dist/model/GetNotefile200Response.js +11 -11
  95. package/dist/model/GetProducts200Response.js +9 -10
  96. package/dist/model/GetProjectMembers200Response.js +11 -12
  97. package/dist/model/GetProjects200Response.js +9 -10
  98. package/dist/model/GetRouteLogsUsage200Response.js +14 -15
  99. package/dist/model/GetSessionsUsage200Response.js +15 -16
  100. package/dist/model/GetWebhooks200Response.js +9 -10
  101. package/dist/model/GoogleRoute.js +33 -33
  102. package/dist/model/HttpRoute.js +35 -35
  103. package/dist/model/Job.js +167 -0
  104. package/dist/model/JobRun.js +246 -0
  105. package/dist/model/Location.js +40 -40
  106. package/dist/model/Login200Response.js +7 -7
  107. package/dist/model/LoginRequest.js +12 -12
  108. package/dist/model/Monitor.js +101 -102
  109. package/dist/model/MonitorAlertRoutesInner.js +10 -9
  110. package/dist/model/MqttRoute.js +68 -68
  111. package/dist/model/Note.js +31 -31
  112. package/dist/model/NoteInput.js +9 -9
  113. package/dist/model/Notefile.js +22 -23
  114. package/dist/model/NotefileSchema.js +18 -19
  115. package/dist/model/NotehubRoute.js +103 -103
  116. package/dist/model/NotehubRouteSummary.js +23 -23
  117. package/dist/model/OAuth2Error.js +20 -20
  118. package/dist/model/OAuth2TokenResponse.js +23 -23
  119. package/dist/model/PersonalAccessToken.js +34 -34
  120. package/dist/model/PersonalAccessTokenCreatedBy.js +17 -17
  121. package/dist/model/PersonalAccessTokenInfo.js +18 -18
  122. package/dist/model/PersonalAccessTokenSecret.js +12 -12
  123. package/dist/model/Product.js +26 -26
  124. package/dist/model/Project.js +34 -34
  125. package/dist/model/ProjectMember.js +22 -22
  126. package/dist/model/ProvisionDeviceRequest.js +18 -18
  127. package/dist/model/ProxyRoute.js +29 -29
  128. package/dist/model/QubitroRoute.js +33 -33
  129. package/dist/model/RadRoute.js +31 -31
  130. package/dist/model/Repository.js +22 -22
  131. package/dist/model/Role.js +9 -9
  132. package/dist/model/RouteLog.js +38 -38
  133. package/dist/model/RouteTransformSettings.js +18 -18
  134. package/dist/model/RunJob200Response.js +115 -0
  135. package/dist/model/S3ArchiveRoute.js +79 -79
  136. package/dist/model/SatelliteDataUsage.js +18 -18
  137. package/dist/model/SatellitePlan.js +29 -29
  138. package/dist/model/SchemaProperty.js +36 -38
  139. package/dist/model/SignalDevice200Response.js +5 -5
  140. package/dist/model/SimUsage.js +19 -19
  141. package/dist/model/SlackBearerNotification.js +25 -25
  142. package/dist/model/SlackRoute.js +48 -48
  143. package/dist/model/SlackWebHookNotification.js +20 -20
  144. package/dist/model/SnowflakeRoute.js +45 -45
  145. package/dist/model/SnowpipeStreamingRoute.js +60 -60
  146. package/dist/model/ThingworxRoute.js +33 -33
  147. package/dist/model/TowerLocation.js +54 -54
  148. package/dist/model/TwilioRoute.js +43 -43
  149. package/dist/model/UpdateFleetRequest.js +33 -33
  150. package/dist/model/UploadMetadata.js +64 -64
  151. package/dist/model/UsageData.js +33 -33
  152. package/dist/model/UsageEventsData.js +61 -43
  153. package/dist/model/UsageEventsResponse.js +14 -15
  154. package/dist/model/UsageRouteLogsData.js +36 -27
  155. package/dist/model/UsageSessionsData.js +67 -36
  156. package/dist/model/UserDfuStateMachine.js +20 -20
  157. package/dist/model/UserDfuStateMachineStatus.js +20 -20
  158. package/dist/model/UserFirmwareInfo.js +12 -12
  159. package/dist/model/WebhookSettings.js +15 -15
  160. package/package.json +3 -3
@@ -15,7 +15,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
16
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
17
17
  * Notehub API
18
- * The OpenAPI definition for the Notehub.io API.
18
+ * The OpenAPI definition for the Notehub.io API.
19
19
  *
20
20
  * The version of the OpenAPI document: 1.2.0
21
21
  * Contact: engineering@blues.io
@@ -26,18 +26,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  *
27
27
  */
28
28
  /**
29
- * Alert service.
30
- * @module api/AlertApi
31
- * @version 6.0.0-beta.9
32
- */
29
+ * Alert service.
30
+ * @module api/AlertApi
31
+ * @version 6.1.0
32
+ */
33
33
  var AlertApi = exports["default"] = /*#__PURE__*/function () {
34
34
  /**
35
- * Constructs a new AlertApi.
36
- * @alias module:api/AlertApi
37
- * @class
38
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
- * default to {@link module:ApiClient#instance} if unspecified.
40
- */
35
+ * Constructs a new AlertApi.
36
+ * @alias module:api/AlertApi
37
+ * @class
38
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
+ * default to {@link module:ApiClient#instance} if unspecified.
40
+ */
41
41
  function AlertApi(apiClient) {
42
42
  _classCallCheck(this, AlertApi);
43
43
  this.apiClient = apiClient || _ApiClient["default"].instance;
@@ -45,11 +45,11 @@ var AlertApi = exports["default"] = /*#__PURE__*/function () {
45
45
 
46
46
  /**
47
47
  * Get list of defined Alerts
48
- * @param {String} projectOrProductUID
48
+ * @param {String} projectOrProductUID
49
49
  * @param {Object} opts Optional parameters
50
50
  * @param {Number} opts.pageSize (default to 50)
51
51
  * @param {Number} opts.pageNum (default to 1)
52
- * @param {String} opts.monitorUID
52
+ * @param {String} opts.monitorUID
53
53
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetAlerts200Response} and HTTP response
54
54
  */
55
55
  return _createClass(AlertApi, [{
@@ -62,29 +62,29 @@ var AlertApi = exports["default"] = /*#__PURE__*/function () {
62
62
  throw new _Error["default"]("Missing the required parameter 'projectOrProductUID' when calling getAlerts");
63
63
  }
64
64
  var pathParams = {
65
- 'projectOrProductUID': projectOrProductUID
65
+ projectOrProductUID: projectOrProductUID
66
66
  };
67
67
  var queryParams = {
68
- 'pageSize': opts['pageSize'],
69
- 'pageNum': opts['pageNum'],
70
- 'monitorUID': opts['monitorUID']
68
+ pageSize: opts["pageSize"],
69
+ pageNum: opts["pageNum"],
70
+ monitorUID: opts["monitorUID"]
71
71
  };
72
72
  var headerParams = {};
73
73
  var formParams = {};
74
- var authNames = ['personalAccessToken'];
74
+ var authNames = ["personalAccessToken"];
75
75
  var contentTypes = [];
76
- var accepts = ['application/json'];
76
+ var accepts = ["application/json"];
77
77
  var returnType = _GetAlerts200Response["default"];
78
- return this.apiClient.callApi('/v1/projects/{projectOrProductUID}/alerts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
78
+ return this.apiClient.callApi("/v1/projects/{projectOrProductUID}/alerts", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
79
79
  }
80
80
 
81
81
  /**
82
82
  * Get list of defined Alerts
83
- * @param {String} projectOrProductUID
83
+ * @param {String} projectOrProductUID
84
84
  * @param {Object} opts Optional parameters
85
85
  * @param {Number} opts.pageSize (default to 50)
86
86
  * @param {Number} opts.pageNum (default to 1)
87
- * @param {String} opts.monitorUID
87
+ * @param {String} opts.monitorUID
88
88
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetAlerts200Response}
89
89
  */
90
90
  }, {
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
18
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
19
  * Notehub API
20
- * The OpenAPI definition for the Notehub.io API.
20
+ * The OpenAPI definition for the Notehub.io API.
21
21
  *
22
22
  * The version of the OpenAPI document: 1.2.0
23
23
  * Contact: engineering@blues.io
@@ -28,18 +28,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  *
29
29
  */
30
30
  /**
31
- * Authorization service.
32
- * @module api/AuthorizationApi
33
- * @version 6.0.0-beta.9
34
- */
31
+ * Authorization service.
32
+ * @module api/AuthorizationApi
33
+ * @version 6.1.0
34
+ */
35
35
  var AuthorizationApi = exports["default"] = /*#__PURE__*/function () {
36
36
  /**
37
- * Constructs a new AuthorizationApi.
38
- * @alias module:api/AuthorizationApi
39
- * @class
40
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
- * default to {@link module:ApiClient#instance} if unspecified.
42
- */
37
+ * Constructs a new AuthorizationApi.
38
+ * @alias module:api/AuthorizationApi
39
+ * @class
40
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
+ * default to {@link module:ApiClient#instance} if unspecified.
42
+ */
43
43
  function AuthorizationApi(apiClient) {
44
44
  _classCallCheck(this, AuthorizationApi);
45
45
  this.apiClient = apiClient || _ApiClient["default"].instance;
@@ -47,7 +47,7 @@ var AuthorizationApi = exports["default"] = /*#__PURE__*/function () {
47
47
 
48
48
  /**
49
49
  * Gets an API key from username and password
50
- * @param {module:model/LoginRequest} loginRequest
50
+ * @param {module:model/LoginRequest} loginRequest
51
51
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Login200Response} and HTTP response
52
52
  */
53
53
  return _createClass(AuthorizationApi, [{
@@ -63,15 +63,15 @@ var AuthorizationApi = exports["default"] = /*#__PURE__*/function () {
63
63
  var headerParams = {};
64
64
  var formParams = {};
65
65
  var authNames = [];
66
- var contentTypes = ['application/json'];
67
- var accepts = ['application/json'];
66
+ var contentTypes = ["application/json"];
67
+ var accepts = ["application/json"];
68
68
  var returnType = _Login200Response["default"];
69
- return this.apiClient.callApi('/auth/login', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
69
+ return this.apiClient.callApi("/auth/login", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
70
70
  }
71
71
 
72
72
  /**
73
73
  * Gets an API key from username and password
74
- * @param {module:model/LoginRequest} loginRequest
74
+ * @param {module:model/LoginRequest} loginRequest
75
75
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Login200Response}
76
76
  */
77
77
  }, {
@@ -84,10 +84,10 @@ var AuthorizationApi = exports["default"] = /*#__PURE__*/function () {
84
84
 
85
85
  /**
86
86
  * Issue an OAuth 2.0 access token (Client Credentials)
87
- * Exchanges client credentials for an access token. Parameters must be sent as application/x-www-form-urlencoded.
88
- * @param {String} clientId
89
- * @param {String} clientSecret
90
- * @param {module:model/String} grantType
87
+ * Exchanges client credentials for an access token. Parameters must be sent as application/x-www-form-urlencoded.
88
+ * @param {String} clientId
89
+ * @param {String} clientSecret
90
+ * @param {module:model/String} grantType
91
91
  * @param {Object} opts Optional parameters
92
92
  * @param {String} opts.scope Space-delimited scopes.
93
93
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OAuth2TokenResponse} and HTTP response
@@ -113,24 +113,24 @@ var AuthorizationApi = exports["default"] = /*#__PURE__*/function () {
113
113
  var queryParams = {};
114
114
  var headerParams = {};
115
115
  var formParams = {
116
- 'client_id': clientId,
117
- 'client_secret': clientSecret,
118
- 'grant_type': grantType,
119
- 'scope': opts['scope']
116
+ client_id: clientId,
117
+ client_secret: clientSecret,
118
+ grant_type: grantType,
119
+ scope: opts["scope"]
120
120
  };
121
121
  var authNames = [];
122
- var contentTypes = ['application/x-www-form-urlencoded'];
123
- var accepts = ['application/json'];
122
+ var contentTypes = ["application/x-www-form-urlencoded"];
123
+ var accepts = ["application/json"];
124
124
  var returnType = _OAuth2TokenResponse["default"];
125
- return this.apiClient.callApi('/oauth2/token', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
125
+ return this.apiClient.callApi("/oauth2/token", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
126
126
  }
127
127
 
128
128
  /**
129
129
  * Issue an OAuth 2.0 access token (Client Credentials)
130
- * Exchanges client credentials for an access token. Parameters must be sent as application/x-www-form-urlencoded.
131
- * @param {String} clientId
132
- * @param {String} clientSecret
133
- * @param {module:model/String} grantType
130
+ * Exchanges client credentials for an access token. Parameters must be sent as application/x-www-form-urlencoded.
131
+ * @param {String} clientId
132
+ * @param {String} clientSecret
133
+ * @param {module:model/String} grantType
134
134
  * @param {Object} opts Optional parameters
135
135
  * @param {String} opts.scope Space-delimited scopes.
136
136
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OAuth2TokenResponse}
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _Error = _interopRequireDefault(require("../model/Error"));
9
+ var _GetBillingAccount200Response = _interopRequireDefault(require("../model/GetBillingAccount200Response"));
10
+ var _GetBillingAccountBalanceHistory200Response = _interopRequireDefault(require("../model/GetBillingAccountBalanceHistory200Response"));
9
11
  var _GetBillingAccounts200Response = _interopRequireDefault(require("../model/GetBillingAccounts200Response"));
10
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
13
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -15,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
15
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
18
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
17
19
  * Notehub API
18
- * The OpenAPI definition for the Notehub.io API.
20
+ * The OpenAPI definition for the Notehub.io API.
19
21
  *
20
22
  * The version of the OpenAPI document: 1.2.0
21
23
  * Contact: engineering@blues.io
@@ -26,28 +28,116 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
28
  *
27
29
  */
28
30
  /**
29
- * BillingAccount service.
30
- * @module api/BillingAccountApi
31
- * @version 6.0.0-beta.9
32
- */
31
+ * BillingAccount service.
32
+ * @module api/BillingAccountApi
33
+ * @version 6.1.0
34
+ */
33
35
  var BillingAccountApi = exports["default"] = /*#__PURE__*/function () {
34
36
  /**
35
- * Constructs a new BillingAccountApi.
36
- * @alias module:api/BillingAccountApi
37
- * @class
38
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
- * default to {@link module:ApiClient#instance} if unspecified.
40
- */
37
+ * Constructs a new BillingAccountApi.
38
+ * @alias module:api/BillingAccountApi
39
+ * @class
40
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
+ * default to {@link module:ApiClient#instance} if unspecified.
42
+ */
41
43
  function BillingAccountApi(apiClient) {
42
44
  _classCallCheck(this, BillingAccountApi);
43
45
  this.apiClient = apiClient || _ApiClient["default"].instance;
44
46
  }
45
47
 
46
48
  /**
47
- * Get Billing Accounts accessible by the api_key
48
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBillingAccounts200Response} and HTTP response
49
+ * Get Billing Account Information
50
+ * @param {String} billingAccountUID
51
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBillingAccount200Response} and HTTP response
49
52
  */
50
53
  return _createClass(BillingAccountApi, [{
54
+ key: "getBillingAccountWithHttpInfo",
55
+ value: function getBillingAccountWithHttpInfo(billingAccountUID) {
56
+ var postBody = null;
57
+ // verify the required parameter 'billingAccountUID' is set
58
+ if (billingAccountUID === undefined || billingAccountUID === null) {
59
+ throw new _Error["default"]("Missing the required parameter 'billingAccountUID' when calling getBillingAccount");
60
+ }
61
+ var pathParams = {
62
+ billingAccountUID: billingAccountUID
63
+ };
64
+ var queryParams = {};
65
+ var headerParams = {};
66
+ var formParams = {};
67
+ var authNames = ["personalAccessToken"];
68
+ var contentTypes = [];
69
+ var accepts = ["application/json"];
70
+ var returnType = _GetBillingAccount200Response["default"];
71
+ return this.apiClient.callApi("/v1/billing-accounts/{billingAccountUID}", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
72
+ }
73
+
74
+ /**
75
+ * Get Billing Account Information
76
+ * @param {String} billingAccountUID
77
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetBillingAccount200Response}
78
+ */
79
+ }, {
80
+ key: "getBillingAccount",
81
+ value: function getBillingAccount(billingAccountUID) {
82
+ return this.getBillingAccountWithHttpInfo(billingAccountUID).then(function (response_and_data) {
83
+ return response_and_data.data;
84
+ });
85
+ }
86
+
87
+ /**
88
+ * Get Billing Account Balance history, only enterprise supported
89
+ * @param {String} billingAccountUID
90
+ * @param {Object} opts Optional parameters
91
+ * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
92
+ * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
93
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBillingAccountBalanceHistory200Response} and HTTP response
94
+ */
95
+ }, {
96
+ key: "getBillingAccountBalanceHistoryWithHttpInfo",
97
+ value: function getBillingAccountBalanceHistoryWithHttpInfo(billingAccountUID, opts) {
98
+ opts = opts || {};
99
+ var postBody = null;
100
+ // verify the required parameter 'billingAccountUID' is set
101
+ if (billingAccountUID === undefined || billingAccountUID === null) {
102
+ throw new _Error["default"]("Missing the required parameter 'billingAccountUID' when calling getBillingAccountBalanceHistory");
103
+ }
104
+ var pathParams = {
105
+ billingAccountUID: billingAccountUID
106
+ };
107
+ var queryParams = {
108
+ startDate: opts["startDate"],
109
+ endDate: opts["endDate"]
110
+ };
111
+ var headerParams = {};
112
+ var formParams = {};
113
+ var authNames = ["personalAccessToken"];
114
+ var contentTypes = [];
115
+ var accepts = ["application/json"];
116
+ var returnType = _GetBillingAccountBalanceHistory200Response["default"];
117
+ return this.apiClient.callApi("/v1/billing-accounts/{billingAccountUID}/balance-history", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
118
+ }
119
+
120
+ /**
121
+ * Get Billing Account Balance history, only enterprise supported
122
+ * @param {String} billingAccountUID
123
+ * @param {Object} opts Optional parameters
124
+ * @param {Number} opts.startDate Start date for filtering results, specified as a Unix timestamp
125
+ * @param {Number} opts.endDate End date for filtering results, specified as a Unix timestamp
126
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetBillingAccountBalanceHistory200Response}
127
+ */
128
+ }, {
129
+ key: "getBillingAccountBalanceHistory",
130
+ value: function getBillingAccountBalanceHistory(billingAccountUID, opts) {
131
+ return this.getBillingAccountBalanceHistoryWithHttpInfo(billingAccountUID, opts).then(function (response_and_data) {
132
+ return response_and_data.data;
133
+ });
134
+ }
135
+
136
+ /**
137
+ * Get Billing Accounts accessible by the api_key
138
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBillingAccounts200Response} and HTTP response
139
+ */
140
+ }, {
51
141
  key: "getBillingAccountsWithHttpInfo",
52
142
  value: function getBillingAccountsWithHttpInfo() {
53
143
  var postBody = null;
@@ -55,11 +145,11 @@ var BillingAccountApi = exports["default"] = /*#__PURE__*/function () {
55
145
  var queryParams = {};
56
146
  var headerParams = {};
57
147
  var formParams = {};
58
- var authNames = ['personalAccessToken'];
148
+ var authNames = ["personalAccessToken"];
59
149
  var contentTypes = [];
60
- var accepts = ['application/json'];
150
+ var accepts = ["application/json"];
61
151
  var returnType = _GetBillingAccounts200Response["default"];
62
- return this.apiClient.callApi('/v1/billing-accounts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
152
+ return this.apiClient.callApi("/v1/billing-accounts", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
63
153
  }
64
154
 
65
155
  /**