merge_ruby_client 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/lib/merge_ruby_client/accounting/audit_trail/client.rb +2 -4
  3. data/lib/merge_ruby_client/accounting/client.rb +7 -0
  4. data/lib/merge_ruby_client/accounting/link_token/client.rb +4 -8
  5. data/lib/merge_ruby_client/accounting/payments/client.rb +0 -4
  6. data/lib/merge_ruby_client/accounting/selective_sync/client.rb +218 -0
  7. data/lib/merge_ruby_client/accounting/types/account.rb +4 -4
  8. data/lib/merge_ruby_client/accounting/types/accounting_attachment.rb +4 -4
  9. data/lib/merge_ruby_client/accounting/types/accounting_period.rb +4 -4
  10. data/lib/merge_ruby_client/accounting/types/accounting_phone_number.rb +4 -4
  11. data/lib/merge_ruby_client/accounting/types/address.rb +4 -4
  12. data/lib/merge_ruby_client/accounting/types/audit_log_event.rb +0 -6
  13. data/lib/merge_ruby_client/accounting/types/balance_sheet.rb +4 -4
  14. data/lib/merge_ruby_client/accounting/types/cash_flow_statement.rb +4 -4
  15. data/lib/merge_ruby_client/accounting/types/company_info.rb +4 -4
  16. data/lib/merge_ruby_client/accounting/types/condition_schema.rb +136 -0
  17. data/lib/merge_ruby_client/accounting/types/condition_type_enum.rb +22 -0
  18. data/lib/merge_ruby_client/accounting/types/contact.rb +4 -4
  19. data/lib/merge_ruby_client/accounting/types/credit_note.rb +4 -4
  20. data/lib/merge_ruby_client/accounting/types/credit_note_line_item.rb +13 -5
  21. data/lib/merge_ruby_client/accounting/types/event_type_enum.rb +0 -6
  22. data/lib/merge_ruby_client/accounting/types/expense.rb +4 -4
  23. data/lib/merge_ruby_client/accounting/types/expense_line.rb +4 -4
  24. data/lib/merge_ruby_client/accounting/types/income_statement.rb +4 -4
  25. data/lib/merge_ruby_client/accounting/types/invoice.rb +4 -4
  26. data/lib/merge_ruby_client/accounting/types/invoice_line_item.rb +4 -4
  27. data/lib/merge_ruby_client/accounting/types/item.rb +4 -4
  28. data/lib/merge_ruby_client/accounting/types/journal_entry.rb +4 -4
  29. data/lib/merge_ruby_client/accounting/types/journal_line.rb +4 -4
  30. data/lib/merge_ruby_client/accounting/types/linked_account_condition.rb +104 -0
  31. data/lib/merge_ruby_client/accounting/types/linked_account_condition_request.rb +87 -0
  32. data/lib/merge_ruby_client/accounting/types/linked_account_selective_sync_configuration.rb +65 -0
  33. data/lib/merge_ruby_client/accounting/types/linked_account_selective_sync_configuration_request.rb +63 -0
  34. data/lib/merge_ruby_client/accounting/types/operator_schema.rb +68 -0
  35. data/lib/merge_ruby_client/accounting/types/paginated_condition_schema_list.rb +80 -0
  36. data/lib/merge_ruby_client/accounting/types/patched_payment_request.rb +1 -14
  37. data/lib/merge_ruby_client/accounting/types/payment.rb +5 -18
  38. data/lib/merge_ruby_client/accounting/types/payment_line_item.rb +4 -4
  39. data/lib/merge_ruby_client/accounting/types/payment_request.rb +1 -14
  40. data/lib/merge_ruby_client/accounting/types/purchase_order.rb +4 -4
  41. data/lib/merge_ruby_client/accounting/types/purchase_order_line_item.rb +4 -4
  42. data/lib/merge_ruby_client/accounting/types/remote_field_api.rb +2 -16
  43. data/lib/merge_ruby_client/accounting/types/report_item.rb +4 -4
  44. data/lib/merge_ruby_client/accounting/types/tax_rate.rb +10 -12
  45. data/lib/merge_ruby_client/accounting/types/tax_rate_company.rb +1 -2
  46. data/lib/merge_ruby_client/accounting/types/tracking_category.rb +4 -4
  47. data/lib/merge_ruby_client/accounting/types/transaction.rb +4 -4
  48. data/lib/merge_ruby_client/accounting/types/transaction_line_item.rb +6 -6
  49. data/lib/merge_ruby_client/accounting/types/vendor_credit.rb +4 -4
  50. data/lib/merge_ruby_client/accounting/types/vendor_credit_line.rb +4 -4
  51. data/lib/merge_ruby_client/ats/audit_trail/client.rb +2 -4
  52. data/lib/merge_ruby_client/ats/client.rb +7 -0
  53. data/lib/merge_ruby_client/ats/job_postings/client.rb +4 -16
  54. data/lib/merge_ruby_client/ats/link_token/client.rb +4 -8
  55. data/lib/merge_ruby_client/ats/selective_sync/client.rb +218 -0
  56. data/lib/merge_ruby_client/ats/types/activity.rb +4 -4
  57. data/lib/merge_ruby_client/ats/types/application.rb +4 -4
  58. data/lib/merge_ruby_client/ats/types/attachment.rb +4 -4
  59. data/lib/merge_ruby_client/ats/types/audit_log_event.rb +0 -6
  60. data/lib/merge_ruby_client/ats/types/candidate.rb +4 -4
  61. data/lib/merge_ruby_client/ats/types/condition_schema.rb +136 -0
  62. data/lib/merge_ruby_client/ats/types/condition_type_enum.rb +22 -0
  63. data/lib/merge_ruby_client/ats/types/department.rb +4 -4
  64. data/lib/merge_ruby_client/ats/types/eeoc.rb +4 -4
  65. data/lib/merge_ruby_client/ats/types/email_address.rb +4 -4
  66. data/lib/merge_ruby_client/ats/types/event_type_enum.rb +0 -6
  67. data/lib/merge_ruby_client/ats/types/job.rb +4 -4
  68. data/lib/merge_ruby_client/ats/types/job_interview_stage.rb +4 -4
  69. data/lib/merge_ruby_client/ats/types/job_posting.rb +4 -4
  70. data/lib/merge_ruby_client/ats/types/linked_account_condition.rb +104 -0
  71. data/lib/merge_ruby_client/ats/types/linked_account_condition_request.rb +87 -0
  72. data/lib/merge_ruby_client/ats/types/linked_account_selective_sync_configuration.rb +65 -0
  73. data/lib/merge_ruby_client/ats/types/linked_account_selective_sync_configuration_request.rb +63 -0
  74. data/lib/merge_ruby_client/ats/types/offer.rb +4 -4
  75. data/lib/merge_ruby_client/ats/types/office.rb +4 -4
  76. data/lib/merge_ruby_client/ats/types/operator_schema.rb +68 -0
  77. data/lib/merge_ruby_client/ats/types/paginated_condition_schema_list.rb +80 -0
  78. data/lib/merge_ruby_client/ats/types/phone_number.rb +4 -4
  79. data/lib/merge_ruby_client/ats/types/reject_reason.rb +4 -4
  80. data/lib/merge_ruby_client/ats/types/remote_field_api.rb +2 -16
  81. data/lib/merge_ruby_client/ats/types/remote_user.rb +4 -4
  82. data/lib/merge_ruby_client/ats/types/scheduled_interview.rb +4 -4
  83. data/lib/merge_ruby_client/ats/types/scorecard.rb +4 -4
  84. data/lib/merge_ruby_client/ats/types/screening_question.rb +4 -4
  85. data/lib/merge_ruby_client/ats/types/screening_question_option.rb +4 -4
  86. data/lib/merge_ruby_client/ats/types/tag.rb +4 -4
  87. data/lib/merge_ruby_client/ats/types/url.rb +4 -4
  88. data/lib/merge_ruby_client/crm/accounts/client.rb +0 -4
  89. data/lib/merge_ruby_client/crm/audit_trail/client.rb +2 -4
  90. data/lib/merge_ruby_client/crm/client.rb +7 -0
  91. data/lib/merge_ruby_client/crm/custom_objects/client.rb +2 -2
  92. data/lib/merge_ruby_client/crm/link_token/client.rb +4 -8
  93. data/lib/merge_ruby_client/crm/selective_sync/client.rb +218 -0
  94. data/lib/merge_ruby_client/crm/types/account.rb +4 -4
  95. data/lib/merge_ruby_client/crm/types/account_request.rb +1 -13
  96. data/lib/merge_ruby_client/crm/types/address.rb +4 -4
  97. data/lib/merge_ruby_client/crm/types/association.rb +6 -6
  98. data/lib/merge_ruby_client/crm/types/association_association_type.rb +0 -1
  99. data/lib/merge_ruby_client/crm/types/association_sub_type.rb +4 -4
  100. data/lib/merge_ruby_client/crm/types/association_type.rb +6 -8
  101. data/lib/merge_ruby_client/crm/types/audit_log_event.rb +0 -6
  102. data/lib/merge_ruby_client/crm/types/condition_schema.rb +136 -0
  103. data/lib/merge_ruby_client/crm/types/condition_type_enum.rb +22 -0
  104. data/lib/merge_ruby_client/crm/types/contact.rb +4 -4
  105. data/lib/merge_ruby_client/crm/types/custom_object.rb +8 -8
  106. data/lib/merge_ruby_client/crm/types/custom_object_class.rb +8 -10
  107. data/lib/merge_ruby_client/crm/types/email_address.rb +4 -4
  108. data/lib/merge_ruby_client/crm/types/engagement.rb +4 -4
  109. data/lib/merge_ruby_client/crm/types/engagement_type.rb +4 -4
  110. data/lib/merge_ruby_client/crm/types/event_type_enum.rb +0 -6
  111. data/lib/merge_ruby_client/crm/types/lead.rb +4 -4
  112. data/lib/merge_ruby_client/crm/types/linked_account_condition.rb +104 -0
  113. data/lib/merge_ruby_client/crm/types/linked_account_condition_request.rb +87 -0
  114. data/lib/merge_ruby_client/crm/types/linked_account_selective_sync_configuration.rb +65 -0
  115. data/lib/merge_ruby_client/crm/types/linked_account_selective_sync_configuration_request.rb +63 -0
  116. data/lib/merge_ruby_client/crm/types/note.rb +4 -4
  117. data/lib/merge_ruby_client/crm/types/operator_schema.rb +68 -0
  118. data/lib/merge_ruby_client/crm/types/opportunity.rb +4 -4
  119. data/lib/merge_ruby_client/crm/types/paginated_condition_schema_list.rb +80 -0
  120. data/lib/merge_ruby_client/crm/types/patched_account_request.rb +1 -13
  121. data/lib/merge_ruby_client/crm/types/phone_number.rb +4 -4
  122. data/lib/merge_ruby_client/crm/types/remote_field_api.rb +2 -16
  123. data/lib/merge_ruby_client/crm/types/remote_field_class_for_custom_object_class.rb +4 -4
  124. data/lib/merge_ruby_client/crm/types/stage.rb +4 -4
  125. data/lib/merge_ruby_client/crm/types/task.rb +4 -4
  126. data/lib/merge_ruby_client/crm/types/user.rb +4 -4
  127. data/lib/merge_ruby_client/filestorage/audit_trail/client.rb +2 -4
  128. data/lib/merge_ruby_client/filestorage/client.rb +7 -0
  129. data/lib/merge_ruby_client/filestorage/link_token/client.rb +4 -8
  130. data/lib/merge_ruby_client/filestorage/selective_sync/client.rb +218 -0
  131. data/lib/merge_ruby_client/filestorage/types/audit_log_event.rb +0 -6
  132. data/lib/merge_ruby_client/filestorage/types/condition_schema.rb +136 -0
  133. data/lib/merge_ruby_client/filestorage/types/condition_type_enum.rb +22 -0
  134. data/lib/merge_ruby_client/filestorage/types/drive.rb +4 -4
  135. data/lib/merge_ruby_client/filestorage/types/event_type_enum.rb +0 -6
  136. data/lib/merge_ruby_client/filestorage/types/file.rb +4 -4
  137. data/lib/merge_ruby_client/filestorage/types/folder.rb +4 -4
  138. data/lib/merge_ruby_client/filestorage/types/group.rb +4 -4
  139. data/lib/merge_ruby_client/filestorage/types/linked_account_condition.rb +104 -0
  140. data/lib/merge_ruby_client/filestorage/types/linked_account_condition_request.rb +87 -0
  141. data/lib/merge_ruby_client/filestorage/types/linked_account_selective_sync_configuration.rb +65 -0
  142. data/lib/merge_ruby_client/filestorage/types/linked_account_selective_sync_configuration_request.rb +63 -0
  143. data/lib/merge_ruby_client/filestorage/types/operator_schema.rb +68 -0
  144. data/lib/merge_ruby_client/filestorage/types/paginated_condition_schema_list.rb +80 -0
  145. data/lib/merge_ruby_client/filestorage/types/permission.rb +4 -4
  146. data/lib/merge_ruby_client/filestorage/types/remote_field_api.rb +2 -16
  147. data/lib/merge_ruby_client/filestorage/types/user.rb +4 -4
  148. data/lib/merge_ruby_client/hris/audit_trail/client.rb +2 -4
  149. data/lib/merge_ruby_client/hris/client.rb +7 -0
  150. data/lib/merge_ruby_client/hris/groups/client.rb +2 -10
  151. data/lib/merge_ruby_client/hris/link_token/client.rb +4 -8
  152. data/lib/merge_ruby_client/hris/selective_sync/client.rb +218 -0
  153. data/lib/merge_ruby_client/hris/types/audit_log_event.rb +0 -6
  154. data/lib/merge_ruby_client/hris/types/bank_info.rb +4 -4
  155. data/lib/merge_ruby_client/hris/types/benefit.rb +4 -4
  156. data/lib/merge_ruby_client/hris/types/company.rb +4 -4
  157. data/lib/merge_ruby_client/hris/types/condition_schema.rb +136 -0
  158. data/lib/merge_ruby_client/hris/types/condition_type_enum.rb +22 -0
  159. data/lib/merge_ruby_client/hris/types/deduction.rb +4 -4
  160. data/lib/merge_ruby_client/hris/types/dependent.rb +4 -4
  161. data/lib/merge_ruby_client/hris/types/earning.rb +4 -4
  162. data/lib/merge_ruby_client/hris/types/employee.rb +4 -4
  163. data/lib/merge_ruby_client/hris/types/employee_payroll_run.rb +4 -4
  164. data/lib/merge_ruby_client/hris/types/employer_benefit.rb +4 -4
  165. data/lib/merge_ruby_client/hris/types/employment.rb +4 -4
  166. data/lib/merge_ruby_client/hris/types/event_type_enum.rb +0 -6
  167. data/lib/merge_ruby_client/hris/types/group.rb +5 -19
  168. data/lib/merge_ruby_client/hris/types/linked_account_condition.rb +104 -0
  169. data/lib/merge_ruby_client/hris/types/linked_account_condition_request.rb +87 -0
  170. data/lib/merge_ruby_client/hris/types/linked_account_selective_sync_configuration.rb +65 -0
  171. data/lib/merge_ruby_client/hris/types/linked_account_selective_sync_configuration_request.rb +63 -0
  172. data/lib/merge_ruby_client/hris/types/location.rb +4 -4
  173. data/lib/merge_ruby_client/hris/types/operator_schema.rb +68 -0
  174. data/lib/merge_ruby_client/hris/types/paginated_condition_schema_list.rb +80 -0
  175. data/lib/merge_ruby_client/hris/types/pay_group.rb +4 -4
  176. data/lib/merge_ruby_client/hris/types/payroll_run.rb +4 -4
  177. data/lib/merge_ruby_client/hris/types/remote_field_api.rb +2 -16
  178. data/lib/merge_ruby_client/hris/types/tax.rb +4 -4
  179. data/lib/merge_ruby_client/hris/types/team.rb +4 -4
  180. data/lib/merge_ruby_client/hris/types/time_off.rb +4 -4
  181. data/lib/merge_ruby_client/hris/types/time_off_balance.rb +4 -4
  182. data/lib/merge_ruby_client/hris/types/timesheet_entry.rb +4 -4
  183. data/lib/merge_ruby_client/ticketing/audit_trail/client.rb +2 -4
  184. data/lib/merge_ruby_client/ticketing/client.rb +7 -0
  185. data/lib/merge_ruby_client/ticketing/contacts/client.rb +0 -127
  186. data/lib/merge_ruby_client/ticketing/link_token/client.rb +4 -8
  187. data/lib/merge_ruby_client/ticketing/selective_sync/client.rb +218 -0
  188. data/lib/merge_ruby_client/ticketing/types/account.rb +4 -4
  189. data/lib/merge_ruby_client/ticketing/types/attachment.rb +4 -4
  190. data/lib/merge_ruby_client/ticketing/types/audit_log_event.rb +0 -6
  191. data/lib/merge_ruby_client/ticketing/types/collection.rb +4 -4
  192. data/lib/merge_ruby_client/ticketing/types/comment.rb +4 -4
  193. data/lib/merge_ruby_client/ticketing/types/condition_schema.rb +136 -0
  194. data/lib/merge_ruby_client/ticketing/types/condition_type_enum.rb +22 -0
  195. data/lib/merge_ruby_client/ticketing/types/contact.rb +4 -4
  196. data/lib/merge_ruby_client/ticketing/types/event_type_enum.rb +0 -6
  197. data/lib/merge_ruby_client/ticketing/types/linked_account_condition.rb +104 -0
  198. data/lib/merge_ruby_client/ticketing/types/linked_account_condition_request.rb +87 -0
  199. data/lib/merge_ruby_client/ticketing/types/linked_account_selective_sync_configuration.rb +65 -0
  200. data/lib/merge_ruby_client/ticketing/types/linked_account_selective_sync_configuration_request.rb +63 -0
  201. data/lib/merge_ruby_client/ticketing/types/operator_schema.rb +68 -0
  202. data/lib/merge_ruby_client/ticketing/types/paginated_condition_schema_list.rb +80 -0
  203. data/lib/merge_ruby_client/ticketing/types/project.rb +4 -4
  204. data/lib/merge_ruby_client/ticketing/types/remote_field_api.rb +2 -16
  205. data/lib/merge_ruby_client/ticketing/types/role.rb +4 -4
  206. data/lib/merge_ruby_client/ticketing/types/tag.rb +4 -4
  207. data/lib/merge_ruby_client/ticketing/types/team.rb +4 -4
  208. data/lib/merge_ruby_client/ticketing/types/ticket.rb +4 -4
  209. data/lib/merge_ruby_client/ticketing/types/user.rb +4 -4
  210. data/lib/merge_ruby_client.rb +7 -7
  211. data/lib/requests.rb +2 -12
  212. data/lib/types_export.rb +153 -115
  213. metadata +56 -12
  214. data/lib/merge_ruby_client/accounting/types/payment_type_enum.rb +0 -12
  215. data/lib/merge_ruby_client/accounting/types/remote_field_api_coverage.rb +0 -54
  216. data/lib/merge_ruby_client/ats/types/remote_field_api_coverage.rb +0 -54
  217. data/lib/merge_ruby_client/crm/types/remote_field_api_coverage.rb +0 -54
  218. data/lib/merge_ruby_client/filestorage/types/remote_field_api_coverage.rb +0 -54
  219. data/lib/merge_ruby_client/hris/types/remote_field_api_coverage.rb +0 -54
  220. data/lib/merge_ruby_client/ticketing/types/contact_request.rb +0 -125
  221. data/lib/merge_ruby_client/ticketing/types/contact_request_account.rb +0 -56
  222. data/lib/merge_ruby_client/ticketing/types/remote_field_api_coverage.rb +0 -54
  223. data/lib/merge_ruby_client/ticketing/types/ticketing_contact_response.rb +0 -101
