wallee
Version:
TypeScript/JavaScript client for wallee
42 lines (41 loc) • 1.65 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfPaymentAdjustment = instanceOfPaymentAdjustment;
exports.PaymentAdjustmentFromJSON = PaymentAdjustmentFromJSON;
exports.PaymentAdjustmentFromJSONTyped = PaymentAdjustmentFromJSONTyped;
exports.PaymentAdjustmentToJSON = PaymentAdjustmentToJSON;
exports.PaymentAdjustmentToJSONTyped = PaymentAdjustmentToJSONTyped;
const Tax_1 = require("./Tax");
/**
* Check if a given object implements the PaymentAdjustment interface.
*/
function instanceOfPaymentAdjustment(value) {
return true;
}
function PaymentAdjustmentFromJSON(json) {
return PaymentAdjustmentFromJSONTyped(json, false);
}
function PaymentAdjustmentFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'amountExcludingTax': json['amountExcludingTax'] == null ? undefined : json['amountExcludingTax'],
'rateInPercentage': json['rateInPercentage'] == null ? undefined : json['rateInPercentage'],
'tax': json['tax'] == null ? undefined : (0, Tax_1.TaxFromJSON)(json['tax']),
'id': json['id'] == null ? undefined : json['id'],
'amountIncludingTax': json['amountIncludingTax'] == null ? undefined : json['amountIncludingTax'],
'type': json['type'] == null ? undefined : json['type'],
};
}
function PaymentAdjustmentToJSON(json) {
return PaymentAdjustmentToJSONTyped(json, false);
}
function PaymentAdjustmentToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'tax': (0, Tax_1.TaxToJSON)(value['tax']),
};
}