wallee
Version:
TypeScript/JavaScript client for wallee
35 lines (34 loc) • 1.3 kB
JavaScript
import { RestAddressFormatFromJSON, RestAddressFormatToJSON, } from './RestAddressFormat';
/**
* Check if a given object implements the RestCountry interface.
*/
export function instanceOfRestCountry(value) {
return true;
}
export function RestCountryFromJSON(json) {
return RestCountryFromJSONTyped(json, false);
}
export function RestCountryFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'isoCode2': json['isoCode2'] == null ? undefined : json['isoCode2'],
'addressFormat': json['addressFormat'] == null ? undefined : RestAddressFormatFromJSON(json['addressFormat']),
'isoCode3': json['isoCode3'] == null ? undefined : json['isoCode3'],
'stateCodes': json['stateCodes'] == null ? undefined : new Set(json['stateCodes']),
'name': json['name'] == null ? undefined : json['name'],
'numericCode': json['numericCode'] == null ? undefined : json['numericCode'],
};
}
export function RestCountryToJSON(json) {
return RestCountryToJSONTyped(json, false);
}
export function RestCountryToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'addressFormat': RestAddressFormatToJSON(value['addressFormat']),
};
}