lockstep_rails 0.3.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +216 -0
- data/Rakefile +31 -0
- data/app/assets/config/lockstep_rails_manifest.js +0 -0
- data/app/concepts/lockstep/active_records/association.rb +78 -0
- data/app/concepts/lockstep/api_record.rb +1118 -0
- data/app/concepts/lockstep/api_records/scopes.rb +20 -0
- data/app/concepts/lockstep/client.rb +162 -0
- data/app/concepts/lockstep/error.rb +50 -0
- data/app/concepts/lockstep/exceptions.rb +4 -0
- data/app/concepts/lockstep/query.rb +409 -0
- data/app/concepts/lockstep/query_methods.rb +75 -0
- data/app/concepts/lockstep/relation_array.rb +100 -0
- data/app/helpers/types.rb +3 -0
- data/app/models/lockstep/account.rb +15 -0
- data/app/models/lockstep/connection.rb +19 -0
- data/app/models/lockstep/contact.rb +9 -0
- data/app/models/lockstep/customer_summary.rb +6 -0
- data/app/models/lockstep/invoice.rb +7 -0
- data/app/models/lockstep/invoice_summary.rb +6 -0
- data/app/models/lockstep/invoices/address.rb +24 -0
- data/app/models/lockstep/note.rb +7 -0
- data/app/models/lockstep/payment.rb +7 -0
- data/app/models/lockstep/payment_summary.rb +6 -0
- data/app/models/lockstep/user.rb +10 -0
- data/app/platform_api/model_template.rb.erb +27 -0
- data/app/platform_api/schema/action_result.rb +15 -0
- data/app/platform_api/schema/activity.rb +141 -0
- data/app/platform_api/schema/activity_fetch_result.rb +26 -0
- data/app/platform_api/schema/activity_stream_item.rb +58 -0
- data/app/platform_api/schema/activity_x_ref.rb +37 -0
- data/app/platform_api/schema/aging.rb +24 -0
- data/app/platform_api/schema/api_key.rb +71 -0
- data/app/platform_api/schema/api_key_fetch_result.rb +26 -0
- data/app/platform_api/schema/app_enrollment.rb +88 -0
- data/app/platform_api/schema/app_enrollment_custom_field.rb +67 -0
- data/app/platform_api/schema/app_enrollment_custom_field_fetch_result.rb +26 -0
- data/app/platform_api/schema/app_enrollment_fetch_result.rb +26 -0
- data/app/platform_api/schema/application.rb +89 -0
- data/app/platform_api/schema/application_fetch_result.rb +26 -0
- data/app/platform_api/schema/ar_aging_header_info.rb +47 -0
- data/app/platform_api/schema/ar_header_info.rb +118 -0
- data/app/platform_api/schema/assembly.rb +68 -0
- data/app/platform_api/schema/at_risk_invoice_summary.rb +90 -0
- data/app/platform_api/schema/at_risk_invoice_summary_fetch_result.rb +26 -0
- data/app/platform_api/schema/attachment.rb +92 -0
- data/app/platform_api/schema/attachment_fetch_result.rb +26 -0
- data/app/platform_api/schema/attachment_header_info.rb +41 -0
- data/app/platform_api/schema/batch_sync.rb +18 -0
- data/app/platform_api/schema/bulk_currency_conversion.rb +19 -0
- data/app/platform_api/schema/cashflow_report.rb +35 -0
- data/app/platform_api/schema/code_definition.rb +58 -0
- data/app/platform_api/schema/code_definition_fetch_result.rb +26 -0
- data/app/platform_api/schema/company.rb +243 -0
- data/app/platform_api/schema/company_fetch_result.rb +26 -0
- data/app/platform_api/schema/company_sync.rb +142 -0
- data/app/platform_api/schema/connector_info.rb +27 -0
- data/app/platform_api/schema/constructor_info.rb +128 -0
- data/app/platform_api/schema/contact.rb +148 -0
- data/app/platform_api/schema/contact_fetch_result.rb +26 -0
- data/app/platform_api/schema/contact_sync.rb +109 -0
- data/app/platform_api/schema/country.rb +62 -0
- data/app/platform_api/schema/country_fetch_result.rb +26 -0
- data/app/platform_api/schema/credit_memo_applied.rb +104 -0
- data/app/platform_api/schema/credit_memo_applied_fetch_result.rb +26 -0
- data/app/platform_api/schema/credit_memo_applied_sync.rb +67 -0
- data/app/platform_api/schema/credit_memo_invoice.rb +77 -0
- data/app/platform_api/schema/currency.rb +31 -0
- data/app/platform_api/schema/currency_fetch_result.rb +26 -0
- data/app/platform_api/schema/currency_rate.rb +28 -0
- data/app/platform_api/schema/custom_attribute_data.rb +18 -0
- data/app/platform_api/schema/custom_attribute_named_argument.rb +24 -0
- data/app/platform_api/schema/custom_attribute_typed_argument.rb +16 -0
- data/app/platform_api/schema/custom_field_definition.rb +76 -0
- data/app/platform_api/schema/custom_field_definition_fetch_result.rb +26 -0
- data/app/platform_api/schema/custom_field_sync.rb +71 -0
- data/app/platform_api/schema/custom_field_value.rb +75 -0
- data/app/platform_api/schema/custom_field_value_fetch_result.rb +26 -0
- data/app/platform_api/schema/customer_details.rb +98 -0
- data/app/platform_api/schema/customer_details_payment.rb +60 -0
- data/app/platform_api/schema/customer_summary.rb +88 -0
- data/app/platform_api/schema/customer_summary_fetch_result.rb +26 -0
- data/app/platform_api/schema/daily_sales_outstanding_report.rb +25 -0
- data/app/platform_api/schema/developer_account_submit.rb +23 -0
- data/app/platform_api/schema/email.rb +160 -0
- data/app/platform_api/schema/email_fetch_result.rb +26 -0
- data/app/platform_api/schema/erp.rb +23 -0
- data/app/platform_api/schema/erp_fetch_result.rb +26 -0
- data/app/platform_api/schema/erp_info.rb +18 -0
- data/app/platform_api/schema/erp_info_data.rb +23 -0
- data/app/platform_api/schema/event_info.rb +59 -0
- data/app/platform_api/schema/exception.rb +41 -0
- data/app/platform_api/schema/field_info.rb +105 -0
- data/app/platform_api/schema/financial_account.rb +90 -0
- data/app/platform_api/schema/financial_account_balance_history.rb +90 -0
- data/app/platform_api/schema/financial_account_balance_history_fetch_result.rb +26 -0
- data/app/platform_api/schema/financial_account_fetch_result.rb +26 -0
- data/app/platform_api/schema/financial_year_setting.rb +74 -0
- data/app/platform_api/schema/financial_year_setting_fetch_result.rb +26 -0
- data/app/platform_api/schema/invite.rb +25 -0
- data/app/platform_api/schema/invite_data.rb +18 -0
- data/app/platform_api/schema/invite_submit.rb +15 -0
- data/app/platform_api/schema/invoice.rb +226 -0
- data/app/platform_api/schema/invoice_address.rb +97 -0
- data/app/platform_api/schema/invoice_fetch_result.rb +29 -0
- data/app/platform_api/schema/invoice_history.rb +188 -0
- data/app/platform_api/schema/invoice_history_fetch_result.rb +26 -0
- data/app/platform_api/schema/invoice_line.rb +142 -0
- data/app/platform_api/schema/invoice_line_sync.rb +208 -0
- data/app/platform_api/schema/invoice_payment_detail.rb +65 -0
- data/app/platform_api/schema/invoice_summary.rb +85 -0
- data/app/platform_api/schema/invoice_summary_fetch_result.rb +26 -0
- data/app/platform_api/schema/invoice_sync.rb +280 -0
- data/app/platform_api/schema/lead.rb +32 -0
- data/app/platform_api/schema/member_info.rb +36 -0
- data/app/platform_api/schema/method_base.rb +128 -0
- data/app/platform_api/schema/method_info.rb +137 -0
- data/app/platform_api/schema/module.rb +44 -0
- data/app/platform_api/schema/module_handle.rb +15 -0
- data/app/platform_api/schema/note.rb +72 -0
- data/app/platform_api/schema/note_fetch_result.rb +26 -0
- data/app/platform_api/schema/parameter_info.rb +64 -0
- data/app/platform_api/schema/payment.rb +147 -0
- data/app/platform_api/schema/payment_applied.rb +95 -0
- data/app/platform_api/schema/payment_applied_fetch_result.rb +26 -0
- data/app/platform_api/schema/payment_applied_sync.rb +74 -0
- data/app/platform_api/schema/payment_detail.rb +110 -0
- data/app/platform_api/schema/payment_detail_fetch_result.rb +26 -0
- data/app/platform_api/schema/payment_detail_header.rb +43 -0
- data/app/platform_api/schema/payment_fetch_result.rb +26 -0
- data/app/platform_api/schema/payment_summary.rb +79 -0
- data/app/platform_api/schema/payment_summary_fetch_result.rb +26 -0
- data/app/platform_api/schema/payment_sync.rb +112 -0
- data/app/platform_api/schema/problem_details.rb +31 -0
- data/app/platform_api/schema/property_info.rb +60 -0
- data/app/platform_api/schema/provisioning.rb +28 -0
- data/app/platform_api/schema/provisioning_finalize_request.rb +28 -0
- data/app/platform_api/schema/provisioning_response.rb +42 -0
- data/app/platform_api/schema/risk_rate.rb +57 -0
- data/app/platform_api/schema/runtime_field_handle.rb +13 -0
- data/app/platform_api/schema/runtime_method_handle.rb +13 -0
- data/app/platform_api/schema/runtime_type_handle.rb +13 -0
- data/app/platform_api/schema/state.rb +22 -0
- data/app/platform_api/schema/state_fetch_result.rb +26 -0
- data/app/platform_api/schema/status.rb +72 -0
- data/app/platform_api/schema/struct_layout_attribute.rb +16 -0
- data/app/platform_api/schema/sync_entity_result.rb +34 -0
- data/app/platform_api/schema/sync_request.rb +71 -0
- data/app/platform_api/schema/sync_request_fetch_result.rb +26 -0
- data/app/platform_api/schema/sync_submit.rb +15 -0
- data/app/platform_api/schema/test_argument_exception.rb +41 -0
- data/app/platform_api/schema/test_timeout_exception.rb +41 -0
- data/app/platform_api/schema/transfer_owner.rb +16 -0
- data/app/platform_api/schema/transfer_owner_submit.rb +15 -0
- data/app/platform_api/schema/type.rb +278 -0
- data/app/platform_api/schema/type_info.rb +287 -0
- data/app/platform_api/schema/uri.rb +15 -0
- data/app/platform_api/schema/user_account.rb +152 -0
- data/app/platform_api/schema/user_account_fetch_result.rb +26 -0
- data/app/platform_api/schema/user_role.rb +50 -0
- data/app/platform_api/schema/user_role_fetch_result.rb +26 -0
- data/app/platform_api/schema/webhook.rb +96 -0
- data/app/platform_api/schema/webhook_fetch_result.rb +26 -0
- data/app/platform_api/schema/webhook_history_table_storage.rb +64 -0
- data/app/platform_api/schema/webhook_history_table_storage_fetch_result.rb +26 -0
- data/app/platform_api/swagger.json +22056 -0
- data/config/routes.rb +2 -0
- data/lib/lockstep_rails/engine.rb +4 -0
- data/lib/lockstep_rails/version.rb +3 -0
- data/lib/lockstep_rails.rb +5 -0
- data/lib/tasks/lockstep_rails_tasks.rake +4 -0
- data/lib/tasks/update_api_schema.rake +159 -0
- metadata +230 -0
@@ -0,0 +1,90 @@
|
|
1
|
+
class Schema::AtRiskInvoiceSummary < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The date of the report
|
9
|
+
# @type: string
|
10
|
+
# @format: date
|
11
|
+
field :report_date
|
12
|
+
|
13
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
14
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
15
|
+
#
|
16
|
+
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
17
|
+
# @type: string
|
18
|
+
# @format: uuid
|
19
|
+
field :group_key
|
20
|
+
|
21
|
+
# The ID number of the counterparty for the invoice, for example, a customer or vendor.
|
22
|
+
# @type: string
|
23
|
+
# @format: uuid
|
24
|
+
field :customer_id
|
25
|
+
|
26
|
+
# The unique ID number of this invoice.
|
27
|
+
# @type: string
|
28
|
+
# @format: uuid
|
29
|
+
field :invoice_id
|
30
|
+
|
31
|
+
# A reference code that is used to identify this invoice.
|
32
|
+
# The meaning of this field is specific to the ERP or accounting system used by the user.
|
33
|
+
# @type: string
|
34
|
+
field :invoice_number
|
35
|
+
|
36
|
+
# The reporting date for this invoice.
|
37
|
+
# @type: string
|
38
|
+
# @format: date
|
39
|
+
field :invoice_date
|
40
|
+
|
41
|
+
# The name of the counterparty for the invoice, for example, a customer or vendor.
|
42
|
+
# @type: string
|
43
|
+
field :customer_name
|
44
|
+
|
45
|
+
# The status of the invoice.
|
46
|
+
# @type: string
|
47
|
+
field :status
|
48
|
+
|
49
|
+
# The due date of the invoice.
|
50
|
+
# @type: string
|
51
|
+
# @format: date
|
52
|
+
field :payment_due_date
|
53
|
+
|
54
|
+
# The total amount of the Invoice.
|
55
|
+
# @type: number
|
56
|
+
# @format: double
|
57
|
+
field :invoice_amount
|
58
|
+
|
59
|
+
# The remaining balance value of this invoice.
|
60
|
+
# @type: number
|
61
|
+
# @format: double
|
62
|
+
field :outstanding_balance
|
63
|
+
|
64
|
+
# A code identifying the type of this Invoice.
|
65
|
+
# @type: string
|
66
|
+
field :invoice_type_code
|
67
|
+
|
68
|
+
# The date stamp for the newest Activity on this Invoice.
|
69
|
+
# @type: string
|
70
|
+
# @format: date
|
71
|
+
field :newest_activity
|
72
|
+
|
73
|
+
# The number of days this Invoice is past due.
|
74
|
+
# @type: integer
|
75
|
+
# @format: int32
|
76
|
+
field :days_past_due
|
77
|
+
|
78
|
+
# The memo text of the payments associated to this invoice.
|
79
|
+
# @type: array
|
80
|
+
field :payment_numbers
|
81
|
+
|
82
|
+
# The ids of the payments associated to this invoice.
|
83
|
+
# @type: array
|
84
|
+
field :payment_ids
|
85
|
+
|
86
|
+
belongs_to :customer, {:class_name=>"Lockstep::Connection", :primary_key=>:company_id, :foreign_key=>"customer_id"}
|
87
|
+
belongs_to :connection, {:class_name=>"Lockstep::Connection", :primary_key=>:company_id, :foreign_key=>"customer_id"}
|
88
|
+
|
89
|
+
|
90
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class Schema::AtRiskInvoiceSummaryFetchResult < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
# @type: integer
|
10
|
+
# @format: int32
|
11
|
+
field :total_count
|
12
|
+
|
13
|
+
|
14
|
+
# @type: integer
|
15
|
+
# @format: int32
|
16
|
+
field :page_size
|
17
|
+
|
18
|
+
|
19
|
+
# @type: integer
|
20
|
+
# @format: int32
|
21
|
+
field :page_number
|
22
|
+
|
23
|
+
|
24
|
+
has_many :records, {:class_name=>"Schema::AtRiskInvoiceSummary", :included=>true}
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
class Schema::Attachment < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
9
|
+
# added to the Lockstep platform.
|
10
|
+
# @type: string
|
11
|
+
# @format: uuid
|
12
|
+
field :attachment_id
|
13
|
+
|
14
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
15
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
16
|
+
#
|
17
|
+
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
18
|
+
# @type: string
|
19
|
+
# @format: uuid
|
20
|
+
field :group_key
|
21
|
+
|
22
|
+
# The name of the table the attachment is associated with
|
23
|
+
# @type: string
|
24
|
+
field :table_key
|
25
|
+
|
26
|
+
# The ID of the object the attachment is associated with
|
27
|
+
# @type: string
|
28
|
+
# @format: uuid
|
29
|
+
field :object_key
|
30
|
+
|
31
|
+
# Name of the file
|
32
|
+
# @type: string
|
33
|
+
field :file_name
|
34
|
+
|
35
|
+
# Extension type of the file
|
36
|
+
# @type: string
|
37
|
+
field :file_ext
|
38
|
+
|
39
|
+
# Corresponding AttachmentType object to describe this attachment
|
40
|
+
# @type: string
|
41
|
+
# @format: uuid
|
42
|
+
field :attachment_type_id
|
43
|
+
|
44
|
+
# Flag indicating the attachment was archived
|
45
|
+
# @type: boolean
|
46
|
+
field :is_archived
|
47
|
+
|
48
|
+
# Tracks the original record for this attachment, not currently used.
|
49
|
+
# @type: string
|
50
|
+
# @format: uuid
|
51
|
+
field :origin_attachment_id
|
52
|
+
|
53
|
+
# Flag for if LS clients can see this file
|
54
|
+
# @type: boolean
|
55
|
+
field :view_internal
|
56
|
+
|
57
|
+
# Flag for if Vendors and customers can see this file
|
58
|
+
# @type: boolean
|
59
|
+
field :view_external
|
60
|
+
|
61
|
+
# The unique ID of this record as it was known in its originating financial system.
|
62
|
+
#
|
63
|
+
# If this company record was imported from a financial system, it will have the value `ErpKey`
|
64
|
+
# set to the original primary key number of the record as it was known in the originating financial
|
65
|
+
# system. If this record was not imported from a financial system, this value will be `null`.
|
66
|
+
#
|
67
|
+
# For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
68
|
+
# @type: string
|
69
|
+
field :erp_key
|
70
|
+
|
71
|
+
# The AppEnrollmentId of the application that imported this record. For accounts
|
72
|
+
# with more than one financial system connected, this field identifies the originating
|
73
|
+
# financial system that produced this record. This value is null if this record
|
74
|
+
# was not loaded from an external ERP or financial system.
|
75
|
+
# @type: string
|
76
|
+
# @format: uuid
|
77
|
+
field :app_enrollment_id
|
78
|
+
|
79
|
+
# The date the attachment was created
|
80
|
+
# @type: string
|
81
|
+
# @format: date-time
|
82
|
+
field :created, Types::Params::DateTime
|
83
|
+
|
84
|
+
# Id of the user who made the file
|
85
|
+
# @type: string
|
86
|
+
# @format: uuid
|
87
|
+
field :created_user_id
|
88
|
+
|
89
|
+
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
90
|
+
|
91
|
+
|
92
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class Schema::AttachmentFetchResult < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
# @type: integer
|
10
|
+
# @format: int32
|
11
|
+
field :total_count
|
12
|
+
|
13
|
+
|
14
|
+
# @type: integer
|
15
|
+
# @format: int32
|
16
|
+
field :page_size
|
17
|
+
|
18
|
+
|
19
|
+
# @type: integer
|
20
|
+
# @format: int32
|
21
|
+
field :page_number
|
22
|
+
|
23
|
+
|
24
|
+
has_many :records, {:class_name=>"Schema::Attachment", :included=>true}
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class Schema::AttachmentHeaderInfo < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
9
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
10
|
+
#
|
11
|
+
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
12
|
+
# @type: string
|
13
|
+
# @format: uuid
|
14
|
+
field :group_key
|
15
|
+
|
16
|
+
# The CompanyId associated with the attachment status report. Providing a null value will
|
17
|
+
# return an attachment summary for all attachments associated to the provided GroupKey
|
18
|
+
# @type: string
|
19
|
+
# @format: uuid
|
20
|
+
field :company_id
|
21
|
+
|
22
|
+
# The total number of attachments associated with the provided GroupKey and CompanyId.
|
23
|
+
# @type: integer
|
24
|
+
# @format: int32
|
25
|
+
field :total_attachments
|
26
|
+
|
27
|
+
# The total number of archived attachments associated with the provided GroupKey and CompanyId.
|
28
|
+
# @type: integer
|
29
|
+
# @format: int32
|
30
|
+
field :total_archived
|
31
|
+
|
32
|
+
# The total number of active attachments associated with the provided GroupKey and CompanyId.
|
33
|
+
# @type: integer
|
34
|
+
# @format: int32
|
35
|
+
field :total_active
|
36
|
+
|
37
|
+
belongs_to :company, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
38
|
+
belongs_to :account, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
39
|
+
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class Schema::BatchSync < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
has_many :companies, {:class_name=>"Schema::CompanySync", :included=>true}
|
10
|
+
has_many :contacts, {:class_name=>"Schema::ContactSync", :included=>true}
|
11
|
+
has_many :credit_memo_applications, {:class_name=>"Schema::CreditMemoAppliedSync", :included=>true}
|
12
|
+
has_many :invoices, {:class_name=>"Schema::InvoiceSync", :included=>true}
|
13
|
+
has_many :invoice_lines, {:class_name=>"Schema::InvoiceLineSync", :included=>true}
|
14
|
+
has_many :custom_fields, {:class_name=>"Schema::CustomFieldSync", :included=>true}
|
15
|
+
has_many :payments, {:class_name=>"Schema::PaymentSync", :included=>true}
|
16
|
+
has_many :payment_applications, {:class_name=>"Schema::PaymentAppliedSync", :included=>true}
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class Schema::BulkCurrencyConversion < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The date for the currency rate
|
9
|
+
# @type: string
|
10
|
+
# @format: date
|
11
|
+
field :date
|
12
|
+
|
13
|
+
# The currency code This will be validated by the /api/v1/currencies data set
|
14
|
+
# @type: string
|
15
|
+
field :source_currency
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class Schema::CashflowReport < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# Timeframe in days the cashflow report is generated on
|
9
|
+
# @type: integer
|
10
|
+
# @format: int32
|
11
|
+
field :timeframe
|
12
|
+
|
13
|
+
# Amount of payments collected based in the timeframe
|
14
|
+
# @type: number
|
15
|
+
# @format: double
|
16
|
+
field :payments_collected
|
17
|
+
|
18
|
+
# Number of payments collected based in the timeframe
|
19
|
+
# @type: integer
|
20
|
+
# @format: int32
|
21
|
+
field :payments_collected_count
|
22
|
+
|
23
|
+
# Amount of invoices billed based in the timeframe
|
24
|
+
# @type: number
|
25
|
+
# @format: double
|
26
|
+
field :invoices_billed
|
27
|
+
|
28
|
+
# Number of invoices billed in the timeframe
|
29
|
+
# @type: integer
|
30
|
+
# @format: int32
|
31
|
+
field :invoices_billed_count
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
class Schema::CodeDefinition < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
9
|
+
# added to the Lockstep platform.
|
10
|
+
# @type: string
|
11
|
+
# @format: uuid
|
12
|
+
field :code_definition_id
|
13
|
+
|
14
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
15
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
16
|
+
#
|
17
|
+
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
18
|
+
# @type: string
|
19
|
+
# @format: uuid
|
20
|
+
field :group_key
|
21
|
+
|
22
|
+
# The type of the Code Definition
|
23
|
+
# @type: string
|
24
|
+
field :code_type
|
25
|
+
|
26
|
+
# The Code to be defined.
|
27
|
+
# @type: string
|
28
|
+
field :code
|
29
|
+
|
30
|
+
# The definition of the Code
|
31
|
+
# @type: string
|
32
|
+
field :code_description
|
33
|
+
|
34
|
+
# The date that the Code Definition was created
|
35
|
+
# @type: string
|
36
|
+
# @format: date-time
|
37
|
+
field :created, Types::Params::DateTime
|
38
|
+
|
39
|
+
# The ID of the user who created the Code Definition
|
40
|
+
# @type: string
|
41
|
+
# @format: uuid
|
42
|
+
field :created_user_id
|
43
|
+
|
44
|
+
# The date the Code Definition was last modified
|
45
|
+
# @type: string
|
46
|
+
# @format: date-time
|
47
|
+
field :modified, Types::Params::DateTime
|
48
|
+
|
49
|
+
# The ID of the user who last modified the Code Definition
|
50
|
+
# @type: string
|
51
|
+
# @format: uuid
|
52
|
+
field :modified_user_id
|
53
|
+
|
54
|
+
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
55
|
+
belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
|
56
|
+
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class Schema::CodeDefinitionFetchResult < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
# @type: integer
|
10
|
+
# @format: int32
|
11
|
+
field :total_count
|
12
|
+
|
13
|
+
|
14
|
+
# @type: integer
|
15
|
+
# @format: int32
|
16
|
+
field :page_size
|
17
|
+
|
18
|
+
|
19
|
+
# @type: integer
|
20
|
+
# @format: int32
|
21
|
+
field :page_number
|
22
|
+
|
23
|
+
|
24
|
+
has_many :records, {:class_name=>"Schema::CodeDefinition", :included=>true}
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,243 @@
|
|
1
|
+
class Schema::Company < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
9
|
+
# added to the Lockstep platform.
|
10
|
+
#
|
11
|
+
# For the ID of this record in its originating financial system, see `ErpKey`.
|
12
|
+
# @type: string
|
13
|
+
# @format: uuid
|
14
|
+
field :company_id
|
15
|
+
|
16
|
+
# The short name of the company.
|
17
|
+
# @type: string
|
18
|
+
field :company_name
|
19
|
+
|
20
|
+
# The unique ID of this record as it was known in its originating financial system.
|
21
|
+
#
|
22
|
+
# If this company record was imported from a financial system, it will have the value `ErpKey`
|
23
|
+
# set to the original primary key number of the record as it was known in the originating financial
|
24
|
+
# system. If this record was not imported, this value will be `null`.
|
25
|
+
#
|
26
|
+
# For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
27
|
+
# @type: string
|
28
|
+
field :erp_key
|
29
|
+
|
30
|
+
# This field indicates the type of company. It can be one of a limited number of values:
|
31
|
+
# Company, Customer, Group, Vendor, or Third Party. A company that represents both a customer and a vendor
|
32
|
+
# is identified as a CustomerVendor.
|
33
|
+
#
|
34
|
+
# * `Company` - This record represents a company that is part of the organization of the account holder.
|
35
|
+
# * `Customer` - This record represents a business entity that purchases things from the account holder.
|
36
|
+
# * `Group` - Only one record of type `GROUP` exists in each account. Contains your account profile.
|
37
|
+
# * `Vendor` - This record represents a business entity that sells things to the account holder.
|
38
|
+
# * `Third Party` - This record represents a business entity that is neither a customer nor vendor.
|
39
|
+
# * `CustomerVendor` - Both a customer and a vendor.
|
40
|
+
# @type: string
|
41
|
+
field :company_type
|
42
|
+
|
43
|
+
# The status of the company. Companies can be either `Active` or `Inactive`. When matched to a
|
44
|
+
# Lockstep corporate profile, this value will change to reflect that this record will be kept
|
45
|
+
# in sync with that company's identity.
|
46
|
+
# @type: string
|
47
|
+
field :company_status
|
48
|
+
|
49
|
+
# If this business entity is part of an organization, this value is non-null and it is set
|
50
|
+
# to the `CompanyId` value of the parent company of this business entity.
|
51
|
+
#
|
52
|
+
# If this value is null, this business entity is a standalone.
|
53
|
+
# @type: string
|
54
|
+
# @format: uuid
|
55
|
+
field :parent_company_id
|
56
|
+
|
57
|
+
# For convenience, this field indicates the top-level parent company. This can be used
|
58
|
+
# to jump directly to the top parent in complex organizational hierarchies.
|
59
|
+
# @type: string
|
60
|
+
# @format: uuid
|
61
|
+
field :enterprise_id
|
62
|
+
|
63
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
64
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
65
|
+
#
|
66
|
+
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
67
|
+
# @type: string
|
68
|
+
# @format: uuid
|
69
|
+
field :group_key
|
70
|
+
|
71
|
+
# This flag indicates whether the company is currently active. An inactive company
|
72
|
+
# should be hidden from the user interface but will still be available for querying.
|
73
|
+
# @type: boolean
|
74
|
+
field :is_active
|
75
|
+
|
76
|
+
# The default currency code used by this business entity. This value can be overridden
|
77
|
+
# for invoices in a different currency code.
|
78
|
+
#
|
79
|
+
# For a list of defined currency codes, see [Query Currencies](https://developer.lockstep.io/reference/get_api-v1-definitions-currencies)
|
80
|
+
# @type: string
|
81
|
+
field :default_currency_code
|
82
|
+
|
83
|
+
# The URL of this company's logo, if known.
|
84
|
+
# @type: string
|
85
|
+
field :company_logo_url
|
86
|
+
|
87
|
+
# The Lockstep `ContactId` of the primary contact for this company.
|
88
|
+
# @type: string
|
89
|
+
# @format: uuid
|
90
|
+
field :primary_contact_id
|
91
|
+
|
92
|
+
# Address info
|
93
|
+
# @type: string
|
94
|
+
field :address1
|
95
|
+
|
96
|
+
# Address info
|
97
|
+
# @type: string
|
98
|
+
field :address2
|
99
|
+
|
100
|
+
# Address info
|
101
|
+
# @type: string
|
102
|
+
field :address3
|
103
|
+
|
104
|
+
# Corporate Address info
|
105
|
+
# @type: string
|
106
|
+
field :corp_city
|
107
|
+
|
108
|
+
# Corporate Address info
|
109
|
+
# @type: string
|
110
|
+
field :corp_state
|
111
|
+
|
112
|
+
# Corporate Address info
|
113
|
+
# @type: string
|
114
|
+
field :corp_postal_code
|
115
|
+
|
116
|
+
# Corporate Address info
|
117
|
+
# @type: string
|
118
|
+
field :corp_country
|
119
|
+
|
120
|
+
# Corporate phone number
|
121
|
+
# @type: string
|
122
|
+
field :corp_phone
|
123
|
+
|
124
|
+
# Corporate fax number
|
125
|
+
# @type: string
|
126
|
+
field :corp_fax
|
127
|
+
|
128
|
+
# Address info
|
129
|
+
# @type: string
|
130
|
+
field :city
|
131
|
+
|
132
|
+
# Address info
|
133
|
+
# @type: string
|
134
|
+
field :state_region
|
135
|
+
|
136
|
+
# Address info
|
137
|
+
# @type: string
|
138
|
+
field :postal_code
|
139
|
+
|
140
|
+
# Address info
|
141
|
+
# @type: string
|
142
|
+
field :country
|
143
|
+
|
144
|
+
# Phone number
|
145
|
+
# @type: string
|
146
|
+
field :phone_number
|
147
|
+
|
148
|
+
# Fax number
|
149
|
+
# @type: string
|
150
|
+
field :fax_number
|
151
|
+
|
152
|
+
# The date this company was created
|
153
|
+
# @type: string
|
154
|
+
# @format: date-time
|
155
|
+
field :created, Types::Params::DateTime
|
156
|
+
|
157
|
+
# The ID of the user who created this company
|
158
|
+
# @type: string
|
159
|
+
# @format: uuid
|
160
|
+
field :created_user_id
|
161
|
+
|
162
|
+
# The date this company was last modified
|
163
|
+
# @type: string
|
164
|
+
# @format: date-time
|
165
|
+
field :modified, Types::Params::DateTime
|
166
|
+
|
167
|
+
# The ID of the user who last modified this company
|
168
|
+
# @type: string
|
169
|
+
# @format: uuid
|
170
|
+
field :modified_user_id
|
171
|
+
|
172
|
+
# The name of the user who last modified this company
|
173
|
+
# @type: string
|
174
|
+
field :modified_user_name
|
175
|
+
|
176
|
+
# Federal Tax ID
|
177
|
+
# @type: string
|
178
|
+
field :tax_id
|
179
|
+
|
180
|
+
# Dun & Bradstreet Number
|
181
|
+
# @type: string
|
182
|
+
field :duns_number
|
183
|
+
|
184
|
+
# AP (Accounts Payable) Email Address
|
185
|
+
# @type: string
|
186
|
+
# @format: email
|
187
|
+
field :ap_email_address
|
188
|
+
|
189
|
+
# AR (Accounts Receivable) Email Address
|
190
|
+
# @type: string
|
191
|
+
# @format: email
|
192
|
+
field :ar_email_address
|
193
|
+
|
194
|
+
# For companies that use a custom domain name for their email system, this is
|
195
|
+
# the domain name used by this company. If this value is known, new emails that
|
196
|
+
# come in from this domain will be connected to this company.
|
197
|
+
# @type: string
|
198
|
+
field :domain_name
|
199
|
+
|
200
|
+
# Identifier for classification of this company.
|
201
|
+
# @type: string
|
202
|
+
# @format: uuid
|
203
|
+
field :company_classification_code_def_id
|
204
|
+
|
205
|
+
# Description of the company.
|
206
|
+
# @type: string
|
207
|
+
field :description
|
208
|
+
|
209
|
+
# Website URL for this company.
|
210
|
+
# @type: string
|
211
|
+
field :website
|
212
|
+
|
213
|
+
# The AppEnrollmentId of the application that imported this record. For accounts
|
214
|
+
# with more than one financial system connected, this field identifies the originating
|
215
|
+
# financial system that produced this record. This value is null if this record
|
216
|
+
# was not loaded from an external ERP or financial system.
|
217
|
+
# @type: string
|
218
|
+
# @format: uuid
|
219
|
+
field :app_enrollment_id
|
220
|
+
|
221
|
+
# All invoices attached to this company.
|
222
|
+
#
|
223
|
+
# To retrieve this collection, specify `Invoices` in the "Include" parameter for your query. For more information on Invoices, see [InvoiceModel](https://developer.lockstep.io/reference/get_api-v1-invoices-id).
|
224
|
+
# @type: array
|
225
|
+
field :invoices
|
226
|
+
|
227
|
+
# Classification code definition for this company.
|
228
|
+
#
|
229
|
+
# To retrieve this collection, specify `Classification` in the "Include" parameter for your query.
|
230
|
+
field :company_classification_code_definition
|
231
|
+
|
232
|
+
belongs_to :company, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
233
|
+
belongs_to :account, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
234
|
+
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
235
|
+
belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
|
236
|
+
|
237
|
+
has_many :notes, {:class_name=>"Lockstep::Note", :included=>true, :foreign_key=>:object_key, :polymorphic=>{:table_key=>"Company"}}
|
238
|
+
has_many :attachments, {:class_name=>"Schema::Attachment", :included=>true}
|
239
|
+
has_many :contacts, {:class_name=>"Schema::Contact", :included=>true}
|
240
|
+
has_many :custom_field_definitions, {:class_name=>"Schema::CustomFieldDefinition", :included=>true}
|
241
|
+
has_many :custom_field_values, {:class_name=>"Schema::CustomFieldValue", :included=>true}
|
242
|
+
|
243
|
+
end
|