Class: Giact::RecurringCheckList
- Inherits:
-
Object
- Object
- Giact::RecurringCheckList
- Defined in:
- lib/giact/recurring_check_list.rb
Instance Attribute Summary collapse
-
#check_date ⇒ Object
Returns the value of attribute check_date.
-
#check_id ⇒ Object
Returns the value of attribute check_id.
-
#refunded ⇒ Object
Returns the value of attribute refunded.
-
#returned ⇒ Object
Returns the value of attribute returned.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(row = "") ⇒ RecurringCheckList
constructor
A new instance of RecurringCheckList.
- #refunded? ⇒ Boolean
- #returned? ⇒ Boolean
Constructor Details
#initialize(row = "") ⇒ RecurringCheckList
Returns a new instance of RecurringCheckList.
5 6 7 |
# File 'lib/giact/recurring_check_list.rb', line 5 def initialize(row="") @check_id, @check_date, @returned, @refunded = row.split("|") end |
Instance Attribute Details
#check_date ⇒ Object
Returns the value of attribute check_date.
3 4 5 |
# File 'lib/giact/recurring_check_list.rb', line 3 def check_date @check_date end |
#check_id ⇒ Object
Returns the value of attribute check_id.
3 4 5 |
# File 'lib/giact/recurring_check_list.rb', line 3 def check_id @check_id end |
#refunded ⇒ Object
Returns the value of attribute refunded.
3 4 5 |
# File 'lib/giact/recurring_check_list.rb', line 3 def refunded @refunded end |
#returned ⇒ Object
Returns the value of attribute returned.
3 4 5 |
# File 'lib/giact/recurring_check_list.rb', line 3 def returned @returned end |
Class Method Details
.from_response(response) ⇒ Object
25 26 27 |
# File 'lib/giact/recurring_check_list.rb', line 25 def self.from_response(response) response.split(/\n/).map{|line| Giact::RecurringCheckList.new(line)} end |
Instance Method Details
#refunded? ⇒ Boolean
21 22 23 |
# File 'lib/giact/recurring_check_list.rb', line 21 def refunded? @refunded.downcase == 'true' end |
#returned? ⇒ Boolean
17 18 19 |
# File 'lib/giact/recurring_check_list.rb', line 17 def returned? @returned.downcase == 'true' end |