lockstep_rails 0.3.36 → 0.3.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/app/concepts/lockstep/api_record.rb +4 -0
  4. data/app/concepts/lockstep/client.rb +16 -0
  5. data/app/concepts/lockstep/query.rb +7 -0
  6. data/app/models/lockstep/customer_summary.rb +5 -0
  7. data/app/models/lockstep/magic_link.rb +10 -0
  8. data/app/models/lockstep/vendor_summary.rb +5 -0
  9. data/app/platform_api/schema/ap_aging_header_info.rb +15 -12
  10. data/app/platform_api/schema/ap_header_info.rb +8 -8
  11. data/app/platform_api/schema/app_enrollment.rb +0 -3
  12. data/app/platform_api/schema/app_enrollment_reconnect_info.rb +30 -0
  13. data/app/platform_api/schema/application.rb +5 -0
  14. data/app/platform_api/schema/ar_aging_header_info.rb +16 -1
  15. data/app/platform_api/schema/ar_header_info.rb +40 -11
  16. data/app/platform_api/schema/at_risk_invoice_summary.rb +1 -1
  17. data/app/platform_api/schema/attachment.rb +34 -9
  18. data/app/platform_api/schema/batch_sync.rb +3 -0
  19. data/app/platform_api/schema/bulk_currency_conversion.rb +1 -1
  20. data/app/platform_api/schema/company.rb +17 -24
  21. data/app/platform_api/schema/company_details.rb +98 -0
  22. data/app/platform_api/schema/company_details_payment.rb +60 -0
  23. data/app/platform_api/schema/company_sync.rb +17 -2
  24. data/app/platform_api/schema/connector_info.rb +29 -0
  25. data/app/platform_api/schema/contact.rb +1 -1
  26. data/app/platform_api/schema/contact_sync.rb +7 -1
  27. data/app/platform_api/schema/credit_memo_applied.rb +6 -0
  28. data/app/platform_api/schema/credit_memo_invoice.rb +1 -1
  29. data/app/platform_api/schema/custom_field_sync.rb +4 -4
  30. data/app/platform_api/schema/custom_field_value.rb +12 -0
  31. data/app/platform_api/schema/customer_summary.rb +36 -1
  32. data/app/platform_api/schema/daily_payable_outstanding_report.rb +7 -4
  33. data/app/platform_api/schema/daily_sales_outstanding_report.rb +0 -5
  34. data/app/platform_api/schema/developer_account_submit.rb +8 -0
  35. data/app/platform_api/schema/dpo_summary.rb +46 -0
  36. data/app/platform_api/schema/dpo_summary_group_total.rb +38 -0
  37. data/app/platform_api/schema/feature_flags_request.rb +14 -0
  38. data/app/platform_api/schema/feature_flags_response.rb +14 -0
  39. data/app/platform_api/schema/financial_account.rb +1 -1
  40. data/app/platform_api/schema/financial_account_balance_history_sync.rb +56 -0
  41. data/app/platform_api/schema/financial_account_sync.rb +50 -0
  42. data/app/platform_api/schema/financial_report.rb +38 -0
  43. data/app/platform_api/schema/financial_report_cell.rb +14 -0
  44. data/app/platform_api/schema/financial_report_row.rb +20 -0
  45. data/app/platform_api/schema/financial_year_setting_sync.rb +28 -0
  46. data/app/platform_api/schema/group_account.rb +62 -0
  47. data/app/platform_api/schema/invoice.rb +8 -3
  48. data/app/platform_api/schema/invoice_fetch_result.rb +4 -4
  49. data/app/platform_api/schema/invoice_history.rb +1 -1
  50. data/app/platform_api/schema/invoice_line_sync.rb +3 -3
  51. data/app/platform_api/schema/invoice_payment_detail.rb +1 -1
  52. data/app/platform_api/schema/invoice_summary.rb +7 -1
  53. data/app/platform_api/schema/invoice_summary_invoice_summary_totals_summary_fetch_result.rb +30 -0
  54. data/app/platform_api/schema/invoice_summary_totals.rb +20 -0
  55. data/app/platform_api/schema/invoice_sync.rb +12 -7
  56. data/app/platform_api/schema/lead.rb +1 -0
  57. data/app/platform_api/schema/magic_link.rb +78 -0
  58. data/app/platform_api/schema/magic_link_fetch_result.rb +26 -0
  59. data/app/platform_api/schema/note.rb +24 -5
  60. data/app/platform_api/schema/payables_coming_due.rb +52 -0
  61. data/app/platform_api/schema/payables_coming_due_fetch_result.rb +26 -0
  62. data/app/platform_api/schema/payables_coming_due_header.rb +44 -0
  63. data/app/platform_api/schema/payables_coming_due_widget.rb +29 -0
  64. data/app/platform_api/schema/payables_summary_report.rb +43 -0
  65. data/app/platform_api/schema/payment.rb +6 -5
  66. data/app/platform_api/schema/payment_applied.rb +3 -0
  67. data/app/platform_api/schema/payment_detail.rb +17 -2
  68. data/app/platform_api/schema/payment_detail_header.rb +1 -1
  69. data/app/platform_api/schema/payment_summary.rb +32 -9
  70. data/app/platform_api/schema/payment_summary_payment_summary_totals_summary_fetch_result.rb +30 -0
  71. data/app/platform_api/schema/payment_summary_totals.rb +20 -0
  72. data/app/platform_api/schema/payment_sync.rb +6 -5
  73. data/app/platform_api/schema/public_company_profile.rb +37 -0
  74. data/app/platform_api/schema/public_company_profile_fetch_result.rb +26 -0
  75. data/app/platform_api/schema/risk_rate.rb +6 -1
  76. data/app/platform_api/schema/status.rb +10 -0
  77. data/app/platform_api/schema/summary_aging_totals.rb +19 -0
  78. data/app/platform_api/schema/sync_entity_result.rb +5 -0
  79. data/app/platform_api/schema/sync_request.rb +5 -0
  80. data/app/platform_api/schema/sync_submit.rb +6 -0
  81. data/app/platform_api/schema/transaction.rb +94 -0
  82. data/app/platform_api/schema/transaction_detail.rb +73 -0
  83. data/app/platform_api/schema/transaction_summary_total.rb +35 -0
  84. data/app/platform_api/schema/transaction_transaction_summary_total_summary_fetch_result.rb +30 -0
  85. data/app/platform_api/schema/user_account.rb +6 -2
  86. data/app/platform_api/schema/user_group.rb +30 -0
  87. data/app/platform_api/schema/user_role.rb +1 -1
  88. data/app/platform_api/schema/vendor_summary.rb +63 -10
  89. data/app/platform_api/schema/vendor_summary_fetch_result.rb +26 -0
  90. data/app/platform_api/schema/webhook.rb +6 -2
  91. data/app/platform_api/schema/webhook_history_table_storage.rb +12 -0
  92. data/app/platform_api/schema/webhook_rule.rb +79 -0
  93. data/app/platform_api/schema/webhook_rule_fetch_result.rb +26 -0
  94. data/app/platform_api/swagger.json +11440 -8523
  95. data/lib/lockstep_rails/version.rb +1 -1
  96. metadata +39 -4
  97. data/app/models/lockstep/ap_header.rb +0 -32
  98. data/app/models/lockstep/ar_header.rb +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05bd7ba3de1568889d934bc0160f923ecf173f1fe5f357856a9fc221d07fe039
