Class: InvisibleCollector::Model::Debt

Inherits:
AbstractModel show all
Defined in:
lib/invisible_collector/models/debt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ModelAttributes

#to_h, #to_json

Constructor Details

#initialize(options = {}) ⇒ Debt

Returns a new instance of Debt.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/invisible_collector/models/debt.rb', line 26

def initialize(options = {})
  options = options.with_indifferent_access
  @id = options[:id]
  @number = options[:number]
  @external_id = options[:external_id]
  @type = options[:type]
  @status = options[:status]
  @date = options[:date]
  @due_date = options[:due_date]
  @paid_at = options[:paid_at]
  @customer = options[:customer]
  @items = options[:items]
  @attributes = options[:attributes]
  @net_total = options[:net_total]
  @tax = options[:tax]
  @gross_total = options[:gross_total]
  @paid_total = options[:paid_total]
  @debit_total = options[:debit_total]
  @credit_total = options[:credit_total]
  @currency = options[:currency]
  @debits = options[:debits]
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



23
24
25
# File 'lib/invisible_collector/models/debt.rb', line 23

def attributes
  @attributes
end

#credit_totalObject

Returns the value of attribute credit_total.



21
22
23
# File 'lib/invisible_collector/models/debt.rb', line 21

def credit_total
  @credit_total
end

#currencyObject

Returns the value of attribute currency.



22
23
24
# File 'lib/invisible_collector/models/debt.rb', line 22

def currency
  @currency
end

#customerObject

Returns the value of attribute customer.



14
15
16
# File 'lib/invisible_collector/models/debt.rb', line 14

def customer
  @customer
end

#dateObject

Returns the value of attribute date.



11
12
13
# File 'lib/invisible_collector/models/debt.rb', line 11

def date
  @date
end

#debit_totalObject

Returns the value of attribute debit_total.



20
21
22
# File 'lib/invisible_collector/models/debt.rb', line 20

def debit_total
  @debit_total
end

#debitsObject

Returns the value of attribute debits.



24
25
26
# File 'lib/invisible_collector/models/debt.rb', line 24

def debits
  @debits
end

#due_dateObject

Returns the value of attribute due_date.



12
13
14
# File 'lib/invisible_collector/models/debt.rb', line 12

def due_date
  @due_date
end

#external_idObject

Returns the value of attribute external_id.



8
9
10
# File 'lib/invisible_collector/models/debt.rb', line 8

def external_id
  @external_id
end

#gross_totalObject

Returns the value of attribute gross_total.



18
19
20
# File 'lib/invisible_collector/models/debt.rb', line 18

def gross_total
  @gross_total
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/invisible_collector/models/debt.rb', line 6

def id
  @id
end

#itemsObject

Returns the value of attribute items.



15
16
17
# File 'lib/invisible_collector/models/debt.rb', line 15

def items
  @items
end

#net_totalObject

Returns the value of attribute net_total.



16
17
18
# File 'lib/invisible_collector/models/debt.rb', line 16

def net_total
  @net_total
end

#numberObject

Returns the value of attribute number.



7
8
9
# File 'lib/invisible_collector/models/debt.rb', line 7

def number
  @number
end

Returns the value of attribute paid_at.



13
14
15
# File 'lib/invisible_collector/models/debt.rb', line 13

def paid_at
  @paid_at
end

Returns the value of attribute paid_total.



19
20
21
# File 'lib/invisible_collector/models/debt.rb', line 19

def paid_total
  @paid_total
end

#statusObject

Returns the value of attribute status.



10
11
12
# File 'lib/invisible_collector/models/debt.rb', line 10

def status
  @status
end

#taxObject

Returns the value of attribute tax.



17
18
19
# File 'lib/invisible_collector/models/debt.rb', line 17

def tax
  @tax
end

#typeObject

Returns the value of attribute type.



9
10
11
# File 'lib/invisible_collector/models/debt.rb', line 9

def type
  @type
end