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,64 @@
1
+ class Schema::WebhookHistoryTableStorage < 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 WebhookId uniquely identifies the webhook used to send notification that an event action has taken place.
17
+ # @type: string
18
+ # @format: uuid
19
+ field :webhook_id
20
+
21
+ # The unique ID of this record, automatically assigned by Lockstep when this record is
22
+ # added to the Lockstep platform.
23
+ # @type: string
24
+ # @format: uuid
25
+ field :webhook_history_id
26
+
27
+ # Event type which fired webhook
28
+ #
29
+ # [entity].[action]
30
+ # @type: string
31
+ field :event_type
32
+
33
+ # Flag whether request was sent to callback url successfully or blocked by failing or because it was disabled.
34
+ # @type: boolean
35
+ field :request_sent
36
+
37
+ # Flag whether webhook notification was successful overall (if webhook disabled should always return true otherwise
38
+ # depends on the response from the callback url)
39
+ # @type: boolean
40
+ field :is_successful
41
+
42
+ # Response status code that is returned when calling a callback url.
43
+ # @type: string
44
+ field :response_status_code
45
+
46
+ # Message containing information about the webhook callback results
47
+ # @type: string
48
+ field :process_result_message
49
+
50
+ # Number of times message failed to be sent over to callback url before succeeding or failing out.
51
+ # The maximum value should is based on webhook.
52
+ # @type: integer
53
+ # @format: int32
54
+ field :failure_count
55
+
56
+ # Timestamp of when a request is sent to a webhook callback.
57
+ # Contains the last time message is sent if failures occur.
58
+ # @type: string
59
+ # @format: date-time
60
+ field :timestamp, Types::Params::DateTime
61
+
62
+
63
+
64
+ end
@@ -0,0 +1,26 @@
1
+ class Schema::WebhookHistoryTableStorageFetchResult < 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::WebhookHistoryTableStorage", :included=>true}
25
+
26
+ end