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
@@ -16,11 +16,10 @@ require 'time'
16
16
  module MergeTicketingClient
17
17
  # # The Comment Object ### Description The `Comment` object is used to represent a comment on a ticket. ### Usage Example TODO
18
18
  class CommentRequest
19
- # The third-party API ID of the matching object.
20
- attr_accessor :remote_id
21
-
19
+ # The author of the Comment, if the author is a User.
22
20
  attr_accessor :user
23
21
 
22
+ # The author of the Comment, if the author is a Contact.
24
23
  attr_accessor :contact
25
24
 
26
25
  # The comment's text body.
@@ -29,25 +28,27 @@ module MergeTicketingClient
29
28
  # The comment's text body formatted as html.
30
29
  attr_accessor :html_body
31
30
 
31
+ # The ticket associated with the comment.
32
32
  attr_accessor :ticket
33
33
 
34
34
  # Whether or not the comment is internal.
35
35
  attr_accessor :is_private
36
36
 
37
- # When the third party's comment was created.
38
- attr_accessor :remote_created_at
37
+ attr_accessor :integration_params
38
+
39
+ attr_accessor :linked_account_params
39
40
 
40
41
  # Attribute mapping from ruby-style variable name to JSON key.
41
42
  def self.attribute_map
42
43
  {
43
- :'remote_id' => :'remote_id',
44
44
  :'user' => :'user',
45
45
  :'contact' => :'contact',
46
46
  :'body' => :'body',
47
47
  :'html_body' => :'html_body',
48
48
  :'ticket' => :'ticket',
49
49
  :'is_private' => :'is_private',
50
- :'remote_created_at' => :'remote_created_at'
50
+ :'integration_params' => :'integration_params',
51
+ :'linked_account_params' => :'linked_account_params'
51
52
  }
52
53
  end
53
54
 
@@ -59,28 +60,28 @@ module MergeTicketingClient
59
60
  # Attribute type mapping.
60
61
  def self.openapi_types
61
62
  {
62
- :'remote_id' => :'String',
63
63
  :'user' => :'String',
64
64
  :'contact' => :'String',
65
65
  :'body' => :'String',
66
66
  :'html_body' => :'String',
67
67
  :'ticket' => :'String',
68
68
  :'is_private' => :'Boolean',
69
- :'remote_created_at' => :'Time'
69
+ :'integration_params' => :'Hash<String, Object>',
70
+ :'linked_account_params' => :'Hash<String, Object>'
70
71
  }
71
72
  end
72
73
 
73
74
  # List of attributes with nullable: true
74
75
  def self.openapi_nullable
75
76
  Set.new([
76
- :'remote_id',
77
77
  :'user',
78
78
  :'contact',
79
79
  :'body',
80
80
  :'html_body',
81
81
  :'ticket',
82
82
  :'is_private',
83
- :'remote_created_at'
83
+ :'integration_params',
84
+ :'linked_account_params'
84
85
  ])
85
86
  end
86
87
 
@@ -99,10 +100,6 @@ module MergeTicketingClient
99
100
  h[k.to_sym] = v
100
101
  }
101
102
 
102
- if attributes.key?(:'remote_id')
103
- self.remote_id = attributes[:'remote_id']
104
- end
105
-
106
103
  if attributes.key?(:'user')
107
104
  self.user = attributes[:'user']
108
105
  end
@@ -127,8 +124,16 @@ module MergeTicketingClient
127
124
  self.is_private = attributes[:'is_private']
128
125
  end
129
126
 
130
- if attributes.key?(:'remote_created_at')
131
- self.remote_created_at = attributes[:'remote_created_at']
127
+ if attributes.key?(:'integration_params')
128
+ if (value = attributes[:'integration_params']).is_a?(Hash)
129
+ self.integration_params = value
130
+ end
131
+ end
132
+
133
+ if attributes.key?(:'linked_account_params')
134
+ if (value = attributes[:'linked_account_params']).is_a?(Hash)
135
+ self.linked_account_params = value
136
+ end
132
137
  end
133
138
  end
134
139
 
@@ -150,14 +155,14 @@ module MergeTicketingClient
150
155
  def ==(o)
151
156
  return true if self.equal?(o)
152
157
  self.class == o.class &&
153
- remote_id == o.remote_id &&
154
158
  user == o.user &&
155
159
  contact == o.contact &&
156
160
  body == o.body &&
157
161
  html_body == o.html_body &&
158
162
  ticket == o.ticket &&
159
163
  is_private == o.is_private &&
