Class: Smartsend::RequestError
- Inherits:
-
Object
- Object
- Smartsend::RequestError
- Defined in:
- lib/smartsend/request_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#id ⇒ Object
Returns the value of attribute id.
-
#links ⇒ Object
Returns the value of attribute links.
-
#message ⇒ Object
Returns the value of attribute message.
Class Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
2 3 4 |
# File 'lib/smartsend/request_error.rb', line 2 def code @code end |
#errors ⇒ Object
Returns the value of attribute errors.
2 3 4 |
# File 'lib/smartsend/request_error.rb', line 2 def errors @errors end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/smartsend/request_error.rb', line 2 def id @id end |
#links ⇒ Object
Returns the value of attribute links.
2 3 4 |
# File 'lib/smartsend/request_error.rb', line 2 def links @links end |
#message ⇒ Object
Returns the value of attribute message.
2 3 4 |
# File 'lib/smartsend/request_error.rb', line 2 def @message end |
Class Method Details
.build(response) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/smartsend/request_error.rb', line 4 def self.build(response) self.new.tap do |error| error.id = response['id'] error.code = response['code'] error. = response['message'] error.links = response['links'] error.errors = response['errors'] end end |