UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

59 lines (58 loc) 2.06 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.instanceOfCheckoutSuccessResponse = instanceOfCheckoutSuccessResponse; exports.CheckoutSuccessResponseFromJSON = CheckoutSuccessResponseFromJSON; exports.CheckoutSuccessResponseFromJSONTyped = CheckoutSuccessResponseFromJSONTyped; exports.CheckoutSuccessResponseToJSON = CheckoutSuccessResponseToJSON; exports.CheckoutSuccessResponseToJSONTyped = CheckoutSuccessResponseToJSONTyped; /** * Check if a given object implements the CheckoutSuccessResponse interface. */ function instanceOfCheckoutSuccessResponse(value) { if (!('customerId' in value) || value['customerId'] === undefined) return false; if (!('invoiceUrls' in value) || value['invoiceUrls'] === undefined) return false; if (!('subscriptionIds' in value) || value['subscriptionIds'] === undefined) return false; return true; } function CheckoutSuccessResponseFromJSON(json) { return CheckoutSuccessResponseFromJSONTyped(json, false); } function CheckoutSuccessResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'customerId': json['customer_id'], 'invoiceUrls': json['invoice_urls'], 'subscriptionIds': json['subscription_ids'], }; } function CheckoutSuccessResponseToJSON(json) { return CheckoutSuccessResponseToJSONTyped(json, false); } function CheckoutSuccessResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'customer_id': value['customerId'], 'invoice_urls': value['invoiceUrls'], 'subscription_ids': value['subscriptionIds'], }; }