160
- remote_created_at == o.remote_created_at
164
+ integration_params == o.integration_params &&
165
+ linked_account_params == o.linked_account_params
161
166
  end
162
167
 
163
168
  # @see the `==` method
@@ -169,7 +174,7 @@ module MergeTicketingClient
169
174
  # Calculates hash code according to all attributes.
170
175
  # @return [Integer] Hash code
171
176
  def hash
172
- [remote_id, user, contact, body, html_body, ticket, is_private, remote_created_at].hash
177
+ [user, contact, body, html_body, ticket, is_private, integration_params, linked_account_params].hash
173
178
  end
174
179
 
175
180
  # Builds the object from hash
@@ -0,0 +1,297 @@
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 'date'
14
+ require 'time'
15
+
16
+ module MergeTicketingClient
17
+ class ConditionSchema
18
+ # The ID of the condition schema. This ID is used when updating selective syncs for a linked account.
19
+ attr_accessor :id
20
+
21
+ # The common model for which a condition schema is defined.
22
+ attr_accessor :common_model
23
+
24
+ # User-facing *native condition* name. e.g. \"Skip Manager\".
25
+ attr_accessor :native_name
26
+
27
+ # The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. \"location_type\".
28
+ attr_accessor :field_name
29
+
30
+ # Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times.
31
+ attr_accessor :is_unique
32
+
33
+ attr_accessor :condition_type
34
+
35
+ # The schemas for the operators that can be used on a condition.
36
+ attr_accessor :operators
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'id' => :'id',
42
+ :'common_model' => :'common_model',
43
+ :'native_name' => :'native_name',
44
+ :'field_name' => :'field_name',
45
+ :'is_unique' => :'is_unique',
46
+ :'condition_type' => :'condition_type',
47
+ :'operators' => :'operators'
48
+ }
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'id' => :'String',
60
+ :'common_model' => :'String',
61
+ :'native_name' => :'String',
62
+ :'field_name' => :'String',
63
+ :'is_unique' => :'Boolean',
64
+ :'condition_type' => :'ConditionTypeEnum',
65
+ :'operators' => :'Array<OperatorSchema>'
66
+ }
67
+ end
68
+
69
+ # List of attributes with nullable: true
70
+ def self.openapi_nullable
71
+ Set.new([
72
+ :'native_name',
73
+ :'field_name',
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeTicketingClient::ConditionSchema` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!self.class.attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeTicketingClient::ConditionSchema`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'id')
93
+ self.id = attributes[:'id']
94
+ end
95
+
96
+ if attributes.key?(:'common_model')
97
+ self.common_model = attributes[:'common_model']
98
+ end
99
+
100
+ if attributes.key?(:'native_name')
101
+ self.native_name = attributes[:'native_name']
102
+ end
103
+
104
+ if attributes.key?(:'field_name')
105
+ self.field_name = attributes[:'field_name']
106
+ end
107
+
108
+ if attributes.key?(:'is_unique')
109
+ self.is_unique = attributes[:'is_unique']
110
+ end
111
+
112
+ if attributes.key?(:'condition_type')
113
+ self.condition_type = attributes[:'condition_type']
114
+ end
115
+
116
+ if attributes.key?(:'operators')
117
+ if (value = attributes[:'operators']).is_a?(Array)
118
+ self.operators = value
119
+ end
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ invalid_properties = Array.new
127
+ if @id.nil?
128
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
129
+ end
130
+
131
+ if @condition_type.nil?
132
+ invalid_properties.push('invalid value for "condition_type", condition_type cannot be nil.')
133
+ end
134
+
135
+ if @operators.nil?
136
+ invalid_properties.push('invalid value for "operators", operators cannot be nil.')
137
+ end
138
+
139
+ invalid_properties
140
+ end
141
+
142
+ # Check to see if the all the properties in the model are valid
143
+ # @return true if the model is valid
144
+ def valid?
145
+ return false if @id.nil?
146
+ return false if @condition_type.nil?
147
+ return false if @operators.nil?
148
+ true
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ id == o.id &&
157
+ common_model == o.common_model &&
158
+ native_name == o.native_name &&
159
+ field_name == o.field_name &&
160
+ is_unique == o.is_unique &&
161
+ condition_type == o.condition_type &&
162
+ operators == o.operators
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [id, common_model, native_name, field_name, is_unique, condition_type, operators].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ new.build_from_hash(attributes)
182
+ end
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ self.class.openapi_types.each_pair do |key, type|
190
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
191
+ self.send("#{key}=", nil)
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
196
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
197
+ end
198
+ elsif !attributes[self.class.attribute_map[key]].nil?
199
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
200
+ end
201
+ end
202
+
203
+ self
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def _deserialize(type, value)
211
+ case type.to_sym
212
+ when :Time
213
+ Time.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :Boolean
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ # models (e.g. Pet) or oneOf
244
+ klass = MergeTicketingClient.const_get(type)
245
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
+ end
247
+ end
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # to_body is an alias to to_hash (backward compatibility)
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_body
258
+ to_hash
259
+ end
260
+
261
+ # Returns the object in the form of hash
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_hash
264
+ hash = {}
265
+ self.class.attribute_map.each_pair do |attr, param|
266
+ value = self.send(attr)
267
+ if value.nil?
268
+ is_nullable = self.class.openapi_nullable.include?(attr)
269
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
270
+ end
271
+
272
+ hash[param] = _to_hash(value)
273
+ end
274
+ hash
275
+ end
276
+
277
+ # Outputs non-array value in the form of hash
278
+ # For object, use to_hash. Otherwise, just return the value
279
+ # @param [Object] value Any valid value
280
+ # @return [Hash] Returns the value in the form of hash
281
+ def _to_hash(value)
282
+ if value.is_a?(Array)
283
+ value.compact.map { |v| _to_hash(v) }
284
+ elsif value.is_a?(Hash)
285
+ {}.tap do |hash|
286
+ value.each { |k, v| hash[k] = _to_hash(v) }
287
+ end
288
+ elsif value.respond_to? :to_hash
289
+ value.to_hash
290
+ else
291
+ value
292
+ end
293
+ end
294
+
295
+ end
296
+
297
+ end
@@ -0,0 +1,50 @@
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 'date'
14
+ require 'time'
15
+
16
+ module MergeTicketingClient
17
+ class ConditionTypeEnum
18
+ BOOLEAN = "BOOLEAN".freeze
19
+ DATE = "DATE".freeze
20
+ DATE_TIME = "DATE_TIME".freeze
21
+ INTEGER = "INTEGER".freeze
22
+ FLOAT = "FLOAT".freeze
23
+ STRING = "STRING".freeze
24
+ LIST_OF_STRINGS = "LIST_OF_STRINGS".freeze
25
+
26
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
27
+
28
+ attr_accessor :value
29
+ attr_accessor :raw_value
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def build_from_hash(value)
35
+ @raw_value = value
36
+ if ["BOOLEAN", "DATE", "DATE_TIME", "INTEGER", "FLOAT", "STRING", "LIST_OF_STRINGS", ].include? value
37
+ @value = value
38
+ else
39
+ @value = MERGE_NONSTANDARD_VALUE
40
+ end
41
+
42
+ self
43
+ end
44
+
45
+ def self.build_from_hash(value)
46
+ ConditionTypeEnum.new.build_from_hash(value)
47
+ end
48
+ end
49
+
50
+ end
@@ -41,6 +41,8 @@ module MergeTicketingClient
41
41
  # Indicates whether or not this object has been deleted by third party webhooks.
42
42
  attr_accessor :remote_was_deleted
43
43
 
44
+ attr_accessor :field_mappings
45
+
44
46
  # Attribute mapping from ruby-style variable name to JSON key.
45
47
  def self.attribute_map
46
48
  {
@@ -52,7 +54,8 @@ module MergeTicketingClient
52
54
  :'details' => :'details',
53
55
  :'account' => :'account',
54
56
  :'remote_data' => :'remote_data',
55
- :'remote_was_deleted' => :'remote_was_deleted'
57
+ :'remote_was_deleted' => :'remote_was_deleted',
58
+ :'field_mappings' => :'field_mappings'
56
59
  }
57
60
  end
58
61
 
@@ -72,7 +75,8 @@ module MergeTicketingClient
72
75
  :'details' => :'String',
73
76
  :'account' => :'String',
74
77
  :'remote_data' => :'Array<RemoteData>',
75
- :'remote_was_deleted' => :'Boolean'
78
+ :'remote_was_deleted' => :'Boolean',
79
+ :'field_mappings' => :'Hash<String, Object>'
76
80
  }
