wallee
Version:
TypeScript/JavaScript client for wallee
42 lines (41 loc) • 1.95 kB
JavaScript
import { CompletionLineItemCreateFromJSON, CompletionLineItemCreateToJSON, } from './CompletionLineItemCreate';
/**
* Check if a given object implements the TransactionCompletionDetails interface.
*/
export function instanceOfTransactionCompletionDetails(value) {
return true;
}
export function TransactionCompletionDetailsFromJSON(json) {
return TransactionCompletionDetailsFromJSONTyped(json, false);
}
export function TransactionCompletionDetailsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'lineItems': json['lineItems'] == null ? undefined : (json['lineItems'].map(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'],
};
}
export function TransactionCompletionDetailsToJSON(json) {
return TransactionCompletionDetailsToJSONTyped(json, false);
}
export function TransactionCompletionDetailsToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'lineItems': value['lineItems'] == null ? undefined : (value['lineItems'].map(CompletionLineItemCreateToJSON)),
'metaData': value['metaData'],
'lastCompletion': value['lastCompletion'],
'statementDescriptor': value['statementDescriptor'],
'externalId': value['externalId'],
'invoiceMerchantReference': value['invoiceMerchantReference'],
'id': value['id'],
};
}