chargebee 2.25.2 → 2.25.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### v2.25.3 (2023-07-24)
2
+ * * *
3
+ * Add Request Config Type
4
+ * Fix validation
5
+
1
6
  ### v2.25.2 (2023-07-24)
2
7
  * * *
3
8
  * Fix typescript typings [generator issue](https://github.com/chargebee/chargebee-node/issues/31)
package/lib/chargebee.js CHANGED
@@ -11,7 +11,7 @@ ChargeBee._env = {
11
11
  hostSuffix: '.chargebee.com',
12
12
  apiPath: '/api/v2',
13
13
  timeout: 80000,
14
- clientVersion: 'v2.25.2',
14
+ clientVersion: 'v2.25.3',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -169,7 +169,7 @@ RequestWrapper.prototype.request = function(callBack, envOptions) {
169
169
  };
170
170
 
171
171
  function validateIdParam(idParam) {
172
- if (typeof idParam === 'undefined' || typeof idParam !== 'string' || idParam.trim() < 1) {
172
+ if (typeof idParam === 'undefined' || typeof idParam !== 'string' || idParam.trim().length < 1) {
173
173
  throw new Error('the required id parameter missing or wrong');
174
174
  }
175
175
  return idParam;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.25.2",
3
+ "version":"2.25.3",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
package/types/core.d.ts CHANGED
@@ -1,7 +1,14 @@
1
1
  declare module 'chargebee' {
2
+ export class RequestConfig {
3
+ site ?: string
4
+ api_key ?: string
5
+ timeout ?: number
6
+ timemachineWaitInMillis ?: number
7
+ exportWaitInMillis ?: number
8
+ }
2
9
  export class ChargebeeRequest<T> {
3
10
  setIdempotencyKey(idempotencyKey: string): this;
4
- request(): Promise<T>;
11
+ request(config ?: RequestConfig): Promise<T>;
5
12
  headers(headers : {[key : string] : string}): this;
6
13
  }
7
14
  type AccountHolderType = 'individual' | 'company'