Class: RSimpy::PostingService

Inherits:
BaseService show all
Defined in:
lib/posting_service.rb

Instance Attribute Summary

Attributes inherited from BaseService

#status_code, #status_message, #success

Instance Method Summary collapse

Methods inherited from BaseService

#execute_using, #reset, #set_status

Constructor Details

#initialize(command, client) ⇒ PostingService

Returns a new instance of PostingService.



14
15
16
17
# File 'lib/posting_service.rb', line 14

def initialize command, client
  @command = command
  @client = client
end

Instance Method Details



23
24
25
# File 'lib/posting_service.rb', line 23

def build_link params
  "/#{@command}.do?" << params.to_querystring
end

#execute(params) ⇒ Object



19
20
21
# File 'lib/posting_service.rb', line 19

def execute params
  execute_using :post, params
end