merge_ticketing_client 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -6
  3. data/docs/Account.md +11 -10
  4. data/docs/AccountIntegration.md +1 -1
  5. data/docs/Attachment.md +15 -14
  6. data/docs/AttachmentRequest.md +11 -12
  7. data/docs/Collection.md +33 -0
  8. data/docs/CollectionTypeEnum.md +15 -0
  9. data/docs/CollectionsApi.md +193 -0
  10. data/docs/Comment.md +16 -15
  11. data/docs/CommentRequest.md +12 -13
  12. data/docs/ConditionSchema.md +30 -0
  13. data/docs/ConditionTypeEnum.md +15 -0
  14. data/docs/Contact.md +14 -13
  15. data/docs/DataPassthroughRequest.md +10 -11
  16. data/docs/EndUserDetailsRequest.md +2 -2
  17. data/docs/FieldFormatEnum.md +15 -0
  18. data/docs/FieldTypeEnum.md +15 -0
  19. data/docs/Issue.md +18 -17
  20. data/docs/LinkToken.md +1 -1
  21. data/docs/LinkedAccountCondition.md +27 -0
  22. data/docs/LinkedAccountConditionRequest.md +21 -0
  23. data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
  24. data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
  25. data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
  26. data/docs/MetaResponse.md +6 -7
  27. data/docs/OperatorSchema.md +20 -0
  28. data/docs/PaginatedCollectionList.md +22 -0
  29. data/docs/PaginatedConditionSchemaList.md +22 -0
  30. data/docs/PaginatedRemoteFieldClassList.md +22 -0
  31. data/docs/PatchedTicketRequest.md +25 -22
  32. data/docs/Project.md +11 -10
  33. data/docs/ProjectsApi.md +10 -8
  34. data/docs/RemoteData.md +4 -5
  35. data/docs/RemoteField.md +19 -0
  36. data/docs/RemoteFieldClass.md +38 -0
  37. data/docs/RemoteFieldClassItemSchema.md +22 -0
  38. data/docs/RemoteResponse.md +9 -10
  39. data/docs/SelectiveSyncApi.md +233 -0
  40. data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
  41. data/docs/SyncStatus.md +5 -3
  42. data/docs/Tag.md +9 -8
  43. data/docs/Team.md +11 -10
  44. data/docs/Ticket.md +32 -25
  45. data/docs/TicketRequest.md +26 -25
  46. data/docs/TicketsApi.md +141 -13
  47. data/docs/User.md +14 -13
  48. data/docs/UsersApi.md +2 -0
  49. data/lib/merge_ticketing_client/api/collections_api.rb +234 -0
  50. data/lib/merge_ticketing_client/api/linked_accounts_api.rb +1 -1
  51. data/lib/merge_ticketing_client/api/projects_api.rb +14 -11
  52. data/lib/merge_ticketing_client/api/selective_sync_api.rb +225 -0
  53. data/lib/merge_ticketing_client/api/tickets_api.rb +177 -19
  54. data/lib/merge_ticketing_client/api/users_api.rb +3 -0
  55. data/lib/merge_ticketing_client/models/account.rb +16 -4
  56. data/lib/merge_ticketing_client/models/account_details_and_actions_status_enum.rb +1 -1
  57. data/lib/merge_ticketing_client/models/account_integration.rb +1 -1
  58. data/lib/merge_ticketing_client/models/attachment.rb +18 -4
  59. data/lib/merge_ticketing_client/models/attachment_request.rb +24 -20
  60. data/lib/merge_ticketing_client/models/categories_enum.rb +3 -2
  61. data/lib/merge_ticketing_client/models/category_enum.rb +3 -2
  62. data/lib/merge_ticketing_client/models/collection.rb +308 -0
  63. data/lib/merge_ticketing_client/models/collection_type_enum.rb +45 -0
  64. data/lib/merge_ticketing_client/models/comment.rb +19 -4
  65. data/lib/merge_ticketing_client/models/comment_request.rb +25 -20
  66. data/lib/merge_ticketing_client/models/condition_schema.rb +297 -0
  67. data/lib/merge_ticketing_client/models/condition_type_enum.rb +50 -0
  68. data/lib/merge_ticketing_client/models/contact.rb +16 -4
  69. data/lib/merge_ticketing_client/models/data_passthrough_request.rb +1 -0
  70. data/lib/merge_ticketing_client/models/encoding_enum.rb +1 -1
  71. data/lib/merge_ticketing_client/models/end_user_details_request.rb +2 -2
  72. data/lib/merge_ticketing_client/models/field_format_enum.rb +49 -0
  73. data/lib/merge_ticketing_client/models/field_type_enum.rb +49 -0
  74. data/lib/merge_ticketing_client/models/issue.rb +15 -4
  75. data/lib/merge_ticketing_client/models/link_token.rb +0 -5
  76. data/lib/merge_ticketing_client/models/linked_account_condition.rb +282 -0
  77. data/lib/merge_ticketing_client/models/linked_account_condition_request.rb +269 -0
  78. data/lib/merge_ticketing_client/models/linked_account_selective_sync_configuration.rb +221 -0
  79. data/lib/merge_ticketing_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
  80. data/lib/merge_ticketing_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
  81. data/lib/merge_ticketing_client/models/method_enum.rb +1 -1
  82. data/lib/merge_ticketing_client/models/operator_schema.rb +229 -0
  83. data/lib/merge_ticketing_client/models/paginated_collection_list.rb +240 -0
  84. data/lib/merge_ticketing_client/models/paginated_condition_schema_list.rb +240 -0
  85. data/lib/merge_ticketing_client/models/paginated_remote_field_class_list.rb +240 -0
  86. data/lib/merge_ticketing_client/models/patched_ticket_request.rb +57 -29
  87. data/lib/merge_ticketing_client/models/priority_enum.rb +1 -1
  88. data/lib/merge_ticketing_client/models/project.rb +16 -4
  89. data/lib/merge_ticketing_client/models/remote_data.rb +9 -7
  90. data/lib/merge_ticketing_client/models/remote_field.rb +231 -0
  91. data/lib/merge_ticketing_client/models/remote_field_class.rb +318 -0
  92. data/lib/merge_ticketing_client/models/remote_field_class_item_schema.rb +241 -0
  93. data/lib/merge_ticketing_client/models/request_format_enum.rb +1 -1
  94. data/lib/merge_ticketing_client/models/response_type_enum.rb +1 -1
  95. data/lib/merge_ticketing_client/models/selective_sync_configurations_usage_enum.rb +45 -0
  96. data/lib/merge_ticketing_client/models/sync_status.rb +13 -4
  97. data/lib/merge_ticketing_client/models/sync_status_status_enum.rb +1 -1
  98. data/lib/merge_ticketing_client/models/tag.rb +16 -4
  99. data/lib/merge_ticketing_client/models/team.rb +16 -4
  100. data/lib/merge_ticketing_client/models/ticket.rb +56 -7
  101. data/lib/merge_ticketing_client/models/ticket_request.rb +57 -40
  102. data/lib/merge_ticketing_client/models/ticket_status_enum.rb +1 -1
  103. data/lib/merge_ticketing_client/models/user.rb +16 -4
  104. data/lib/merge_ticketing_client/version.rb +1 -1
  105. data/lib/merge_ticketing_client.rb +21 -0
  106. data/spec/api/collections_api_spec.rb +76 -0
  107. data/spec/api/projects_api_spec.rb +3 -2
  108. data/spec/api/selective_sync_api_spec.rb +72 -0
  109. data/spec/api/tickets_api_spec.rb +24 -4
  110. data/spec/api/users_api_spec.rb +1 -0
  111. data/spec/models/account_spec.rb +6 -0
  112. data/spec/models/attachment_request_spec.rb +12 -0
  113. data/spec/models/attachment_spec.rb +6 -0
  114. data/spec/models/collection_spec.rb +82 -0
  115. data/spec/models/collection_type_enum_spec.rb +28 -0
  116. data/spec/models/comment_request_spec.rb +12 -0
  117. data/spec/models/comment_spec.rb +6 -0
  118. data/spec/models/condition_schema_spec.rb +70 -0
  119. data/spec/models/condition_type_enum_spec.rb +28 -0
  120. data/spec/models/contact_spec.rb +6 -0
  121. data/spec/models/issue_spec.rb +6 -0
  122. data/spec/models/linked_account_condition_request_spec.rb +46 -0
  123. data/spec/models/linked_account_condition_spec.rb +64 -0
  124. data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
  125. data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
  126. data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
  127. data/spec/models/operator_schema_spec.rb +40 -0
  128. data/spec/models/paginated_collection_list_spec.rb +46 -0
  129. data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
  130. data/spec/models/patched_ticket_request_spec.rb +24 -0
  131. data/spec/models/project_spec.rb +6 -0
  132. data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
  133. data/spec/models/sync_status_spec.rb +6 -0
  134. data/spec/models/tag_spec.rb +6 -0
  135. data/spec/models/team_spec.rb +6 -0
  136. data/spec/models/ticket_request_spec.rb +24 -0
  137. data/spec/models/ticket_spec.rb +18 -0
  138. data/spec/models/user_spec.rb +6 -0
  139. metadata +144 -72
