wallee
Version:
TypeScript/JavaScript client for wallee
46 lines (45 loc) • 1.81 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfLineItemReductionCreate = instanceOfLineItemReductionCreate;
exports.LineItemReductionCreateFromJSON = LineItemReductionCreateFromJSON;
exports.LineItemReductionCreateFromJSONTyped = LineItemReductionCreateFromJSONTyped;
exports.LineItemReductionCreateToJSON = LineItemReductionCreateToJSON;
exports.LineItemReductionCreateToJSONTyped = LineItemReductionCreateToJSONTyped;
/**
* Check if a given object implements the LineItemReductionCreate interface.
*/
function instanceOfLineItemReductionCreate(value) {
if (!('quantityReduction' in value) || value['quantityReduction'] === undefined)
return false;
if (!('unitPriceReduction' in value) || value['unitPriceReduction'] === undefined)
return false;
if (!('lineItemUniqueId' in value) || value['lineItemUniqueId'] === undefined)
return false;
return true;
}
function LineItemReductionCreateFromJSON(json) {
return LineItemReductionCreateFromJSONTyped(json, false);
}
function LineItemReductionCreateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'quantityReduction': json['quantityReduction'],
'unitPriceReduction': json['unitPriceReduction'],
'lineItemUniqueId': json['lineItemUniqueId'],
};
}
function LineItemReductionCreateToJSON(json) {
return LineItemReductionCreateToJSONTyped(json, false);
}
function LineItemReductionCreateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'quantityReduction': value['quantityReduction'],
'unitPriceReduction': value['unitPriceReduction'],
'lineItemUniqueId': value['lineItemUniqueId'],
};
}