Class: PipelineDealsApi::HttpClient
- Inherits:
-
Object
- Object
- PipelineDealsApi::HttpClient
show all
- Defined in:
- lib/pipeline_deals_api/http_client.rb
Defined Under Namespace
Classes: BadGatewayError, BadRequestError, ClientError, ConflictError, ForbiddenError, GatewayTimeoutError, InternalServerError, MethodNotAllowed, NotFoundError, PaymentRequiredError, RequestTimeoutError, RequestURITooLongError, Response, ResponseError, ServerError, ServiceUnavailableError, TooManyRequestsError, UnauthorizedError, UnknownError, UnprocessableEntityError
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(credentials:) ⇒ HttpClient
Returns a new instance of HttpClient.
5
6
7
|
# File 'lib/pipeline_deals_api/http_client.rb', line 5
def initialize(credentials:)
@credentials = credentials
end
|
Instance Attribute Details
#credentials ⇒ Object
Returns the value of attribute credentials.
3
4
5
|
# File 'lib/pipeline_deals_api/http_client.rb', line 3
def credentials
@credentials
end
|
Instance Method Details
#delete(url, body = {}, headers = {}) ⇒ Object
21
22
23
|
# File 'lib/pipeline_deals_api/http_client.rb', line 21
def delete(url, body = {}, = {})
http_request(:delete, url, body, )
end
|
#get(url, body = {}, headers = {}) ⇒ Object
9
10
11
|
# File 'lib/pipeline_deals_api/http_client.rb', line 9
def get(url, body = {}, = {})
http_request(:get, url, body, )
end
|
#post(url, body = {}, headers = {}) ⇒ Object
17
18
19
|
# File 'lib/pipeline_deals_api/http_client.rb', line 17
def post(url, body = {}, = {})
http_request(:post, url, body, )
end
|
#put(url, body = {}, headers = {}) ⇒ Object
13
14
15
|
# File 'lib/pipeline_deals_api/http_client.rb', line 13
def put(url, body = {}, = {})
http_request(:put, url, body, )
end
|