Class: Clearbooks::AccountCode

Inherits:
Base
  • Object
show all
Defined in:
lib/clearbooks/model/account_code.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

build, create

Constructor Details

#initialize(data) ⇒ AccountCode

Returns a new instance of AccountCode.

Parameters:



50
51
52
53
54
55
56
57
58
59
# File 'lib/clearbooks/model/account_code.rb', line 50

def initialize data
  @id               = data.savon(:id).to_i
  @account_name     = data.savon :account_name
  @group_name       = data.savon :group_name

  @default_vat_rate = data.savon :default_vat_rate

  @show_sales       = data.savon(:show_sales).to_b
  @show_purchases   = data.savon(:show_purchases).to_b
end

Instance Attribute Details

#account_nameString (readonly)

Optional.



21
22
23
# File 'lib/clearbooks/model/account_code.rb', line 21

def 
  @account_name
end

#default_vat_rateString (readonly)

Optional.



31
32
33
# File 'lib/clearbooks/model/account_code.rb', line 31

def default_vat_rate
  @default_vat_rate
end

#group_nameString (readonly)

Optional. The name of the group the account code is assigned to.



26
27
28
# File 'lib/clearbooks/model/account_code.rb', line 26

def group_name
  @group_name
end

#idFixnum (readonly)

Optional. The internal id of the account code.



16
17
18
# File 'lib/clearbooks/model/account_code.rb', line 16

def id
  @id
end

#show_purchasesBoolean (readonly)

Optional. Boolean value of whether the account code shows in the purchase invoice form.



41
42
43
# File 'lib/clearbooks/model/account_code.rb', line 41

def show_purchases
  @show_purchases
end

#show_salesBoolean (readonly)

Optional. Boolean value of whether the account code shows in the sales invoice form.



36
37
38
# File 'lib/clearbooks/model/account_code.rb', line 36

def show_sales
  @show_sales
end