Class: Markety::Response::LeadResponse
- Inherits:
-
Object
- Object
- Markety::Response::LeadResponse
- Defined in:
- lib/markety/response/lead_response.rb
Instance Attribute Summary collapse
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#lead_id ⇒ Object
Returns the value of attribute lead_id.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response) ⇒ LeadResponse
constructor
A new instance of LeadResponse.
- #success? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ LeadResponse
Returns a new instance of LeadResponse.
7 8 9 10 11 |
# File 'lib/markety/response/lead_response.rb', line 7 def initialize(response) self.status = response[:status] self. = response[:error] self.lead_id = response[:lead_id] end |
Instance Attribute Details
#error_message ⇒ Object
Returns the value of attribute error_message.
5 6 7 |
# File 'lib/markety/response/lead_response.rb', line 5 def end |
#lead_id ⇒ Object
Returns the value of attribute lead_id.
5 6 7 |
# File 'lib/markety/response/lead_response.rb', line 5 def lead_id @lead_id end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/markety/response/lead_response.rb', line 5 def status @status end |
Instance Method Details
#success? ⇒ Boolean
13 14 15 |
# File 'lib/markety/response/lead_response.rb', line 13 def success? !failed? end |