Class: ProcessOut::CustomerAction
- Inherits:
-
Object
- Object
- ProcessOut::CustomerAction
- Defined in:
- lib/processout/customer_action.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#fill_with_data(data) ⇒ Object
- Fills the object with data coming from the API Params:
data -
Hashof data coming from the API.
- Fills the object with data coming from the API Params:
-
#initialize(client) ⇒ CustomerAction
constructor
- Initializes the CustomerAction object Params:
client -
ProcessOutclient instance.
- Initializes the CustomerAction object Params:
Constructor Details
#initialize(client) ⇒ CustomerAction
Initializes the CustomerAction object Params:
client-
ProcessOutclient instance
26 27 28 29 30 31 32 |
# File 'lib/processout/customer_action.rb', line 26 def initialize(client) @client = client @type = "" @value = "" end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
10 11 12 |
# File 'lib/processout/customer_action.rb', line 10 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
11 12 13 |
# File 'lib/processout/customer_action.rb', line 11 def value @value end |
Instance Method Details
#fill_with_data(data) ⇒ Object
Fills the object with data coming from the API Params:
data-
Hashof data coming from the API
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/processout/customer_action.rb', line 37 def fill_with_data(data) if data.include? "type" @type = data["type"] end if data.include? "value" @value = data["value"] end self end |