@@ -0,0 +1,234 @@
1
+ =begin
2
+ #Merge Ticketing API
3
+
4
+ #The unified API for building rich integrations with multiple Ticketing platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MergeTicketingClient
16
+ class CollectionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Returns a list of `Collection` objects.
23
+ # @param x_account_token [String] Token identifying the end user.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :collection_type If provided, will only return collections of the given type.
26
+ # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
27
+ # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
28
+ # @option opts [String] :cursor The pagination cursor value.
29
+ # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
30
+ # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
31
+ # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
32
+ # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
33
+ # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
34
+ # @option opts [Integer] :page_size Number of results to return per page.
35
+ # @option opts [String] :parent_collection_id If provided, will only return collections whose parent collection matches the given id.
36
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
37
+ # @option opts [String] :remote_id The API provider's ID for the given object.
38
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
39
+ # @return [PaginatedCollectionList]
40
+ def collections_list(x_account_token, opts = {})
41
+ data, _status_code, _headers = collections_list_with_http_info(x_account_token, opts)
42
+ data
43
+ end
44
+
45
+ # Returns a list of `Collection` objects.
46
+ # @param x_account_token [String] Token identifying the end user.
47
+ # @param [Hash] opts the optional parameters
48
+ # @option opts [String] :collection_type If provided, will only return collections of the given type.
49
+ # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
50
+ # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
51
+ # @option opts [String] :cursor The pagination cursor value.
52
+ # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
53
+ # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
54
+ # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
55
+ # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
56
+ # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
57
+ # @option opts [Integer] :page_size Number of results to return per page.
58
+ # @option opts [String] :parent_collection_id If provided, will only return collections whose parent collection matches the given id.
59
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
60
+ # @option opts [String] :remote_id The API provider's ID for the given object.
61
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
62
+ # @return [Array<(PaginatedCollectionList, Integer, Hash)>] PaginatedCollectionList data, response status code and response headers
63
+ def collections_list_with_http_info(x_account_token, opts = {})
64
+ if @api_client.config.debugging
65
+ @api_client.config.logger.debug 'Calling API: CollectionsApi.collections_list ...'
66
+ end
67
+ # verify the required parameter 'x_account_token' is set
68
+ if @api_client.config.client_side_validation && x_account_token.nil?
69
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling CollectionsApi.collections_list"
70
+ end
71
+ allowable_values = ["LIST", "PROJECT"]
72
+ if @api_client.config.client_side_validation && opts[:'collection_type'] && !allowable_values.include?(opts[:'collection_type'])
73
+ fail ArgumentError, "invalid value for \"collection_type\", must be one of #{allowable_values}"
74
+ end
75
+ allowable_values = ["parent_collection"]
76
+ if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
77
+ fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
78
+ end
79
+ allowable_values = ["collection_type"]
80
+ if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
81
+ fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
82
+ end
83
+ allowable_values = ["collection_type"]
84
+ if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
85
+ fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
86
+ end
87
+ # resource path
88
+ local_var_path = '/collections'
89
+
90
+ # query parameters
91
+ query_params = opts[:query_params] || {}
92
+ query_params[:'collection_type'] = opts[:'collection_type'] if !opts[:'collection_type'].nil?
93
+ query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
94
+ query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
95
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
96
+ query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
97
+ query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
98
+ query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
99
+ query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
100
+ query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
101
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
102
+ query_params[:'parent_collection_id'] = opts[:'parent_collection_id'] if !opts[:'parent_collection_id'].nil?
103
+ query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
104
+ query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
105
+ query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
106
+
107
+ # header parameters
108
+ header_params = opts[:header_params] || {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+ header_params[:'X-Account-Token'] = x_account_token
112
+
113
+ # form parameters
114
+ form_params = opts[:form_params] || {}
115
+
116
+ # http body (model)
117
+ post_body = opts[:debug_body]
118
+
119
+ # return_type
120
+ return_type = opts[:debug_return_type] || 'PaginatedCollectionList'
121
+
122
+ # auth_names
123
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
124
+
125
+ new_options = opts.merge(
126
+ :operation => :"CollectionsApi.collections_list",
127
+ :header_params => header_params,
128
+ :query_params => query_params,
129
+ :form_params => form_params,
130
+ :body => post_body,
131
+ :auth_names => auth_names,
132
+ :return_type => return_type
133
+ )
134
+
135
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug "API called: CollectionsApi#collections_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
+ end
139
+ return data, status_code, headers
140
+ end
141
+
142
+ # Returns a `Collection` object with the given `id`.
143
+ # @param x_account_token [String] Token identifying the end user.
144
+ # @param id [String]
145
+ # @param [Hash] opts the optional parameters
146
+ # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
147
+ # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
148
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
149
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
150
+ # @return [Collection]
151
+ def collections_retrieve(x_account_token, id, opts = {})
152
+ data, _status_code, _headers = collections_retrieve_with_http_info(x_account_token, id, opts)
153
+ data
154
+ end
155
+
156
+ # Returns a &#x60;Collection&#x60; object with the given &#x60;id&#x60;.
157
+ # @param x_account_token [String] Token identifying the end user.
158
+ # @param id [String]
159
+ # @param [Hash] opts the optional parameters
160
+ # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
161
+ # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
162
+ # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
163
+ # @option opts [String] :show_enum_origins Which fields should be returned in non-normalized form.
164
+ # @return [Array<(Collection, Integer, Hash)>] Collection data, response status code and response headers
165
+ def collections_retrieve_with_http_info(x_account_token, id, opts = {})
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug 'Calling API: CollectionsApi.collections_retrieve ...'
168
+ end
169
+ # verify the required parameter 'x_account_token' is set
170
+ if @api_client.config.client_side_validation && x_account_token.nil?
171
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling CollectionsApi.collections_retrieve"
172
+ end
173
+ # verify the required parameter 'id' is set
174
+ if @api_client.config.client_side_validation && id.nil?
175
+ fail ArgumentError, "Missing the required parameter 'id' when calling CollectionsApi.collections_retrieve"
176
+ end
177
+ allowable_values = ["parent_collection"]
178
+ if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
179
+ fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
180
+ end
181
+ allowable_values = ["collection_type"]
182
+ if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
183
+ fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
184
+ end
185
+ allowable_values = ["collection_type"]
186
+ if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
187
+ fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
188
+ end
189
+ # resource path
190
+ local_var_path = '/collections/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
191
+
192
+ # query parameters
193
+ query_params = opts[:query_params] || {}
194
+ query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
195
+ query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
196
+ query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
197
+ query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
198
+
199
+ # header parameters
200
+ header_params = opts[:header_params] || {}
201
+ # HTTP header 'Accept' (if needed)
202
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
203
+ header_params[:'X-Account-Token'] = x_account_token
204
+
205
+ # form parameters
206
+ form_params = opts[:form_params] || {}
207
+
208
+ # http body (model)
209
+ post_body = opts[:debug_body]
210
+
211
+ # return_type
212
+ return_type = opts[:debug_return_type] || 'Collection'
213
+
214
+ # auth_names
215
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
216
+
217
+ new_options = opts.merge(
218
+ :operation => :"CollectionsApi.collections_retrieve",
219
+ :header_params => header_params,
220
+ :query_params => query_params,
221
+ :form_params => form_params,
222
+ :body => post_body,
223
+ :auth_names => auth_names,
224
+ :return_type => return_type
225
+ )
226
+
227
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "API called: CollectionsApi#collections_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ end
231
+ return data, status_code, headers
232
+ end
233
+ end
234
+ end
@@ -60,7 +60,7 @@ module MergeTicketingClient
60
60
  if @api_client.config.debugging
61
61
  @api_client.config.logger.debug 'Calling API: LinkedAccountsApi.linked_accounts_list ...'
62
62
  end
63
- allowable_values = ["accounting", "ats", "crm", "hris", "ticketing"]
63
+ allowable_values = ["accounting", "ats", "crm", "hris", "mktg", "ticketing"]
64
64
  if @api_client.config.client_side_validation && opts[:'category'] && !allowable_values.include?(opts[:'category'])
65
65
  fail ArgumentError, "invalid value for \"category\", must be one of #{allowable_values}"
66
66
  end
@@ -179,30 +179,32 @@ module MergeTicketingClient
179
179
  return data, status_code, headers
180
180
  end
181
181
 
182
- # Returns a `User` object with the given `id`.
182
+ # Returns a list of `User` objects.
183
183
  # @param x_account_token [String] Token identifying the end user.
184
- # @param id [String]
184
+ # @param parent_id [String]
185
185
  # @param [Hash] opts the optional parameters
186
186
  # @option opts [String] :cursor The pagination cursor value.
187
187
  # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
188
+ # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
188
189
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
189
190
  # @option opts [Integer] :page_size Number of results to return per page.
190
191
  # @return [PaginatedUserList]
191
- def projects_users_list(x_account_token, id, opts = {})
192
- data, _status_code, _headers = projects_users_list_with_http_info(x_account_token, id, opts)
192
+ def projects_users_list(x_account_token, parent_id, opts = {})
193
+ data, _status_code, _headers = projects_users_list_with_http_info(x_account_token, parent_id, opts)
193
194
  data
194
195
  end
195
196
 
196
- # Returns a &#x60;User&#x60; object with the given &#x60;id&#x60;.
197
+ # Returns a list of &#x60;User&#x60; objects.
197
198
  # @param x_account_token [String] Token identifying the end user.
198
- # @param id [String]
199
+ # @param parent_id [String]
199
200
  # @param [Hash] opts the optional parameters
200
201
  # @option opts [String] :cursor The pagination cursor value.
201
202
  # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
203
+ # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
202
204
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
203
205
  # @option opts [Integer] :page_size Number of results to return per page.
204
206
  # @return [Array<(PaginatedUserList, Integer, Hash)>] PaginatedUserList data, response status code and response headers
205
- def projects_users_list_with_http_info(x_account_token, id, opts = {})
207
+ def projects_users_list_with_http_info(x_account_token, parent_id, opts = {})
206
208
  if @api_client.config.debugging
207
209
  @api_client.config.logger.debug 'Calling API: ProjectsApi.projects_users_list ...'
208
210
  end
@@ -210,21 +212,22 @@ module MergeTicketingClient
210
212
  if @api_client.config.client_side_validation && x_account_token.nil?
211
213
  fail ArgumentError, "Missing the required parameter 'x_account_token' when calling ProjectsApi.projects_users_list"
212
214
  end
213
- # verify the required parameter 'id' is set
214
- if @api_client.config.client_side_validation && id.nil?
215
- fail ArgumentError, "Missing the required parameter 'id' when calling ProjectsApi.projects_users_list"
215
+ # verify the required parameter 'parent_id' is set
216
+ if @api_client.config.client_side_validation && parent_id.nil?
217
+ fail ArgumentError, "Missing the required parameter 'parent_id' when calling ProjectsApi.projects_users_list"
216
218
  end
217
219
  allowable_values = ["teams"]
218
220
  if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
219
221
  fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
220
222
  end
221
223
  # resource path
222
- local_var_path = '/projects/{id}/users'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
224
+ local_var_path = '/projects/{parent_id}/users'.sub('{' + 'parent_id' + '}', CGI.escape(parent_id.to_s))
223
225
 
224
226
  # query parameters
225
227
  query_params = opts[:query_params] || {}
226
228
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
227
229
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
230
+ query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
228
231
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
229
232
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
230
233
 
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #Merge Ticketing API
3
+
4
+ #The unified API for building rich integrations with multiple Ticketing platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MergeTicketingClient
16
+ class SelectiveSyncApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get a linked account's selective syncs.
23
+ # @param x_account_token [String] Token identifying the end user.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [Array<LinkedAccountSelectiveSyncConfiguration>]
26
+ def selective_sync_configurations_list(x_account_token, opts = {})
27
+ data, _status_code, _headers = selective_sync_configurations_list_with_http_info(x_account_token, opts)
28
+ data
29
+ end
30
+
31
+ # Get a linked account&#39;s selective syncs.
32
+ # @param x_account_token [String] Token identifying the end user.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(Array<LinkedAccountSelectiveSyncConfiguration>, Integer, Hash)>] Array<LinkedAccountSelectiveSyncConfiguration> data, response status code and response headers
35
+ def selective_sync_configurations_list_with_http_info(x_account_token, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: SelectiveSyncApi.selective_sync_configurations_list ...'
38
+ end
39
+ # verify the required parameter 'x_account_token' is set
40
+ if @api_client.config.client_side_validation && x_account_token.nil?
41
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling SelectiveSyncApi.selective_sync_configurations_list"
42
+ end
43
+ # resource path
44
+ local_var_path = '/selective-sync/configurations'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+ header_params[:'X-Account-Token'] = x_account_token
54
+
55
+ # form parameters
56
+ form_params = opts[:form_params] || {}
57
+
58
+ # http body (model)
59
+ post_body = opts[:debug_body]
60
+
61
+ # return_type
62
+ return_type = opts[:debug_return_type] || 'Array<LinkedAccountSelectiveSyncConfiguration>'
63
+
64
+ # auth_names
65
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
66
+
67
+ new_options = opts.merge(
68
+ :operation => :"SelectiveSyncApi.selective_sync_configurations_list",
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: SelectiveSyncApi#selective_sync_configurations_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # Replace a linked account's selective syncs.
85
+ # @param x_account_token [String] Token identifying the end user.
86
+ # @param linked_account_selective_sync_configuration_list_request [LinkedAccountSelectiveSyncConfigurationListRequest]
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [Array<LinkedAccountSelectiveSyncConfiguration>]
89
+ def selective_sync_configurations_update(x_account_token, linked_account_selective_sync_configuration_list_request, opts = {})
90
+ data, _status_code, _headers = selective_sync_configurations_update_with_http_info(x_account_token, linked_account_selective_sync_configuration_list_request, opts)
91
+ data
92
+ end
93
+
94
+ # Replace a linked account&#39;s selective syncs.
95
+ # @param x_account_token [String] Token identifying the end user.
96
+ # @param linked_account_selective_sync_configuration_list_request [LinkedAccountSelectiveSyncConfigurationListRequest]
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [Array<(Array<LinkedAccountSelectiveSyncConfiguration>, Integer, Hash)>] Array<LinkedAccountSelectiveSyncConfiguration> data, response status code and response headers
99
+ def selective_sync_configurations_update_with_http_info(x_account_token, linked_account_selective_sync_configuration_list_request, opts = {})
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug 'Calling API: SelectiveSyncApi.selective_sync_configurations_update ...'
102
+ end
103
+ # verify the required parameter 'x_account_token' is set
104
+ if @api_client.config.client_side_validation && x_account_token.nil?
105
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling SelectiveSyncApi.selective_sync_configurations_update"
106
+ end
107
+ # verify the required parameter 'linked_account_selective_sync_configuration_list_request' is set
108
+ if @api_client.config.client_side_validation && linked_account_selective_sync_configuration_list_request.nil?
109
+ fail ArgumentError, "Missing the required parameter 'linked_account_selective_sync_configuration_list_request' when calling SelectiveSyncApi.selective_sync_configurations_update"
110
+ end
111
+ # resource path
112
+ local_var_path = '/selective-sync/configurations'
113
+
114
+ # query parameters
115
+ query_params = opts[:query_params] || {}
116
+
117
+ # header parameters
118
+ header_params = opts[:header_params] || {}
119
+ # HTTP header 'Accept' (if needed)
120
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
+ # HTTP header 'Content-Type'
122
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
123
+ header_params[:'X-Account-Token'] = x_account_token
124
+
125
+ # form parameters
126
+ form_params = opts[:form_params] || {}
127
+
128
+ # http body (model)
129
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(linked_account_selective_sync_configuration_list_request)
130
+
131
+ # return_type
132
+ return_type = opts[:debug_return_type] || 'Array<LinkedAccountSelectiveSyncConfiguration>'
133
+
134
+ # auth_names
135
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
136
+
137
+ new_options = opts.merge(
138
+ :operation => :"SelectiveSyncApi.selective_sync_configurations_update",
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => return_type
145
+ )
146
+
147
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: SelectiveSyncApi#selective_sync_configurations_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
152
+ end
153
+
154
+ # Get metadata for the conditions available to a linked account.
155
+ # @param x_account_token [String] Token identifying the end user.
156
+ # @param [Hash] opts the optional parameters
157
+ # @option opts [String] :common_model
158
+ # @option opts [String] :cursor The pagination cursor value.
159
+ # @option opts [Integer] :page_size Number of results to return per page.
160
+ # @return [PaginatedConditionSchemaList]
161
+ def selective_sync_meta_list(x_account_token, opts = {})
162
+ data, _status_code, _headers = selective_sync_meta_list_with_http_info(x_account_token, opts)
163
+ data
164
+ end
165
+
166
+ # Get metadata for the conditions available to a linked account.
167
+ # @param x_account_token [String] Token identifying the end user.
168
+ # @param [Hash] opts the optional parameters
169
+ # @option opts [String] :common_model
170
+ # @option opts [String] :cursor The pagination cursor value.
171
+ # @option opts [Integer] :page_size Number of results to return per page.
172
+ # @return [Array<(PaginatedConditionSchemaList, Integer, Hash)>] PaginatedConditionSchemaList data, response status code and response headers
173
+ def selective_sync_meta_list_with_http_info(x_account_token, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: SelectiveSyncApi.selective_sync_meta_list ...'
176
+ end
177
+ # verify the required parameter 'x_account_token' is set
178
+ if @api_client.config.client_side_validation && x_account_token.nil?
179
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling SelectiveSyncApi.selective_sync_meta_list"
180
+ end
181
+ # resource path
182
+ local_var_path = '/selective-sync/meta'
183
+
184
+ # query parameters
185
+ query_params = opts[:query_params] || {}
186
+ query_params[:'common_model'] = opts[:'common_model'] if !opts[:'common_model'].nil?
187
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
188
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
189
+
190
+ # header parameters
191
+ header_params = opts[:header_params] || {}
192
+ # HTTP header 'Accept' (if needed)
193
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
194
+ header_params[:'X-Account-Token'] = x_account_token
195
+
196
+ # form parameters
197
+ form_params = opts[:form_params] || {}
198
+
199
+ # http body (model)
200
+ post_body = opts[:debug_body]
201
+
202
+ # return_type
203
+ return_type = opts[:debug_return_type] || 'PaginatedConditionSchemaList'
204
+
205
+ # auth_names
206
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
207
+
208
+ new_options = opts.merge(
209
+ :operation => :"SelectiveSyncApi.selective_sync_meta_list",
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names,
215
+ :return_type => return_type
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: SelectiveSyncApi#selective_sync_meta_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+ end
225
+ end