class Swgr2rb::Request
Request
contains all parameters necessary for making an API request. Its instances are being passed to ConductorSender.send_request
.
Attributes
body[R]
endpoint_name[R]
headers[R]
subdomain[R]
type[R]
Public Class Methods
new(endpoint_name, type, headers, body)
click to toggle source
# 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
Public Instance Methods
url()
click to toggle source
# File lib/request_sender/request.rb, line 17 def url generate_url end
Private Instance Methods
generate_url()
click to toggle source
# File lib/request_sender/request.rb, line 27 def generate_url "https://#{endpoint_name}" end
process_request_type()
click to toggle source
# File lib/request_sender/request.rb, line 23 def process_request_type @type = type.split(' ').join('_') if type.split(' ').length > 1 end