UNPKG

wallee

Version:
48 lines (47 loc) 2.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfCustomerAddress = instanceOfCustomerAddress; exports.CustomerAddressFromJSON = CustomerAddressFromJSON; exports.CustomerAddressFromJSONTyped = CustomerAddressFromJSONTyped; exports.CustomerAddressToJSON = CustomerAddressToJSON; exports.CustomerAddressToJSONTyped = CustomerAddressToJSONTyped; const Customer_1 = require("./Customer"); const CustomerAddressType_1 = require("./CustomerAddressType"); const CustomerPostalAddress_1 = require("./CustomerPostalAddress"); /** * Check if a given object implements the CustomerAddress interface. */ function instanceOfCustomerAddress(value) { return true; } function CustomerAddressFromJSON(json) { return CustomerAddressFromJSONTyped(json, false); } function CustomerAddressFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'address': json['address'] == null ? undefined : (0, CustomerPostalAddress_1.CustomerPostalAddressFromJSON)(json['address']), 'addressType': json['addressType'] == null ? undefined : (0, CustomerAddressType_1.CustomerAddressTypeFromJSON)(json['addressType']), 'id': json['id'] == null ? undefined : json['id'], 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'version': json['version'] == null ? undefined : json['version'], 'customer': json['customer'] == null ? undefined : (0, Customer_1.CustomerFromJSON)(json['customer']), 'defaultAddress': json['defaultAddress'] == null ? undefined : json['defaultAddress'], }; } function CustomerAddressToJSON(json) { return CustomerAddressToJSONTyped(json, false); } function CustomerAddressToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'address': (0, CustomerPostalAddress_1.CustomerPostalAddressToJSON)(value['address']), 'addressType': (0, CustomerAddressType_1.CustomerAddressTypeToJSON)(value['addressType']), 'customer': (0, Customer_1.CustomerToJSON)(value['customer']), }; }