Class: Economic::CreditorProxy

Inherits:
EntityProxy show all
Includes:
FindByCiNumber, FindByHandleWithNumber, FindByNumber
Defined in:
lib/economic/proxies/creditor_proxy.rb

Instance Attribute Summary

Attributes inherited from EntityProxy

#owner

Instance Method Summary collapse

Methods included from FindByNumber

#find_by_number

Methods included from FindByHandleWithNumber

#find

Methods included from FindByCiNumber

#find_by_ci_number

Methods inherited from EntityProxy

#all, #append, #build, entity_class, #entity_class, entity_class_name, #entity_class_name, #find, #get_data, #initialize, #session

Constructor Details

This class inherits a constructor from Economic::EntityProxy

Instance Method Details

#create_simple(opts) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/economic/proxies/creditor_proxy.rb', line 14

def create_simple(opts)
  response = request("Create", "number" => opts[:number],
                               "creditorGroupHandle" => {"Number" => opts[:creditor_group_handle][:number]},
                               :name => opts[:name],
                               :vatZone => opts[:vat_zone])

  find(response)
end