@@ -0,0 +1,87 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Merge
7
+ module Accounting
8
+ class LinkedAccountConditionRequest
9
+ # @return [String] The ID indicating which Linked Account Condition this is.
10
+ attr_reader :id
11
+ # @return [String] The ID indicating which condition schema to use for a specific condition.
12
+ attr_reader :condition_schema_id
13
+ # @return [String] The operator for a specific condition.
14
+ attr_reader :operator
15
+ # @return [Object]
16
+ attr_reader :value
17
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
18
+ attr_reader :additional_properties
19
+ # @return [Object]
20
+ attr_reader :_field_set
21
+ protected :_field_set
22
+
23
+ OMIT = Object.new
24
+
25
+ # @param id [String] The ID indicating which Linked Account Condition this is.
26
+ # @param condition_schema_id [String] The ID indicating which condition schema to use for a specific condition.
27
+ # @param operator [String] The operator for a specific condition.
28
+ # @param value [Object]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [Merge::Accounting::LinkedAccountConditionRequest]
31
+ def initialize(condition_schema_id:, operator:, value:, id: OMIT, additional_properties: nil)
32
+ @id = id if id != OMIT
33
+ @condition_schema_id = condition_schema_id
34
+ @operator = operator
35
+ @value = value
36
+ @additional_properties = additional_properties
37
+ @_field_set = {
38
+ "id": id,
39
+ "condition_schema_id": condition_schema_id,
40
+ "operator": operator,
41
+ "value": value
42
+ }.reject do |_k, v|
43
+ v == OMIT
44
+ end
45
+ end
46
+
47
+ # Deserialize a JSON object to an instance of LinkedAccountConditionRequest
48
+ #
49
+ # @param json_object [String]
50
+ # @return [Merge::Accounting::LinkedAccountConditionRequest]
51
+ def self.from_json(json_object:)
52
+ struct = JSON.parse(json_object, object_class: OpenStruct)
53
+ id = struct["id"]
54
+ condition_schema_id = struct["condition_schema_id"]
55
+ operator = struct["operator"]
56
+ value = struct["value"]
57
+ new(
58
+ id: id,
59
+ condition_schema_id: condition_schema_id,
60
+ operator: operator,
61
+ value: value,
62
+ additional_properties: struct
63
+ )
64
+ end
65
+
66
+ # Serialize an instance of LinkedAccountConditionRequest to a JSON object
67
+ #
68
+ # @return [String]
69
+ def to_json(*_args)
70
+ @_field_set&.to_json
71
+ end
72
+
73
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
74
+ # hash and check each fields type against the current object's property
75
+ # definitions.
76
+ #
77
+ # @param obj [Object]
78
+ # @return [Void]
79
+ def self.validate_raw(obj:)
80
+ obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
81
+ obj.condition_schema_id.is_a?(String) != false || raise("Passed value for field obj.condition_schema_id is not the expected type, validation failed.")
82
+ obj.operator.is_a?(String) != false || raise("Passed value for field obj.operator is not the expected type, validation failed.")
83
+ obj.value.is_a?(Object) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "linked_account_condition"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Merge
8
+ module Accounting
9
+ class LinkedAccountSelectiveSyncConfiguration
10
+ # @return [Array<Merge::Accounting::LinkedAccountCondition>] The conditions belonging to a selective sync.
11
+ attr_reader :linked_account_conditions
12
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
13
+ attr_reader :additional_properties
14
+ # @return [Object]
15
+ attr_reader :_field_set
16
+ protected :_field_set
17
+
18
+ OMIT = Object.new
19
+
20
+ # @param linked_account_conditions [Array<Merge::Accounting::LinkedAccountCondition>] The conditions belonging to a selective sync.
21
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
22
+ # @return [Merge::Accounting::LinkedAccountSelectiveSyncConfiguration]
23
+ def initialize(linked_account_conditions: OMIT, additional_properties: nil)
24
+ @linked_account_conditions = linked_account_conditions if linked_account_conditions != OMIT
25
+ @additional_properties = additional_properties
26
+ @_field_set = { "linked_account_conditions": linked_account_conditions }.reject do |_k, v|
27
+ v == OMIT
28
+ end
29
+ end
30
+
31
+ # Deserialize a JSON object to an instance of
32
+ # LinkedAccountSelectiveSyncConfiguration
33
+ #
34
+ # @param json_object [String]
35
+ # @return [Merge::Accounting::LinkedAccountSelectiveSyncConfiguration]
36
+ def self.from_json(json_object:)
37
+ struct = JSON.parse(json_object, object_class: OpenStruct)
38
+ parsed_json = JSON.parse(json_object)
39
+ linked_account_conditions = parsed_json["linked_account_conditions"]&.map do |v|
40
+ v = v.to_json
41
+ Merge::Accounting::LinkedAccountCondition.from_json(json_object: v)
42
+ end
43
+ new(linked_account_conditions: linked_account_conditions, additional_properties: struct)
44
+ end
45
+
46
+ # Serialize an instance of LinkedAccountSelectiveSyncConfiguration to a JSON
47
+ # object
48
+ #
49
+ # @return [String]
50
+ def to_json(*_args)
51
+ @_field_set&.to_json
52
+ end
53
+
54
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
55
+ # hash and check each fields type against the current object's property
56
+ # definitions.
57
+ #
58
+ # @param obj [Object]
59
+ # @return [Void]
60
+ def self.validate_raw(obj:)
61
+ obj.linked_account_conditions&.is_a?(Array) != false || raise("Passed value for field obj.linked_account_conditions is not the expected type, validation failed.")
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "linked_account_condition_request"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Merge
8
+ module Accounting
9
+ class LinkedAccountSelectiveSyncConfigurationRequest
10
+ # @return [Array<Merge::Accounting::LinkedAccountConditionRequest>] The conditions belonging to a selective sync.
11
+ attr_reader :linked_account_conditions
12
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
13
+ attr_reader :additional_properties
14
+ # @return [Object]
15
+ attr_reader :_field_set
16
+ protected :_field_set
17
+
18
+ OMIT = Object.new
19
+
20
+ # @param linked_account_conditions [Array<Merge::Accounting::LinkedAccountConditionRequest>] The conditions belonging to a selective sync.
21
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
22
+ # @return [Merge::Accounting::LinkedAccountSelectiveSyncConfigurationRequest]
23
+ def initialize(linked_account_conditions:, additional_properties: nil)
24
+ @linked_account_conditions = linked_account_conditions
25
+ @additional_properties = additional_properties
26
+ @_field_set = { "linked_account_conditions": linked_account_conditions }
27
+ end
28
+
29
+ # Deserialize a JSON object to an instance of
30
+ # LinkedAccountSelectiveSyncConfigurationRequest
31
+ #
32
+ # @param json_object [String]
33
+ # @return [Merge::Accounting::LinkedAccountSelectiveSyncConfigurationRequest]
34
+ def self.from_json(json_object:)
35
+ struct = JSON.parse(json_object, object_class: OpenStruct)
36
+ parsed_json = JSON.parse(json_object)
37
+ linked_account_conditions = parsed_json["linked_account_conditions"]&.map do |v|
38
+ v = v.to_json
39
+ Merge::Accounting::LinkedAccountConditionRequest.from_json(json_object: v)
40
+ end
41
+ new(linked_account_conditions: linked_account_conditions, additional_properties: struct)
42
+ end
43
+
44
+ # Serialize an instance of LinkedAccountSelectiveSyncConfigurationRequest to a
45
+ # JSON object
46
+ #
47
+ # @return [String]
48
+ def to_json(*_args)
49
+ @_field_set&.to_json
50
+ end
51
+
52
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
53
+ # hash and check each fields type against the current object's property
54
+ # definitions.
55
+ #
56
+ # @param obj [Object]
57
+ # @return [Void]
58
+ def self.validate_raw(obj:)
59
+ obj.linked_account_conditions.is_a?(Array) != false || raise("Passed value for field obj.linked_account_conditions is not the expected type, validation failed.")
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Merge
7
+ module Accounting
8
+ class OperatorSchema
9
+ # @return [String] The operator for which an operator schema is defined.
10
+ attr_reader :operator
11
+ # @return [Boolean] Whether the operator can be repeated multiple times.
12
+ attr_reader :is_unique
13
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
14
+ attr_reader :additional_properties
15
+ # @return [Object]
16
+ attr_reader :_field_set
17
+ protected :_field_set
18
+
19
+ OMIT = Object.new
20
+
21
+ # @param operator [String] The operator for which an operator schema is defined.
22
+ # @param is_unique [Boolean] Whether the operator can be repeated multiple times.
23
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
24
+ # @return [Merge::Accounting::OperatorSchema]
25
+ def initialize(operator: OMIT, is_unique: OMIT, additional_properties: nil)
26
+ @operator = operator if operator != OMIT
27
+ @is_unique = is_unique if is_unique != OMIT
28
+ @additional_properties = additional_properties
29
+ @_field_set = { "operator": operator, "is_unique": is_unique }.reject do |_k, v|
30
+ v == OMIT
31
+ end
32
+ end
33
+
34
+ # Deserialize a JSON object to an instance of OperatorSchema
35
+ #
36
+ # @param json_object [String]
37
+ # @return [Merge::Accounting::OperatorSchema]
38
+ def self.from_json(json_object:)
39
+ struct = JSON.parse(json_object, object_class: OpenStruct)
40
+ operator = struct["operator"]
41
+ is_unique = struct["is_unique"]
42
+ new(
43
+ operator: operator,
44
+ is_unique: is_unique,
45
+ additional_properties: struct
46
+ )
47
+ end
48
+
49
+ # Serialize an instance of OperatorSchema to a JSON object
50
+ #
51
+ # @return [String]
52
+ def to_json(*_args)
53
+ @_field_set&.to_json
54
+ end
55
+
56
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
57
+ # hash and check each fields type against the current object's property
58
+ # definitions.
59
+ #
60
+ # @param obj [Object]
61
+ # @return [Void]
62
+ def self.validate_raw(obj:)
63
+ obj.operator&.is_a?(String) != false || raise("Passed value for field obj.operator is not the expected type, validation failed.")
64
+ obj.is_unique&.is_a?(Boolean) != false || raise("Passed value for field obj.is_unique is not the expected type, validation failed.")
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "condition_schema"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Merge
8
+ module Accounting
9
+ class PaginatedConditionSchemaList
10
+ # @return [String]
11
+ attr_reader :next_
12
+ # @return [String]
13
+ attr_reader :previous
14
+ # @return [Array<Merge::Accounting::ConditionSchema>]
15
+ attr_reader :results
16
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
17
+ attr_reader :additional_properties
18
+ # @return [Object]
19
+ attr_reader :_field_set
20
+ protected :_field_set
21
+
22
+ OMIT = Object.new
23
+
24
+ # @param next_ [String]
25
+ # @param previous [String]
26
+ # @param results [Array<Merge::Accounting::ConditionSchema>]
27
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
28
+ # @return [Merge::Accounting::PaginatedConditionSchemaList]
29
+ def initialize(next_: OMIT, previous: OMIT, results: OMIT, additional_properties: nil)
30
+ @next_ = next_ if next_ != OMIT
31
+ @previous = previous if previous != OMIT
32
+ @results = results if results != OMIT
33
+ @additional_properties = additional_properties
34
+ @_field_set = { "next": next_, "previous": previous, "results": results }.reject do |_k, v|
35
+ v == OMIT
36
+ end
37
+ end
38
+
39
+ # Deserialize a JSON object to an instance of PaginatedConditionSchemaList
40
+ #
41
+ # @param json_object [String]
42
+ # @return [Merge::Accounting::PaginatedConditionSchemaList]
43
+ def self.from_json(json_object:)
44
+ struct = JSON.parse(json_object, object_class: OpenStruct)
45
+ parsed_json = JSON.parse(json_object)
46
+ next_ = struct["next"]
47
+ previous = struct["previous"]
48
+ results = parsed_json["results"]&.map do |v|
49
+ v = v.to_json
50
+ Merge::Accounting::ConditionSchema.from_json(json_object: v)
51
+ end
52
+ new(
53
+ next_: next_,
54
+ previous: previous,
55
+ results: results,
56
+ additional_properties: struct
57
+ )
58
+ end
59
+
60
+ # Serialize an instance of PaginatedConditionSchemaList to a JSON object
61
+ #
62
+ # @return [String]
63
+ def to_json(*_args)
64
+ @_field_set&.to_json
65
+ end
66
+
67
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
68
+ # hash and check each fields type against the current object's property
69
+ # definitions.
70
+ #
71
+ # @param obj [Object]
72
+ # @return [Void]
73
+ def self.validate_raw(obj:)
74
+ obj.next_&.is_a?(String) != false || raise("Passed value for field obj.next_ is not the expected type, validation failed.")
75
+ obj.previous&.is_a?(String) != false || raise("Passed value for field obj.previous is not the expected type, validation failed.")
76
+ obj.results&.is_a?(Array) != false || raise("Passed value for field obj.results is not the expected type, validation failed.")
77
+ end
78
+ end
79
+ end
80
+ end
@@ -5,7 +5,6 @@ require_relative "patched_payment_request_contact"
5
5
  require_relative "patched_payment_request_account"
