UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

58 lines (57 loc) 2.26 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.instanceOfInvoiceItemDiscountAmountsExternal = instanceOfInvoiceItemDiscountAmountsExternal; exports.InvoiceItemDiscountAmountsExternalFromJSON = InvoiceItemDiscountAmountsExternalFromJSON; exports.InvoiceItemDiscountAmountsExternalFromJSONTyped = InvoiceItemDiscountAmountsExternalFromJSONTyped; exports.InvoiceItemDiscountAmountsExternalToJSON = InvoiceItemDiscountAmountsExternalToJSON; exports.InvoiceItemDiscountAmountsExternalToJSONTyped = InvoiceItemDiscountAmountsExternalToJSONTyped; const ObjectName_1 = require("./ObjectName"); /** * Check if a given object implements the InvoiceItemDiscountAmountsExternal interface. */ function instanceOfInvoiceItemDiscountAmountsExternal(value) { if (!('amountAtom' in value) || value['amountAtom'] === undefined) return false; if (!('discountId' in value) || value['discountId'] === undefined) return false; return true; } function InvoiceItemDiscountAmountsExternalFromJSON(json) { return InvoiceItemDiscountAmountsExternalFromJSONTyped(json, false); } function InvoiceItemDiscountAmountsExternalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'amountAtom': json['amount_atom'], 'discountId': json['discount_id'], 'object': json['object'] == null ? undefined : (0, ObjectName_1.ObjectNameFromJSON)(json['object']), }; } function InvoiceItemDiscountAmountsExternalToJSON(json) { return InvoiceItemDiscountAmountsExternalToJSONTyped(json, false); } function InvoiceItemDiscountAmountsExternalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'amount_atom': value['amountAtom'], 'discount_id': value['discountId'], 'object': (0, ObjectName_1.ObjectNameToJSON)(value['object']), }; }