wallee
Version:
TypeScript/JavaScript client for wallee
49 lines (48 loc) • 2.45 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfTransactionCompletionDetails = instanceOfTransactionCompletionDetails;
exports.TransactionCompletionDetailsFromJSON = TransactionCompletionDetailsFromJSON;
exports.TransactionCompletionDetailsFromJSONTyped = TransactionCompletionDetailsFromJSONTyped;
exports.TransactionCompletionDetailsToJSON = TransactionCompletionDetailsToJSON;
exports.TransactionCompletionDetailsToJSONTyped = TransactionCompletionDetailsToJSONTyped;
const CompletionLineItemCreate_1 = require("./CompletionLineItemCreate");
/**
* Check if a given object implements the TransactionCompletionDetails interface.
*/
function instanceOfTransactionCompletionDetails(value) {
return true;
}
function TransactionCompletionDetailsFromJSON(json) {
return TransactionCompletionDetailsFromJSONTyped(json, false);
}
function TransactionCompletionDetailsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'lineItems': json['lineItems'] == null ? undefined : (json['lineItems'].map(CompletionLineItemCreate_1.CompletionLineItemCreateFromJSON)),
'metaData': json['metaData'] == null ? undefined : json['metaData'],
'lastCompletion': json['lastCompletion'] == null ? undefined : json['lastCompletion'],
'statementDescriptor': json['statementDescriptor'] == null ? undefined : json['statementDescriptor'],
'externalId': json['externalId'] == null ? undefined : json['externalId'],
'invoiceMerchantReference': json['invoiceMerchantReference'] == null ? undefined : json['invoiceMerchantReference'],
'id': json['id'] == null ? undefined : json['id'],
};
}
function TransactionCompletionDetailsToJSON(json) {
return TransactionCompletionDetailsToJSONTyped(json, false);
}
function TransactionCompletionDetailsToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'lineItems': value['lineItems'] == null ? undefined : (value['lineItems'].map(CompletionLineItemCreate_1.CompletionLineItemCreateToJSON)),
'metaData': value['metaData'],
'lastCompletion': value['lastCompletion'],
'statementDescriptor': value['statementDescriptor'],
'externalId': value['externalId'],
'invoiceMerchantReference': value['invoiceMerchantReference'],
'id': value['id'],
};
}