6
6
  require_relative "currency_enum"
7
7
  require_relative "patched_payment_request_company"
8
- require_relative "payment_type_enum"
9
8
  require_relative "patched_payment_request_tracking_categories_item"
10
9
  require_relative "patched_payment_request_accounting_period"
11
10
  require_relative "patched_payment_request_applied_to_lines_item"
@@ -341,10 +340,6 @@ module Merge
341
340
  attr_reader :company
342
341
  # @return [Float] The total amount of money being paid to the supplier, or customer, after taxes.
343
342
  attr_reader :total_amount
344
- # @return [Merge::Accounting::PaymentTypeEnum] The type of the invoice.
345
- # - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
346
- # - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
347
- attr_reader :type
348
343
  # @return [Array<Merge::Accounting::PatchedPaymentRequestTrackingCategoriesItem>]
349
344
  attr_reader :tracking_categories
350
345
  # @return [Merge::Accounting::PatchedPaymentRequestAccountingPeriod] The accounting period that the Payment was generated in.
@@ -676,9 +671,6 @@ module Merge
676
671
  # @param exchange_rate [String] The payment's exchange rate.
677
672
  # @param company [Merge::Accounting::PatchedPaymentRequestCompany] The company the payment belongs to.
678
673
  # @param total_amount [Float] The total amount of money being paid to the supplier, or customer, after taxes.
