UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

64 lines (63 loc) 2.41 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.instanceOfListResponseCustomerExternal = instanceOfListResponseCustomerExternal; exports.ListResponseCustomerExternalFromJSON = ListResponseCustomerExternalFromJSON; exports.ListResponseCustomerExternalFromJSONTyped = ListResponseCustomerExternalFromJSONTyped; exports.ListResponseCustomerExternalToJSON = ListResponseCustomerExternalToJSON; exports.ListResponseCustomerExternalToJSONTyped = ListResponseCustomerExternalToJSONTyped; const CustomerExternal_1 = require("./CustomerExternal"); /** * Check if a given object implements the ListResponseCustomerExternal interface. */ function instanceOfListResponseCustomerExternal(value) { if (!('data' in value) || value['data'] === undefined) return false; if (!('pageNumber' in value) || value['pageNumber'] === undefined) return false; if (!('pageSize' in value) || value['pageSize'] === undefined) return false; if (!('totalObjects' in value) || value['totalObjects'] === undefined) return false; return true; } function ListResponseCustomerExternalFromJSON(json) { return ListResponseCustomerExternalFromJSONTyped(json, false); } function ListResponseCustomerExternalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'data': (json['data'].map(CustomerExternal_1.CustomerExternalFromJSON)), 'pageNumber': json['page_number'], 'pageSize': json['page_size'], 'totalObjects': json['total_objects'], }; } function ListResponseCustomerExternalToJSON(json) { return ListResponseCustomerExternalToJSONTyped(json, false); } function ListResponseCustomerExternalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'data': (value['data'].map(CustomerExternal_1.CustomerExternalToJSON)), 'page_number': value['pageNumber'], 'page_size': value['pageSize'], 'total_objects': value['totalObjects'], }; }