Class: Teilashare::Request
- Inherits:
-
Object
- Object
- Teilashare::Request
- Defined in:
- lib/teilashare/request.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(client, resource) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(client, resource) ⇒ Request
Returns a new instance of Request.
7 8 9 10 |
# File 'lib/teilashare/request.rb', line 7 def initialize(client, resource) @client = client @resource = resource end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/teilashare/request.rb', line 5 def client @client end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
5 6 7 |
# File 'lib/teilashare/request.rb', line 5 def resource @resource end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 |
# File 'lib/teilashare/request.rb', line 12 def call connection.get(request_url) do |req| req.headers['x-ShareASale-Date'] = auth.date_string req.headers['x-ShareASale-Authentication'] = auth.hash end end |