UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

56 lines (55 loc) 1.96 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.instanceOfCustomerBalanceExternal = instanceOfCustomerBalanceExternal; exports.CustomerBalanceExternalFromJSON = CustomerBalanceExternalFromJSON; exports.CustomerBalanceExternalFromJSONTyped = CustomerBalanceExternalFromJSONTyped; exports.CustomerBalanceExternalToJSON = CustomerBalanceExternalToJSON; exports.CustomerBalanceExternalToJSONTyped = CustomerBalanceExternalToJSONTyped; const CurrencyEnum_1 = require("./CurrencyEnum"); /** * Check if a given object implements the CustomerBalanceExternal interface. */ function instanceOfCustomerBalanceExternal(value) { if (!('amountAtom' in value) || value['amountAtom'] === undefined) return false; if (!('currency' in value) || value['currency'] === undefined) return false; return true; } function CustomerBalanceExternalFromJSON(json) { return CustomerBalanceExternalFromJSONTyped(json, false); } function CustomerBalanceExternalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'amountAtom': json['amount_atom'], 'currency': (0, CurrencyEnum_1.CurrencyEnumFromJSON)(json['currency']), }; } function CustomerBalanceExternalToJSON(json) { return CustomerBalanceExternalToJSONTyped(json, false); } function CustomerBalanceExternalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'amount_atom': value['amountAtom'], 'currency': (0, CurrencyEnum_1.CurrencyEnumToJSON)(value['currency']), }; }