wallee
Version:
TypeScript/JavaScript client for wallee
60 lines (59 loc) • 3.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfSubscriberActive = instanceOfSubscriberActive;
exports.SubscriberActiveFromJSON = SubscriberActiveFromJSON;
exports.SubscriberActiveFromJSONTyped = SubscriberActiveFromJSONTyped;
exports.SubscriberActiveToJSON = SubscriberActiveToJSON;
exports.SubscriberActiveToJSONTyped = SubscriberActiveToJSONTyped;
const AddressCreate_1 = require("./AddressCreate");
const CreationEntityState_1 = require("./CreationEntityState");
/**
* Check if a given object implements the SubscriberActive interface.
*/
function instanceOfSubscriberActive(value) {
if (!('version' in value) || value['version'] === undefined)
return false;
return true;
}
function SubscriberActiveFromJSON(json) {
return SubscriberActiveFromJSONTyped(json, false);
}
function SubscriberActiveFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'reference': json['reference'] == null ? undefined : json['reference'],
'additionalAllowedPaymentMethodConfigurations': json['additionalAllowedPaymentMethodConfigurations'] == null ? undefined : json['additionalAllowedPaymentMethodConfigurations'],
'metaData': json['metaData'] == null ? undefined : json['metaData'],
'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'],
'disallowedPaymentMethodConfigurations': json['disallowedPaymentMethodConfigurations'] == null ? undefined : json['disallowedPaymentMethodConfigurations'],
'description': json['description'] == null ? undefined : json['description'],
'shippingAddress': json['shippingAddress'] == null ? undefined : (0, AddressCreate_1.AddressCreateFromJSON)(json['shippingAddress']),
'language': json['language'] == null ? undefined : json['language'],
'billingAddress': json['billingAddress'] == null ? undefined : (0, AddressCreate_1.AddressCreateFromJSON)(json['billingAddress']),
'version': json['version'],
'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
};
}
function SubscriberActiveToJSON(json) {
return SubscriberActiveToJSONTyped(json, false);
}
function SubscriberActiveToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'reference': value['reference'],
'additionalAllowedPaymentMethodConfigurations': value['additionalAllowedPaymentMethodConfigurations'],
'metaData': value['metaData'],
'emailAddress': value['emailAddress'],
'disallowedPaymentMethodConfigurations': value['disallowedPaymentMethodConfigurations'],
'description': value['description'],
'shippingAddress': (0, AddressCreate_1.AddressCreateToJSON)(value['shippingAddress']),
'language': value['language'],
'billingAddress': (0, AddressCreate_1.AddressCreateToJSON)(value['billingAddress']),
'version': value['version'],
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
};
}