@getivy/node-sdk 0.1.0-alpha.2 → 0.1.0-alpha.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/src/index.ts CHANGED
@@ -103,7 +103,7 @@ export interface ClientOptions {
103
103
  /**
104
104
  * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
105
105
  *
106
- * Defaults to process.env['GETIVY_BASE_URL'].
106
+ * Defaults to process.env['IVY_BASE_URL'].
107
107
  */
108
108
  baseURL?: string | null | undefined;
109
109
 
@@ -158,19 +158,19 @@ export interface ClientOptions {
158
158
  }
159
159
 
160
160
  /**
161
- * API Client for interfacing with the Getivy API.
161
+ * API Client for interfacing with the Ivy API.
162
162
  */
163
- export class Getivy extends Core.APIClient {
163
+ export class Ivy extends Core.APIClient {
164
164
  apiKey: string;
165
165
 
166
166
  private _options: ClientOptions;
167
167
 
168
168
  /**
169
- * API Client for interfacing with the Getivy API.
169
+ * API Client for interfacing with the Ivy API.
170
170
  *
171
171
  * @param {string | undefined} [opts.apiKey=process.env['IVY_API_KEY'] ?? undefined]
172
172
  * @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
173
- * @param {string} [opts.baseURL=process.env['GETIVY_BASE_URL'] ?? https://api.getivy.de] - Override the default base URL for the API.
173
+ * @param {string} [opts.baseURL=process.env['IVY_BASE_URL'] ?? https://api.getivy.de] - Override the default base URL for the API.
174
174
  * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
175
175
  * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
176
176
  * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -179,13 +179,13 @@ export class Getivy extends Core.APIClient {
179
179
  * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
180
180
  */
181
181
  constructor({
182
- baseURL = Core.readEnv('GETIVY_BASE_URL'),
182
+ baseURL = Core.readEnv('IVY_BASE_URL'),
183
183
  apiKey = Core.readEnv('IVY_API_KEY'),
184
184
  ...opts
185
185
  }: ClientOptions = {}) {
186
186
  if (apiKey === undefined) {
187
- throw new Errors.GetivyError(
188
- "The IVY_API_KEY environment variable is missing or empty; either provide it, or instantiate the Getivy client with an apiKey option, like new Getivy({ apiKey: 'My API Key' }).",
187
+ throw new Errors.IvyError(
188
+ "The IVY_API_KEY environment variable is missing or empty; either provide it, or instantiate the Ivy client with an apiKey option, like new Ivy({ apiKey: 'My API Key' }).",
189
189
  );
190
190
  }
191
191
 
@@ -197,8 +197,8 @@ export class Getivy extends Core.APIClient {
197
197
  };
198
198
 
199
199
  if (baseURL && opts.environment) {
200
- throw new Errors.GetivyError(
201
- 'Ambiguous URL; The `baseURL` option (or GETIVY_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null',
200
+ throw new Errors.IvyError(
201
+ 'Ambiguous URL; The `baseURL` option (or IVY_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null',
202
202
  );
203
203
  }
204
204
 
@@ -243,10 +243,10 @@ export class Getivy extends Core.APIClient {
243
243
  return { 'X-Ivy-Api-Key': this.apiKey };
244
244
  }
245
245
 
246
- static Getivy = this;
246
+ static Ivy = this;
247
247
  static DEFAULT_TIMEOUT = 60000; // 1 minute
248
248
 
249
- static GetivyError = Errors.GetivyError;
249
+ static IvyError = Errors.IvyError;
250
250
  static APIError = Errors.APIError;
251
251
  static APIConnectionError = Errors.APIConnectionError;
252
252
  static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
@@ -264,19 +264,19 @@ export class Getivy extends Core.APIClient {
264
264
  static fileFromPath = Uploads.fileFromPath;
265
265
  }
266
266
 
267
- Getivy.Banks = Banks;
268
- Getivy.Checkoutsession = Checkoutsession;
269
- Getivy.Customers = Customers;
270
- Getivy.Orders = Orders;
271
- Getivy.Charges = Charges;
272
- Getivy.Mandates = Mandates;
273
- Getivy.Capabilities = Capabilities;
274
- Getivy.Refunds = Refunds;
275
- Getivy.Payouts = Payouts;
276
- Getivy.Reports = Reports;
277
- Getivy.Subaccounts = Subaccounts;
278
- Getivy.Balance = Balance;
279
- export declare namespace Getivy {
267
+ Ivy.Banks = Banks;
268
+ Ivy.Checkoutsession = Checkoutsession;
269
+ Ivy.Customers = Customers;
270
+ Ivy.Orders = Orders;
271
+ Ivy.Charges = Charges;
272
+ Ivy.Mandates = Mandates;
273
+ Ivy.Capabilities = Capabilities;
274
+ Ivy.Refunds = Refunds;
275
+ Ivy.Payouts = Payouts;
276
+ Ivy.Reports = Reports;
277
+ Ivy.Subaccounts = Subaccounts;
278
+ Ivy.Balance = Balance;
279
+ export declare namespace Ivy {
280
280
  export type RequestOptions = Core.RequestOptions;
281
281
 
282
282
  export {
@@ -375,7 +375,7 @@ export declare namespace Getivy {
375
375
 
376
376
  export { toFile, fileFromPath } from './uploads';
377
377
  export {
378
- GetivyError,
378
+ IvyError,
379
379
  APIError,
380
380
  APIConnectionError,
381
381
  APIConnectionTimeoutError,
@@ -390,4 +390,4 @@ export {
390
390
  UnprocessableEntityError,
391
391
  } from './error';
392
392
 
393
- export default Getivy;
393
+ export default Ivy;
package/src/resource.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import type { Getivy } from './index';
3
+ import type { Ivy } from './index';
4
4
 
5
5
  export class APIResource {
6
- protected _client: Getivy;
6
+ protected _client: Ivy;
7
7
 
8
- constructor(client: Getivy) {
8
+ constructor(client: Ivy) {
9
9
  this._client = client;
10
10
  }
11
11
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.2'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.3'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.2";
1
+ export declare const VERSION = "0.1.0-alpha.3";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-alpha.2'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.3'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-alpha.2'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.3'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map