679
- # @param type [Merge::Accounting::PaymentTypeEnum] The type of the invoice.
680
- # - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
681
- # - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
682
674
  # @param tracking_categories [Array<Merge::Accounting::PatchedPaymentRequestTrackingCategoriesItem>]
683
675
  # @param accounting_period [Merge::Accounting::PatchedPaymentRequestAccountingPeriod] The accounting period that the Payment was generated in.
684
676
  # @param applied_to_lines [Array<Merge::Accounting::PatchedPaymentRequestAppliedToLinesItem>] A list of “Payment Applied to Lines” objects.
@@ -687,7 +679,7 @@ module Merge
687
679
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
688
680
  # @return [Merge::Accounting::PatchedPaymentRequest]
689
681
  def initialize(transaction_date: OMIT, contact: OMIT, account: OMIT, currency: OMIT, exchange_rate: OMIT,
690
- company: OMIT, total_amount: OMIT, type: OMIT, tracking_categories: OMIT, accounting_period: OMIT, applied_to_lines: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil)
682
+ company: OMIT, total_amount: OMIT, tracking_categories: OMIT, accounting_period: OMIT, applied_to_lines: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil)
691
683
  @transaction_date = transaction_date if transaction_date != OMIT
692
684
  @contact = contact if contact != OMIT
