UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

63 lines (62 loc) 2.6 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * OpenPay API * super charge your subscription management. * * The version of the OpenAPI document: 1.2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfNonPciIntegration = instanceOfNonPciIntegration; exports.NonPciIntegrationFromJSON = NonPciIntegrationFromJSON; exports.NonPciIntegrationFromJSONTyped = NonPciIntegrationFromJSONTyped; exports.NonPciIntegrationToJSON = NonPciIntegrationToJSON; exports.NonPciIntegrationToJSONTyped = NonPciIntegrationToJSONTyped; const NonPciIntegrationConfigurationInner_1 = require("./NonPciIntegrationConfigurationInner"); const NonPciIntegrationEnum_1 = require("./NonPciIntegrationEnum"); /** * Check if a given object implements the NonPciIntegration interface. */ function instanceOfNonPciIntegration(value) { if (!('accountId' in value) || value['accountId'] === undefined) return false; if (!('integrationId' in value) || value['integrationId'] === undefined) return false; if (!('integrationType' in value) || value['integrationType'] === undefined) return false; return true; } function NonPciIntegrationFromJSON(json) { return NonPciIntegrationFromJSONTyped(json, false); } function NonPciIntegrationFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'accountId': json['account_id'], '_configuration': json['configuration'] == null ? undefined : (json['configuration'].map(NonPciIntegrationConfigurationInner_1.NonPciIntegrationConfigurationInnerFromJSON)), 'integrationId': json['integration_id'], 'integrationType': (0, NonPciIntegrationEnum_1.NonPciIntegrationEnumFromJSON)(json['integration_type']), }; } function NonPciIntegrationToJSON(json) { return NonPciIntegrationToJSONTyped(json, false); } function NonPciIntegrationToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'account_id': value['accountId'], 'configuration': value['_configuration'] == null ? undefined : (value['_configuration'].map(NonPciIntegrationConfigurationInner_1.NonPciIntegrationConfigurationInnerToJSON)), 'integration_id': value['integrationId'], 'integration_type': (0, NonPciIntegrationEnum_1.NonPciIntegrationEnumToJSON)(value['integrationType']), }; }