Method: Tpaga::ApiErrorsItem#initialize
- Defined in:
- lib/tpaga/models/api_errors_item.rb
#initialize(attributes = {}) ⇒ ApiErrorsItem
Returns a new instance of ApiErrorsItem.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/tpaga/models/api_errors_item.rb', line 35 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[:'object'] @object = attributes[:'object'] end if attributes[:'field'] @field = attributes[:'field'] end if attributes[:'rejected-value'] @rejected_value = attributes[:'rejected-value'] end if attributes[:'message'] = attributes[:'message'] end end |