693
685
  @account = account if account != OMIT
@@ -695,7 +687,6 @@ module Merge
695
687
  @exchange_rate = exchange_rate if exchange_rate != OMIT
696
688
  @company = company if company != OMIT
697
689
  @total_amount = total_amount if total_amount != OMIT
698
- @type = type if type != OMIT
699
690
  @tracking_categories = tracking_categories if tracking_categories != OMIT
700
691
  @accounting_period = accounting_period if accounting_period != OMIT
701
692
  @applied_to_lines = applied_to_lines if applied_to_lines != OMIT
@@ -710,7 +701,6 @@ module Merge
710
701
  "exchange_rate": exchange_rate,
711
702
  "company": company,
712
703
  "total_amount": total_amount,
713
- "type": type,
714
704
  "tracking_categories": tracking_categories,
715
705
  "accounting_period": accounting_period,
716
706
  "applied_to_lines": applied_to_lines,
@@ -750,7 +740,6 @@ module Merge
750
740
  company = Merge::Accounting::PatchedPaymentRequestCompany.from_json(json_object: company)
751
741
  end
752
742
  total_amount = struct["total_amount"]
753
- type = struct["type"]
754
743
  tracking_categories = parsed_json["tracking_categories"]&.map do |v|
755
744
  v = v.to_json
