lockstep_rails 0.3.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +216 -0
  4. data/Rakefile +31 -0
  5. data/app/assets/config/lockstep_rails_manifest.js +0 -0
  6. data/app/concepts/lockstep/active_records/association.rb +78 -0
  7. data/app/concepts/lockstep/api_record.rb +1118 -0
  8. data/app/concepts/lockstep/api_records/scopes.rb +20 -0
  9. data/app/concepts/lockstep/client.rb +162 -0
  10. data/app/concepts/lockstep/error.rb +50 -0
  11. data/app/concepts/lockstep/exceptions.rb +4 -0
  12. data/app/concepts/lockstep/query.rb +409 -0
  13. data/app/concepts/lockstep/query_methods.rb +75 -0
  14. data/app/concepts/lockstep/relation_array.rb +100 -0
  15. data/app/helpers/types.rb +3 -0
  16. data/app/models/lockstep/account.rb +15 -0
  17. data/app/models/lockstep/connection.rb +19 -0
  18. data/app/models/lockstep/contact.rb +9 -0
  19. data/app/models/lockstep/customer_summary.rb +6 -0
  20. data/app/models/lockstep/invoice.rb +7 -0
  21. data/app/models/lockstep/invoice_summary.rb +6 -0
  22. data/app/models/lockstep/invoices/address.rb +24 -0
  23. data/app/models/lockstep/note.rb +7 -0
  24. data/app/models/lockstep/payment.rb +7 -0
  25. data/app/models/lockstep/payment_summary.rb +6 -0
  26. data/app/models/lockstep/user.rb +10 -0
  27. data/app/platform_api/model_template.rb.erb +27 -0
  28. data/app/platform_api/schema/action_result.rb +15 -0
  29. data/app/platform_api/schema/activity.rb +141 -0
  30. data/app/platform_api/schema/activity_fetch_result.rb +26 -0
  31. data/app/platform_api/schema/activity_stream_item.rb +58 -0
  32. data/app/platform_api/schema/activity_x_ref.rb +37 -0
  33. data/app/platform_api/schema/aging.rb +24 -0
  34. data/app/platform_api/schema/api_key.rb +71 -0
  35. data/app/platform_api/schema/api_key_fetch_result.rb +26 -0
  36. data/app/platform_api/schema/app_enrollment.rb +88 -0
  37. data/app/platform_api/schema/app_enrollment_custom_field.rb +67 -0
  38. data/app/platform_api/schema/app_enrollment_custom_field_fetch_result.rb +26 -0
  39. data/app/platform_api/schema/app_enrollment_fetch_result.rb +26 -0
  40. data/app/platform_api/schema/application.rb +89 -0
  41. data/app/platform_api/schema/application_fetch_result.rb +26 -0
  42. data/app/platform_api/schema/ar_aging_header_info.rb +47 -0
  43. data/app/platform_api/schema/ar_header_info.rb +118 -0
  44. data/app/platform_api/schema/assembly.rb +68 -0
  45. data/app/platform_api/schema/at_risk_invoice_summary.rb +90 -0
  46. data/app/platform_api/schema/at_risk_invoice_summary_fetch_result.rb +26 -0
  47. data/app/platform_api/schema/attachment.rb +92 -0
  48. data/app/platform_api/schema/attachment_fetch_result.rb +26 -0
  49. data/app/platform_api/schema/attachment_header_info.rb +41 -0
  50. data/app/platform_api/schema/batch_sync.rb +18 -0
  51. data/app/platform_api/schema/bulk_currency_conversion.rb +19 -0
  52. data/app/platform_api/schema/cashflow_report.rb +35 -0
  53. data/app/platform_api/schema/code_definition.rb +58 -0
  54. data/app/platform_api/schema/code_definition_fetch_result.rb +26 -0
  55. data/app/platform_api/schema/company.rb +243 -0
  56. data/app/platform_api/schema/company_fetch_result.rb +26 -0
  57. data/app/platform_api/schema/company_sync.rb +142 -0
  58. data/app/platform_api/schema/connector_info.rb +27 -0
  59. data/app/platform_api/schema/constructor_info.rb +128 -0
  60. data/app/platform_api/schema/contact.rb +148 -0
  61. data/app/platform_api/schema/contact_fetch_result.rb +26 -0
  62. data/app/platform_api/schema/contact_sync.rb +109 -0
  63. data/app/platform_api/schema/country.rb +62 -0
  64. data/app/platform_api/schema/country_fetch_result.rb +26 -0
  65. data/app/platform_api/schema/credit_memo_applied.rb +104 -0
  66. data/app/platform_api/schema/credit_memo_applied_fetch_result.rb +26 -0
  67. data/app/platform_api/schema/credit_memo_applied_sync.rb +67 -0
  68. data/app/platform_api/schema/credit_memo_invoice.rb +77 -0
  69. data/app/platform_api/schema/currency.rb +31 -0
  70. data/app/platform_api/schema/currency_fetch_result.rb +26 -0
  71. data/app/platform_api/schema/currency_rate.rb +28 -0
  72. data/app/platform_api/schema/custom_attribute_data.rb +18 -0
  73. data/app/platform_api/schema/custom_attribute_named_argument.rb +24 -0
  74. data/app/platform_api/schema/custom_attribute_typed_argument.rb +16 -0
  75. data/app/platform_api/schema/custom_field_definition.rb +76 -0
  76. data/app/platform_api/schema/custom_field_definition_fetch_result.rb +26 -0
  77. data/app/platform_api/schema/custom_field_sync.rb +71 -0
  78. data/app/platform_api/schema/custom_field_value.rb +75 -0
  79. data/app/platform_api/schema/custom_field_value_fetch_result.rb +26 -0
  80. data/app/platform_api/schema/customer_details.rb +98 -0
  81. data/app/platform_api/schema/customer_details_payment.rb +60 -0
  82. data/app/platform_api/schema/customer_summary.rb +88 -0
  83. data/app/platform_api/schema/customer_summary_fetch_result.rb +26 -0
  84. data/app/platform_api/schema/daily_sales_outstanding_report.rb +25 -0
  85. data/app/platform_api/schema/developer_account_submit.rb +23 -0
  86. data/app/platform_api/schema/email.rb +160 -0
  87. data/app/platform_api/schema/email_fetch_result.rb +26 -0
  88. data/app/platform_api/schema/erp.rb +23 -0
  89. data/app/platform_api/schema/erp_fetch_result.rb +26 -0
  90. data/app/platform_api/schema/erp_info.rb +18 -0
  91. data/app/platform_api/schema/erp_info_data.rb +23 -0
  92. data/app/platform_api/schema/event_info.rb +59 -0
  93. data/app/platform_api/schema/exception.rb +41 -0
  94. data/app/platform_api/schema/field_info.rb +105 -0
  95. data/app/platform_api/schema/financial_account.rb +90 -0
  96. data/app/platform_api/schema/financial_account_balance_history.rb +90 -0
  97. data/app/platform_api/schema/financial_account_balance_history_fetch_result.rb +26 -0
  98. data/app/platform_api/schema/financial_account_fetch_result.rb +26 -0
  99. data/app/platform_api/schema/financial_year_setting.rb +74 -0
  100. data/app/platform_api/schema/financial_year_setting_fetch_result.rb +26 -0
  101. data/app/platform_api/schema/invite.rb +25 -0
  102. data/app/platform_api/schema/invite_data.rb +18 -0
  103. data/app/platform_api/schema/invite_submit.rb +15 -0
  104. data/app/platform_api/schema/invoice.rb +226 -0
  105. data/app/platform_api/schema/invoice_address.rb +97 -0
  106. data/app/platform_api/schema/invoice_fetch_result.rb +29 -0
  107. data/app/platform_api/schema/invoice_history.rb +188 -0
  108. data/app/platform_api/schema/invoice_history_fetch_result.rb +26 -0
  109. data/app/platform_api/schema/invoice_line.rb +142 -0
  110. data/app/platform_api/schema/invoice_line_sync.rb +208 -0
  111. data/app/platform_api/schema/invoice_payment_detail.rb +65 -0
  112. data/app/platform_api/schema/invoice_summary.rb +85 -0
  113. data/app/platform_api/schema/invoice_summary_fetch_result.rb +26 -0
  114. data/app/platform_api/schema/invoice_sync.rb +280 -0
  115. data/app/platform_api/schema/lead.rb +32 -0
  116. data/app/platform_api/schema/member_info.rb +36 -0
  117. data/app/platform_api/schema/method_base.rb +128 -0
  118. data/app/platform_api/schema/method_info.rb +137 -0
  119. data/app/platform_api/schema/module.rb +44 -0
  120. data/app/platform_api/schema/module_handle.rb +15 -0
  121. data/app/platform_api/schema/note.rb +72 -0
  122. data/app/platform_api/schema/note_fetch_result.rb +26 -0
  123. data/app/platform_api/schema/parameter_info.rb +64 -0
  124. data/app/platform_api/schema/payment.rb +147 -0
  125. data/app/platform_api/schema/payment_applied.rb +95 -0
  126. data/app/platform_api/schema/payment_applied_fetch_result.rb +26 -0
  127. data/app/platform_api/schema/payment_applied_sync.rb +74 -0
  128. data/app/platform_api/schema/payment_detail.rb +110 -0
  129. data/app/platform_api/schema/payment_detail_fetch_result.rb +26 -0
  130. data/app/platform_api/schema/payment_detail_header.rb +43 -0
  131. data/app/platform_api/schema/payment_fetch_result.rb +26 -0
  132. data/app/platform_api/schema/payment_summary.rb +79 -0
  133. data/app/platform_api/schema/payment_summary_fetch_result.rb +26 -0
  134. data/app/platform_api/schema/payment_sync.rb +112 -0
  135. data/app/platform_api/schema/problem_details.rb +31 -0
  136. data/app/platform_api/schema/property_info.rb +60 -0
  137. data/app/platform_api/schema/provisioning.rb +28 -0
  138. data/app/platform_api/schema/provisioning_finalize_request.rb +28 -0
  139. data/app/platform_api/schema/provisioning_response.rb +42 -0
  140. data/app/platform_api/schema/risk_rate.rb +57 -0
  141. data/app/platform_api/schema/runtime_field_handle.rb +13 -0
  142. data/app/platform_api/schema/runtime_method_handle.rb +13 -0
  143. data/app/platform_api/schema/runtime_type_handle.rb +13 -0
  144. data/app/platform_api/schema/state.rb +22 -0
  145. data/app/platform_api/schema/state_fetch_result.rb +26 -0
  146. data/app/platform_api/schema/status.rb +72 -0
  147. data/app/platform_api/schema/struct_layout_attribute.rb +16 -0
  148. data/app/platform_api/schema/sync_entity_result.rb +34 -0
  149. data/app/platform_api/schema/sync_request.rb +71 -0
  150. data/app/platform_api/schema/sync_request_fetch_result.rb +26 -0
  151. data/app/platform_api/schema/sync_submit.rb +15 -0
  152. data/app/platform_api/schema/test_argument_exception.rb +41 -0
  153. data/app/platform_api/schema/test_timeout_exception.rb +41 -0
  154. data/app/platform_api/schema/transfer_owner.rb +16 -0
  155. data/app/platform_api/schema/transfer_owner_submit.rb +15 -0
  156. data/app/platform_api/schema/type.rb +278 -0
  157. data/app/platform_api/schema/type_info.rb +287 -0
  158. data/app/platform_api/schema/uri.rb +15 -0
  159. data/app/platform_api/schema/user_account.rb +152 -0
  160. data/app/platform_api/schema/user_account_fetch_result.rb +26 -0
  161. data/app/platform_api/schema/user_role.rb +50 -0
  162. data/app/platform_api/schema/user_role_fetch_result.rb +26 -0
  163. data/app/platform_api/schema/webhook.rb +96 -0
  164. data/app/platform_api/schema/webhook_fetch_result.rb +26 -0
  165. data/app/platform_api/schema/webhook_history_table_storage.rb +64 -0
  166. data/app/platform_api/schema/webhook_history_table_storage_fetch_result.rb +26 -0
  167. data/app/platform_api/swagger.json +22056 -0
  168. data/config/routes.rb +2 -0
  169. data/lib/lockstep_rails/engine.rb +4 -0
  170. data/lib/lockstep_rails/version.rb +3 -0
  171. data/lib/lockstep_rails.rb +5 -0
  172. data/lib/tasks/lockstep_rails_tasks.rake +4 -0
  173. data/lib/tasks/update_api_schema.rake +159 -0
  174. metadata +230 -0