77
81
  end
78
82
 
@@ -86,6 +90,7 @@ module MergeTicketingClient
86
90
  :'details',
87
91
  :'account',
88
92
  :'remote_data',
93
+ :'field_mappings'
89
94
  ])
90
95
  end
91
96
 
@@ -141,6 +146,12 @@ module MergeTicketingClient
141
146
  if attributes.key?(:'remote_was_deleted')
142
147
  self.remote_was_deleted = attributes[:'remote_was_deleted']
143
148
  end
149
+
150
+ if attributes.key?(:'field_mappings')
151
+ if (value = attributes[:'field_mappings']).is_a?(Hash)
152
+ self.field_mappings = value
153
+ end
154
+ end
144
155
  end
145
156
 
146
157
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -169,7 +180,8 @@ module MergeTicketingClient
169
180
  details == o.details &&
170
181
  account == o.account &&
171
182
  remote_data == o.remote_data &&
172
- remote_was_deleted == o.remote_was_deleted
183
+ remote_was_deleted == o.remote_was_deleted &&
184
+ field_mappings == o.field_mappings
173
185
  end
174
186
 
175
187
  # @see the `==` method
@@ -181,7 +193,7 @@ module MergeTicketingClient
181
193
  # Calculates hash code according to all attributes.
182
194
  # @return [Integer] Hash code
