wallee
Version:
TypeScript/JavaScript client for wallee
54 lines (53 loc) • 2.83 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfSubscriber = instanceOfSubscriber;
exports.SubscriberFromJSON = SubscriberFromJSON;
exports.SubscriberFromJSONTyped = SubscriberFromJSONTyped;
exports.SubscriberToJSON = SubscriberToJSON;
exports.SubscriberToJSONTyped = SubscriberToJSONTyped;
const Address_1 = require("./Address");
const CreationEntityState_1 = require("./CreationEntityState");
/**
* Check if a given object implements the Subscriber interface.
*/
function instanceOfSubscriber(value) {
return true;
}
function SubscriberFromJSON(json) {
return SubscriberFromJSONTyped(json, false);
}
function SubscriberFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])),
'description': json['description'] == null ? undefined : json['description'],
'externalId': json['externalId'] == null ? undefined : json['externalId'],
'language': json['language'] == null ? undefined : json['language'],
'version': json['version'] == null ? undefined : json['version'],
'reference': json['reference'] == null ? undefined : json['reference'],
'additionalAllowedPaymentMethodConfigurations': json['additionalAllowedPaymentMethodConfigurations'] == null ? undefined : json['additionalAllowedPaymentMethodConfigurations'],
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'metaData': json['metaData'] == null ? undefined : json['metaData'],
'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'],
'disallowedPaymentMethodConfigurations': json['disallowedPaymentMethodConfigurations'] == null ? undefined : json['disallowedPaymentMethodConfigurations'],
'shippingAddress': json['shippingAddress'] == null ? undefined : (0, Address_1.AddressFromJSON)(json['shippingAddress']),
'billingAddress': json['billingAddress'] == null ? undefined : (0, Address_1.AddressFromJSON)(json['billingAddress']),
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
};
}
function SubscriberToJSON(json) {
return SubscriberToJSONTyped(json, false);
}
function SubscriberToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'shippingAddress': (0, Address_1.AddressToJSON)(value['shippingAddress']),
'billingAddress': (0, Address_1.AddressToJSON)(value['billingAddress']),
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
};
}