Class: CTA::CustomerAlerts::AlertsResponse
- Inherits:
-
API::Response
- Object
- API::Response
- CTA::CustomerAlerts::AlertsResponse
- Defined in:
- lib/cta_redux/api/customer_alerts.rb
Instance Attribute Summary collapse
-
#alerts ⇒ Array<Alert>
readonly
An array of Alert objects that match the requested query.
Attributes inherited from API::Response
#error, #parsed_body, #raw_body, #timestamp
Instance Method Summary collapse
-
#initialize(parsed_body, raw_body, debug) ⇒ AlertsResponse
constructor
A new instance of AlertsResponse.
Constructor Details
#initialize(parsed_body, raw_body, debug) ⇒ AlertsResponse
Returns a new instance of AlertsResponse.
94 95 96 97 |
# File 'lib/cta_redux/api/customer_alerts.rb', line 94 def initialize(parsed_body, raw_body, debug) super(parsed_body, raw_body, debug) @alerts = Array.wrap(parsed_body["CTAAlerts"]["Alert"]).map { |a| Alert.new(a) } end |
Instance Attribute Details
#alerts ⇒ Array<Alert> (readonly)
Returns An array of CTA::CustomerAlerts::Alert objects that match the requested query.
92 93 94 |
# File 'lib/cta_redux/api/customer_alerts.rb', line 92 def alerts @alerts end |