UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

64 lines (63 loc) 2.5 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.instanceOfListResponseSubscriptionExternal = instanceOfListResponseSubscriptionExternal; exports.ListResponseSubscriptionExternalFromJSON = ListResponseSubscriptionExternalFromJSON; exports.ListResponseSubscriptionExternalFromJSONTyped = ListResponseSubscriptionExternalFromJSONTyped; exports.ListResponseSubscriptionExternalToJSON = ListResponseSubscriptionExternalToJSON; exports.ListResponseSubscriptionExternalToJSONTyped = ListResponseSubscriptionExternalToJSONTyped; const SubscriptionExternal_1 = require("./SubscriptionExternal"); /** * Check if a given object implements the ListResponseSubscriptionExternal interface. */ function instanceOfListResponseSubscriptionExternal(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 ListResponseSubscriptionExternalFromJSON(json) { return ListResponseSubscriptionExternalFromJSONTyped(json, false); } function ListResponseSubscriptionExternalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'data': (json['data'].map(SubscriptionExternal_1.SubscriptionExternalFromJSON)), 'pageNumber': json['page_number'], 'pageSize': json['page_size'], 'totalObjects': json['total_objects'], }; } function ListResponseSubscriptionExternalToJSON(json) { return ListResponseSubscriptionExternalToJSONTyped(json, false); } function ListResponseSubscriptionExternalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'data': (value['data'].map(SubscriptionExternal_1.SubscriptionExternalToJSON)), 'page_number': value['pageNumber'], 'page_size': value['pageSize'], 'total_objects': value['totalObjects'], }; }