Class: ProcessOut::CustomerAction

Inherits:
Object
  • Object
show all
Defined in:
lib/processout/customer_action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ CustomerAction

Initializes the CustomerAction object Params:

client

ProcessOut client 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

#typeObject

Returns the value of attribute type.



10
11
12
# File 'lib/processout/customer_action.rb', line 10

def type
  @type
end

#valueObject

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

Hash of 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