Class: BalihooLpcClient::Request::Metrics
- Defined in:
- lib/balihoo_lpc_client/request/metrics.rb
Instance Attribute Summary collapse
-
#tactic_id ⇒ Object
Returns the value of attribute tactic_id.
Attributes inherited from ApiBase
Attributes inherited from Base
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(api:, params:, tactic_id:) ⇒ Metrics
constructor
A new instance of Metrics.
Constructor Details
#initialize(api:, params:, tactic_id:) ⇒ Metrics
Returns a new instance of Metrics.
6 7 8 9 |
# File 'lib/balihoo_lpc_client/request/metrics.rb', line 6 def initialize(api:, params:, tactic_id:) super(api: api, params: params) self.tactic_id = tactic_id end |
Instance Attribute Details
#tactic_id ⇒ Object
Returns the value of attribute tactic_id.
4 5 6 |
# File 'lib/balihoo_lpc_client/request/metrics.rb', line 4 def tactic_id @tactic_id end |
Instance Method Details
#fetch ⇒ Object
11 12 13 14 15 |
# File 'lib/balihoo_lpc_client/request/metrics.rb', line 11 def fetch response = self.class.get("/tactic/#{tactic_id}/metrics", opts).parsed_response handle_errors_with(klass: ApiResponseError, response: response) handle_response(response: response, klass: klass_for(response: response), mappable: false) end |