756
745
  Merge::Accounting::PatchedPaymentRequestTrackingCategoriesItem.from_json(json_object: v)
@@ -775,7 +764,6 @@ module Merge
775
764
  exchange_rate: exchange_rate,
776
765
  company: company,
777
766
  total_amount: total_amount,
778
- type: type,
779
767
  tracking_categories: tracking_categories,
780
768
  accounting_period: accounting_period,
781
769
  applied_to_lines: applied_to_lines,
@@ -806,7 +794,6 @@ module Merge
806
794
  obj.exchange_rate&.is_a?(String) != false || raise("Passed value for field obj.exchange_rate is not the expected type, validation failed.")
807
795
  obj.company.nil? || Merge::Accounting::PatchedPaymentRequestCompany.validate_raw(obj: obj.company)
808
796
  obj.total_amount&.is_a?(Float) != false || raise("Passed value for field obj.total_amount is not the expected type, validation failed.")
809
- obj.type&.is_a?(Merge::Accounting::PaymentTypeEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
810
797
  obj.tracking_categories&.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
811
798
  obj.accounting_period.nil? || Merge::Accounting::PatchedPaymentRequestAccountingPeriod.validate_raw(obj: obj.accounting_period)
812
799
  obj.applied_to_lines&.is_a?(Array) != false || raise("Passed value for field obj.applied_to_lines is not the expected type, validation failed.")
@@ -5,7 +5,6 @@ require_relative "payment_contact"
5
5
  require_relative "payment_account"
6
6
  require_relative "currency_enum"
7
7
  require_relative "payment_company"
8
- require_relative "payment_type_enum"
9
8
  require_relative "payment_tracking_categories_item"
10
9
  require_relative "payment_accounting_period"
11
10
  require_relative "payment_applied_to_lines_item"
@@ -26,9 +25,9 @@ module Merge
26
25
  attr_reader :id
27
26
  # @return [String] The third-party API ID of the matching object.
28
27
  attr_reader :remote_id
29
- # @return [DateTime] The datetime that this object was created by Merge.
28
+ # @return [DateTime]
30
29
  attr_reader :created_at
31
- # @return [DateTime] The datetime that this object was modified by Merge.
30
+ # @return [DateTime] This is the datetime that this object was last updated by Merge
32
31
  attr_reader :modified_at
33
32
  # @return [DateTime] The payment's transaction date.
34
33
  attr_reader :transaction_date
@@ -350,10 +349,6 @@ module Merge
350
349
  attr_reader :company
351
350
  # @return [Float] The total amount of money being paid to the supplier, or customer, after taxes.
352
351
  attr_reader :total_amount
353
- # @return [Merge::Accounting::PaymentTypeEnum] The type of the invoice.
354
- # - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
355
- # - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
356
- attr_reader :type
357
352
  # @return [Array<Merge::Accounting::PaymentTrackingCategoriesItem>]
358
353
  attr_reader :tracking_categories
359
354
  # @return [DateTime] When the third party's payment entry was updated.
@@ -379,8 +374,8 @@ module Merge
379
374
 
380
375
  # @param id [String]
381
376
  # @param remote_id [String] The third-party API ID of the matching object.
382
- # @param created_at [DateTime] The datetime that this object was created by Merge.
383
- # @param modified_at [DateTime] The datetime that this object was modified by Merge.
377
+ # @param created_at [DateTime]
378
+ # @param modified_at [DateTime] This is the datetime that this object was last updated by Merge
384
379
  # @param transaction_date [DateTime] The payment's transaction date.
385
380
  # @param contact [Merge::Accounting::PaymentContact] The supplier, or customer involved in the payment.
386
381
  # @param account [Merge::Accounting::PaymentAccount] The supplier’s or customer’s account in which the payment is made.
@@ -694,9 +689,6 @@ module Merge
694
689
  # @param exchange_rate [String] The payment's exchange rate.
695
690
  # @param company [Merge::Accounting::PaymentCompany] The company the payment belongs to.
696
691
  # @param total_amount [Float] The total amount of money being paid to the supplier, or customer, after taxes.
697
- # @param type [Merge::Accounting::PaymentTypeEnum] The type of the invoice.
698
- # - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
699
- # - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
700
692
  # @param tracking_categories [Array<Merge::Accounting::PaymentTrackingCategoriesItem>]
701
693
  # @param remote_updated_at [DateTime] When the third party's payment entry was updated.
702
694
  # @param remote_was_deleted [Boolean] Indicates whether or not this object has been deleted in the third party
@@ -708,7 +700,7 @@ module Merge
708
700
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
709
701
  # @return [Merge::Accounting::Payment]
710
702
  def initialize(id: OMIT, remote_id: OMIT, created_at: OMIT, modified_at: OMIT, transaction_date: OMIT,
711
- contact: OMIT, account: OMIT, currency: OMIT, exchange_rate: OMIT, company: OMIT, total_amount: OMIT, type: OMIT, tracking_categories: OMIT, remote_updated_at: OMIT, remote_was_deleted: OMIT, accounting_period: OMIT, applied_to_lines: OMIT, field_mappings: OMIT, remote_data: OMIT, additional_properties: nil)
703
+ contact: OMIT, account: OMIT, currency: OMIT, exchange_rate: OMIT, company: OMIT, total_amount: OMIT, tracking_categories: OMIT, remote_updated_at: OMIT, remote_was_deleted: OMIT, accounting_period: OMIT, applied_to_lines: OMIT, field_mappings: OMIT, remote_data: OMIT, additional_properties: nil)
712
704
  @id = id if id != OMIT
