UNPKG

wallee

Version:
53 lines (52 loc) 2.65 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfDunningCase = instanceOfDunningCase; exports.DunningCaseFromJSON = DunningCaseFromJSON; exports.DunningCaseFromJSONTyped = DunningCaseFromJSONTyped; exports.DunningCaseToJSON = DunningCaseToJSON; exports.DunningCaseToJSONTyped = DunningCaseToJSONTyped; const DunningFlow_1 = require("./DunningFlow"); const DunningCaseState_1 = require("./DunningCaseState"); const TransactionInvoice_1 = require("./TransactionInvoice"); /** * Check if a given object implements the DunningCase interface. */ function instanceOfDunningCase(value) { return true; } function DunningCaseFromJSON(json) { return DunningCaseFromJSONTyped(json, false); } function DunningCaseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'canceledOn': json['canceledOn'] == null ? undefined : (new Date(json['canceledOn'])), 'derecognizedOn': json['derecognizedOn'] == null ? undefined : (new Date(json['derecognizedOn'])), 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'version': json['version'] == null ? undefined : json['version'], 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'initialInvoice': json['initialInvoice'] == null ? undefined : (0, TransactionInvoice_1.TransactionInvoiceFromJSON)(json['initialInvoice']), 'succeededOn': json['succeededOn'] == null ? undefined : (new Date(json['succeededOn'])), 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, DunningCaseState_1.DunningCaseStateFromJSON)(json['state']), 'linkedTransaction': json['linkedTransaction'] == null ? undefined : json['linkedTransaction'], 'failedOn': json['failedOn'] == null ? undefined : (new Date(json['failedOn'])), 'flow': json['flow'] == null ? undefined : (0, DunningFlow_1.DunningFlowFromJSON)(json['flow']), }; } function DunningCaseToJSON(json) { return DunningCaseToJSONTyped(json, false); } function DunningCaseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'initialInvoice': (0, TransactionInvoice_1.TransactionInvoiceToJSON)(value['initialInvoice']), 'state': (0, DunningCaseState_1.DunningCaseStateToJSON)(value['state']), 'flow': (0, DunningFlow_1.DunningFlowToJSON)(value['flow']), }; }