Class: Mondo::Card
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#expires ⇒ Object
Returns the value of attribute expires.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_digits ⇒ Object
Returns the value of attribute last_digits.
-
#name ⇒ Object
Returns the value of attribute name.
-
#processor ⇒ Object
Returns the value of attribute processor.
-
#processor_token ⇒ Object
Returns the value of attribute processor_token.
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
boolean_accessor, boolean_reader, date_accessor, date_writer, #initialize, #inspect, #to_s
Constructor Details
This class inherits a constructor from Mondo::Resource
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
3 4 5 |
# File 'lib/api/mondo/card.rb', line 3 def account_id @account_id end |
#expires ⇒ Object
Returns the value of attribute expires.
3 4 5 |
# File 'lib/api/mondo/card.rb', line 3 def expires @expires end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/api/mondo/card.rb', line 3 def id @id end |
#last_digits ⇒ Object
Returns the value of attribute last_digits.
3 4 5 |
# File 'lib/api/mondo/card.rb', line 3 def last_digits @last_digits end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/api/mondo/card.rb', line 3 def name @name end |
#processor ⇒ Object
Returns the value of attribute processor.
3 4 5 |
# File 'lib/api/mondo/card.rb', line 3 def processor @processor end |
#processor_token ⇒ Object
Returns the value of attribute processor_token.
3 4 5 |
# File 'lib/api/mondo/card.rb', line 3 def processor_token @processor_token end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/api/mondo/card.rb', line 3 def status @status end |
Instance Method Details
#active? ⇒ Boolean
8 9 10 |
# File 'lib/api/mondo/card.rb', line 8 def active? status == 'ACTIVE' end |
#freeze ⇒ Object
12 13 14 15 16 17 |
# File 'lib/api/mondo/card.rb', line 12 def freeze self.client.api_put("/card/toggle", { card_id: id, status: 'INACTIVE' }) end |
#unfreeze ⇒ Object
19 20 21 22 23 24 |
# File 'lib/api/mondo/card.rb', line 19 def unfreeze self.client.api_put("/card/toggle", { card_id: id, status: 'ACTIVE' }) end |