Class: TrinsicApi::EvrotrustAddressComponents
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- TrinsicApi::EvrotrustAddressComponents
- Defined in:
- lib/trinsic_api/models/evrotrust_address_components.rb
Instance Attribute Summary collapse
-
#apartment ⇒ Object
The apartment fragment of the address.
-
#apartment_local ⇒ Object
The local-language apartment fragment of the address.
-
#building_number ⇒ Object
The building number fragment of the address.
-
#building_number_local ⇒ Object
The local-language building number fragment of the address.
-
#district ⇒ Object
The district fragment of the address.
-
#district_local ⇒ Object
The local-language district fragment of the address.
-
#entrance ⇒ Object
The entrance fragment of the address.
-
#entrance_local ⇒ Object
The local-language entrance fragment of the address.
-
#floor ⇒ Object
The floor fragment of the address.
-
#floor_local ⇒ Object
The local-language floor fragment of the address.
-
#location ⇒ Object
The location or street fragment of the address.
-
#location_local ⇒ Object
The local-language location or street fragment of the address.
-
#municipality ⇒ Object
The municipality fragment of the address.
-
#municipality_local ⇒ Object
The local-language municipality fragment of the address.
-
#settlement ⇒ Object
The settlement fragment of the address.
-
#settlement_local ⇒ Object
The local-language settlement fragment of the address.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ EvrotrustAddressComponents
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ EvrotrustAddressComponents
Initializes the object
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 144 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::EvrotrustAddressComponents` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::EvrotrustAddressComponents`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'district') self.district = attributes[:'district'] end if attributes.key?(:'district_local') self.district_local = attributes[:'district_local'] end if attributes.key?(:'municipality') self.municipality = attributes[:'municipality'] end if attributes.key?(:'municipality_local') self.municipality_local = attributes[:'municipality_local'] end if attributes.key?(:'settlement') self.settlement = attributes[:'settlement'] end if attributes.key?(:'settlement_local') self.settlement_local = attributes[:'settlement_local'] end if attributes.key?(:'location') self.location = attributes[:'location'] end if attributes.key?(:'location_local') self.location_local = attributes[:'location_local'] end if attributes.key?(:'building_number') self.building_number = attributes[:'building_number'] end if attributes.key?(:'building_number_local') self.building_number_local = attributes[:'building_number_local'] end if attributes.key?(:'entrance') self.entrance = attributes[:'entrance'] end if attributes.key?(:'entrance_local') self.entrance_local = attributes[:'entrance_local'] end if attributes.key?(:'floor') self.floor = attributes[:'floor'] end if attributes.key?(:'floor_local') self.floor_local = attributes[:'floor_local'] end if attributes.key?(:'apartment') self.apartment = attributes[:'apartment'] end if attributes.key?(:'apartment_local') self.apartment_local = attributes[:'apartment_local'] end end |
Instance Attribute Details
#apartment ⇒ Object
The apartment fragment of the address.
61 62 63 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 61 def apartment @apartment end |
#apartment_local ⇒ Object
The local-language apartment fragment of the address.
64 65 66 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 64 def apartment_local @apartment_local end |
#building_number ⇒ Object
The building number fragment of the address.
43 44 45 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 43 def building_number @building_number end |
#building_number_local ⇒ Object
The local-language building number fragment of the address.
46 47 48 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 46 def building_number_local @building_number_local end |
#district ⇒ Object
The district fragment of the address.
19 20 21 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 19 def district @district end |
#district_local ⇒ Object
The local-language district fragment of the address.
22 23 24 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 22 def district_local @district_local end |
#entrance ⇒ Object
The entrance fragment of the address.
49 50 51 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 49 def entrance @entrance end |
#entrance_local ⇒ Object
The local-language entrance fragment of the address.
52 53 54 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 52 def entrance_local @entrance_local end |
#floor ⇒ Object
The floor fragment of the address.
55 56 57 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 55 def floor @floor end |
#floor_local ⇒ Object
The local-language floor fragment of the address.
58 59 60 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 58 def floor_local @floor_local end |
#location ⇒ Object
The location or street fragment of the address.
37 38 39 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 37 def location @location end |
#location_local ⇒ Object
The local-language location or street fragment of the address.
40 41 42 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 40 def location_local @location_local end |
#municipality ⇒ Object
The municipality fragment of the address.
25 26 27 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 25 def municipality @municipality end |
#municipality_local ⇒ Object
The local-language municipality fragment of the address.
28 29 30 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 28 def municipality_local @municipality_local end |
#settlement ⇒ Object
The settlement fragment of the address.
31 32 33 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 31 def settlement @settlement end |
#settlement_local ⇒ Object
The local-language settlement fragment of the address.
34 35 36 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 34 def settlement_local @settlement_local end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
89 90 91 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 89 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
94 95 96 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 94 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 67 def self.attribute_map { :'district' => :'district', :'district_local' => :'districtLocal', :'municipality' => :'municipality', :'municipality_local' => :'municipalityLocal', :'settlement' => :'settlement', :'settlement_local' => :'settlementLocal', :'location' => :'location', :'location_local' => :'locationLocal', :'building_number' => :'buildingNumber', :'building_number_local' => :'buildingNumberLocal', :'entrance' => :'entrance', :'entrance_local' => :'entranceLocal', :'floor' => :'floor', :'floor_local' => :'floorLocal', :'apartment' => :'apartment', :'apartment_local' => :'apartmentLocal' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 276 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 121 def self.openapi_nullable Set.new([ :'district', :'district_local', :'municipality', :'municipality_local', :'settlement', :'settlement_local', :'location', :'location_local', :'building_number', :'building_number_local', :'entrance', :'entrance_local', :'floor', :'floor_local', :'apartment', :'apartment_local' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 99 def self.openapi_types { :'district' => :'String', :'district_local' => :'String', :'municipality' => :'String', :'municipality_local' => :'String', :'settlement' => :'String', :'settlement_local' => :'String', :'location' => :'String', :'location_local' => :'String', :'building_number' => :'String', :'building_number_local' => :'String', :'entrance' => :'String', :'entrance_local' => :'String', :'floor' => :'String', :'floor_local' => :'String', :'apartment' => :'String', :'apartment_local' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 240 def ==(o) return true if self.equal?(o) self.class == o.class && district == o.district && district_local == o.district_local && municipality == o.municipality && municipality_local == o.municipality_local && settlement == o.settlement && settlement_local == o.settlement_local && location == o.location && location_local == o.location_local && building_number == o.building_number && building_number_local == o.building_number_local && entrance == o.entrance && entrance_local == o.entrance_local && floor == o.floor && floor_local == o.floor_local && apartment == o.apartment && apartment_local == o.apartment_local end |
#eql?(o) ⇒ Boolean
263 264 265 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 263 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
269 270 271 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 269 def hash [district, district_local, municipality, municipality_local, settlement, settlement_local, location, location_local, building_number, building_number_local, entrance, entrance_local, floor, floor_local, apartment, apartment_local].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
225 226 227 228 229 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 225 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 298 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
233 234 235 236 |
# File 'lib/trinsic_api/models/evrotrust_address_components.rb', line 233 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |