Module: FindByHandleWithNumber

Included in:
Economic::CreditorProxy, Economic::DebtorProxy, Economic::InvoiceProxy, Economic::OrderLineProxy, Economic::OrderProxy, Economic::ProductProxy
Defined in:
lib/economic/proxies/actions/find_by_handle_with_number.rb

Overview

Use FindByHandleWithNumber when the SOAP action to find entity requires ‘Number` to be passed rather than the default `Id`

Instance Method Summary collapse

Instance Method Details

#find(handle) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/economic/proxies/actions/find_by_handle_with_number.rb', line 6

def find(handle)
  handle = if handle.respond_to?(:to_i)
    Economic::Entity::Handle.build(:number => handle)
  else
    Economic::Entity::Handle.build(handle)
  end
  super(handle)
end