Class: PartnerApi::Endpoints::Base
- Inherits:
-
Object
- Object
- PartnerApi::Endpoints::Base
- Defined in:
- lib/partner_api/endpoints/base.rb
Direct Known Subclasses
AnzApi::Endpoint, BnzApi::Endpoint, FabApi::Endpoint, GeminiApi::Endpoint, VmaApi::Endpoint, WestpacApi::Endpoint
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/partner_api/endpoints/base.rb', line 17 def call config.logger.info(**logging_params.merge(class: self.class.name)) response = config.instrumentation.call(action: self.class.name) do client.request(method, url, **) end if successful?(response) Success(decode(response)) else Failure(decode_error(response)) end rescue HTTP::Error, OpenSSL::SSL::SSLError => e raise Errors::ConnectionError, e. end |