4
- data.tar.gz: 4a1458573f08c1b33aa11da01487df04ca403e9bff7f9e8039f723284e47f62b
3
+ metadata.gz: 481ae74f941e20ac5a66c1f3b48c3ae9d9283ea53e64cbbe979eeb6b852f27a0
4
+ data.tar.gz: d91082889c6d59314032cc2d2a89567e5e868d98c7cbe9a5c5bb930e390bdea9
5
5
  SHA512:
6
- metadata.gz: 887d60f6868d2d525de634193da364ff24a86447d3b1e5616421d7c4ccefcb3c5b55d55c64ff3be0c7ec6f9ad94e794e3951ada7e0e9ffb3eef3834c4da6824f
7
- data.tar.gz: 7adadb32cc6a971a5c9e4c816cd2e12f15aa85c845a73dab446f645cb1061d9f0f38d82da34b9d30cc3c0c84c161de4170d0cb5336b7e34c1309e981a37205da
6
+ metadata.gz: 0edf7d1be2d8a48637a54b7f47264821fc8d76e2cce0af5b60cb8a35724c6dd89b33ac36c78ca1691ddcf4dae2a536a9dcf971d32758365ebd2f1ca1b3488f95
7
+ data.tar.gz: ae547b1171bbb79f663f4838689a580d6bfcbb9a1fcf1f2c5ffcacb7fa424e8db19f8fa85191829428f30bd37181e74b0267eb8f4da4338cd5f31ef0f078bdc6
data/README.md CHANGED
@@ -61,6 +61,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
61
61
  * Lockstep::ReportPayablesComingDueSummary
