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,226 @@
|
|
1
|
+
class Schema::Invoice < 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 unique ID of this record, automatically assigned by Lockstep when this record is
|
17
|
+
# added to the Lockstep platform.
|
18
|
+
#
|
19
|
+
# For the ID of this record in its originating financial system, see `ErpKey`.
|
20
|
+
# @type: string
|
21
|
+
# @format: uuid
|
22
|
+
field :invoice_id
|
23
|
+
|
24
|
+
# The ID number of the company that created this invoice.
|
25
|
+
# @type: string
|
26
|
+
# @format: uuid
|
27
|
+
field :company_id
|
28
|
+
|
29
|
+
# The ID number of the counterparty for the invoice, for example, a customer or vendor.
|
30
|
+
# @type: string
|
31
|
+
# @format: uuid
|
32
|
+
field :customer_id
|
33
|
+
|
34
|
+
# The unique ID of this record as it was known in its originating financial system.
|
35
|
+
#
|
36
|
+
# If this company record was imported from a financial system, it will have the value `ErpKey`
|
37
|
+
# set to the original primary key number of the record as it was known in the originating financial
|
38
|
+
# system. If this record was not imported, this value will be `null`.
|
39
|
+
#
|
40
|
+
# For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
41
|
+
# @type: string
|
42
|
+
field :erp_key
|
43
|
+
|
44
|
+
# The "Purchase Order Code" is a code that is sometimes used by companies to refer to the original PO
|
45
|
+
# that was sent that caused this invoice to be written. If a customer sends a purchase order to a vendor,
|
46
|
+
# the vendor can then create an invoice and refer back to the originating purchase order using this field.
|
47
|
+
# @type: string
|
48
|
+
field :purchase_order_code
|
49
|
+
|
50
|
+
# An additional reference code that is sometimes used to identify this invoice.
|
51
|
+
# The meaning of this field is specific to the ERP or accounting system used by the user.
|
52
|
+
# @type: string
|
53
|
+
field :reference_code
|
54
|
+
|
55
|
+
# A code identifying the salesperson responsible for writing this quote, invoice, or order.
|
56
|
+
# @type: string
|
57
|
+
field :salesperson_code
|
58
|
+
|
59
|
+
# A name identifying the salesperson responsible for writing this quote, invoice, or order.
|
60
|
+
# @type: string
|
61
|
+
field :salesperson_name
|
62
|
+
|
63
|
+
# A code identifying the type of this invoice.
|
64
|
+
#
|
65
|
+
# Recognized Invoice types are:
|
66
|
+
# * `Invoice` - Represents an invoice sent by Company to the Customer
|
67
|
+
# * `AP Invoice` - Represents an invoice sent by Customer to the Company
|
68
|
+
# * `Credit Memo` - Represents a credit memo generated by Customer given to Company
|
69
|
+
# @type: string
|
70
|
+
field :invoice_type_code
|
71
|
+
|
72
|
+
# A code identifying the status of this invoice.
|
73
|
+
#
|
74
|
+
# Recognized Invoice status codes are:
|
75
|
+
# * `Open` - Represents an invoice that is considered open and needs more work to complete
|
76
|
+
# * `Closed` - Represents an invoice that is considered closed and resolved
|
77
|
+
# @type: string
|
78
|
+
field :invoice_status_code
|
79
|
+
|
80
|
+
# A code identifying the terms given to the purchaser. This field is imported directly from the originating
|
81
|
+
# financial system and does not follow a specified format.
|
82
|
+
# @type: string
|
83
|
+
field :terms_code
|
84
|
+
|
85
|
+
# If the customer negotiated any special terms different from the standard terms above, describe them here.
|
86
|
+
# @type: string
|
87
|
+
field :special_terms
|
88
|
+
|
89
|
+
# The three-character ISO 4217 currency code used for this invoice.
|
90
|
+
# @type: string
|
91
|
+
field :currency_code
|
92
|
+
|
93
|
+
# The total value of this invoice, inclusive of all taxes and line items.
|
94
|
+
# @type: number
|
95
|
+
# @format: double
|
96
|
+
field :total_amount
|
97
|
+
|
98
|
+
# The total sales (or transactional) tax calculated for this invoice.
|
99
|
+
# @type: number
|
100
|
+
# @format: double
|
101
|
+
field :sales_tax_amount
|
102
|
+
|
103
|
+
# The total discounts given by the seller to the buyer on this invoice.
|
104
|
+
# @type: number
|
105
|
+
# @format: double
|
106
|
+
field :discount_amount
|
107
|
+
|
108
|
+
# The remaining balance value of this invoice.
|
109
|
+
# @type: number
|
110
|
+
# @format: double
|
111
|
+
field :outstanding_balance_amount
|
112
|
+
|
113
|
+
# The reporting date for this invoice.
|
114
|
+
# @type: string
|
115
|
+
# @format: date
|
116
|
+
field :invoice_date
|
117
|
+
|
118
|
+
# The date when discounts were adjusted for this invoice.
|
119
|
+
# @type: string
|
120
|
+
# @format: date
|
121
|
+
field :discount_date
|
122
|
+
|
123
|
+
# The date when this invoice posted to the company's general ledger.
|
124
|
+
# @type: string
|
125
|
+
# @format: date
|
126
|
+
field :posted_date
|
127
|
+
|
128
|
+
# The date when the invoice was closed and finalized after completion of all payments and delivery of all products and
|
129
|
+
# services.
|
130
|
+
# @type: string
|
131
|
+
# @format: date
|
132
|
+
field :invoice_closed_date
|
133
|
+
|
134
|
+
# The date when the remaining outstanding balance is due.
|
135
|
+
# @type: string
|
136
|
+
# @format: date
|
137
|
+
field :payment_due_date
|
138
|
+
|
139
|
+
# The date and time when this record was imported from the user's ERP or accounting system.
|
140
|
+
# @type: string
|
141
|
+
# @format: date-time
|
142
|
+
field :imported_date, Types::Params::DateTime
|
143
|
+
|
144
|
+
# The ID number of the invoice's origination address
|
145
|
+
# @type: string
|
146
|
+
# @format: uuid
|
147
|
+
field :primary_origin_address_id
|
148
|
+
|
149
|
+
# The ID number of the invoice's bill-to address
|
150
|
+
# @type: string
|
151
|
+
# @format: uuid
|
152
|
+
field :primary_bill_to_address_id
|
153
|
+
|
154
|
+
# The ID number of the invoice's ship-to address
|
155
|
+
# @type: string
|
156
|
+
# @format: uuid
|
157
|
+
field :primary_ship_to_address_id
|
158
|
+
|
159
|
+
# The date on which this invoice record was created.
|
160
|
+
# @type: string
|
161
|
+
# @format: date-time
|
162
|
+
field :created, Types::Params::DateTime
|
163
|
+
|
164
|
+
# The ID number of the user who created this invoice.
|
165
|
+
# @type: string
|
166
|
+
# @format: uuid
|
167
|
+
field :created_user_id
|
168
|
+
|
169
|
+
# The date on which this invoice record was last modified.
|
170
|
+
# @type: string
|
171
|
+
# @format: date-time
|
172
|
+
field :modified, Types::Params::DateTime
|
173
|
+
|
174
|
+
# The ID number of the user who most recently modified this invoice.
|
175
|
+
# @type: string
|
176
|
+
# @format: uuid
|
177
|
+
field :modified_user_id
|
178
|
+
|
179
|
+
# The AppEnrollmentId of the application that imported this record. For accounts
|
180
|
+
# with more than one financial system connected, this field identifies the originating
|
181
|
+
# financial system that produced this record. This value is null if this record
|
182
|
+
# was not loaded from an external ERP or financial system.
|
183
|
+
# @type: string
|
184
|
+
# @format: uuid
|
185
|
+
field :app_enrollment_id
|
186
|
+
|
187
|
+
# Is the invoice voided?
|
188
|
+
# @type: boolean
|
189
|
+
field :is_voided
|
190
|
+
|
191
|
+
# Is the invoice in dispute?
|
192
|
+
# @type: boolean
|
193
|
+
field :in_dispute
|
194
|
+
|
195
|
+
# Should the invoice be excluded from aging calculations?
|
196
|
+
# @type: boolean
|
197
|
+
field :exclude_from_aging
|
198
|
+
|
199
|
+
# The Company associated to this invoice.
|
200
|
+
# To retrieve this item, specify `Company` in the "Include" parameter for your query.
|
201
|
+
field :company
|
202
|
+
|
203
|
+
# The Customer associated to the invoice customer
|
204
|
+
# To retrieve this item, specify `Customer` in the "Include" parameter for your query.
|
205
|
+
field :customer
|
206
|
+
|
207
|
+
# The Contact associated to the invoice customer
|
208
|
+
# To retrieve this item, specify `Customer` in the "Include" parameter for your query.
|
209
|
+
field :customer_primary_contact
|
210
|
+
|
211
|
+
belongs_to :company, { :class_name => "Lockstep::Account", :primary_key => :company_id, :foreign_key => "company_id" }
|
212
|
+
belongs_to :account, { :class_name => "Lockstep::Account", :primary_key => :company_id, :foreign_key => "company_id" }
|
213
|
+
belongs_to :customer, { :class_name => "Lockstep::Connection", :primary_key => :company_id, :foreign_key => "customer_id" }
|
214
|
+
belongs_to :connection, { :class_name => "Lockstep::Connection", :primary_key => :company_id, :foreign_key => "customer_id" }
|
215
|
+
belongs_to :created_user, { :class_name => "Lockstep::User", :primary_key => :user_id, :foreign_key => "created_user_id" }
|
216
|
+
belongs_to :modified_user, { :class_name => "Lockstep::User", :primary_key => :user_id, :foreign_key => "modified_user_id" }
|
217
|
+
|
218
|
+
has_many :addresses, { :class_name => "Schema::InvoiceAddress", :included => true }
|
219
|
+
has_many :lines, { :class_name => "Schema::InvoiceLine", :included => true }
|
220
|
+
has_many :payments, { :class_name => "Schema::InvoicePaymentDetail", :included => true }
|
221
|
+
has_many :notes, { :class_name => "Lockstep::Note", :included => true, :foreign_key => :object_key, :polymorphic => { :table_key => "Invoice" } }
|
222
|
+
has_many :attachments, { :class_name => "Schema::Attachment", :included => true }
|
223
|
+
has_many :credit_memos, { :class_name => "Schema::CreditMemoInvoice", :included => true }
|
224
|
+
has_many :custom_field_values, { :class_name => "Schema::CustomFieldValue", :included => true }
|
225
|
+
has_many :custom_field_definitions, { :class_name => "Schema::CustomFieldDefinition", :included => true }
|
226
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
class Schema::InvoiceAddress < 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 :invoice_address_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 ID number of the invoice this address belongs to
|
23
|
+
# @type: string
|
24
|
+
# @format: uuid
|
25
|
+
field :invoice_id
|
26
|
+
|
27
|
+
# The first line of the address.
|
28
|
+
# @type: string
|
29
|
+
field :line1
|
30
|
+
|
31
|
+
# The second line of the address.
|
32
|
+
# @type: string
|
33
|
+
field :line2
|
34
|
+
|
35
|
+
# The third line of the address.
|
36
|
+
# @type: string
|
37
|
+
field :line3
|
38
|
+
|
39
|
+
# The name of the city for this address.
|
40
|
+
# @type: string
|
41
|
+
field :city
|
42
|
+
|
43
|
+
# The state or region part of this address.
|
44
|
+
# @type: string
|
45
|
+
field :region
|
46
|
+
|
47
|
+
# The postal code for this address.
|
48
|
+
# @type: string
|
49
|
+
field :postal_code
|
50
|
+
|
51
|
+
# The country for this address.
|
52
|
+
# @type: string
|
53
|
+
field :country
|
54
|
+
|
55
|
+
# The latitude of this address, if available.
|
56
|
+
# @type: number
|
57
|
+
# @format: float
|
58
|
+
field :latitude
|
59
|
+
|
60
|
+
# The longitude of this address, if available.
|
61
|
+
# @type: number
|
62
|
+
# @format: float
|
63
|
+
field :longitude
|
64
|
+
|
65
|
+
# The date on which this address record was created.
|
66
|
+
# @type: string
|
67
|
+
# @format: date-time
|
68
|
+
field :created, Types::Params::DateTime
|
69
|
+
|
70
|
+
# The ID number of the user who created this address.
|
71
|
+
# @type: string
|
72
|
+
# @format: uuid
|
73
|
+
field :created_user_id
|
74
|
+
|
75
|
+
# The date on which this address record was last modified.
|
76
|
+
# @type: string
|
77
|
+
# @format: date-time
|
78
|
+
field :modified, Types::Params::DateTime
|
79
|
+
|
80
|
+
# The ID number of the user who most recently modified this address.
|
81
|
+
# @type: string
|
82
|
+
# @format: uuid
|
83
|
+
field :modified_user_id
|
84
|
+
|
85
|
+
# The AppEnrollmentId of the application that imported this record. For accounts
|
86
|
+
# with more than one financial system connected, this field identifies the originating
|
87
|
+
# financial system that produced this record. This value is null if this record
|
88
|
+
# was not loaded from an external ERP or financial system.
|
89
|
+
# @type: string
|
90
|
+
# @format: uuid
|
91
|
+
field :app_enrollment_id
|
92
|
+
|
93
|
+
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
94
|
+
belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
|
95
|
+
|
96
|
+
|
97
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class Schema::InvoiceFetchResult < 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
|
+
# For more information on Invoices, see [InvoiceModel](https://developer.lockstep.io/reference/get_api-v1-invoices-id).
|
24
|
+
# @type: array
|
25
|
+
field :records
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,188 @@
|
|
1
|
+
class Schema::InvoiceHistory < 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 unique ID number of this invoice history entry.
|
17
|
+
# @type: string
|
18
|
+
# @format: uuid
|
19
|
+
field :invoice_history_id
|
20
|
+
|
21
|
+
# The unique ID of the Invoice represented by this history entry. This ID was automatically assigned
|
22
|
+
# by Lockstep to the Invoice record when it was added to the Lockstep platform.
|
23
|
+
#
|
24
|
+
# For the ID of this record in its originating financial system, see `ErpKey`.
|
25
|
+
# @type: string
|
26
|
+
# @format: uuid
|
27
|
+
field :invoice_id
|
28
|
+
|
29
|
+
# The ID number of the company that created this invoice.
|
30
|
+
# @type: string
|
31
|
+
# @format: uuid
|
32
|
+
field :company_id
|
33
|
+
|
34
|
+
# The ID number of the counterparty for the invoice, for example, a customer or vendor.
|
35
|
+
# @type: string
|
36
|
+
# @format: uuid
|
37
|
+
field :customer_id
|
38
|
+
|
39
|
+
# The unique ID of this record as it was known in its originating financial system.
|
40
|
+
#
|
41
|
+
# If this company record was imported from a financial system, it will have the value `ErpKey`
|
42
|
+
# set to the original primary key number of the record as it was known in the originating financial
|
43
|
+
# system. If this record was not imported, this value will be `null`.
|
44
|
+
#
|
45
|
+
# For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
46
|
+
# @type: string
|
47
|
+
field :erp_key
|
48
|
+
|
49
|
+
# The purchase order code as it exists in the user's ERP or accounting system.
|
50
|
+
# @type: string
|
51
|
+
field :purchase_order_code
|
52
|
+
|
53
|
+
# An additional reference code that is sometimes used to identify this invoice.
|
54
|
+
# The meaning of this field is specific to the ERP or accounting system used by the user.
|
55
|
+
# @type: string
|
56
|
+
field :reference_code
|
57
|
+
|
58
|
+
# A code identifying the salesperson responsible for writing this invoice.
|
59
|
+
# @type: string
|
60
|
+
field :salesperson_code
|
61
|
+
|
62
|
+
# A string identifying the salesperson responsible for writing this invoice.
|
63
|
+
# @type: string
|
64
|
+
field :salesperson_name
|
65
|
+
|
66
|
+
# A code identifying the type of this invoice.
|
67
|
+
# @type: string
|
68
|
+
field :invoice_type_code
|
69
|
+
|
70
|
+
# A code identifying the status of this invoice.
|
71
|
+
# @type: string
|
72
|
+
field :invoice_status_code
|
73
|
+
|
74
|
+
# A code identifying the terms given to the purchaser.
|
75
|
+
# @type: string
|
76
|
+
field :terms_code
|
77
|
+
|
78
|
+
# If the customer negotiated any special terms different from the standard terms above, describe them here.
|
79
|
+
# @type: string
|
80
|
+
field :special_terms
|
81
|
+
|
82
|
+
# The three-character ISO 4217 currency code used for this invoice. This will be validated by the /api/v1/currencies data set
|
83
|
+
# @type: string
|
84
|
+
field :currency_code
|
85
|
+
|
86
|
+
# The total value of this invoice, inclusive of all taxes and line items.
|
87
|
+
# @type: number
|
88
|
+
# @format: double
|
89
|
+
field :total_amount
|
90
|
+
|
91
|
+
# The total sales (or transactional) tax calculated for this invoice.
|
92
|
+
# @type: number
|
93
|
+
# @format: double
|
94
|
+
field :sales_tax_amount
|
95
|
+
|
96
|
+
# The total discounts given by the seller to the buyer on this invoice.
|
97
|
+
# @type: number
|
98
|
+
# @format: double
|
99
|
+
field :discount_amount
|
100
|
+
|
101
|
+
# The remaining balance value of this invoice.
|
102
|
+
# @type: number
|
103
|
+
# @format: double
|
104
|
+
field :outstanding_balance_amount
|
105
|
+
|
106
|
+
# The reporting date for this invoice.
|
107
|
+
# @type: string
|
108
|
+
# @format: date
|
109
|
+
field :invoice_date
|
110
|
+
|
111
|
+
# The date when discounts were adjusted for this invoice.
|
112
|
+
# @type: string
|
113
|
+
# @format: date
|
114
|
+
field :discount_date
|
115
|
+
|
116
|
+
# The date when this invoice posted to the company's general ledger.
|
117
|
+
# @type: string
|
118
|
+
# @format: date
|
119
|
+
field :posted_date
|
120
|
+
|
121
|
+
# The date when the invoice was closed and finalized after completion of all payments and delivery of all products and
|
122
|
+
# services.
|
123
|
+
# @type: string
|
124
|
+
# @format: date
|
125
|
+
field :invoice_closed_date
|
126
|
+
|
127
|
+
# The date when the remaining outstanding balance is due.
|
128
|
+
# @type: string
|
129
|
+
# @format: date
|
130
|
+
field :payment_due_date
|
131
|
+
|
132
|
+
# The date and time when this record was imported from the user's ERP or accounting system.
|
133
|
+
# @type: string
|
134
|
+
# @format: date-time
|
135
|
+
field :imported_date, Types::Params::DateTime
|
136
|
+
|
137
|
+
# The ID number of the invoice's origination address
|
138
|
+
# @type: string
|
139
|
+
# @format: uuid
|
140
|
+
field :primary_origin_address_id
|
141
|
+
|
142
|
+
# The ID number of the invoice's bill-to address
|
143
|
+
# @type: string
|
144
|
+
# @format: uuid
|
145
|
+
field :primary_bill_to_address_id
|
146
|
+
|
147
|
+
# The ID number of the invoice's ship-to address
|
148
|
+
# @type: string
|
149
|
+
# @format: uuid
|
150
|
+
field :primary_ship_to_address_id
|
151
|
+
|
152
|
+
# The date on which this invoice record was created.
|
153
|
+
# @type: string
|
154
|
+
# @format: date-time
|
155
|
+
field :created, Types::Params::DateTime
|
156
|
+
|
157
|
+
# The ID number of the user who created this invoice.
|
158
|
+
# @type: string
|
159
|
+
# @format: uuid
|
160
|
+
field :created_user_id
|
161
|
+
|
162
|
+
# The date on which this invoice record was last modified.
|
163
|
+
# @type: string
|
164
|
+
# @format: date-time
|
165
|
+
field :modified, Types::Params::DateTime
|
166
|
+
|
167
|
+
# The ID number of the user who most recently modified this invoice.
|
168
|
+
# @type: string
|
169
|
+
# @format: uuid
|
170
|
+
field :modified_user_id
|
171
|
+
|
172
|
+
# The AppEnrollmentId of the application that imported this record. For accounts
|
173
|
+
# with more than one financial system connected, this field identifies the originating
|
174
|
+
# financial system that produced this record. This value is null if this record
|
175
|
+
# was not loaded from an external ERP or financial system.
|
176
|
+
# @type: string
|
177
|
+
# @format: uuid
|
178
|
+
field :app_enrollment_id
|
179
|
+
|
180
|
+
belongs_to :company, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
181
|
+
belongs_to :account, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
182
|
+
belongs_to :customer, {:class_name=>"Lockstep::Connection", :primary_key=>:company_id, :foreign_key=>"customer_id"}
|
183
|
+
belongs_to :connection, {:class_name=>"Lockstep::Connection", :primary_key=>:company_id, :foreign_key=>"customer_id"}
|
184
|
+
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
185
|
+
belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
|
186
|
+
|
187
|
+
|
188
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class Schema::InvoiceHistoryFetchResult < 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::InvoiceHistory", :included=>true}
|
25
|
+
|
26
|
+
end
|