UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

59 lines (58 loc) 2.53 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.instanceOfUpdateSubscriptionResponse = instanceOfUpdateSubscriptionResponse; exports.UpdateSubscriptionResponseFromJSON = UpdateSubscriptionResponseFromJSON; exports.UpdateSubscriptionResponseFromJSONTyped = UpdateSubscriptionResponseFromJSONTyped; exports.UpdateSubscriptionResponseToJSON = UpdateSubscriptionResponseToJSON; exports.UpdateSubscriptionResponseToJSONTyped = UpdateSubscriptionResponseToJSONTyped; const InvoiceExternal_1 = require("./InvoiceExternal"); const SubscriptionExternal_1 = require("./SubscriptionExternal"); /** * Check if a given object implements the UpdateSubscriptionResponse interface. */ function instanceOfUpdateSubscriptionResponse(value) { if (!('invoices' in value) || value['invoices'] === undefined) return false; if (!('subscriptions' in value) || value['subscriptions'] === undefined) return false; return true; } function UpdateSubscriptionResponseFromJSON(json) { return UpdateSubscriptionResponseFromJSONTyped(json, false); } function UpdateSubscriptionResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'invoices': (json['invoices'].map(InvoiceExternal_1.InvoiceExternalFromJSON)), 'renewalInvoices': json['renewal_invoices'] == null ? undefined : (json['renewal_invoices'].map(InvoiceExternal_1.InvoiceExternalFromJSON)), 'subscriptions': (json['subscriptions'].map(SubscriptionExternal_1.SubscriptionExternalFromJSON)), }; } function UpdateSubscriptionResponseToJSON(json) { return UpdateSubscriptionResponseToJSONTyped(json, false); } function UpdateSubscriptionResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'invoices': (value['invoices'].map(InvoiceExternal_1.InvoiceExternalToJSON)), 'renewal_invoices': value['renewalInvoices'] == null ? undefined : (value['renewalInvoices'].map(InvoiceExternal_1.InvoiceExternalToJSON)), 'subscriptions': (value['subscriptions'].map(SubscriptionExternal_1.SubscriptionExternalToJSON)), }; }