UNPKG

wallee

Version:
46 lines (45 loc) 2.43 kB
import { AddressCreateFromJSON, AddressCreateToJSON, } from './AddressCreate'; import { LineItemCreateFromJSON, LineItemCreateToJSON, } from './LineItemCreate'; import { DebtCollectionEnvironmentFromJSON, DebtCollectionEnvironmentToJSON, } from './DebtCollectionEnvironment'; /** * Check if a given object implements the AbstractDebtCollectionCaseUpdate interface. */ export function instanceOfAbstractDebtCollectionCaseUpdate(value) { return true; } export function AbstractDebtCollectionCaseUpdateFromJSON(json) { return AbstractDebtCollectionCaseUpdateFromJSONTyped(json, false); } export function AbstractDebtCollectionCaseUpdateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'lineItems': json['lineItems'] == null ? undefined : (json['lineItems'].map(LineItemCreateFromJSON)), 'contractDate': json['contractDate'] == null ? undefined : (new Date(json['contractDate'])), 'environment': json['environment'] == null ? undefined : DebtCollectionEnvironmentFromJSON(json['environment']), 'dueDate': json['dueDate'] == null ? undefined : (new Date(json['dueDate'])), 'currency': json['currency'] == null ? undefined : json['currency'], 'language': json['language'] == null ? undefined : json['language'], 'billingAddress': json['billingAddress'] == null ? undefined : AddressCreateFromJSON(json['billingAddress']), 'spaceViewId': json['spaceViewId'] == null ? undefined : json['spaceViewId'], }; } export function AbstractDebtCollectionCaseUpdateToJSON(json) { return AbstractDebtCollectionCaseUpdateToJSONTyped(json, false); } export function AbstractDebtCollectionCaseUpdateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'lineItems': value['lineItems'] == null ? undefined : (value['lineItems'].map(LineItemCreateToJSON)), 'contractDate': value['contractDate'] == null ? undefined : ((value['contractDate']).toISOString()), 'environment': DebtCollectionEnvironmentToJSON(value['environment']), 'dueDate': value['dueDate'] == null ? undefined : ((value['dueDate']).toISOString()), 'currency': value['currency'], 'language': value['language'], 'billingAddress': AddressCreateToJSON(value['billingAddress']), 'spaceViewId': value['spaceViewId'], }; }