wallee
Version:
TypeScript/JavaScript client for wallee
35 lines (34 loc) • 1.27 kB
JavaScript
import { TaxFromJSON, TaxToJSON, } from './Tax';
/**
* Check if a given object implements the PaymentAdjustment interface.
*/
export function instanceOfPaymentAdjustment(value) {
return true;
}
export function PaymentAdjustmentFromJSON(json) {
return PaymentAdjustmentFromJSONTyped(json, false);
}
export 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 : TaxFromJSON(json['tax']),
'id': json['id'] == null ? undefined : json['id'],
'amountIncludingTax': json['amountIncludingTax'] == null ? undefined : json['amountIncludingTax'],
'type': json['type'] == null ? undefined : json['type'],
};
}
export function PaymentAdjustmentToJSON(json) {
return PaymentAdjustmentToJSONTyped(json, false);
}
export function PaymentAdjustmentToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'tax': TaxToJSON(value['tax']),
};
}