class Tpaga::City
Attributes
country[RW]
name[RW]
state[RW]
Public Class Methods
attribute_map()
click to toggle source
attribute mapping from ruby-style variable name to JSON key
# File lib/tpaga/models/city.rb, line 6 def self.attribute_map { # :'name' => :'name', # ISO 3166-2 code for state :'state' => :'state', # ISO 3166-1 Alpha 2 code for country :'country' => :'country' } end
new(attributes = {})
click to toggle source
# File lib/tpaga/models/city.rb, line 31 def initialize(attributes = {}) return if !attributes.is_a?(Hash) || attributes.empty? # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'name'] @name = attributes[:'name'] end if attributes[:'state'] @state = attributes[:'state'] end if attributes[:'country'] @country = attributes[:'country'] end end
swagger_types()
click to toggle source
attribute type
# File lib/tpaga/models/city.rb, line 22 def self.swagger_types { :'name' => :'string', :'state' => :'string', :'country' => :'string' } end