module LastbillClient::Utils::AuthentifiedRequest
@author ciappa_m@modulotech.fr Included by the request where an authentication token is required. @see LastbillClient::Request
Attributes
token[R]
@return [String] The authentication token
Public Instance Methods
with_token(token)
click to toggle source
Store the given authentication token and use it to set the Authorization
header of the request. @param token [String] The authentication token @return [LastbillClient::Utils::AuthentifiedRequest] self (to chain methods)
# File lib/lastbill_client/request/requests/utils/authentified_request.rb, line 17 def with_token(token) @token = token @headers["Authorization"] = token self end