62
62
  * Lockstep::ApiKey
63
63
  * Lockstep::InvoiceAtRiskSummary
64
+ * Lockstep::MagicLink
64
65
 
65
66
  ## ActiveModel Interfaces
66
67
 
@@ -544,6 +544,10 @@ module Lockstep
544
544
  query_builder.where(*args)
545
545
  end
546
546
 
547
+ def self.additional_query_params(args)
548
+ query_builder.additional_query_params(args)
549
+ end
550
+
547
551
  def self.execute
548
552
  query_builder.execute
549
553
  end
@@ -29,6 +29,13 @@ module Lockstep
29
29
  RequestStore.store[:lockstep_api_key]
30
30
  end
31
31
 
32
+ def self.set_internal_service_key(key)
33
+ RequestStore.store[:internal_service_key] = key
34
+ end
35
+
36
+ def internal_service_key
37
+ RequestStore.store[:internal_service_key]
38
+ end
32
39
 
33
40
  ##
34
41
  # Construct a new Lockstep API client targeting the specified server.
@@ -115,6 +122,7 @@ module Lockstep
115
122
  request["SdkType"] = 'Ruby'
116
123
  request["SdkVersion"] = '2022.4.32.0'
117
124
  request["MachineName"] = Socket.gethostname
125
+ request["LS-InternalService"] = internal_service_key if internal_service_key_set?
118
126
  body = body.to_json unless body.is_a?(String)
119
127
  request.body = body
120
128
 
@@ -155,6 +163,14 @@ module Lockstep
155
163
  request(:delete, path, {}, {})
156
164
  end
157
165
 
166
+ def post_magic_link(path, body: {}, params: {})
167
+ request(:post, path, body, params)
168
+ end
169
+
170
+ def internal_service_key_set?
171
+ !!internal_service_key
172
+ end
173
+
158
174
  def with_logger(&block)
159
175
  block.call
160
176
  end
@@ -51,6 +51,12 @@ class Lockstep::Query
51
51
  end
52
52
  end
53
53
 
54
+ def additional_query_params(args)
55
+ with_clone do
56
+ criteria[:additional_query_params] ||= args
57
+ end
58
+ end
59
+
54
60
  def convert_arg(arg)
55
61
  return arg.to_pointer if arg.is_a?(Lockstep::ApiRecord)
56
62
  return Lockstep::ApiRecord.to_date_object(arg) if arg.is_a?(Time) || arg.is_a?(Date)
@@ -198,6 +204,7 @@ class Lockstep::Query
198
204
  params.merge!({ :include => criteria[:include].join(",") }) if criteria[:include]
199
205
  params.merge!({ :order => criteria[:order].join(",") }) if criteria[:order]
200
206
  params.merge!({ :pageSize => 2 }) if criteria[:count]
207
+ params.merge!(criteria[:additional_query_params]) if criteria[:additional_query_params]
201
208
  params.reject! { |k, v| v.blank? }
202
209
  params
203
210
  end
@@ -3,4 +3,9 @@ class Lockstep::CustomerSummary < Lockstep::ApiRecord
3
3
  self.id_ref = "company_id"
4
4
  self.query_path = ""
5
5
  load_schema(Schema::CustomerSummary)
6
+
7
+ def self.with_report_date(report_date)
8
+ additional_query_params({"reportDate": report_date})
9
+ end
10
+
6
11
  end
