Class: Broadcast::Warning
- Inherits:
-
Struct
- Object
- Struct
- Broadcast::Warning
- Defined in:
- lib/broadcast/response.rb
Overview
A single entry from the API's warnings array (docs: api-response-warnings).
The API raises these on successful 2xx responses when it accepted the request
but ignored part of it — an unrecognized parameter, a parameter that only
applies in another mode, a value the server overrode.
param is a dot-path to the offending parameter (e.g. "subscriber.foo").
The API never includes submitted values, so a warning is safe to log.
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#param ⇒ Object
Returns the value of attribute param.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
13 14 15 |
# File 'lib/broadcast/response.rb', line 13 def code @code end |
#message ⇒ Object
Returns the value of attribute message
13 14 15 |
# File 'lib/broadcast/response.rb', line 13 def @message end |
#param ⇒ Object
Returns the value of attribute param
13 14 15 |
# File 'lib/broadcast/response.rb', line 13 def param @param end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/broadcast/response.rb', line 14 def to_s param ? "[#{code}] #{param}: #{}" : "[#{code}] #{}" end |