UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

64 lines (63 loc) 2.38 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.instanceOfListResponseProductExternal = instanceOfListResponseProductExternal; exports.ListResponseProductExternalFromJSON = ListResponseProductExternalFromJSON; exports.ListResponseProductExternalFromJSONTyped = ListResponseProductExternalFromJSONTyped; exports.ListResponseProductExternalToJSON = ListResponseProductExternalToJSON; exports.ListResponseProductExternalToJSONTyped = ListResponseProductExternalToJSONTyped; const ProductExternal_1 = require("./ProductExternal"); /** * Check if a given object implements the ListResponseProductExternal interface. */ function instanceOfListResponseProductExternal(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 ListResponseProductExternalFromJSON(json) { return ListResponseProductExternalFromJSONTyped(json, false); } function ListResponseProductExternalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'data': (json['data'].map(ProductExternal_1.ProductExternalFromJSON)), 'pageNumber': json['page_number'], 'pageSize': json['page_size'], 'totalObjects': json['total_objects'], }; } function ListResponseProductExternalToJSON(json) { return ListResponseProductExternalToJSONTyped(json, false); } function ListResponseProductExternalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'data': (value['data'].map(ProductExternal_1.ProductExternalToJSON)), 'page_number': value['pageNumber'], 'page_size': value['pageSize'], 'total_objects': value['totalObjects'], }; }