183
195
  def hash
184
- [id, remote_id, name, email_address, phone_number, details, account, remote_data, remote_was_deleted].hash
196
+ [id, remote_id, name, email_address, phone_number, details, account, remote_data, remote_was_deleted, field_mappings].hash
185
197
  end
186
198
 
187
199
  # Builds the object from hash
@@ -32,6 +32,7 @@ module MergeTicketingClient
32
32
 
33
33
  attr_accessor :request_format
34
34
 
35
+ # Optional. If true, the response will always be an object of the form `{\"type\": T, \"value\": ...}` where `T` will be one of `string, boolean, number, null, array, object`.
35
36
  attr_accessor :normalize_response
36
37
 
37
38
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -39,7 +39,7 @@ module MergeTicketingClient
39
39
  end
40
40
 
41
41
  def self.build_from_hash(value)
42
- IssueStatusEnum.new.build_from_hash(value)
42
+ EncodingEnum.new.build_from_hash(value)
43
43
  end
44
44
  end
45
45
 
@@ -15,13 +15,13 @@ require 'time'
15
15
 
16
16
  module MergeTicketingClient
17
17
  class EndUserDetailsRequest
18
- # Your end user's email address.
18
+ # Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.
19
19
  attr_accessor :end_user_email_address
20
20
 
21
21
  # Your end user's organization.
22
22
  attr_accessor :end_user_organization_name
23
23
 
24
- # Unique ID for your end user.
24
+ # This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers.
25
25
  attr_accessor :end_user_origin_id
26
26
 
27
27
  # The integration categories to show in Merge Link.
@@ -0,0 +1,49 @@
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 'date'
14
+ require 'time'
15
+
16
+ module MergeTicketingClient
17
+ class FieldFormatEnum
18
+ STRING = "string".freeze
19
+ NUMBER = "number".freeze
20
+ DATE = "date".freeze
21
+ DATETIME = "datetime".freeze
22
+ BOOL = "bool".freeze
23
+ LIST = "list".freeze
24
+
25
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
26
+
27
+ attr_accessor :value
28
+ attr_accessor :raw_value
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ @raw_value = value
35
+ if ["string", "number", "date", "datetime", "bool", "list", ].include? value
36
+ @value = value
37
+ else
38
+ @value = MERGE_NONSTANDARD_VALUE
39
+ end
40
+
41
+ self
42
+ end
43
+
44
+ def self.build_from_hash(value)
45
+ FieldFormatEnum.new.build_from_hash(value)
46
+ end
47
+ end
48
+
49
+ end
@@ -0,0 +1,49 @@
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 'date'
14
+ require 'time'
15
+
16
+ module MergeTicketingClient
17
+ class FieldTypeEnum
18
+ STRING = "string".freeze
19
+ NUMBER = "number".freeze
20
+ DATE = "date".freeze
21
+ DATETIME = "datetime".freeze
22
+ BOOL = "bool".freeze
23
+ LIST = "list".freeze
24
+
25
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
26
+
27
+ attr_accessor :value
28
+ attr_accessor :raw_value
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ @raw_value = value
35
+ if ["string", "number", "date", "datetime", "bool", "list", ].include? value
36
+ @value = value
37
+ else
38
+ @value = MERGE_NONSTANDARD_VALUE
39
+ end
40
+
41
+ self
42
+ end
43
+
44
+ def self.build_from_hash(value)
45
+ FieldTypeEnum.new.build_from_hash(value)
46
+ end
47
+ end
48
+
49
+ end