cashctrl 0.0.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +21 -0
- data/README.md +831 -14
- data/cashctrl.gemspec +1 -1
- data/lib/cashctrl/client.rb +219 -0
- data/lib/cashctrl/collection.rb +78 -0
- data/lib/cashctrl/configuration.rb +30 -0
- data/lib/cashctrl/error.rb +29 -0
- data/lib/cashctrl/errors.rb +76 -0
- data/lib/cashctrl/localized_string.rb +115 -0
- data/lib/cashctrl/models/account.rb +39 -0
- data/lib/cashctrl/models/article.rb +48 -0
- data/lib/cashctrl/models/asset.rb +37 -0
- data/lib/cashctrl/models/attachment.rb +14 -0
- data/lib/cashctrl/models/bank.rb +18 -0
- data/lib/cashctrl/models/category.rb +13 -0
- data/lib/cashctrl/models/certificate_document.rb +14 -0
- data/lib/cashctrl/models/certificate_template.rb +13 -0
- data/lib/cashctrl/models/cost_center.rb +17 -0
- data/lib/cashctrl/models/currency.rb +18 -0
- data/lib/cashctrl/models/custom_field.rb +18 -0
- data/lib/cashctrl/models/custom_field_group.rb +12 -0
- data/lib/cashctrl/models/file.rb +20 -0
- data/lib/cashctrl/models/fiscal_period.rb +16 -0
- data/lib/cashctrl/models/fiscal_period_task.rb +14 -0
- data/lib/cashctrl/models/history.rb +19 -0
- data/lib/cashctrl/models/insurance_type.rb +13 -0
- data/lib/cashctrl/models/journal.rb +65 -0
- data/lib/cashctrl/models/journal_import.rb +18 -0
- data/lib/cashctrl/models/journal_import_entry.rb +20 -0
- data/lib/cashctrl/models/journal_item.rb +20 -0
- data/lib/cashctrl/models/loader.rb +55 -0
- data/lib/cashctrl/models/location.rb +22 -0
- data/lib/cashctrl/models/order.rb +53 -0
- data/lib/cashctrl/models/order_book_entry.rb +17 -0
- data/lib/cashctrl/models/order_document.rb +15 -0
- data/lib/cashctrl/models/order_item.rb +23 -0
- data/lib/cashctrl/models/order_layout.rb +18 -0
- data/lib/cashctrl/models/order_payment.rb +16 -0
- data/lib/cashctrl/models/person.rb +78 -0
- data/lib/cashctrl/models/report.rb +15 -0
- data/lib/cashctrl/models/report_collection.rb +13 -0
- data/lib/cashctrl/models/report_element.rb +16 -0
- data/lib/cashctrl/models/rounding.rb +16 -0
- data/lib/cashctrl/models/salary_book_entry.rb +16 -0
- data/lib/cashctrl/models/salary_certificate.rb +16 -0
- data/lib/cashctrl/models/salary_document.rb +15 -0
- data/lib/cashctrl/models/salary_field.rb +16 -0
- data/lib/cashctrl/models/salary_layout.rb +13 -0
- data/lib/cashctrl/models/salary_payment.rb +16 -0
- data/lib/cashctrl/models/salary_setting.rb +12 -0
- data/lib/cashctrl/models/salary_statement.rb +19 -0
- data/lib/cashctrl/models/salary_status.rb +12 -0
- data/lib/cashctrl/models/salary_sum.rb +14 -0
- data/lib/cashctrl/models/salary_template.rb +12 -0
- data/lib/cashctrl/models/salary_type.rb +14 -0
- data/lib/cashctrl/models/sequence_number.rb +13 -0
- data/lib/cashctrl/models/setting.rb +33 -0
- data/lib/cashctrl/models/tax.rb +18 -0
- data/lib/cashctrl/models/text.rb +13 -0
- data/lib/cashctrl/models/title.rb +13 -0
- data/lib/cashctrl/models/unit.rb +11 -0
- data/lib/cashctrl/relation.rb +271 -0
- data/lib/cashctrl/resource.rb +433 -0
- data/lib/cashctrl/resources/account/bank.rb +14 -0
- data/lib/cashctrl/resources/account/category.rb +16 -0
- data/lib/cashctrl/resources/account/cost_center/category.rb +18 -0
- data/lib/cashctrl/resources/account/cost_center.rb +26 -0
- data/lib/cashctrl/resources/account.rb +28 -0
- data/lib/cashctrl/resources/attachments.rb +32 -0
- data/lib/cashctrl/resources/base.rb +237 -0
- data/lib/cashctrl/resources/currency.rb +17 -0
- data/lib/cashctrl/resources/custom_field/group.rb +16 -0
- data/lib/cashctrl/resources/custom_field.rb +18 -0
- data/lib/cashctrl/resources/file/category.rb +16 -0
- data/lib/cashctrl/resources/file.rb +82 -0
- data/lib/cashctrl/resources/fiscal_period/task.rb +20 -0
- data/lib/cashctrl/resources/fiscal_period.rb +54 -0
- data/lib/cashctrl/resources/history.rb +26 -0
- data/lib/cashctrl/resources/import_session.rb +43 -0
- data/lib/cashctrl/resources/inventory/article/category.rb +18 -0
- data/lib/cashctrl/resources/inventory/article/import.rb +13 -0
- data/lib/cashctrl/resources/inventory/article.rb +19 -0
- data/lib/cashctrl/resources/inventory/asset/category.rb +18 -0
- data/lib/cashctrl/resources/inventory/asset.rb +19 -0
- data/lib/cashctrl/resources/inventory/unit.rb +12 -0
- data/lib/cashctrl/resources/journal/import/entry.rb +33 -0
- data/lib/cashctrl/resources/journal/import.rb +16 -0
- data/lib/cashctrl/resources/journal.rb +56 -0
- data/lib/cashctrl/resources/location.rb +10 -0
- data/lib/cashctrl/resources/order/book_entry.rb +12 -0
- data/lib/cashctrl/resources/order/category.rb +21 -0
- data/lib/cashctrl/resources/order/document.rb +30 -0
- data/lib/cashctrl/resources/order/layout.rb +12 -0
- data/lib/cashctrl/resources/order/payment.rb +36 -0
- data/lib/cashctrl/resources/order.rb +47 -0
- data/lib/cashctrl/resources/organization.rb +13 -0
- data/lib/cashctrl/resources/person/category.rb +16 -0
- data/lib/cashctrl/resources/person/import.rb +11 -0
- data/lib/cashctrl/resources/person/title.rb +12 -0
- data/lib/cashctrl/resources/person.rb +21 -0
- data/lib/cashctrl/resources/report/collection.rb +40 -0
- data/lib/cashctrl/resources/report/element.rb +48 -0
- data/lib/cashctrl/resources/report.rb +34 -0
- data/lib/cashctrl/resources/rounding.rb +10 -0
- data/lib/cashctrl/resources/salary/book_entry.rb +12 -0
- data/lib/cashctrl/resources/salary/category.rb +16 -0
- data/lib/cashctrl/resources/salary/certificate/document.rb +47 -0
- data/lib/cashctrl/resources/salary/certificate/template.rb +18 -0
- data/lib/cashctrl/resources/salary/certificate.rb +20 -0
- data/lib/cashctrl/resources/salary/document.rb +42 -0
- data/lib/cashctrl/resources/salary/field.rb +24 -0
- data/lib/cashctrl/resources/salary/insurance/type.rb +14 -0
- data/lib/cashctrl/resources/salary/layout.rb +12 -0
- data/lib/cashctrl/resources/salary/payment.rb +36 -0
- data/lib/cashctrl/resources/salary/setting.rb +12 -0
- data/lib/cashctrl/resources/salary/statement.rb +42 -0
- data/lib/cashctrl/resources/salary/status.rb +16 -0
- data/lib/cashctrl/resources/salary/sum.rb +12 -0
- data/lib/cashctrl/resources/salary/template.rb +16 -0
- data/lib/cashctrl/resources/salary/type.rb +17 -0
- data/lib/cashctrl/resources/sequence_number.rb +14 -0
- data/lib/cashctrl/resources/setting.rb +34 -0
- data/lib/cashctrl/resources/tax.rb +10 -0
- data/lib/cashctrl/resources/text.rb +10 -0
- data/lib/cashctrl/schema.yml +712 -0
- data/lib/cashctrl/version.rb +2 -2
- data/lib/cashctrl.rb +125 -3
- data/lib/generators/model_generator.rb +104 -0
- data/sig/cashctrl.rbs +1 -1
- metadata +126 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class Bank < Resource
|
|
8
|
+
attribute :account_id, type: :integer
|
|
9
|
+
attribute :account_name, type: :string, readonly: true
|
|
10
|
+
attribute :name, type: :string
|
|
11
|
+
attribute :iban, type: :string
|
|
12
|
+
attribute :bic, type: :string
|
|
13
|
+
attribute :qr_iban, type: :string
|
|
14
|
+
belongs_to :account, resource: "Account"
|
|
15
|
+
nested :attachments, model: "Attachment"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class Category < Resource
|
|
8
|
+
attribute :parent_id, type: :integer
|
|
9
|
+
attribute :name, type: :string
|
|
10
|
+
attribute :sequence, type: :integer
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class CertificateDocument < Resource
|
|
8
|
+
attribute :certificate_id, type: :integer
|
|
9
|
+
attribute :layout_id, type: :integer
|
|
10
|
+
attribute :name, type: :string
|
|
11
|
+
attribute :file_id, type: :integer, readonly: true
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class CertificateTemplate < Resource
|
|
8
|
+
attribute :name, type: :string
|
|
9
|
+
attribute :year, type: :integer
|
|
10
|
+
attribute :fields, type: :json
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class CostCenter < Resource
|
|
8
|
+
attribute :category_id, type: :integer
|
|
9
|
+
attribute :category_name, type: :string, readonly: true
|
|
10
|
+
attribute :number, type: :string
|
|
11
|
+
attribute :name, type: :string
|
|
12
|
+
attribute :notes, type: :string
|
|
13
|
+
belongs_to :category, resource: "Account::CostCenter::Category"
|
|
14
|
+
nested :attachments, model: "Attachment"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class Currency < Resource
|
|
8
|
+
attribute :code, type: :string
|
|
9
|
+
attribute :description, type: :string
|
|
10
|
+
attribute :rate, type: :decimal
|
|
11
|
+
attribute :value, type: :string, readonly: true
|
|
12
|
+
attribute :index, type: :string, readonly: true
|
|
13
|
+
attribute :text, type: :string, readonly: true
|
|
14
|
+
attribute :is_default, type: :boolean
|
|
15
|
+
attribute :is_auto, type: :boolean
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class CustomField < Resource
|
|
8
|
+
attribute :type, type: :string
|
|
9
|
+
attribute :group_id, type: :integer
|
|
10
|
+
attribute :group_name, type: :string, readonly: true
|
|
11
|
+
attribute :name, type: :string
|
|
12
|
+
attribute :description, type: :string
|
|
13
|
+
attribute :data_type, type: :string
|
|
14
|
+
attribute :values, type: :string
|
|
15
|
+
attribute :is_multi, type: :boolean
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class CustomFieldGroup < Resource
|
|
8
|
+
attribute :type, type: :string
|
|
9
|
+
attribute :name, type: :string
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class File < Resource
|
|
8
|
+
attribute :category_id, type: :integer
|
|
9
|
+
attribute :category_name, type: :string, readonly: true
|
|
10
|
+
attribute :name, type: :string
|
|
11
|
+
attribute :mime_type, type: :string
|
|
12
|
+
attribute :size, type: :integer, readonly: true
|
|
13
|
+
attribute :width, type: :integer, readonly: true
|
|
14
|
+
attribute :height, type: :integer, readonly: true
|
|
15
|
+
attribute :notes, type: :string
|
|
16
|
+
attribute :is_archived, type: :boolean, readonly: true
|
|
17
|
+
belongs_to :category, resource: "File::Category"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class FiscalPeriod < Resource
|
|
8
|
+
attribute :name, type: :string
|
|
9
|
+
attribute :start, type: :date
|
|
10
|
+
attribute :end, type: :date
|
|
11
|
+
attribute :is_current, type: :boolean, readonly: true
|
|
12
|
+
attribute :is_closed, type: :boolean, readonly: true
|
|
13
|
+
attribute :is_custom, type: :boolean
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class FiscalPeriodTask < Resource
|
|
8
|
+
attribute :fiscal_period_id, type: :integer
|
|
9
|
+
attribute :name, type: :string
|
|
10
|
+
attribute :description, type: :string
|
|
11
|
+
attribute :is_done, type: :boolean
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class History < Resource
|
|
8
|
+
attribute :type, type: :string
|
|
9
|
+
attribute :action, type: :string
|
|
10
|
+
attribute :entity_id, type: :integer
|
|
11
|
+
attribute :entity_name, type: :string
|
|
12
|
+
attribute :user_id, type: :integer
|
|
13
|
+
attribute :user_name, type: :string
|
|
14
|
+
attribute :date, type: :datetime
|
|
15
|
+
attribute :description, type: :string
|
|
16
|
+
attribute :changes, type: :json
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class InsuranceType < Resource
|
|
8
|
+
attribute :name, type: :string
|
|
9
|
+
attribute :code, type: :string
|
|
10
|
+
attribute :description, type: :string
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class Journal < Resource
|
|
8
|
+
attribute :debit_id, type: :integer
|
|
9
|
+
attribute :debit_name, type: :string, readonly: true
|
|
10
|
+
attribute :credit_id, type: :integer
|
|
11
|
+
attribute :credit_name, type: :string, readonly: true
|
|
12
|
+
attribute :associate_id, type: :integer
|
|
13
|
+
attribute :associate_name, type: :string, readonly: true
|
|
14
|
+
attribute :tax_id, type: :integer
|
|
15
|
+
attribute :tax_name, type: :string, readonly: true
|
|
16
|
+
attribute :order_id, type: :integer, readonly: true
|
|
17
|
+
attribute :order_book_entry_id, type: :integer, readonly: true
|
|
18
|
+
attribute :salary_book_entry_id, type: :integer, readonly: true
|
|
19
|
+
attribute :statement_id, type: :integer, readonly: true
|
|
20
|
+
attribute :inventory_id, type: :integer, readonly: true
|
|
21
|
+
attribute :import_entry_id, type: :integer, readonly: true
|
|
22
|
+
attribute :type, type: :string, readonly: true
|
|
23
|
+
attribute :date_added, type: :date
|
|
24
|
+
attribute :title, type: :string
|
|
25
|
+
attribute :custom, type: :string
|
|
26
|
+
attribute :notes, type: :string
|
|
27
|
+
attribute :reference, type: :string
|
|
28
|
+
attribute :amount, type: :decimal
|
|
29
|
+
attribute :items, type: :json
|
|
30
|
+
attribute :currency_id, type: :integer
|
|
31
|
+
attribute :currency_rate, type: :decimal
|
|
32
|
+
attribute :currency_code, type: :string, readonly: true
|
|
33
|
+
attribute :account_id, type: :integer
|
|
34
|
+
attribute :account_currency_id, type: :integer, readonly: true
|
|
35
|
+
attribute :account_class, type: :string, readonly: true
|
|
36
|
+
attribute :balance, type: :decimal, readonly: true
|
|
37
|
+
attribute :name_singular, type: :string, readonly: true
|
|
38
|
+
attribute :order_type, type: :string, readonly: true
|
|
39
|
+
attribute :items_count, type: :integer, readonly: true
|
|
40
|
+
attribute :recurrence, type: :string
|
|
41
|
+
attribute :start_date, type: :date
|
|
42
|
+
attribute :end_date, type: :date
|
|
43
|
+
attribute :days_before, type: :integer
|
|
44
|
+
attribute :notify_type, type: :string
|
|
45
|
+
attribute :notify_person_id, type: :integer
|
|
46
|
+
attribute :notify_user_id, type: :integer
|
|
47
|
+
attribute :notify_email, type: :string
|
|
48
|
+
attribute :attachment_count, type: :integer, readonly: true
|
|
49
|
+
attribute :allocation_count, type: :integer, readonly: true
|
|
50
|
+
attribute :cost_center_ids, type: :string
|
|
51
|
+
attribute :cost_center_numbers, type: :string, readonly: true
|
|
52
|
+
attribute :imported, type: :datetime, readonly: true
|
|
53
|
+
attribute :imported_by, type: :string, readonly: true
|
|
54
|
+
attribute :is_recurring, type: :boolean, readonly: true
|
|
55
|
+
belongs_to :debit, resource: "Account"
|
|
56
|
+
belongs_to :credit, resource: "Account"
|
|
57
|
+
belongs_to :associate, resource: "Person"
|
|
58
|
+
belongs_to :tax, resource: "Tax"
|
|
59
|
+
belongs_to :currency, resource: "Currency"
|
|
60
|
+
belongs_to :order, resource: "Order"
|
|
61
|
+
nested :items, model: "JournalItem"
|
|
62
|
+
nested :attachments, model: "Attachment"
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class JournalImport < Resource
|
|
8
|
+
attribute :account_id, type: :integer
|
|
9
|
+
attribute :account_name, type: :string, readonly: true
|
|
10
|
+
attribute :name, type: :string
|
|
11
|
+
attribute :date_start, type: :date
|
|
12
|
+
attribute :date_end, type: :date
|
|
13
|
+
attribute :total_entries, type: :integer, readonly: true
|
|
14
|
+
attribute :mapped_entries, type: :integer, readonly: true
|
|
15
|
+
attribute :booked_entries, type: :integer, readonly: true
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class JournalImportEntry < Resource
|
|
8
|
+
attribute :import_id, type: :integer
|
|
9
|
+
attribute :date, type: :date
|
|
10
|
+
attribute :amount, type: :decimal
|
|
11
|
+
attribute :description, type: :string
|
|
12
|
+
attribute :reference, type: :string
|
|
13
|
+
attribute :balance, type: :decimal
|
|
14
|
+
attribute :debit_id, type: :integer
|
|
15
|
+
attribute :credit_id, type: :integer
|
|
16
|
+
attribute :is_booked, type: :boolean, readonly: true
|
|
17
|
+
attribute :is_duplicate, type: :boolean, readonly: true
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class JournalItem < Resource
|
|
8
|
+
attribute :account_id, type: :integer
|
|
9
|
+
attribute :debit, type: :decimal
|
|
10
|
+
attribute :credit, type: :decimal
|
|
11
|
+
attribute :description, type: :string
|
|
12
|
+
attribute :tax_id, type: :integer
|
|
13
|
+
attribute :associate_id, type: :integer
|
|
14
|
+
attribute :amount, type: :decimal, readonly: true
|
|
15
|
+
belongs_to :account, resource: "Account"
|
|
16
|
+
belongs_to :tax, resource: "Tax"
|
|
17
|
+
belongs_to :associate, resource: "Person"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Auto-generated loader for all models
|
|
4
|
+
|
|
5
|
+
require_relative "account"
|
|
6
|
+
require_relative "person"
|
|
7
|
+
require_relative "currency"
|
|
8
|
+
require_relative "tax"
|
|
9
|
+
require_relative "journal"
|
|
10
|
+
require_relative "order"
|
|
11
|
+
require_relative "fiscal_period"
|
|
12
|
+
require_relative "location"
|
|
13
|
+
require_relative "rounding"
|
|
14
|
+
require_relative "sequence_number"
|
|
15
|
+
require_relative "custom_field"
|
|
16
|
+
require_relative "file"
|
|
17
|
+
require_relative "article"
|
|
18
|
+
require_relative "asset"
|
|
19
|
+
require_relative "unit"
|
|
20
|
+
require_relative "category"
|
|
21
|
+
require_relative "text"
|
|
22
|
+
require_relative "report"
|
|
23
|
+
require_relative "setting"
|
|
24
|
+
require_relative "history"
|
|
25
|
+
require_relative "bank"
|
|
26
|
+
require_relative "cost_center"
|
|
27
|
+
require_relative "title"
|
|
28
|
+
require_relative "custom_field_group"
|
|
29
|
+
require_relative "order_book_entry"
|
|
30
|
+
require_relative "order_document"
|
|
31
|
+
require_relative "order_layout"
|
|
32
|
+
require_relative "order_payment"
|
|
33
|
+
require_relative "journal_import"
|
|
34
|
+
require_relative "journal_import_entry"
|
|
35
|
+
require_relative "fiscal_period_task"
|
|
36
|
+
require_relative "report_collection"
|
|
37
|
+
require_relative "report_element"
|
|
38
|
+
require_relative "salary_book_entry"
|
|
39
|
+
require_relative "salary_certificate"
|
|
40
|
+
require_relative "salary_document"
|
|
41
|
+
require_relative "salary_field"
|
|
42
|
+
require_relative "salary_layout"
|
|
43
|
+
require_relative "salary_payment"
|
|
44
|
+
require_relative "salary_setting"
|
|
45
|
+
require_relative "salary_statement"
|
|
46
|
+
require_relative "salary_status"
|
|
47
|
+
require_relative "salary_sum"
|
|
48
|
+
require_relative "salary_template"
|
|
49
|
+
require_relative "salary_type"
|
|
50
|
+
require_relative "insurance_type"
|
|
51
|
+
require_relative "certificate_document"
|
|
52
|
+
require_relative "certificate_template"
|
|
53
|
+
require_relative "journal_item"
|
|
54
|
+
require_relative "order_item"
|
|
55
|
+
require_relative "attachment"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class Location < Resource
|
|
8
|
+
attribute :name, type: :string
|
|
9
|
+
attribute :address, type: :string
|
|
10
|
+
attribute :zip, type: :string
|
|
11
|
+
attribute :city, type: :string
|
|
12
|
+
attribute :country, type: :string
|
|
13
|
+
attribute :country_name, type: :string, readonly: true
|
|
14
|
+
attribute :logo_file_id, type: :integer
|
|
15
|
+
attribute :bic, type: :string
|
|
16
|
+
attribute :iban, type: :string
|
|
17
|
+
attribute :qr_iban, type: :string
|
|
18
|
+
attribute :vat_uid, type: :string
|
|
19
|
+
attribute :is_default, type: :boolean
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class Order < Resource
|
|
8
|
+
attribute :category_id, type: :integer
|
|
9
|
+
attribute :category_name, type: :string, readonly: true
|
|
10
|
+
attribute :category_display, type: :string, readonly: true
|
|
11
|
+
attribute :associate_id, type: :integer
|
|
12
|
+
attribute :associate_name, type: :string, readonly: true
|
|
13
|
+
attribute :responsible_person_id, type: :integer
|
|
14
|
+
attribute :responsible_person_name, type: :string, readonly: true
|
|
15
|
+
attribute :type, type: :string
|
|
16
|
+
attribute :nr, type: :string
|
|
17
|
+
attribute :status, type: :string
|
|
18
|
+
attribute :status_name, type: :string, readonly: true
|
|
19
|
+
attribute :date, type: :date
|
|
20
|
+
attribute :due_date, type: :date
|
|
21
|
+
attribute :currency_id, type: :integer
|
|
22
|
+
attribute :currency_code, type: :string, readonly: true
|
|
23
|
+
attribute :currency_rate, type: :decimal
|
|
24
|
+
attribute :discount_percentage, type: :decimal
|
|
25
|
+
attribute :rounding_id, type: :integer
|
|
26
|
+
attribute :description, type: :string
|
|
27
|
+
attribute :header, type: :string
|
|
28
|
+
attribute :footer, type: :string
|
|
29
|
+
attribute :items, type: :json
|
|
30
|
+
attribute :custom, type: :string
|
|
31
|
+
attribute :notes, type: :string
|
|
32
|
+
attribute :total, type: :decimal, readonly: true
|
|
33
|
+
attribute :total_default_currency, type: :decimal, readonly: true
|
|
34
|
+
attribute :attachment_count, type: :integer, readonly: true
|
|
35
|
+
attribute :recurrence, type: :string
|
|
36
|
+
attribute :start_date, type: :date
|
|
37
|
+
attribute :end_date, type: :date
|
|
38
|
+
attribute :days_before, type: :integer
|
|
39
|
+
attribute :notify_type, type: :string
|
|
40
|
+
attribute :notify_person_id, type: :integer
|
|
41
|
+
attribute :notify_user_id, type: :integer
|
|
42
|
+
attribute :notify_email, type: :string
|
|
43
|
+
attribute :is_recurring, type: :boolean, readonly: true
|
|
44
|
+
belongs_to :category, resource: "Order::Category"
|
|
45
|
+
belongs_to :associate, resource: "Person"
|
|
46
|
+
belongs_to :responsible_person, resource: "Person"
|
|
47
|
+
belongs_to :currency, resource: "Currency"
|
|
48
|
+
belongs_to :rounding, resource: "Rounding"
|
|
49
|
+
nested :items, model: "OrderItem"
|
|
50
|
+
nested :attachments, model: "Attachment"
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class OrderBookEntry < Resource
|
|
8
|
+
attribute :order_id, type: :integer
|
|
9
|
+
attribute :account_id, type: :integer
|
|
10
|
+
attribute :account_name, type: :string, readonly: true
|
|
11
|
+
attribute :tax_id, type: :integer
|
|
12
|
+
attribute :tax_name, type: :string, readonly: true
|
|
13
|
+
attribute :description, type: :string
|
|
14
|
+
attribute :amount, type: :decimal
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class OrderDocument < Resource
|
|
8
|
+
attribute :order_id, type: :integer
|
|
9
|
+
attribute :layout_id, type: :integer
|
|
10
|
+
attribute :name, type: :string
|
|
11
|
+
attribute :file_id, type: :integer, readonly: true
|
|
12
|
+
attribute :mime_type, type: :string, readonly: true
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class OrderItem < Resource
|
|
8
|
+
attribute :account_id, type: :integer
|
|
9
|
+
attribute :tax_id, type: :integer
|
|
10
|
+
attribute :unit_id, type: :integer
|
|
11
|
+
attribute :name, type: :string
|
|
12
|
+
attribute :description, type: :string
|
|
13
|
+
attribute :article_nr, type: :string
|
|
14
|
+
attribute :quantity, type: :decimal
|
|
15
|
+
attribute :unit_price, type: :decimal
|
|
16
|
+
attribute :discount_percentage, type: :decimal
|
|
17
|
+
attribute :type, type: :string
|
|
18
|
+
belongs_to :account, resource: "Account"
|
|
19
|
+
belongs_to :tax, resource: "Tax"
|
|
20
|
+
belongs_to :unit, resource: "Inventory::Unit"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class OrderLayout < Resource
|
|
8
|
+
attribute :type, type: :string
|
|
9
|
+
attribute :name, type: :string
|
|
10
|
+
attribute :page_size, type: :string
|
|
11
|
+
attribute :margin_top, type: :decimal
|
|
12
|
+
attribute :margin_bottom, type: :decimal
|
|
13
|
+
attribute :margin_left, type: :decimal
|
|
14
|
+
attribute :margin_right, type: :decimal
|
|
15
|
+
attribute :is_default, type: :boolean
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class OrderPayment < Resource
|
|
8
|
+
attribute :order_id, type: :integer
|
|
9
|
+
attribute :account_id, type: :integer
|
|
10
|
+
attribute :account_name, type: :string, readonly: true
|
|
11
|
+
attribute :date, type: :date
|
|
12
|
+
attribute :amount, type: :decimal
|
|
13
|
+
attribute :notes, type: :string
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from schema.yml. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
module CashCtrl
|
|
6
|
+
module Models
|
|
7
|
+
class Person < Resource
|
|
8
|
+
attribute :category_id, type: :integer
|
|
9
|
+
attribute :category_name, type: :string, readonly: true
|
|
10
|
+
attribute :category_display, type: :string, readonly: true
|
|
11
|
+
attribute :thumbnail_file_id, type: :integer
|
|
12
|
+
attribute :certificate_template_id, type: :integer
|
|
13
|
+
attribute :certificate_values, type: :string
|
|
14
|
+
attribute :title, type: :string, readonly: true
|
|
15
|
+
attribute :title_id, type: :integer
|
|
16
|
+
attribute :title_sentence, type: :string, readonly: true
|
|
17
|
+
attribute :gender, type: :string
|
|
18
|
+
attribute :gender_name, type: :string, readonly: true
|
|
19
|
+
attribute :nr, type: :string
|
|
20
|
+
attribute :name, type: :string, readonly: true
|
|
21
|
+
attribute :first_name, type: :string
|
|
22
|
+
attribute :last_name, type: :string
|
|
23
|
+
attribute :company, type: :string
|
|
24
|
+
attribute :position, type: :string
|
|
25
|
+
attribute :industry, type: :string
|
|
26
|
+
attribute :department, type: :string
|
|
27
|
+
attribute :language, type: :string
|
|
28
|
+
attribute :language_name, type: :string, readonly: true
|
|
29
|
+
attribute :iban, type: :string
|
|
30
|
+
attribute :bic, type: :string
|
|
31
|
+
attribute :vat_uid, type: :string
|
|
32
|
+
attribute :date_birth, type: :date
|
|
33
|
+
attribute :discount_percentage, type: :decimal
|
|
34
|
+
attribute :discount_inherited, type: :decimal, readonly: true
|
|
35
|
+
attribute :discount_effective, type: :decimal, readonly: true
|
|
36
|
+
attribute :notes, type: :string
|
|
37
|
+
attribute :email_work, type: :string
|
|
38
|
+
attribute :email_private, type: :string
|
|
39
|
+
attribute :phone_work, type: :string
|
|
40
|
+
attribute :phone_private, type: :string
|
|
41
|
+
attribute :mobile_work, type: :string
|
|
42
|
+
attribute :mobile_private, type: :string
|
|
43
|
+
attribute :url, type: :string
|
|
44
|
+
attribute :address, type: :string
|
|
45
|
+
attribute :zip, type: :string
|
|
46
|
+
attribute :city, type: :string
|
|
47
|
+
attribute :canton, type: :string
|
|
48
|
+
attribute :country, type: :string
|
|
49
|
+
attribute :country_name, type: :string, readonly: true
|
|
50
|
+
attribute :superior_id, type: :integer
|
|
51
|
+
attribute :superior_name, type: :string, readonly: true
|
|
52
|
+
attribute :color, type: :string
|
|
53
|
+
attribute :alt_name, type: :string
|
|
54
|
+
attribute :user_id, type: :integer
|
|
55
|
+
attribute :location_id, type: :integer
|
|
56
|
+
attribute :location_name, type: :string, readonly: true
|
|
57
|
+
attribute :ssn, type: :string
|
|
58
|
+
attribute :insurance_nr, type: :string
|
|
59
|
+
attribute :insurance_member_nr, type: :string
|
|
60
|
+
attribute :custom, type: :string
|
|
61
|
+
attribute :attachment_count, type: :integer, readonly: true
|
|
62
|
+
attribute :children_count, type: :integer, readonly: true
|
|
63
|
+
attribute :is_customer, type: :boolean
|
|
64
|
+
attribute :is_vendor, type: :boolean
|
|
65
|
+
attribute :is_employee, type: :boolean
|
|
66
|
+
attribute :is_insurance, type: :boolean
|
|
67
|
+
attribute :is_family, type: :boolean
|
|
68
|
+
attribute :is_auto_fill_responsible_person, type: :boolean
|
|
69
|
+
attribute :is_inactive, type: :boolean
|
|
70
|
+
belongs_to :category, resource: "Person::Category"
|
|
71
|
+
belongs_to :superior, resource: "Person"
|
|
72
|
+
belongs_to :location, resource: "Location"
|
|
73
|
+
has_many :orders, resource: "Order", foreign_key: :associate_id
|
|
74
|
+
has_many :journals, resource: "Journal", foreign_key: :associate_id
|
|
75
|
+
nested :attachments, model: "Attachment"
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|