Class: PagSeguro::SubscriptionTransaction
- Inherits:
-
Object
- Object
- PagSeguro::SubscriptionTransaction
- Includes:
- Extensions::MassAssignment
- Defined in:
- lib/pagseguro/subscription_transaction.rb
Constant Summary collapse
- STATUSES =
{ waiting_payment: 1, in_review: 2, paid: 3, available: 4, in_dispute: 5, returned: 6, canceled: 7, charged: 8, temporary_retention: 9 }
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#date ⇒ Object
Returns the value of attribute date.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
Methods included from Extensions::MassAssignment
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
17 18 19 |
# File 'lib/pagseguro/subscription_transaction.rb', line 17 def code @code end |
#date ⇒ Object
Returns the value of attribute date.
19 20 21 |
# File 'lib/pagseguro/subscription_transaction.rb', line 19 def date @date end |
#status ⇒ Object
Returns the value of attribute status.
18 19 20 |
# File 'lib/pagseguro/subscription_transaction.rb', line 18 def status @status end |
Instance Method Details
#==(object) ⇒ Object
25 26 27 |
# File 'lib/pagseguro/subscription_transaction.rb', line 25 def ==(object) [code, status, date] == [object.code, object.status, object.date] end |
#status_code ⇒ Object
21 22 23 |
# File 'lib/pagseguro/subscription_transaction.rb', line 21 def status_code STATUSES[status.to_sym] end |