@@ -0,0 +1,10 @@
1
+ class Lockstep::MagicLink < Lockstep::ApiRecord
2
+ self.model_name_uri = "v1/useraccounts/magic-links"
3
+ self.id_ref = "magicLinkId"
4
+ self.query_path = ""
5
+
6
+ def self.generate(email_id, expiry, app_id, user_role)
7
+ body = {email: email_id, expiresInMinutes: expiry, applicationId: app_id, userRole: user_role}
8
+ resource.post_magic_link('', body: body, params: {})
9
+ end
10
+ end
@@ -3,4 +3,9 @@ class Lockstep::VendorSummary < Lockstep::ApiRecord
3
3
  self.id_ref = "vendor_id"
4
4
  self.query_path = ""
5
5
  load_schema(Schema::VendorSummary)
6
+
7
+ def self.with_report_date(report_date)
8
+ additional_query_params({"reportDate": report_date})
9
+ end
10
+
6
11
  end
@@ -5,9 +5,9 @@ def self.id_ref
5
5
  nil
6
6
  end
7
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
- #
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
11
  # For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
12
12
  # @type: string
13
13
  # @format: uuid
@@ -17,43 +17,46 @@ end
17
17
  # @type: string
18
18
  field :report_bucket
19
19
 
20
- # The total number of customers.
20
+ # The total number of vendors.
21
21
  # @type: integer
22
22
  # @format: int32
23
23
  field :total_vendors
24
24
 
25
- # The total number of invoices outstanding.
25
+ # The total number of bills outstanding.
26
26
  # @type: integer
27
27
  # @format: int32
28
28
  field :total_bills_outstanding
29
29
 
30
- # The total amount outstanding.
30
+ # The total amount outstanding on bills.
31
31
  # @type: number
32
32
  # @format: double
33
33
  field :total_bills_outstanding_amount
34
34
 
35
- # The total credit memo amount outstanding.
35
+ # The total amount outstanding on credit memos.
36
36
  # @type: number
37
37
  # @format: double
38
38
  field :total_credit_memo_outstanding_amount
39
39
 
40
- # The total advance payment amount.
40
+ # The total amount of advance payments.
41
41
  # @type: number
42
42
  # @format: double
43
43
  field :total_advance_payment_amount
44
44
 
45
- # The total outstanding amount
45
+ # The total amount outstanding.
46
46
  # @type: number
47
47
  # @format: double
48
48
  field :total_outstanding_amount
49
49
 
50
- # The total amount for AR.
50
+ # The total amount for AP.
51
51
  # @type: number
52
52
  # @format: double
53
53
  field :total_ap_amount
54
54
 
55
- # Portion of Total AR this data represents.
55
+ # Portion of Total AP this data represents.
56
56
  # @type: number
57
57
  # @format: double
58
58
  field :percentage_of_total_ap
59
- end
59
+
60
+
61
+
62
+ end
@@ -5,9 +5,9 @@ def self.id_ref
5
5
  nil
6
6
  end
7
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
- #
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
11
  # For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
12
12
  # @type: string
13
13
  # @format: uuid
@@ -15,15 +15,15 @@ end
15
15
 
16
16
  # The date of the report
17
17
  # @type: string
18
- # @format: date
19
- field :report_date
18
+ # @format: date-time
19
+ field :report_date, Types::Params::DateTime
20
20
 
21
21
  # The date of the report
22
22
  # @type: string
23
- # @format: uuid
24
- field :company_id
23
+ # @format: date-time
24
+ field :report_period, Types::Params::DateTime
25
25
 
26
- # The total number of vendors..
26
+ # The total number of vendors.
27
27
  # @type: integer
28
28
  # @format: int32
29
29
  field :total_vendors
@@ -72,9 +72,6 @@ end
72
72
  # Data about the last successful sync associated with this enrollment
73
73
  field :last_successful_sync
74
74
 
75
- # Use `ConnectorInfo` instead.
76
- field :erp_info
77
-
78
75
  # Optional data necessary to create an app enrollment for a supported connector.
79
76
  # Only enter relevant fields for the given connector.
80
77
  field :connector_info
