@@ -82,6 +82,7 @@ def self.openapi_nullable
82
82
:'street_address' ,
83
83
:'locality' ,
84
84
:'administrative_area' ,
85
+ :'country' ,
85
86
:'post_code'
86
87
] )
87
88
end
@@ -126,26 +127,21 @@ def initialize(attributes = {})
126
127
# @return Array for valid properties with the reasons
127
128
def list_invalid_properties
128
129
invalid_properties = Array . new
129
- if @country . nil?
130
- invalid_properties . push ( 'invalid value for "country", country cannot be nil.' )
131
- end
132
-
133
130
invalid_properties
134
131
end
135
132
136
133
# Check to see if the all the properties in the model are valid
137
134
# @return true if the model is valid
138
135
def valid?
139
- return false if @country . nil?
140
- country_validator = EnumAttributeValidator . new ( 'String' , [ "CA" , "US" , "MX" , "AT" , "AU" , "BE" , "CH" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "IE" , "IM" , "IS" , "IT" , "LI" , "LT" , "LT" , "LV" , "LU" , "NL" , "NO" , "PH" , "PL" , "RO" , "SE" , "SG" , "SK" , "CN" , "ID" , "IN" , "JP" , "KR" , "MO" , "MY" , "SG" , "HK" , "TW" ] )
136
+ country_validator = EnumAttributeValidator . new ( 'String' , [ "CA" , "US" , "MX" , "AT" , "AU" , "BE" , "CH" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "IE" , "IM" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "NL" , "NO" , "PH" , "PL" , "RO" , "SE" , "SK" , "CN" , "HK" , "ID" , "IN" , "JP" , "KR" , "MO" , "MY" , "SG" , "TW" ] )
141
137
return false unless country_validator . valid? ( @country )
142
138
true
143
139
end
144
140
145
141
# Custom attribute writer method checking allowed values (enum).
146
142
# @param [Object] country Object to be assigned
147
143
def country = ( country )
148
- validator = EnumAttributeValidator . new ( 'String' , [ "CA" , "US" , "MX" , "AT" , "AU" , "BE" , "CH" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "IE" , "IM" , "IS" , "IT" , "LI" , "LT" , "LT " , "LV" , "LU" , " NL", "NO" , "PH" , "PL" , "RO" , "SE" , "SG " , "SK " , "CN " , "ID" , "IN" , "JP" , "KR" , "MO" , "MY" , "SG" , "HK ", "TW" ] )
144
+ validator = EnumAttributeValidator . new ( 'String' , [ "CA" , "US" , "MX" , "AT" , "AU" , "BE" , "CH" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "IE" , "IM" , "IS" , "IT" , "LI" , "LT" , "LU " , "LV" , "NL" , "NO" , "PH" , "PL" , "RO" , "SE" , "SK " , "CN " , "HK " , "ID" , "IN" , "JP" , "KR" , "MO" , "MY" , "SG" , "TW" ] )
149
145
unless validator . valid? ( country )
150
146
fail ArgumentError , "invalid value for \" country\" , must be one of #{ validator . allowable_values } ."
151
147
end
0 commit comments