UNPKG

wallee

Version:
49 lines (48 loc) 2.93 kB
import { DeliveryIndicationStateFromJSON, DeliveryIndicationStateToJSON, } from './DeliveryIndicationState'; import { TransactionFromJSON, TransactionToJSON, } from './Transaction'; import { DeliveryIndicationDecisionReasonFromJSON, DeliveryIndicationDecisionReasonToJSON, } from './DeliveryIndicationDecisionReason'; import { TransactionCompletionFromJSON, TransactionCompletionToJSON, } from './TransactionCompletion'; /** * Check if a given object implements the DeliveryIndication interface. */ export function instanceOfDeliveryIndication(value) { return true; } export function DeliveryIndicationFromJSON(json) { return DeliveryIndicationFromJSONTyped(json, false); } export function DeliveryIndicationFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'completion': json['completion'] == null ? undefined : TransactionCompletionFromJSON(json['completion']), 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'automaticDecisionReason': json['automaticDecisionReason'] == null ? undefined : 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 : DeliveryIndicationStateFromJSON(json['state']), 'linkedTransaction': json['linkedTransaction'] == null ? undefined : json['linkedTransaction'], 'transaction': json['transaction'] == null ? undefined : TransactionFromJSON(json['transaction']), }; } export function DeliveryIndicationToJSON(json) { return DeliveryIndicationToJSONTyped(json, false); } export function DeliveryIndicationToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'completion': TransactionCompletionToJSON(value['completion']), 'automaticDecisionReason': DeliveryIndicationDecisionReasonToJSON(value['automaticDecisionReason']), 'state': DeliveryIndicationStateToJSON(value['state']), 'transaction': TransactionToJSON(value['transaction']), }; }