@@ -0,0 +1,30 @@
1
+ class Schema::AppEnrollmentReconnectInfo < Lockstep::ApiRecord
2
+
3
+ # ApiRecord will crash unless `id_ref` is defined
4
+ def self.id_ref
5
+ nil
6
+ end
7
+
8
+ # The OAuth authentication code.
9
+ # @type: string
10
+ field :auth_code
11
+
12
+ # The OAuth authentication code.
13
+ # @type: string
14
+ field :username
15
+
16
+ # The password for the web services account with access permissions.
17
+ # @type: string
18
+ field :password
19
+
20
+ # The access token id for the connector enrollment.
21
+ # @type: string
22
+ field :token_id
23
+
24
+ # The access token secret for the connector enrollment.
25
+ # @type: string
26
+ field :token_secret
27
+
28
+
29
+
30
+ end
@@ -78,6 +78,11 @@ end
78
78
  # @format: uuid
79
79
  field :group_key
80
80
 
81
+ # The B2C Client ID of the application
82
+ # @type: string
83
+ # @format: uuid
84
+ field :b2_c_client_id
85
+
81
86
  belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
82
87
  belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
83
88
 
@@ -7,7 +7,7 @@ end
7
7
 
8
8
  # The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
9
9
  # account will share the same GroupKey value. GroupKey values cannot be changed once created.
10
- #
10
+ #
11
11
  # For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
12
12
  # @type: string
13
13
  # @format: uuid
@@ -27,6 +27,21 @@ end
27
27
  # @format: int32
28
28
  field :total_invoices_outstanding
29
29
 
30
+ # The total amount outstanding on invoices.
31
+ # @type: number
32
+ # @format: double
33
+ field :total_invoice_outstanding_amount
34
+
35
+ # The total amount outstanding on credit memos.
36
+ # @type: number
37
+ # @format: double
38
+ field :total_credit_memo_outstanding_amount
39
+
40
+ # The total amount of unapplied payments.
41
+ # @type: number
42
+ # @format: double
43
+ field :total_unapplied_payment_amount
44
+
30
45
  # The total amount outstanding.
31
46
  # @type: number
32
47
  # @format: double
@@ -5,9 +5,9 @@ def self.id_ref
5
5
  nil
6
6
  end
7
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
- #
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
11
  # For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
12
12
  # @type: string
13
13
  # @format: uuid
@@ -20,8 +20,7 @@ end
20
20
 
21
21
  # The date of the report
22
22
  # @type: string
23
- # @format: uuid
24
- field :company_id
23
+ field :report_period
25
24
 
26
25
  # The total number of customers.
27
26
  # @type: integer
@@ -103,20 +102,50 @@ end
103
102
  # @format: double
104
103
  field :total_payment_amount_current_year
105
104
 
106
- # The total amount of payments received in the last 30 days
105
+ # Portion of Total AR that is 90+ days Past due.
106
+ # @type: number
107
+ # @format: double
108
+ field :percentage_of_total_ar90_days_past_due
109
+
110
+ # The number of customers who paid within the past thirty days.
107
111
  # @type: integer
108
112
  # @format: int32
109
- field :total_collected_past_thirty_days
113
+ field :customers_paid_past_thirty_days
114
+
115
+ # The total amount collected over the past thirty days.
116
+ # @type: number
117
+ # @format: double
118
+ field :amount_collected_past_thirty_days
119
+
120
+ # The amount unapplied from the payments collected over the past thirty days.
121
+ # @type: number
122
+ # @format: double
123
+ field :unapplied_amount_past_thirty_days
110
124
 
111
- # The total amount of Invoices paid in the last 30 days
125
+ # The number of invoices paid over the past thirty days.
112
126
  # @type: integer
113
127
  # @format: int32
114
- field :total_invoices_paid_past_thirty_days
128
+ field :invoices_paid_past_thirty_days
115
129
 
116
- # Portion of Total AR that is 90+ days Past due.
130
+ # The number of customers invoiced over the the past thirty days.
131
+ # @type: integer
132
+ # @format: int32
133
+ field :customers_invoiced_past_thirty_days
134
+
135
+ # The total amount invoiced over the past thirty days.
117
136
  # @type: number
118
137
  # @format: double
119
- field :percentage_of_total_ar90_days_past_due
138
+ field :amount_invoiced_past_thirty_days
139
+
140
+ # The amount outstanding on the invoices invoiced over the past thirty days.
141
+ # @type: number
142
+ # @format: double
143
+ field :amount_due_past_thirty_days
144
+
145
+ # The number of invoices invoiced over the past thirty days.
146
+ # @type: integer
147
+ # @format: int32
148
+ field :invoices_past_thirty_days
120
149
 
