wallee
Version:
TypeScript/JavaScript client for wallee
43 lines (42 loc) • 1.72 kB
JavaScript
/**
* Check if a given object implements the SubscriptionPending interface.
*/
export function instanceOfSubscriptionPending(value) {
if (!('version' in value) || value['version'] === undefined)
return false;
return true;
}
export function SubscriptionPendingFromJSON(json) {
return SubscriptionPendingFromJSONTyped(json, false);
}
export function SubscriptionPendingFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'description': json['description'] == null ? undefined : json['description'],
'plannedTerminationDate': json['plannedTerminationDate'] == null ? undefined : (new Date(json['plannedTerminationDate'])),
'affiliate': json['affiliate'] == null ? undefined : json['affiliate'],
'version': json['version'],
'reference': json['reference'] == null ? undefined : json['reference'],
'subscriber': json['subscriber'] == null ? undefined : json['subscriber'],
'token': json['token'] == null ? undefined : json['token'],
};
}
export function SubscriptionPendingToJSON(json) {
return SubscriptionPendingToJSONTyped(json, false);
}
export function SubscriptionPendingToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'description': value['description'],
'plannedTerminationDate': value['plannedTerminationDate'] == null ? undefined : ((value['plannedTerminationDate']).toISOString()),
'affiliate': value['affiliate'],
'version': value['version'],
'reference': value['reference'],
'subscriber': value['subscriber'],
'token': value['token'],
};
}