UNPKG

card-management-sdk

Version:

The Shell Card Management API is REST-based and employs OAUTH 2.0,Basic and ApiKey authentication. The API endpoints accept JSON-encoded request bodies, return JSON-encoded responses and use standard HTTP response codes. All resources are located in the S

36 lines (27 loc) 1.14 kB
/** * Shell Card Management APIsLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { Client, Configuration, Environment } from '../src'; export const testClient = new Client(createConfigurationFromEnvironment()); function createConfigurationFromEnvironment(): Partial<Configuration> { const config: Partial<Configuration> = {}; const environment = process.env.SHELL_CARD_MANAGEMENT_AP_IS_LIB_ENVIRONMENT; const timeout = process.env.SHELL_CARD_MANAGEMENT_AP_IS_LIB_TIMEOUT; const oAuthClientId = process.env.SHELL_CARD_MANAGEMENT_AP_IS_LIB_O_AUTH_CLIENT_ID; const oAuthClientSecret = process.env.SHELL_CARD_MANAGEMENT_AP_IS_LIB_O_AUTH_CLIENT_SECRET; if (environment !== undefined) { config.environment = environment as Environment; } if (timeout !== undefined && timeout !== '') { config.timeout = parseInt(timeout); } if (oAuthClientId !== undefined && oAuthClientSecret !== undefined) { config.clientCredentialsAuthCredentials = { oAuthClientId: oAuthClientId, oAuthClientSecret: oAuthClientSecret, }; } return config; }