wallee
Version:
TypeScript/JavaScript client for wallee
57 lines (56 loc) • 3.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfDebtCollectionCaseUpdate = instanceOfDebtCollectionCaseUpdate;
exports.DebtCollectionCaseUpdateFromJSON = DebtCollectionCaseUpdateFromJSON;
exports.DebtCollectionCaseUpdateFromJSONTyped = DebtCollectionCaseUpdateFromJSONTyped;
exports.DebtCollectionCaseUpdateToJSON = DebtCollectionCaseUpdateToJSON;
exports.DebtCollectionCaseUpdateToJSONTyped = DebtCollectionCaseUpdateToJSONTyped;
const AddressCreate_1 = require("./AddressCreate");
const LineItemCreate_1 = require("./LineItemCreate");
const DebtCollectionEnvironment_1 = require("./DebtCollectionEnvironment");
/**
* Check if a given object implements the DebtCollectionCaseUpdate interface.
*/
function instanceOfDebtCollectionCaseUpdate(value) {
if (!('version' in value) || value['version'] === undefined)
return false;
return true;
}
function DebtCollectionCaseUpdateFromJSON(json) {
return DebtCollectionCaseUpdateFromJSONTyped(json, false);
}
function DebtCollectionCaseUpdateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'lineItems': json['lineItems'] == null ? undefined : (json['lineItems'].map(LineItemCreate_1.LineItemCreateFromJSON)),
'contractDate': json['contractDate'] == null ? undefined : (new Date(json['contractDate'])),
'environment': json['environment'] == null ? undefined : (0, DebtCollectionEnvironment_1.DebtCollectionEnvironmentFromJSON)(json['environment']),
'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])),
'currency': json['currency'] == null ? undefined : json['currency'],
'language': json['language'] == null ? undefined : json['language'],
'billingAddress': json['billingAddress'] == null ? undefined : (0, AddressCreate_1.AddressCreateFromJSON)(json['billingAddress']),
'spaceViewId': json['spaceViewId'] == null ? undefined : json['spaceViewId'],
'version': json['version'],
};
}
function DebtCollectionCaseUpdateToJSON(json) {
return DebtCollectionCaseUpdateToJSONTyped(json, false);
}
function DebtCollectionCaseUpdateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'lineItems': value['lineItems'] == null ? undefined : (value['lineItems'].map(LineItemCreate_1.LineItemCreateToJSON)),
'contractDate': value['contractDate'] == null ? undefined : ((value['contractDate']).toISOString()),
'environment': (0, DebtCollectionEnvironment_1.DebtCollectionEnvironmentToJSON)(value['environment']),
'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString()),
'currency': value['currency'],
'language': value['language'],
'billingAddress': (0, AddressCreate_1.AddressCreateToJSON)(value['billingAddress']),
'spaceViewId': value['spaceViewId'],
'version': value['version'],
};
}