Sha256: 6fc18acbe48c83409cdfa3de18c8847028540500c3a473f54e0c60640df16ee0

Contents?: true

Size: 600 Bytes

Versions: 3

Compression:

Stored size: 600 Bytes

Contents

require "economic/proxies/entity_proxy"

module Economic
  class CashBookProxy < EntityProxy
    def find_by_name(name)
      response = request("FindByName", "name" => name)

      cash_book = build
      cash_book.partial = true
      cash_book.persisted = true
      cash_book.number = response[:number]
      cash_book
    end

    def get_name(id)
      response = request("GetName", "cashBookHandle" => {
                           "Number" => id
                         })

      cash_book = build
      cash_book.number = id
      cash_book.name = response
      cash_book
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rconomic-0.7.0 lib/economic/proxies/cash_book_proxy.rb
rconomic-0.6.1 lib/economic/proxies/cash_book_proxy.rb
rconomic-0.6.0 lib/economic/proxies/cash_book_proxy.rb