UNPKG

wallee

Version:
37 lines (36 loc) 1.45 kB
import { CustomerAddressTypeFromJSON, CustomerAddressTypeToJSON, } from './CustomerAddressType'; import { CustomerPostalAddressCreateFromJSON, CustomerPostalAddressCreateToJSON, } from './CustomerPostalAddressCreate'; /** * Check if a given object implements the CustomerAddressActive interface. */ export function instanceOfCustomerAddressActive(value) { if (!('version' in value) || value['version'] === undefined) return false; return true; } export function CustomerAddressActiveFromJSON(json) { return CustomerAddressActiveFromJSONTyped(json, false); } export function CustomerAddressActiveFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'address': json['address'] == null ? undefined : CustomerPostalAddressCreateFromJSON(json['address']), 'addressType': json['addressType'] == null ? undefined : CustomerAddressTypeFromJSON(json['addressType']), 'version': json['version'], }; } export function CustomerAddressActiveToJSON(json) { return CustomerAddressActiveToJSONTyped(json, false); } export function CustomerAddressActiveToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'address': CustomerPostalAddressCreateToJSON(value['address']), 'addressType': CustomerAddressTypeToJSON(value['addressType']), 'version': value['version'], }; }