Class: HonestRenter::Post

Inherits:
Object
  • Object
show all
Defined in:
lib/requests/post.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource_name, body, session = nil) ⇒ Post

Returns a new instance of Post.



3
4
5
6
7
# File 'lib/requests/post.rb', line 3

def initialize(resource_name, body, session=nil)
  @resource_name = resource_name
  @body = body
  @session = session
end

Instance Method Details

#callObject



9
10
11
12
13
# File 'lib/requests/post.rb', line 9

def call
  client = HonestRenter::Client.new
  request = HonestRenter::Request.new(client, @session)
  request.post(@resource_name, @body)
end