UNPKG

wallee

Version:
56 lines (55 loc) 3.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfDeliveryIndication = instanceOfDeliveryIndication; exports.DeliveryIndicationFromJSON = DeliveryIndicationFromJSON; exports.DeliveryIndicationFromJSONTyped = DeliveryIndicationFromJSONTyped; exports.DeliveryIndicationToJSON = DeliveryIndicationToJSON; exports.DeliveryIndicationToJSONTyped = DeliveryIndicationToJSONTyped; const DeliveryIndicationState_1 = require("./DeliveryIndicationState"); const Transaction_1 = require("./Transaction"); const DeliveryIndicationDecisionReason_1 = require("./DeliveryIndicationDecisionReason"); const TransactionCompletion_1 = require("./TransactionCompletion"); /** * Check if a given object implements the DeliveryIndication interface. */ function instanceOfDeliveryIndication(value) { return true; } function DeliveryIndicationFromJSON(json) { return DeliveryIndicationFromJSONTyped(json, false); } function DeliveryIndicationFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'completion': json['completion'] == null ? undefined : (0, TransactionCompletion_1.TransactionCompletionFromJSON)(json['completion']), 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'automaticDecisionReason': json['automaticDecisionReason'] == null ? undefined : (0, DeliveryIndicationDecisionReason_1.DeliveryIndicationDecisionReasonFromJSON)(json['automaticDecisionReason']), 'automaticallyDecidedOn': json['automaticallyDecidedOn'] == null ? undefined : (new Date(json['automaticallyDecidedOn'])), 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'manuallyDecidedBy': json['manuallyDecidedBy'] == null ? undefined : json['manuallyDecidedBy'], 'timeoutOn': json['timeoutOn'] == null ? undefined : (new Date(json['timeoutOn'])), 'manualDecisionTimeoutOn': json['manualDecisionTimeoutOn'] == null ? undefined : (new Date(json['manualDecisionTimeoutOn'])), 'manuallyDecidedOn': json['manuallyDecidedOn'] == null ? undefined : (new Date(json['manuallyDecidedOn'])), 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, DeliveryIndicationState_1.DeliveryIndicationStateFromJSON)(json['state']), 'linkedTransaction': json['linkedTransaction'] == null ? undefined : json['linkedTransaction'], 'transaction': json['transaction'] == null ? undefined : (0, Transaction_1.TransactionFromJSON)(json['transaction']), }; } function DeliveryIndicationToJSON(json) { return DeliveryIndicationToJSONTyped(json, false); } function DeliveryIndicationToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'completion': (0, TransactionCompletion_1.TransactionCompletionToJSON)(value['completion']), 'automaticDecisionReason': (0, DeliveryIndicationDecisionReason_1.DeliveryIndicationDecisionReasonToJSON)(value['automaticDecisionReason']), 'state': (0, DeliveryIndicationState_1.DeliveryIndicationStateToJSON)(value['state']), 'transaction': (0, Transaction_1.TransactionToJSON)(value['transaction']), }; }