@getopenpay/client
Version:
OpenPay API TypeScript SDK
58 lines (57 loc) • 2.19 kB
JavaScript
;
/* 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.instanceOfInvoiceDiscountAmountsExternal = instanceOfInvoiceDiscountAmountsExternal;
exports.InvoiceDiscountAmountsExternalFromJSON = InvoiceDiscountAmountsExternalFromJSON;
exports.InvoiceDiscountAmountsExternalFromJSONTyped = InvoiceDiscountAmountsExternalFromJSONTyped;
exports.InvoiceDiscountAmountsExternalToJSON = InvoiceDiscountAmountsExternalToJSON;
exports.InvoiceDiscountAmountsExternalToJSONTyped = InvoiceDiscountAmountsExternalToJSONTyped;
const ObjectName_1 = require("./ObjectName");
/**
* Check if a given object implements the InvoiceDiscountAmountsExternal interface.
*/
function instanceOfInvoiceDiscountAmountsExternal(value) {
if (!('amountAtom' in value) || value['amountAtom'] === undefined)
return false;
if (!('discountId' in value) || value['discountId'] === undefined)
return false;
return true;
}
function InvoiceDiscountAmountsExternalFromJSON(json) {
return InvoiceDiscountAmountsExternalFromJSONTyped(json, false);
}
function InvoiceDiscountAmountsExternalFromJSONTyped(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 InvoiceDiscountAmountsExternalToJSON(json) {
return InvoiceDiscountAmountsExternalToJSONTyped(json, false);
}
function InvoiceDiscountAmountsExternalToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'amount_atom': value['amountAtom'],
'discount_id': value['discountId'],
'object': (0, ObjectName_1.ObjectNameToJSON)(value['object']),
};
}