UNPKG

wallee

Version:
53 lines (52 loc) 2.72 kB
import { AddressCreateFromJSON, AddressCreateToJSON, } from './AddressCreate'; import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState'; /** * Check if a given object implements the SubscriberActive interface. */ export function instanceOfSubscriberActive(value) { if (!('version' in value) || value['version'] === undefined) return false; return true; } export function SubscriberActiveFromJSON(json) { return SubscriberActiveFromJSONTyped(json, false); } export 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 : AddressCreateFromJSON(json['shippingAddress']), 'language': json['language'] == null ? undefined : json['language'], 'billingAddress': json['billingAddress'] == null ? undefined : AddressCreateFromJSON(json['billingAddress']), 'version': json['version'], 'state': json['state'] == null ? undefined : CreationEntityStateFromJSON(json['state']), }; } export function SubscriberActiveToJSON(json) { return SubscriberActiveToJSONTyped(json, false); } export 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': AddressCreateToJSON(value['shippingAddress']), 'language': value['language'], 'billingAddress': AddressCreateToJSON(value['billingAddress']), 'version': value['version'], 'state': CreationEntityStateToJSON(value['state']), }; }