Class: B2bCenterApi::WebService::Remote

Inherits:
Object
  • Object
show all
Defined in:
lib/b2b_center_api/web_service/remote.rb

Direct Known Subclasses

RemoteAuction, RemoteMarket, RemoteTender

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Remote

Returns a new instance of Remote.



21
22
23
# File 'lib/b2b_center_api/web_service/remote.rb', line 21

def initialize(client)
  @client = client
end

Instance Method Details

#command(name, params) ⇒ Object



7
8
9
10
11
12
# File 'lib/b2b_center_api/web_service/remote.rb', line 7

def command(name, params)
  auth = B2bCenterApi::Settings.auth_options
  params = auth.merge(params)
  res = @client.call(method_fullname(name), message: params)
  Response.new(res)
end

#command_with_attachments(name, attachments, params) ⇒ Object



14
15
16
17
18
19
# File 'lib/b2b_center_api/web_service/remote.rb', line 14

def command_with_attachments(name, attachments, params)
  auth = B2bCenterApi::Settings.auth_options
  params = auth.merge(params)
  res = @client.call(method_fullname(name), message: params, attachments: attachments)
  Response.new(res)
end