UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

57 lines (56 loc) 1.87 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.instanceOfPriceTierPublic = instanceOfPriceTierPublic; exports.PriceTierPublicFromJSON = PriceTierPublicFromJSON; exports.PriceTierPublicFromJSONTyped = PriceTierPublicFromJSONTyped; exports.PriceTierPublicToJSON = PriceTierPublicToJSON; exports.PriceTierPublicToJSONTyped = PriceTierPublicToJSONTyped; /** * Check if a given object implements the PriceTierPublic interface. */ function instanceOfPriceTierPublic(value) { if (!('flatAmountAtom' in value) || value['flatAmountAtom'] === undefined) return false; if (!('unitAmountAtom' in value) || value['unitAmountAtom'] === undefined) return false; return true; } function PriceTierPublicFromJSON(json) { return PriceTierPublicFromJSONTyped(json, false); } function PriceTierPublicFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'flatAmountAtom': json['flat_amount_atom'], 'unitAmountAtom': json['unit_amount_atom'], 'unitsUpto': json['units_upto'] == null ? undefined : json['units_upto'], }; } function PriceTierPublicToJSON(json) { return PriceTierPublicToJSONTyped(json, false); } function PriceTierPublicToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'flat_amount_atom': value['flatAmountAtom'], 'unit_amount_atom': value['unitAmountAtom'], 'units_upto': value['unitsUpto'], }; }