wallee
Version:
TypeScript/JavaScript client for wallee
40 lines (39 loc) • 1.67 kB
JavaScript
import { DunningFlowTypeFromJSON, DunningFlowTypeToJSON, } from './DunningFlowType';
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
/**
* Check if a given object implements the DunningFlow interface.
*/
export function instanceOfDunningFlow(value) {
return true;
}
export function DunningFlowFromJSON(json) {
return DunningFlowFromJSONTyped(json, false);
}
export function DunningFlowFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'name': json['name'] == null ? undefined : json['name'],
'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])),
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : CreationEntityStateFromJSON(json['state']),
'conditions': json['conditions'] == null ? undefined : json['conditions'],
'priority': json['priority'] == null ? undefined : json['priority'],
'type': json['type'] == null ? undefined : DunningFlowTypeFromJSON(json['type']),
'version': json['version'] == null ? undefined : json['version'],
};
}
export function DunningFlowToJSON(json) {
return DunningFlowToJSONTyped(json, false);
}
export function DunningFlowToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': CreationEntityStateToJSON(value['state']),
'type': DunningFlowTypeToJSON(value['type']),
};
}