Method: ProcessOut::CustomerAction#fill_with_data

Defined in:
lib/processout/customer_action.rb

#fill_with_data(data) ⇒ Object

Fills the object with data coming from the API Params:

data

Hash of data coming from the API



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/processout/customer_action.rb', line 59

def fill_with_data(data)
  if data.nil?
    return self
  end
  if data.include? "type"
    self.type = data["type"]
  end
  if data.include? "value"
    self.value = data["value"]
  end
  if data.include? "metadata"
    self. = data["metadata"]
  end
  
  self
end