@@ -0,0 +1,26 @@
1
+ class Schema::CompanyFetchResult < 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::Company", :included=>true}
25
+
26
+ end
@@ -0,0 +1,142 @@
1
+ class Schema::CompanySync < Lockstep::ApiRecord
2
+
3
+ # ApiRecord will crash unless `id_ref` is defined
4
+ def self.id_ref
5
+ nil
6
+ end
7
+
8
+ # This is the primary key of the Company record. For this field, you should use whatever the company's unique
9
+ # identifying number is in the originating system. Search for a unique, non-changing number within the
10
+ # originating financial system for this record.
11
+ #
12
+ # Example: If you store your company records in a database, whatever the primary key for the company table is
13
+ # in the database should be the `ErpKey`.
14
+ #
15
+ # Example: If you use a financial system such as Quickbooks or Xero, look for the primary ID number of the
16
+ # company record within that financial system.
17
+ #
18
+ # For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
19
+ # @type: string
20
+ field :erp_key
21
+
22
+ # A friendly, short name of the company.
23
+ # @type: string
24
+ field :company_name
25
+
26
+ # This field indicates the type of company. It can be one of a limited number of values: `Company`,
27
+ # `Customer`, `Group`, `Vendor`, or `Third Party`. A company that represents both a customer and a vendor is
28
+ # identified as a `CustomerVendor`.
29
+ #
30
+ # When loading data into Lockstep, you should focus on the distinction between a company that is part of
31
+ # your own enterprise, or a company that is external to your enterprise.
32
+ #
33
+ # For a company that is within your enterprise, you should set this value to be `Company`.
34
+ #
35
+ # For a company that is external to your enterprise, you should set this value to either `Customer`,
36
+ # `Vendor`, `Third Party`, or `CustomerVendor`. If you don't know what value to choose, select
37
+ # `CustomerVendor`.
38
+ # @type: string
39
+ field :company_type
40
+
41
+ # An optional field including status codes. Defined status codes are `Active` and `Inactive`.
42
+ # @type: string
43
+ field :company_status
44
+
45
+ # If this company has a parent company, identify the parent company's `ErpKey` value here. This value should
46
+ # be the original primary key or unique ID of the parent company to this company belongs. This value should
47
+ # match the original ErpKey field on the parent company.
48
+ #
49
+ # If this company is not a child company, leave this field null.
50
+ # @type: string
51
+ field :parent_company_erp_key
52
+
53
+ # This flag indicates whether the company is currently active. An inactive company will be hidden from the
54
+ # user interface but will still be available for querying.
55
+ # @type: boolean
56
+ field :is_active
57
+
58
+ # The default currency code for transactions related to this company. For a list of currency codes, see
59
+ # [Query Currencies](https://developer.lockstep.io/reference/get_api-v1-definitions-currencies). This will be validated by the /api/v1/currencies data set
60
+ # @type: string
61
+ field :default_currency_code
62
+
63
+ # The URL of this company's logo, if known.
64
+ # @type: string
65
+ field :company_logo_url
66
+
67
+ # The `ErpKey` of the primary contact for this company. This value should match the `ErpKey` value of the
68
+ # [Importing Contacts](https://developer.lockstep.io/docs/importing-contacts) record for the contact table.
69
+ # @type: string
70
+ field :primary_contact_erp_key
71
+
72
+ # The company's primary mailing address information
73
+ # @type: string
74
+ field :address1
75
+
76
+ # The company's primary mailing address information
77
+ # @type: string
78
+ field :address2
79
+
80
+ # The company's primary mailing address information
81
+ # @type: string
82
+ field :address3
83
+
84
+ # The company's primary mailing address information
85
+ # @type: string
86
+ field :city
87
+
88
+ # The company's primary mailing address information
89
+ # @type: string
90
+ field :state_region
91
+
92
+ # The company's primary mailing address information
93
+ # @type: string
94
+ field :postal_code
95
+
96
+ # The company's primary mailing address information This will be validated by the /api/v1/countries data set
97
+ # @type: string
98
+ field :country
99
+
100
+ # The main phone number of this company.
101
+ # @type: string
102
+ field :phone_number
103
+
104
+ # The main fax number of this company.
105
+ # @type: string
106
+ field :fax_number
107
+
108
+ # If known, the date when this record was created according to the originating financial system
109
+ # in which this record is maintained. If the originating financial system does not maintain a
110
+ # created-date, leave this field null.
111
+ # @type: string
112
+ # @format: date-time
113
+ field :created, Types::Params::DateTime
114
+
115
+ # If known, the date when this record was most recently modified according to the originating
116
+ # financial system in which this record is maintained. If the originating financial system does
117
+ # not maintain a most-recently-modified-date, leave this field null.
118
+ # @type: string
119
+ # @format: date-time
120
+ field :modified, Types::Params::DateTime
121
+
122
+ # The company's Tax ID number for the appropriate government for this company.
123
+ # @type: string
124
+ field :tax_id
125
+
126
+ # The Dun and Bradstreet number for this company, if known.
127
+ # @type: string
128
+ field :duns_number
129
+
130
+ # If you know the AP (accounts payable) email address of this company, fill it in here. This is the email
131
+ # address where you would send questions to the company if the company owed you money.
132
+ # @type: string
133
+ field :ap_email_address
134
+
135
+ # If you know the AR (accounts receivable) email address of this company, fill it in here. This is the email
136
+ # address where you would send questions to the company if you owed this company money.
137
+ # @type: string
138
+ field :ar_email_address
139
+
140
+
141
+
142
+ end
@@ -0,0 +1,27 @@
1
+ class Schema::ConnectorInfo < Lockstep::ApiRecord
2
+
3
+ # ApiRecord will crash unless `id_ref` is defined
4
+ def self.id_ref
5
+ nil
6
+ end
7
+
8
+ # The authorization code returned from the first step of the OAuth2 flow
9
+ # https://oauth.net/2/grant-types/authorization-code/
10
+ # @type: string
11
+ field :auth_code
12
+
13
+ # The realm id of the account being granted permissions to access
14
+ # @type: string
15
+ field :realm_id
16
+
17
+ # The redirect uri used for step one of the OAuth2.0 flow.
18
+ # @type: string
19
+ field :redirect_uri
20
+
21
+ # The email an email connection is being created for.
22
+ # @type: string
23
+ field :email
24
+
25
+
26
+
27
+ end
@@ -0,0 +1,128 @@
1
+ class Schema::ConstructorInfo < 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: string
10
+ field :name
11
+
12
+
13
+ field :declaring_type
14
+
15
+
16
+ field :reflected_type
17
+
18
+
19
+ field :module
20
+
21
+
22
+ # @type: boolean
23
+ field :is_collectible
24
+
25
+
26
+ # @type: integer
27
+ # @format: int32
28
+ field :metadata_token
29
+
30
+
31
+ field :attributes
32
+
33
+
34
+ field :method_implementation_flags
35
+
36
+
37
+ field :calling_convention
38
+
39
+
40
+ # @type: boolean
41
+ field :is_abstract
42
+
43
+
44
+ # @type: boolean
45
+ field :is_constructor
46
+
47
+
48
+ # @type: boolean
49
+ field :is_final
50
+
51
+
52
+ # @type: boolean
53
+ field :is_hide_by_sig
54
+
55
+
56
+ # @type: boolean
57
+ field :is_special_name
58
+
59
+
60
+ # @type: boolean
61
+ field :is_static
62
+
63
+
64
+ # @type: boolean
65
+ field :is_virtual
66
+
67
+
68
+ # @type: boolean
69
+ field :is_assembly
70
+
71
+
72
+ # @type: boolean
73
+ field :is_family
74
+
75
+
76
+ # @type: boolean
77
+ field :is_family_and_assembly
78
+
79
+
80
+ # @type: boolean
81
+ field :is_family_or_assembly
82
+
83
+
84
+ # @type: boolean
85
+ field :is_private
86
+
87
+
88
+ # @type: boolean
89
+ field :is_public
90
+
91
+
92
+ # @type: boolean
93
+ field :is_constructed_generic_method
94
+
95
+
96
+ # @type: boolean
97
+ field :is_generic_method
98
+
99
+
100
+ # @type: boolean
101
+ field :is_generic_method_definition
102
+
103
+
104
+ # @type: boolean
105
+ field :contains_generic_parameters
106
+
107
+
108
+ field :method_handle
109
+
110
+
111
+ # @type: boolean
112
+ field :is_security_critical
113
+
114
+
115
+ # @type: boolean
116
+ field :is_security_safe_critical
117
+
118
+
119
+ # @type: boolean
120
+ field :is_security_transparent
121
+
122
+
123
+ field :member_type
124
+
125
+
126
+ has_many :custom_attributes, {:class_name=>"Schema::CustomAttributeData", :included=>true}
127
+
128
+ end
@@ -0,0 +1,148 @@
1
+ class Schema::Contact < 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 :contact_id
15
+
16
+ # The ID of the company to which this contact belongs.
17
+ # @type: string
18
+ # @format: uuid
19
+ field :company_id
20
+
21
+ # The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
22
+ # account will share the same GroupKey value. GroupKey values cannot be changed once created.
23
+ #
24
+ # For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
25
+ # @type: string
26
+ # @format: uuid
27
+ field :group_key
28
+
29
+ # The unique ID of this record as it was known in its originating financial system.
30
+ #
31
+ # If this contact record was imported from a financial system, it will have the value `ErpKey`
32
+ # set to the original primary key number of the record as it was known in the originating financial
33
+ # system. If this record was not imported, this value will be `null`.
34
+ #
35
+ # For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
36
+ # @type: string
37
+ field :erp_key
38
+
39
+ # The name of the contact.
40
+ # @type: string
41
+ field :contact_name
42
+
43
+ # A friendly human-readable code that describes this Contact.
44
+ # @type: string
45
+ field :contact_code
46
+
47
+ # The title of the contact.
48
+ # @type: string
49
+ field :title
50
+
51
+ # The role code for the contact.
52
+ # @type: string
53
+ field :role_code
54
+
55
+ # The email address of the contact.
56
+ # @type: string
57
+ # @format: email
58
+ field :email_address
59
+
60
+ # The phone number of the contact.
61
+ # @type: string
62
+ field :phone
63
+
64
+ # The fax number of the contact.
65
+ # @type: string
66
+ field :fax
67
+
68
+ # The first line of the address.
69
+ # @type: string
70
+ field :address1
71
+
72
+ # The second line of the address.
73
+ # @type: string
74
+ field :address2
75
+
76
+ # The third line of the address.
77
+ # @type: string
78
+ field :address3
79
+
80
+ # The city of the address.
81
+ # @type: string
82
+ field :city
83
+
84
+ # The state/region of the address.
85
+ # @type: string
86
+ field :state_region
87
+
88
+ # The postal/zip code of the address.
89
+ # @type: string
90
+ field :postal_code
91
+
92
+ # The two character country code of the address. This will be validated by the /api/v1/countries data set
93
+ # @type: string
94
+ field :country_code
95
+
96
+ # Flag indicating if the contact is active.
97
+ # @type: boolean
98
+ field :is_active
99
+
100
+ # The webpage url of the contact.
101
+ # @type: string
102
+ # @format: uri
103
+ field :webpage_url
104
+
105
+ # The picture/avatar url of the contact.
106
+ # @type: string
107
+ # @format: uri
108
+ field :picture_url
109
+
110
+ # The date on which this record was created.
111
+ # @type: string
112
+ # @format: date-time
113
+ field :created, Types::Params::DateTime
114
+
115
+ # The ID of the user who created this contact.
116
+ # @type: string
117
+ # @format: uuid
118
+ field :created_user_id
119
+
120
+ # The date on which this record was last modified.
121
+ # @type: string
122
+ # @format: date-time
123
+ field :modified, Types::Params::DateTime
124
+
125
+ # The ID of the user who last modified this contact.
126
+ # @type: string
127
+ # @format: uuid
128
+ field :modified_user_id
129
+
130
+ # The AppEnrollmentId of the application that imported this record. For accounts
131
+ # with more than one financial system connected, this field identifies the originating
132
+ # financial system that produced this record. This value is null if this record
133
+ # was not loaded from an external ERP or financial system.
134
+ # @type: string
135
+ # @format: uuid
136
+ field :app_enrollment_id
137
+
138
+ belongs_to :company, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
139
+ belongs_to :account, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
140
+ belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
141
+ belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
142
+
143
+ has_many :notes, {:class_name=>"Lockstep::Note", :included=>true, :foreign_key=>:object_key, :polymorphic=>{:table_key=>"Contact"}}
144
+ has_many :attachments, {:class_name=>"Schema::Attachment", :included=>true}
145
+ has_many :custom_field_definitions, {:class_name=>"Schema::CustomFieldDefinition", :included=>true}
146
+ has_many :custom_field_values, {:class_name=>"Schema::CustomFieldValue", :included=>true}
147
+
148
+ end
@@ -0,0 +1,26 @@
1
+ class Schema::ContactFetchResult < 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::Contact", :included=>true}
25
+
26
+ end
@@ -0,0 +1,109 @@
1
+ class Schema::ContactSync < Lockstep::ApiRecord
2
+
3
+ # ApiRecord will crash unless `id_ref` is defined
4
+ def self.id_ref
5
+ nil
6
+ end
7
+
8
+ # This is the primary key of the Contact record. For this field, you should use whatever the contact's unique
9
+ # identifying number is in the originating system. Search for a unique, non-changing number within the
10
+ # originating financial system for this record.
11
+ #
12
+ # Example: If you store your contact records in a database, whatever the primary key for the contact table is
13
+ # in the database should be the "ErpKey".
14
+ #
15
+ # For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
16
+ # @type: string
17
+ field :erp_key
18
+
19
+ # The original primary key or unique ID of the company to which this contact belongs. This value should
20
+ # match the [Company ErpKey](https://developer.lockstep.io/docs/importing-companies#erpkey) field on the
21
+ # [CompanySyncModel](https://developer.lockstep.io/docs/importing-companies).
22
+ # @type: string
23
+ field :company_erp_key
24
+
25
+ # The name of the contact.
26
+ # @type: string
27
+ field :contact_name
28
+
29
+ # A friendly human-readable code that describes this Contact.
30
+ # @type: string
31
+ field :contact_code
32
+
33
+ # The title of the contact.
34
+ # @type: string
35
+ field :title
36
+
37
+ # The role code for the contact.
38
+ # @type: string
39
+ field :role_code
40
+
41
+ # The email address of the contact.
42
+ # @type: string
43
+ field :email_address
44
+
45
+ # The phone number of the contact.
46
+ # @type: string
47
+ field :phone
48
+
49
+ # The fax number of the contact.
50
+ # @type: string
51
+ field :fax
52
+
53
+ # The mailing address information for this contact.
54
+ # @type: string
55
+ field :address1
56
+
57
+ # The mailing address information for this contact.
58
+ # @type: string
59
+ field :address2
60
+
61
+ # The mailing address information for this contact.
62
+ # @type: string
63
+ field :address3
64
+
65
+ # The mailing address information for this contact.
66
+ # @type: string
67
+ field :city
68
+
69
+ # The mailing address information for this contact.
70
+ # @type: string
71
+ field :state_region
72
+
73
+ # The mailing address information for this contact.
74
+ # @type: string
75
+ field :postal_code
76
+
77
+ # The mailing address information for this contact. This will be validated by the /api/v1/countries data set
78
+ # @type: string
79
+ field :country_code
80
+
81
+ # True if this contact is considered "active".
82
+ # @type: boolean
83
+ field :is_active
84
+
85
+ # A webpage URL for more information about this contact.
86
+ # @type: string
87
+ field :webpage_url
88
+
89
+ # If available, the URL of a photograph that shows this contact.
90
+ # @type: string
91
+ field :picture_url
92
+
93
+ # If known, the date when this record was created according to the originating financial system
94
+ # in which this record is maintained. If the originating financial system does not maintain a
95
+ # created-date, leave this field null.
96
+ # @type: string
97
+ # @format: date-time
98
+ field :created, Types::Params::DateTime
99
+
100
+ # If known, the date when this record was most recently modified according to the originating
101
+ # financial system in which this record is maintained. If the originating financial system does
102
+ # not maintain a most-recently-modified-date, leave this field null.
103
+ # @type: string
104
+ # @format: date-time
105
+ field :modified, Types::Params::DateTime
106
+
107
+
108
+
109
+ end
@@ -0,0 +1,62 @@
1
+ class Schema::Country < Lockstep::ApiRecord
2
+
3
+ # ApiRecord will crash unless `id_ref` is defined
4
+ def self.id_ref
5
+ nil
6
+ end
7
+
8
+ # Name of the country
9
+ # @type: string
10
+ field :name
11
+
12
+ # 2 letter alphabetic code for the given country
13
+ # @type: string
14
+ field :alpha2
15
+
16
+ # 3 letter alphabetic code for the given country
17
+ # @type: string
18
+ field :alpha3
19
+
20
+ # Unique 3 digit number for the given country
21
+ # @type: integer
22
+ # @format: int32
23
+ field :country_code
24
+
25
+ # Region of the country
26
+ # @type: string
27
+ field :region
28
+
29
+ # Subregion of the country
30
+ # @type: string
31
+ field :sub_region
32
+
33
+ # Intermediate region of the country
34
+ # @type: string
35
+ field :intermediate_region
36
+
37
+ # Numeric code for a region
38
+ # @type: integer
39
+ # @format: int32
40
+ field :region_code
41
+
42
+ # Numeric code for a subregion
43
+ # @type: integer
44
+ # @format: int32
45
+ field :sub_region_code
46
+
47
+ # Numeric code for an intermediate region
48
+ # @type: integer
49
+ # @format: int32
50
+ field :intermediate_region_code
51
+
52
+ # French name of the country
53
+ # @type: string
54
+ field :french_name
55
+
56
+ # A different name for a country
57
+ # @type: string
58
+ field :aliases
59
+
60
+
61
+
62
+ end
@@ -0,0 +1,26 @@
1
+ class Schema::CountryFetchResult < 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::Country", :included=>true}
25
+
26
+ end