Class: RDStation::Segmentations
- Inherits:
-
Object
- Object
- RDStation::Segmentations
- Includes:
- HTTParty, RetryableRequest
- Defined in:
- lib/rdstation/segmentations.rb
Constant Summary
Constants included from RetryableRequest
Instance Method Summary collapse
- #all ⇒ Object
- #contacts(segmentation_id) ⇒ Object
-
#initialize(authorization:) ⇒ Segmentations
constructor
A new instance of Segmentations.
Methods included from RetryableRequest
#refresh_access_token, #retry_possible?, #retryable_request
Constructor Details
#initialize(authorization:) ⇒ Segmentations
Returns a new instance of Segmentations.
6 7 8 |
# File 'lib/rdstation/segmentations.rb', line 6 def initialize(authorization:) @authorization = end |
Instance Method Details
#all ⇒ Object
10 11 12 13 14 15 |
# File 'lib/rdstation/segmentations.rb', line 10 def all retryable_request(@authorization) do || response = self.class.get(base_url, headers: .headers) ApiResponse.build(response) end end |
#contacts(segmentation_id) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rdstation/segmentations.rb', line 17 def contacts(segmentation_id) retryable_request(@authorization) do || response = self.class.get(base_url("#{segmentation_id}/contacts"), headers: .headers) ApiResponse.build(response) end end |