Class: Setsuzoku::Service::WebService::ApiStrategy
- Inherits:
-
Object
- Object
- Setsuzoku::Service::WebService::ApiStrategy
- Extended by:
- T::Helpers, T::Sig
- Includes:
- ApiStrategy
- Defined in:
- lib/setsuzoku/service/web_service/api_strategy.rb
Direct Known Subclasses
Defined Under Namespace
Modules: InterfaceMethods
Instance Attribute Summary
Attributes included from ApiStrategy
Instance Method Summary collapse
- #parse_response(response:, **options) ⇒ Object
- #perform_external_call(request:, action_details:, **options) ⇒ Object
Methods included from ApiStrategy
#call_external_api, #final, #initialize
Instance Method Details
#parse_response(response:, **options) ⇒ Object
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/setsuzoku/service/web_service/api_strategy.rb', line 76 def parse_response(response:, **) case [:response_type] when :json JSON.parse(response.body).deep_symbolize_keys when :xml convert_xml_to_hash(response.body) else JSON.parse(response.body).deep_symbolize_keys end end |
#perform_external_call(request:, action_details:, **options) ⇒ Object
66 |
# File 'lib/setsuzoku/service/web_service/api_strategy.rb', line 66 def perform_external_call(request:, action_details:, **); end |