Class: Direct::API::V5::Service
- Inherits:
-
Object
- Object
- Direct::API::V5::Service
- Defined in:
- lib/direct/api/v5/service.rb
Instance Method Summary collapse
-
#initialize(client:, service_name:) ⇒ Service
constructor
A new instance of Service.
-
#method_missing(method, *args) ⇒ Object
Direct API methods.
Constructor Details
#initialize(client:, service_name:) ⇒ Service
Returns a new instance of Service.
3 4 5 6 |
# File 'lib/direct/api/v5/service.rb', line 3 def initialize(client:, service_name:) @client = client @service_name = service_name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
Direct API methods
9 10 11 12 13 14 15 16 |
# File 'lib/direct/api/v5/service.rb', line 9 def method_missing(method, *args) params = args[0] || {} if params.is_a?(Hash) call_api_method(method, params) else super end end |