Class: Conekta::Payee

Instance Attribute Summary

Attributes inherited from ConektaObject

#id, #values

Instance Method Summary collapse

Methods included from Operations::CreateMember

#create_member

Methods included from Operations::CustomAction

#custom_action

Methods included from Operations::Update

#update

Methods included from Operations::Delete

#delete, #delete_member

Methods included from Operations::Create

included

Methods included from Operations::Where

included

Methods included from Operations::Find

included

Methods inherited from Resource

url, #url

Methods inherited from ConektaObject

class_name, #class_name, #create_attr, #first, #initialize, #inspect, #last, #set_val, #to_s, #unset_key

Constructor Details

This class inherits a constructor from Conekta::ConektaObject

Instance Method Details

#create_payout_method(params) ⇒ Object



22
23
24
# File 'lib/conekta/payee.rb', line 22

def create_payout_method(params)
  self.create_member('payout_methods', params)
end

#load_from(response = nil) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/conekta/payee.rb', line 10

def load_from(response=nil)
  if response
    super
  end
  payee = self
  self.payout_methods.each do |k,v|
    if !v.respond_to? :deleted or !v.deleted
      v.create_attr('payee', payee)
      self.payout_methods.set_val(k,v)
    end
  end
end