UNPKG

wallee

Version:
46 lines (45 loc) 2.37 kB
import { AddressCreateFromJSON, AddressCreateToJSON, } from './AddressCreate'; /** * Check if a given object implements the AbstractSubscriberUpdate interface. */ export function instanceOfAbstractSubscriberUpdate(value) { return true; } export function AbstractSubscriberUpdateFromJSON(json) { return AbstractSubscriberUpdateFromJSONTyped(json, false); } export function AbstractSubscriberUpdateFromJSONTyped(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']), }; } export function AbstractSubscriberUpdateToJSON(json) { return AbstractSubscriberUpdateToJSONTyped(json, false); } export function AbstractSubscriberUpdateToJSONTyped(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']), }; }