UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

84 lines (83 loc) 3.58 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.instanceOfPaymentRouteExternal = instanceOfPaymentRouteExternal; exports.PaymentRouteExternalFromJSON = PaymentRouteExternalFromJSON; exports.PaymentRouteExternalFromJSONTyped = PaymentRouteExternalFromJSONTyped; exports.PaymentRouteExternalToJSON = PaymentRouteExternalToJSON; exports.PaymentRouteExternalToJSONTyped = PaymentRouteExternalToJSONTyped; const PaymentRouteType_1 = require("./PaymentRouteType"); const GeneralPaymentRouteArgsOutput_1 = require("./GeneralPaymentRouteArgsOutput"); const ObjectName_1 = require("./ObjectName"); /** * Check if a given object implements the PaymentRouteExternal interface. */ function instanceOfPaymentRouteExternal(value) { if (!('accountId' in value) || value['accountId'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('routeConfig' in value) || value['routeConfig'] === undefined) return false; if (!('routeType' in value) || value['routeType'] === undefined) return false; if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false; return true; } function PaymentRouteExternalFromJSON(json) { return PaymentRouteExternalFromJSONTyped(json, false); } function PaymentRouteExternalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'accountId': json['account_id'], 'createdAt': (new Date(json['created_at'])), 'generalPaymentRouteArgs': json['general_payment_route_args'] == null ? undefined : (0, GeneralPaymentRouteArgsOutput_1.GeneralPaymentRouteArgsOutputFromJSON)(json['general_payment_route_args']), 'id': json['id'], 'isDeleted': json['is_deleted'] == null ? undefined : json['is_deleted'], 'name': json['name'], 'object': json['object'] == null ? undefined : (0, ObjectName_1.ObjectNameFromJSON)(json['object']), 'routeConfig': json['route_config'], 'routeType': (0, PaymentRouteType_1.PaymentRouteTypeFromJSON)(json['route_type']), 'updatedAt': (new Date(json['updated_at'])), }; } function PaymentRouteExternalToJSON(json) { return PaymentRouteExternalToJSONTyped(json, false); } function PaymentRouteExternalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'account_id': value['accountId'], 'created_at': ((value['createdAt']).toISOString()), 'general_payment_route_args': (0, GeneralPaymentRouteArgsOutput_1.GeneralPaymentRouteArgsOutputToJSON)(value['generalPaymentRouteArgs']), 'id': value['id'], 'is_deleted': value['isDeleted'], 'name': value['name'], 'object': (0, ObjectName_1.ObjectNameToJSON)(value['object']), 'route_config': value['routeConfig'], 'route_type': (0, PaymentRouteType_1.PaymentRouteTypeToJSON)(value['routeType']), 'updated_at': ((value['updatedAt']).toISOString()), }; }