wallee
Version:
TypeScript/JavaScript client for wallee
34 lines (33 loc) • 1.37 kB
JavaScript
import { SubscriptionSuspensionActionFromJSON, SubscriptionSuspensionActionToJSON, } from './SubscriptionSuspensionAction';
/**
* Check if a given object implements the SuspensionCreationRequest interface.
*/
export function instanceOfSuspensionCreationRequest(value) {
return true;
}
export function SuspensionCreationRequestFromJSON(json) {
return SuspensionCreationRequestFromJSONTyped(json, false);
}
export function SuspensionCreationRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'note': json['note'] == null ? undefined : json['note'],
'endAction': json['endAction'] == null ? undefined : SubscriptionSuspensionActionFromJSON(json['endAction']),
'plannedEndDate': json['plannedEndDate'] == null ? undefined : (new Date(json['plannedEndDate'])),
};
}
export function SuspensionCreationRequestToJSON(json) {
return SuspensionCreationRequestToJSONTyped(json, false);
}
export function SuspensionCreationRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'note': value['note'],
'endAction': SubscriptionSuspensionActionToJSON(value['endAction']),
'plannedEndDate': value['plannedEndDate'] == null ? undefined : ((value['plannedEndDate']).toISOString()),
};
}