713
705
  @remote_id = remote_id if remote_id != OMIT
714
706
  @created_at = created_at if created_at != OMIT
@@ -720,7 +712,6 @@ module Merge
720
712
  @exchange_rate = exchange_rate if exchange_rate != OMIT
721
713
  @company = company if company != OMIT
722
714
  @total_amount = total_amount if total_amount != OMIT
723
- @type = type if type != OMIT
724
715
  @tracking_categories = tracking_categories if tracking_categories != OMIT
725
716
  @remote_updated_at = remote_updated_at if remote_updated_at != OMIT
726
717
  @remote_was_deleted = remote_was_deleted if remote_was_deleted != OMIT
@@ -741,7 +732,6 @@ module Merge
741
732
  "exchange_rate": exchange_rate,
742
733
  "company": company,
743
734
  "total_amount": total_amount,
744
- "type": type,
745
735
  "tracking_categories": tracking_categories,
746
736
  "remote_updated_at": remote_updated_at,
747
737
  "remote_was_deleted": remote_was_deleted,
@@ -787,7 +777,6 @@ module Merge
787
777
  company = Merge::Accounting::PaymentCompany.from_json(json_object: company)
788
778
  end
789
779
  total_amount = struct["total_amount"]
790
- type = struct["type"]
791
780
  tracking_categories = parsed_json["tracking_categories"]&.map do |v|
792
781
  v = v.to_json
793
782
  Merge::Accounting::PaymentTrackingCategoriesItem.from_json(json_object: v)
@@ -823,7 +812,6 @@ module Merge
823
812
  exchange_rate: exchange_rate,
824
813
  company: company,
825
814
  total_amount: total_amount,
826
- type: type,
827
815
  tracking_categories: tracking_categories,
828
816
  remote_updated_at: remote_updated_at,
829
817
  remote_was_deleted: remote_was_deleted,
@@ -860,7 +848,6 @@ module Merge
860
848
  obj.exchange_rate&.is_a?(String) != false || raise("Passed value for field obj.exchange_rate is not the expected type, validation failed.")
861
849
  obj.company.nil? || Merge::Accounting::PaymentCompany.validate_raw(obj: obj.company)
862
850
  obj.total_amount&.is_a?(Float) != false || raise("Passed value for field obj.total_amount is not the expected type, validation failed.")
