Class: RlmLogistics::Record::Base

Inherits:
ActiveRecord::Remote::Base
  • Object
show all
Extended by:
Helpers::AuthenticationHelper
Defined in:
lib/rlm_logistics/record/base.rb

Direct Known Subclasses

Address, Credit, Inventory, Item, Line, PackedOrder, SalesOrder

Instance Method Summary collapse

Methods included from Helpers::AuthenticationHelper

authenticate

Instance Method Details

#credentialsObject



17
18
19
20
21
22
# File 'lib/rlm_logistics/record/base.rb', line 17

def credentials
  {
    username:  RlmLogistics.username,
    key_value: RlmLogistics.password
  }
end

#custom_optionsObject



13
14
15
# File 'lib/rlm_logistics/record/base.rb', line 13

def custom_options
  { authentication: credentials, company_number: RlmLogistics.company }
end

#soap_optionsObject



24
25
26
27
28
29
30
31
# File 'lib/rlm_logistics/record/base.rb', line 24

def soap_options
  super.merge(
    root:         "ITEM_FILTER",
    namespace:    "http://ws.rlm.com",
    operation:    self.class.operation_path,
    base_element: self.class.base_element_name
  )
end