UNPKG

wallee

Version:
58 lines (57 loc) 3.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfCustomerPostalAddress = instanceOfCustomerPostalAddress; exports.CustomerPostalAddressFromJSON = CustomerPostalAddressFromJSON; exports.CustomerPostalAddressFromJSONTyped = CustomerPostalAddressFromJSONTyped; exports.CustomerPostalAddressToJSON = CustomerPostalAddressToJSON; exports.CustomerPostalAddressToJSONTyped = CustomerPostalAddressToJSONTyped; const Gender_1 = require("./Gender"); const LegalOrganizationForm_1 = require("./LegalOrganizationForm"); /** * Check if a given object implements the CustomerPostalAddress interface. */ function instanceOfCustomerPostalAddress(value) { return true; } function CustomerPostalAddressFromJSON(json) { return CustomerPostalAddressFromJSONTyped(json, false); } function CustomerPostalAddressFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'country': json['country'] == null ? undefined : json['country'], 'mobilePhoneNumber': json['mobilePhoneNumber'] == null ? undefined : json['mobilePhoneNumber'], 'gender': json['gender'] == null ? undefined : (0, Gender_1.GenderFromJSON)(json['gender']), 'organizationName': json['organizationName'] == null ? undefined : json['organizationName'], 'city': json['city'] == null ? undefined : json['city'], 'commercialRegisterNumber': json['commercialRegisterNumber'] == null ? undefined : json['commercialRegisterNumber'], 'socialSecurityNumber': json['socialSecurityNumber'] == null ? undefined : json['socialSecurityNumber'], 'givenName': json['givenName'] == null ? undefined : json['givenName'], 'postcode': json['postcode'] == null ? undefined : json['postcode'], 'legalOrganizationForm': json['legalOrganizationForm'] == null ? undefined : (0, LegalOrganizationForm_1.LegalOrganizationFormFromJSON)(json['legalOrganizationForm']), 'salesTaxNumber': json['salesTaxNumber'] == null ? undefined : json['salesTaxNumber'], 'dateOfBirth': json['dateOfBirth'] == null ? undefined : (new Date(json['dateOfBirth'])), 'dependentLocality': json['dependentLocality'] == null ? undefined : json['dependentLocality'], 'emailAddress': json['emailAddress'] == null ? undefined : json['emailAddress'], 'phoneNumber': json['phoneNumber'] == null ? undefined : json['phoneNumber'], 'sortingCode': json['sortingCode'] == null ? undefined : json['sortingCode'], 'street': json['street'] == null ? undefined : json['street'], 'familyName': json['familyName'] == null ? undefined : json['familyName'], 'postalState': json['postalState'] == null ? undefined : json['postalState'], 'salutation': json['salutation'] == null ? undefined : json['salutation'], }; } function CustomerPostalAddressToJSON(json) { return CustomerPostalAddressToJSONTyped(json, false); } function CustomerPostalAddressToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'gender': (0, Gender_1.GenderToJSON)(value['gender']), 'legalOrganizationForm': (0, LegalOrganizationForm_1.LegalOrganizationFormToJSON)(value['legalOrganizationForm']), }; }