Class: Giact::RecurringCheckList

Inherits:
Object
  • Object
show all
Defined in:
lib/giact/recurring_check_list.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_dateObject

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_idObject

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

#refundedObject

Returns the value of attribute refunded.



3
4
5
# File 'lib/giact/recurring_check_list.rb', line 3

def refunded
  @refunded
end

#returnedObject

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

Returns:

  • (Boolean)


21
22
23
# File 'lib/giact/recurring_check_list.rb', line 21

def refunded?
  @refunded.downcase == 'true'
end

#returned?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/giact/recurring_check_list.rb', line 17

def returned?
  @returned.downcase == 'true'
end