UNPKG

wallee

Version:
51 lines (50 loc) 2.86 kB
import { GenderFromJSON, GenderToJSON, } from './Gender'; import { LegalOrganizationFormFromJSON, LegalOrganizationFormToJSON, } from './LegalOrganizationForm'; /** * Check if a given object implements the CustomerPostalAddress interface. */ export function instanceOfCustomerPostalAddress(value) { return true; } export function CustomerPostalAddressFromJSON(json) { return CustomerPostalAddressFromJSONTyped(json, false); } export 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 : 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 : 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'], }; } export function CustomerPostalAddressToJSON(json) { return CustomerPostalAddressToJSONTyped(json, false); } export function CustomerPostalAddressToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'gender': GenderToJSON(value['gender']), 'legalOrganizationForm': LegalOrganizationFormToJSON(value['legalOrganizationForm']), }; }