863
- obj.type&.is_a?(Merge::Accounting::PaymentTypeEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
864
851
  obj.tracking_categories&.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
865
852
  obj.remote_updated_at&.is_a?(DateTime) != false || raise("Passed value for field obj.remote_updated_at is not the expected type, validation failed.")
866
853
  obj.remote_was_deleted&.is_a?(Boolean) != false || raise("Passed value for field obj.remote_was_deleted is not the expected type, validation failed.")
@@ -19,9 +19,9 @@ module Merge
19
19
  attr_reader :id
20
20
  # @return [String] The third-party API ID of the matching object.
21
21
  attr_reader :remote_id
22
- # @return [DateTime] The datetime that this object was created by Merge.
22
+ # @return [DateTime]
23
23
  attr_reader :created_at
24
- # @return [DateTime] The datetime that this object was modified by Merge.
24
+ # @return [DateTime] This is the datetime that this object was last updated by Merge
25
25
  attr_reader :modified_at
26
26
  # @return [String] The amount being applied to the transaction.
27
27
  attr_reader :applied_amount
@@ -42,8 +42,8 @@ module Merge
42
42
 
43
43
  # @param id [String]
44
44
  # @param remote_id [String] The third-party API ID of the matching object.
45
- # @param created_at [DateTime] The datetime that this object was created by Merge.
46
- # @param modified_at [DateTime] The datetime that this object was modified by Merge.
45
+ # @param created_at [DateTime]
46
+ # @param modified_at [DateTime] This is the datetime that this object was last updated by Merge
47
47
  # @param applied_amount [String] The amount being applied to the transaction.
48
48
  # @param applied_date [DateTime] The date the payment portion is applied.
49
49
  # @param related_object_id [String] The Merge ID of the transaction the payment portion is being applied to.
@@ -5,7 +5,6 @@ require_relative "payment_request_contact"
5
5
  require_relative "payment_request_account"
6
6
  require_relative "currency_enum"
7
7
  require_relative "payment_request_company"
8
- require_relative "payment_type_enum"
9
8
  require_relative "payment_request_tracking_categories_item"
10
9
  require_relative "payment_request_accounting_period"
11
10
  require_relative "payment_request_applied_to_lines_item"
@@ -341,10 +340,6 @@ module Merge
341
340
  attr_reader :company
342
341
  # @return [Float] The total amount of money being paid to the supplier, or customer, after taxes.
343
342
  attr_reader :total_amount
344
- # @return [Merge::Accounting::PaymentTypeEnum] The type of the invoice.
345
- # - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
346
- # - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
347
- attr_reader :type
348
343
  # @return [Array<Merge::Accounting::PaymentRequestTrackingCategoriesItem>]
349
344
  attr_reader :tracking_categories
350
345
  # @return [Merge::Accounting::PaymentRequestAccountingPeriod] The accounting period that the Payment was generated in.
@@ -676,9 +671,6 @@ module Merge
676
671
  # @param exchange_rate [String] The payment's exchange rate.
677
672
  # @param company [Merge::Accounting::PaymentRequestCompany] The company the payment belongs to.
678
673
  # @param total_amount [Float] The total amount of money being paid to the supplier, or customer, after taxes.
679
- # @param type [Merge::Accounting::PaymentTypeEnum] The type of the invoice.
680
- # - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
681
- # - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE
682
674
  # @param tracking_categories [Array<Merge::Accounting::PaymentRequestTrackingCategoriesItem>]
683
675
  # @param accounting_period [Merge::Accounting::PaymentRequestAccountingPeriod] The accounting period that the Payment was generated in.
684
676
  # @param applied_to_lines [Array<Merge::Accounting::PaymentRequestAppliedToLinesItem>] A list of “Payment Applied to Lines” objects.
@@ -687,7 +679,7 @@ module Merge
687
679
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
688
680
  # @return [Merge::Accounting::PaymentRequest]
689
681
  def initialize(transaction_date: OMIT, contact: OMIT, account: OMIT, currency: OMIT, exchange_rate: OMIT,
690
- company: OMIT, total_amount: OMIT, type: OMIT, tracking_categories: OMIT, accounting_period: OMIT, applied_to_lines: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil)
682
+ company: OMIT, total_amount: OMIT, tracking_categories: OMIT, accounting_period: OMIT, applied_to_lines: OMIT, integration_params: OMIT, linked_account_params: OMIT, additional_properties: nil)
691
683
  @transaction_date = transaction_date if transaction_date != OMIT
692
684
  @contact = contact if contact != OMIT
693
685
  @account = account if account != OMIT
@@ -695,7 +687,6 @@ module Merge
695
687
  @exchange_rate = exchange_rate if exchange_rate != OMIT
696
688
  @company = company if company != OMIT
697
689
  @total_amount = total_amount if total_amount != OMIT
698
- @type = type if type != OMIT
699
690
  @tracking_categories = tracking_categories if tracking_categories != OMIT
700
691
  @accounting_period = accounting_period if accounting_period != OMIT
701
692
  @applied_to_lines = applied_to_lines if applied_to_lines != OMIT
@@ -710,7 +701,6 @@ module Merge
710
701
  "exchange_rate": exchange_rate,
711
702
  "company": company,
712
703
  "total_amount": total_amount,
713
- "type": type,
714
704
  "tracking_categories": tracking_categories,
715
705
  "accounting_period": accounting_period,
716
706
  "applied_to_lines": applied_to_lines,
@@ -750,7 +740,6 @@ module Merge
750
740
  company = Merge::Accounting::PaymentRequestCompany.from_json(json_object: company)
751
741
  end
752
742
  total_amount = struct["total_amount"]
753
- type = struct["type"]
754
743
  tracking_categories = parsed_json["tracking_categories"]&.map do |v|
755
744
  v = v.to_json
756
745
  Merge::Accounting::PaymentRequestTrackingCategoriesItem.from_json(json_object: v)
@@ -775,7 +764,6 @@ module Merge
775
764
  exchange_rate: exchange_rate,
776
765
  company: company,
777
766
  total_amount: total_amount,
778
- type: type,
779
767
  tracking_categories: tracking_categories,
780
768
  accounting_period: accounting_period,
781
769
  applied_to_lines: applied_to_lines,
@@ -806,7 +794,6 @@ module Merge
806
794
  obj.exchange_rate&.is_a?(String) != false || raise("Passed value for field obj.exchange_rate is not the expected type, validation failed.")
807
795
  obj.company.nil? || Merge::Accounting::PaymentRequestCompany.validate_raw(obj: obj.company)
808
796
  obj.total_amount&.is_a?(Float) != false || raise("Passed value for field obj.total_amount is not the expected type, validation failed.")
809
- obj.type&.is_a?(Merge::Accounting::PaymentTypeEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
810
797
  obj.tracking_categories&.is_a?(Array) != false || raise("Passed value for field obj.tracking_categories is not the expected type, validation failed.")
811
798
  obj.accounting_period.nil? || Merge::Accounting::PaymentRequestAccountingPeriod.validate_raw(obj: obj.accounting_period)
812
799
  obj.applied_to_lines&.is_a?(Array) != false || raise("Passed value for field obj.applied_to_lines is not the expected type, validation failed.")
@@ -32,9 +32,9 @@ module Merge
32
32
  attr_reader :id
33
33
  # @return [String] The third-party API ID of the matching object.
34
34
  attr_reader :remote_id
35
- # @return [DateTime] The datetime that this object was created by Merge.
35
+ # @return [DateTime]
36
36
  attr_reader :created_at
37
- # @return [DateTime] The datetime that this object was modified by Merge.
37
+ # @return [DateTime] This is the datetime that this object was last updated by Merge
38
38
  attr_reader :modified_at
39
39
  # @return [Merge::Accounting::PurchaseOrderStatusEnum] The purchase order's status.
40
40
  # - `DRAFT` - DRAFT
@@ -398,8 +398,8 @@ module Merge
398
398
 
399
399
  # @param id [String]
400
400
  # @param remote_id [String] The third-party API ID of the matching object.
401
- # @param created_at [DateTime] The datetime that this object was created by Merge.
402
- # @param modified_at [DateTime] The datetime that this object was modified by Merge.
401
+ # @param created_at [DateTime]
402
+ # @param modified_at [DateTime] This is the datetime that this object was last updated by Merge
403
403
  # @param status [Merge::Accounting::PurchaseOrderStatusEnum] The purchase order's status.
404
404
  # - `DRAFT` - DRAFT
405
405
  # - `SUBMITTED` - SUBMITTED