wallee
Version:
TypeScript/JavaScript client for wallee
41 lines (40 loc) • 1.85 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfSuspensionCreationRequest = instanceOfSuspensionCreationRequest;
exports.SuspensionCreationRequestFromJSON = SuspensionCreationRequestFromJSON;
exports.SuspensionCreationRequestFromJSONTyped = SuspensionCreationRequestFromJSONTyped;
exports.SuspensionCreationRequestToJSON = SuspensionCreationRequestToJSON;
exports.SuspensionCreationRequestToJSONTyped = SuspensionCreationRequestToJSONTyped;
const SubscriptionSuspensionAction_1 = require("./SubscriptionSuspensionAction");
/**
* Check if a given object implements the SuspensionCreationRequest interface.
*/
function instanceOfSuspensionCreationRequest(value) {
return true;
}
function SuspensionCreationRequestFromJSON(json) {
return SuspensionCreationRequestFromJSONTyped(json, false);
}
function SuspensionCreationRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'note': json['note'] == null ? undefined : json['note'],
'endAction': json['endAction'] == null ? undefined : (0, SubscriptionSuspensionAction_1.SubscriptionSuspensionActionFromJSON)(json['endAction']),
'plannedEndDate': json['plannedEndDate'] == null ? undefined : (new Date(json['plannedEndDate'])),
};
}
function SuspensionCreationRequestToJSON(json) {
return SuspensionCreationRequestToJSONTyped(json, false);
}
function SuspensionCreationRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'note': value['note'],
'endAction': (0, SubscriptionSuspensionAction_1.SubscriptionSuspensionActionToJSON)(value['endAction']),
'plannedEndDate': value['plannedEndDate'] == null ? undefined : ((value['plannedEndDate']).toISOString()),
};
}