Class: Swgr2rb::Request
- Inherits:
-
Object
- Object
- Swgr2rb::Request
- Defined in:
- lib/request_sender/request.rb
Overview
Request contains all parameters necessary for making an API request. Its instances are being passed to ConductorSender.send_request.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#endpoint_name ⇒ Object
readonly
Returns the value of attribute endpoint_name.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#subdomain ⇒ Object
readonly
Returns the value of attribute subdomain.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(endpoint_name, type, headers, body) ⇒ Request
constructor
A new instance of Request.
- #url ⇒ Object
Constructor Details
#initialize(endpoint_name, type, headers, body) ⇒ Request
Returns a new instance of Request.
9 10 11 12 13 14 15 |
# File 'lib/request_sender/request.rb', line 9 def initialize(endpoint_name, type, headers, body) @endpoint_name = endpoint_name @type = type @headers = headers @body = body process_request_type end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
7 8 9 |
# File 'lib/request_sender/request.rb', line 7 def body @body end |
#endpoint_name ⇒ Object (readonly)
Returns the value of attribute endpoint_name.
7 8 9 |
# File 'lib/request_sender/request.rb', line 7 def endpoint_name @endpoint_name end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
7 8 9 |
# File 'lib/request_sender/request.rb', line 7 def headers @headers end |
#subdomain ⇒ Object (readonly)
Returns the value of attribute subdomain.
7 8 9 |
# File 'lib/request_sender/request.rb', line 7 def subdomain @subdomain end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/request_sender/request.rb', line 7 def type @type end |
Instance Method Details
#url ⇒ Object
17 18 19 |
# File 'lib/request_sender/request.rb', line 17 def url generate_url end |