@getopenpay/client
Version:
OpenPay API TypeScript SDK
54 lines (53 loc) • 2.12 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.instanceOfCustomerInvoiceSettings = instanceOfCustomerInvoiceSettings;
exports.CustomerInvoiceSettingsFromJSON = CustomerInvoiceSettingsFromJSON;
exports.CustomerInvoiceSettingsFromJSONTyped = CustomerInvoiceSettingsFromJSONTyped;
exports.CustomerInvoiceSettingsToJSON = CustomerInvoiceSettingsToJSON;
exports.CustomerInvoiceSettingsToJSONTyped = CustomerInvoiceSettingsToJSONTyped;
const TaxIdSetting_1 = require("./TaxIdSetting");
/**
* Check if a given object implements the CustomerInvoiceSettings interface.
*/
function instanceOfCustomerInvoiceSettings(value) {
return true;
}
function CustomerInvoiceSettingsFromJSON(json) {
return CustomerInvoiceSettingsFromJSONTyped(json, false);
}
function CustomerInvoiceSettingsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'customerTaxIds': json['customer_tax_ids'] == null ? undefined : (json['customer_tax_ids'].map(TaxIdSetting_1.TaxIdSettingFromJSON)),
'defaultNetD': json['default_net_d'] == null ? undefined : json['default_net_d'],
'emailReceiptOnPaid': json['email_receipt_on_paid'] == null ? undefined : json['email_receipt_on_paid'],
};
}
function CustomerInvoiceSettingsToJSON(json) {
return CustomerInvoiceSettingsToJSONTyped(json, false);
}
function CustomerInvoiceSettingsToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'customer_tax_ids': value['customerTaxIds'] == null ? undefined : (value['customerTaxIds'].map(TaxIdSetting_1.TaxIdSettingToJSON)),
'default_net_d': value['defaultNetD'],
'email_receipt_on_paid': value['emailReceiptOnPaid'],
};
}