Class: WalmartOpen::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/walmart_open/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#paramsObject

Returns the value of attribute params.



7
8
9
# File 'lib/walmart_open/request.rb', line 7

def params
  @params
end

#pathObject

Returns the value of attribute path.



7
8
9
# File 'lib/walmart_open/request.rb', line 7

def path
  @path
end

Instance Method Details

#submit(client) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/walmart_open/request.rb', line 9

def submit(client)
  raise "@path must be specified" unless path

  response = HTTParty.public_send(request_method, build_url(client), request_options(client))
  verify_response(response)
  parse_response(response)
end