Method: ProcessOut::CustomerAction#prefill

Defined in:
lib/processout/customer_action.rb

#prefill(data) ⇒ Object

Prefills the object with the data passed as parameters Params:

data

Hash of data



79
80
81
82
83
84
85
86
87
88
# File 'lib/processout/customer_action.rb', line 79

def prefill(data)
  if data.nil?
    return self
  end
  self.type = data.fetch(:type, self.type)
  self.value = data.fetch(:value, self.value)
  self. = data.fetch(:metadata, self.)
  
  self
end