UNPKG

wallee

Version:
37 lines (36 loc) 1.46 kB
import { CustomerAddressTypeFromJSON, CustomerAddressTypeToJSON, } from './CustomerAddressType'; import { CustomerPostalAddressCreateFromJSON, CustomerPostalAddressCreateToJSON, } from './CustomerPostalAddressCreate'; /** * Check if a given object implements the CustomerAddressCreate interface. */ export function instanceOfCustomerAddressCreate(value) { if (!('customer' in value) || value['customer'] === undefined) return false; return true; } export function CustomerAddressCreateFromJSON(json) { return CustomerAddressCreateFromJSONTyped(json, false); } export function CustomerAddressCreateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'address': json['address'] == null ? undefined : CustomerPostalAddressCreateFromJSON(json['address']), 'addressType': json['addressType'] == null ? undefined : CustomerAddressTypeFromJSON(json['addressType']), 'customer': json['customer'], }; } export function CustomerAddressCreateToJSON(json) { return CustomerAddressCreateToJSONTyped(json, false); } export function CustomerAddressCreateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'address': CustomerPostalAddressCreateToJSON(value['address']), 'addressType': CustomerAddressTypeToJSON(value['addressType']), 'customer': value['customer'], }; }