121
150
 
122
151
 
@@ -12,7 +12,7 @@ end
12
12
 
13
13
  # The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
14
14
  # account will share the same GroupKey value. GroupKey values cannot be changed once created.
15
- #
15
+ #
16
16
  # For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
17
17
  # @type: string
18
18
  # @format: uuid
@@ -19,33 +19,53 @@ end
19
19
  # @format: uuid
20
20
  field :group_key
21
21
 
22
- # The name of the table the attachment is associated with
22
+ # An Attachment is connected to an existing item within the Lockstep Platform by the fields `TableKey` and
23
+ # `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of
24
+ # `Invoice` and an `ObjectKey` value of `12345`.
25
+ #
26
+ # The `TableKey` value contains the name of the table within the Lockstep Platform to which this Attachment
27
+ # is connected.
28
+ #
29
+ # For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
23
30
  # @type: string
24
31
  field :table_key
25
32
 
26
- # The ID of the object the attachment is associated with
33
+ # An Attachment is connected to an existing item within the Lockstep Platform by the fields `TableKey` and
34
+ # `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of
35
+ # `Invoice` and an `ObjectKey` value of `12345`.
36
+ #
37
+ # The `ObjectKey` value contains the primary key of the record within the Lockstep Platform to which this
38
+ # Attachment is connected.
39
+ #
40
+ # For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
27
41
  # @type: string
28
42
  # @format: uuid
29
43
  field :object_key
30
44
 
31
- # Name of the file
45
+ # An Attachment represents a file that was uploaded to the Lockstep Platform. This field contains the original
46
+ # name of the file on disk, without its extension.
32
47
  # @type: string
33
48
  field :file_name
34
49
 
35
- # Extension type of the file
50
+ # An Attachment represents a file that was uploaded to the Lockstep Platform. This field contains the original
51
+ # extension name of the file on disk.
36
52
  # @type: string
37
53
  field :file_ext
38
54
 
39
- # Corresponding AttachmentType object to describe this attachment
55
+ # DEPRECATED: This field is replaced by `AttachmentType`.
40
56
  # @type: string
41
57
  # @format: uuid
42
58
  field :attachment_type_id
43
59
 
44
- # Flag indicating the attachment was archived
60
+ # A flag indicating whether this Attachment is archived (also known as hidden or deleted). When you call
61
+ # [ArchiveAttachment](https://developer.lockstep.io/reference/delete_api-v1-attachments-id) this field will
62
+ # be set to true.
63
+ #
64
+ # You should avoid displaying Attachments with the IsArchived field set to true in your user interface.
45
65
  # @type: boolean
46
66
  field :is_archived
47
67
 
48
- # Tracks the original record for this attachment, not currently used.
68
+ # DEPRECATED - Do not use
49
69
  # @type: string
50
70
  # @format: uuid
51
71
  field :origin_attachment_id
@@ -76,16 +96,21 @@ end
76
96
  # @format: uuid
77
97
  field :app_enrollment_id
78
98
 
79
- # The date the attachment was created
99
+ # The date the attachment was created.
80
100
  # @type: string
81
101
  # @format: date-time
82
102
  field :created, Types::Params::DateTime
83
103
 
84
- # Id of the user who made the file
104
+ # The unique ID of the [UserAccount](https://developer.lockstep.io/docs/useraccountmodel) of the user
105
+ # who created this Attachment.
85
106
  # @type: string
86
107
  # @format: uuid
87
108
  field :created_user_id
88
109
 
110
+ # A text string describing the type of this Attachment.
111
+ # @type: string
112
+ field :attachment_type
113
+
89
114
  belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
90
115
 
91
116
 
@@ -14,5 +14,8 @@ end
14
14
  has_many :custom_fields, {:class_name=>"Schema::CustomFieldSync", :included=>true}
15
15
  has_many :payments, {:class_name=>"Schema::PaymentSync", :included=>true}
16
16
  has_many :payment_applications, {:class_name=>"Schema::PaymentAppliedSync", :included=>true}
