Class: Cb::Models::State

Inherits:
ApiResponseModel show all
Defined in:
lib/cb/models/implementations/state.rb

Instance Attribute Summary collapse

Attributes inherited from ApiResponseModel

#api_response

Instance Method Summary collapse

Methods inherited from ApiResponseModel

#initialize

Constructor Details

This class inherits a constructor from Cb::Models::ApiResponseModel

Instance Attribute Details

#keyObject

Returns the value of attribute key.



14
15
16
# File 'lib/cb/models/implementations/state.rb', line 14

def key
  @key
end

#valueObject

Returns the value of attribute value.



14
15
16
# File 'lib/cb/models/implementations/state.rb', line 14

def value
  @value
end

Instance Method Details

#required_fieldsObject



21
22
23
# File 'lib/cb/models/implementations/state.rb', line 21

def required_fields
  %w(StateId StateName)
end

#set_model_propertiesObject



16
17
18
19
# File 'lib/cb/models/implementations/state.rb', line 16

def set_model_properties
  @key = api_response['StateId']
  @value = api_response['StateName']
end