Class: CTA::CustomerAlerts::AlertsResponse

Inherits:
API::Response show all
Defined in:
lib/cta_redux/api/customer_alerts.rb

Instance Attribute Summary collapse

Attributes inherited from API::Response

#error, #parsed_body, #raw_body, #timestamp

Instance Method Summary collapse

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

#alertsArray<Alert> (readonly)

Returns An array of CTA::CustomerAlerts::Alert objects that match the requested query.

Returns:



92
93
94
# File 'lib/cta_redux/api/customer_alerts.rb', line 92

def alerts
  @alerts
end