17
+ has_many :financial_year_settings, {:class_name=>"Schema::FinancialYearSettingSync", :included=>true}
18
+ has_many :financial_accounts, {:class_name=>"Schema::FinancialAccountSync", :included=>true}
19
+ has_many :financial_account_balance_histories, {:class_name=>"Schema::FinancialAccountBalanceHistorySync", :included=>true}
17
20
 
18
21
  end
@@ -10,7 +10,7 @@ end
10
10
  # @format: date
11
11
  field :date
12
12
 
13
- # The currency code This will be validated by the /api/v1/currencies data set
13
+ # The currency code This will be validated by the /api/v1/definitions/currencies data set
14
14
  # @type: string
15
15
  field :source_currency
16
16
 
@@ -101,30 +101,6 @@ end
101
101
  # @type: string
102
102
  field :address3
103
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
104
  # Address info
129
105
  # @type: string
130
106
  field :city
@@ -141,6 +117,10 @@ end
141
117
  # @type: string
142
118
  field :country
143
119
 
120
+ # Time zone
121
+ # @type: string
122
+ field :time_zone
123
+
144
124
  # Phone number
145
125
  # @type: string
146
126
  field :phone_number
@@ -191,6 +171,10 @@ end
191
171
  # @format: email
192
172
  field :ar_email_address
193
173
 
174
+ # Indicates the preferred invoice delivery method. Examples include Print, Email, Fax
175
+ # @type: string
176
+ field :preferred_delivery_method
177
+
194
178
  # For companies that use a custom domain name for their email system, this is
195
179
  # the domain name used by this company. If this value is known, new emails that
196
180
  # come in from this domain will be connected to this company.
@@ -218,6 +202,15 @@ end
218
202
  # @format: uuid
219
203
  field :app_enrollment_id
220
204
 
205
+ # Company Email Address
206
+ # @type: string
207
+ # @format: email
208
+ field :email_address
209
+
210
+ # The public url slug for the Company.
211
+ # @type: string
212
+ field :public_url_slug
213
+
221
214
  # All invoices attached to this company.
222
215
  #
223
216
  # 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).
@@ -0,0 +1,98 @@
1
+ class Schema::CompanyDetails < 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 company
17
+ # @type: string
18
+ # @format: uuid
19
+ field :customer_id
20
+
21
+ # The unique ID of this company
22
+ # @type: string
23
+ field :name
24
+
25
+ # Company address info
26
+ # @type: string
27
+ field :address1
28
+
29
+ # Company address info
30
+ # @type: string
31
+ field :address2
32
+
33
+ # Company address info
34
+ # @type: string
35
+ field :address3
36
+
37
+ # Company address info
38
+ # @type: string
39
+ field :city
40
+
41
+ # Company address info
42
+ # @type: string
43
+ field :state
44
+
45
+ # Company address info
46
+ # @type: string
47
+ field :postal_code
48
+
49
+ # Company address country
50
+ # @type: string
51
+ field :country
52
+
53
+ # Company phone number
54
+ # @type: string
55
+ field :phone_number
56
+
57
+ # Company fax number
58
+ # @type: string
59
+ field :fax_number
60
+
61
+ # Company email address
62
+ # @type: string
63
+ field :email
64
+
65
+ # Company primary contact id
66
+ # @type: string
67
+ # @format: uuid
68
+ field :contact_id
69
+
70
+ # Company primary contact name
71
+ # @type: string
72
+ field :contact_name
73
+
74
+ # Company primary contact email address
75
+ # @type: string
76
+ field :contact_email
77
+
78
+ # Company number of outstanding invoices
79
+ # @type: integer
80
+ # @format: int32
81
+ field :outstanding_invoices
82
+
83
+ # Company total outstanding invoice amount
84
+ # @type: number
85
+ # @format: double
86
+ field :outstanding_amount
87
+
88
+ # Company total past due amount
89
+ # @type: number
90
+ # @format: double
91
+ field :amount_past_due
92
+
93
+ belongs_to :customer, {:class_name=>"Lockstep::Connection", :primary_key=>:company_id, :foreign_key=>"customer_id"}
94
+ belongs_to :connection, {:class_name=>"Lockstep::Connection", :primary_key=>:company_id, :foreign_key=>"customer_id"}
95
+
96
+ has_many :payments, {:class_name=>"Schema::CompanyDetailsPayment", :included=>true}
97
+
98
+ end