Class: AuthenticatedClient::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/authenticated_client/auth_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



13
14
15
16
17
18
19
20
# File 'lib/authenticated_client/auth_client.rb', line 13

def initialize
  @url = nil
  @token = nil
  @verb = :post
  @parameters = {}
  @body = {}
  @auditing = nil
end

Instance Attribute Details

#auditingObject

Returns the value of attribute auditing.



11
12
13
# File 'lib/authenticated_client/auth_client.rb', line 11

def auditing
  @auditing
end

#bodyObject

Returns the value of attribute body.



10
11
12
# File 'lib/authenticated_client/auth_client.rb', line 10

def body
  @body
end

#parametersObject

Returns the value of attribute parameters.



9
10
11
# File 'lib/authenticated_client/auth_client.rb', line 9

def parameters
  @parameters
end

#tokenObject

Returns the value of attribute token.



7
8
9
# File 'lib/authenticated_client/auth_client.rb', line 7

def token
  @token
end

#urlObject

Returns the value of attribute url.



6
7
8
# File 'lib/authenticated_client/auth_client.rb', line 6

def url
  @url
end

#verbObject

Returns the value of attribute verb.



8
9
10
# File 'lib/authenticated_client/auth_client.rb', line 8

def verb
  @verb
end

Instance Method Details

#requestObject



22
23
24
25
# File 'lib/authenticated_client/auth_client.rb', line 22

def request
  validate_elements_before_performing_request
  perform_http_request
end