Class: Sisow::Api::Callback
- Inherits:
-
Object
- Object
- Sisow::Api::Callback
- Defined in:
- lib/sisow/api/callback.rb
Instance Attribute Summary collapse
-
#entrance_code ⇒ Object
Returns the value of attribute entrance_code.
-
#sha1 ⇒ Object
Returns the value of attribute sha1.
-
#status ⇒ Object
Returns the value of attribute status.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
- #cancelled? ⇒ Boolean
- #expired? ⇒ Boolean
- #failure? ⇒ Boolean
-
#initialize(attributes = {}) ⇒ Callback
constructor
A new instance of Callback.
- #pending? ⇒ Boolean
- #reversed? ⇒ Boolean
- #success? ⇒ Boolean
- #valid? ⇒ Boolean
- #validate! ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Callback
Returns a new instance of Callback.
10 11 12 13 14 |
# File 'lib/sisow/api/callback.rb', line 10 def initialize(attributes = {}) attributes.each do |k,v| send("#{k}=", v) end end |
Instance Attribute Details
#entrance_code ⇒ Object
Returns the value of attribute entrance_code.
5 6 7 |
# File 'lib/sisow/api/callback.rb', line 5 def entrance_code @entrance_code end |
#sha1 ⇒ Object
Returns the value of attribute sha1.
5 6 7 |
# File 'lib/sisow/api/callback.rb', line 5 def sha1 @sha1 end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/sisow/api/callback.rb', line 5 def status @status end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
5 6 7 |
# File 'lib/sisow/api/callback.rb', line 5 def transaction_id @transaction_id end |
Instance Method Details
#cancelled? ⇒ Boolean
33 34 35 |
# File 'lib/sisow/api/callback.rb', line 33 def cancelled? @status == 'Cancelled' end |
#expired? ⇒ Boolean
29 30 31 |
# File 'lib/sisow/api/callback.rb', line 29 def expired? @status == 'Expired' end |
#failure? ⇒ Boolean
37 38 39 |
# File 'lib/sisow/api/callback.rb', line 37 def failure? @status == 'Failure' end |
#pending? ⇒ Boolean
41 42 43 |
# File 'lib/sisow/api/callback.rb', line 41 def pending? @status == 'Pending' end |
#reversed? ⇒ Boolean
45 46 47 |
# File 'lib/sisow/api/callback.rb', line 45 def reversed? @status == 'Reversed' end |
#success? ⇒ Boolean
25 26 27 |
# File 'lib/sisow/api/callback.rb', line 25 def success? @status == 'Success' end |
#valid? ⇒ Boolean
16 17 18 |
# File 'lib/sisow/api/callback.rb', line 16 def valid? valid_callback == true end |