merge_ticketing_client 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -6
- data/docs/Account.md +3 -1
- data/docs/AccountIntegration.md +1 -1
- data/docs/Attachment.md +5 -3
- data/docs/AttachmentRequest.md +7 -3
- data/docs/Collection.md +34 -0
- data/docs/CollectionTypeEnum.md +15 -0
- data/docs/CollectionsApi.md +193 -0
- data/docs/Comment.md +6 -4
- data/docs/CommentRequest.md +8 -4
- data/docs/ConditionSchema.md +30 -0
- data/docs/ConditionTypeEnum.md +15 -0
- data/docs/Contact.md +3 -1
- data/docs/DataPassthroughRequest.md +1 -1
- data/docs/EndUserDetailsRequest.md +2 -2
- data/docs/Issue.md +9 -7
- data/docs/LinkToken.md +1 -1
- data/docs/LinkedAccountCondition.md +28 -0
- data/docs/LinkedAccountConditionRequest.md +22 -0
- data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
- data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
- data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
- data/docs/OperatorSchema.md +20 -0
- data/docs/PaginatedCollectionList.md +22 -0
- data/docs/PaginatedConditionSchemaList.md +22 -0
- data/docs/PatchedTicketRequest.md +15 -7
- data/docs/Project.md +3 -1
- data/docs/ProjectsApi.md +10 -8
- data/docs/SelectiveSyncApi.md +233 -0
- data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
- data/docs/SyncStatus.md +5 -3
- data/docs/Tag.md +3 -1
- data/docs/Team.md +3 -1
- data/docs/Ticket.md +13 -7
- data/docs/TicketRequest.md +15 -7
- data/docs/TicketsApi.md +53 -13
- data/docs/User.md +3 -1
- data/docs/UsersApi.md +2 -0
- data/lib/merge_ticketing_client/api/collections_api.rb +234 -0
- data/lib/merge_ticketing_client/api/linked_accounts_api.rb +1 -1
- data/lib/merge_ticketing_client/api/projects_api.rb +14 -11
- data/lib/merge_ticketing_client/api/selective_sync_api.rb +225 -0
- data/lib/merge_ticketing_client/api/tickets_api.rb +94 -19
- data/lib/merge_ticketing_client/api/users_api.rb +3 -0
- data/lib/merge_ticketing_client/models/account.rb +16 -4
- data/lib/merge_ticketing_client/models/account_details_and_actions_status_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/account_integration.rb +1 -1
- data/lib/merge_ticketing_client/models/attachment.rb +18 -4
- data/lib/merge_ticketing_client/models/attachment_request.rb +31 -5
- data/lib/merge_ticketing_client/models/categories_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/category_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/collection.rb +308 -0
- data/lib/merge_ticketing_client/models/collection_type_enum.rb +45 -0
- data/lib/merge_ticketing_client/models/comment.rb +19 -4
- data/lib/merge_ticketing_client/models/comment_request.rb +32 -5
- data/lib/merge_ticketing_client/models/condition_schema.rb +297 -0
- data/lib/merge_ticketing_client/models/condition_type_enum.rb +50 -0
- data/lib/merge_ticketing_client/models/contact.rb +16 -4
- data/lib/merge_ticketing_client/models/data_passthrough_request.rb +1 -0
- data/lib/merge_ticketing_client/models/encoding_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/end_user_details_request.rb +2 -2
- data/lib/merge_ticketing_client/models/issue.rb +15 -4
- data/lib/merge_ticketing_client/models/link_token.rb +0 -5
- data/lib/merge_ticketing_client/models/linked_account_condition.rb +282 -0
- data/lib/merge_ticketing_client/models/linked_account_condition_request.rb +269 -0
- data/lib/merge_ticketing_client/models/linked_account_selective_sync_configuration.rb +221 -0
- data/lib/merge_ticketing_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
- data/lib/merge_ticketing_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
- data/lib/merge_ticketing_client/models/method_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/operator_schema.rb +229 -0
- data/lib/merge_ticketing_client/models/paginated_collection_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_condition_schema_list.rb +240 -0
- data/lib/merge_ticketing_client/models/patched_ticket_request.rb +57 -7
- data/lib/merge_ticketing_client/models/priority_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/project.rb +16 -4
- data/lib/merge_ticketing_client/models/request_format_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/response_type_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/selective_sync_configurations_usage_enum.rb +45 -0
- data/lib/merge_ticketing_client/models/sync_status.rb +13 -4
- data/lib/merge_ticketing_client/models/sync_status_status_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/tag.rb +16 -4
- data/lib/merge_ticketing_client/models/team.rb +16 -4
- data/lib/merge_ticketing_client/models/ticket.rb +45 -7
- data/lib/merge_ticketing_client/models/ticket_request.rb +57 -7
- data/lib/merge_ticketing_client/models/ticket_status_enum.rb +1 -1
- data/lib/merge_ticketing_client/models/user.rb +16 -4
- data/lib/merge_ticketing_client/version.rb +1 -1
- data/lib/merge_ticketing_client.rb +15 -0
- data/spec/api/collections_api_spec.rb +76 -0
- data/spec/api/projects_api_spec.rb +3 -2
- data/spec/api/selective_sync_api_spec.rb +72 -0
- data/spec/api/tickets_api_spec.rb +24 -4
- data/spec/api/users_api_spec.rb +1 -0
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/attachment_request_spec.rb +12 -0
- data/spec/models/attachment_spec.rb +6 -0
- data/spec/models/collection_spec.rb +82 -0
- data/spec/models/collection_type_enum_spec.rb +28 -0
- data/spec/models/comment_request_spec.rb +12 -0
- data/spec/models/comment_spec.rb +6 -0
- data/spec/models/condition_schema_spec.rb +70 -0
- data/spec/models/condition_type_enum_spec.rb +28 -0
- data/spec/models/contact_spec.rb +6 -0
- data/spec/models/issue_spec.rb +6 -0
- data/spec/models/linked_account_condition_request_spec.rb +46 -0
- data/spec/models/linked_account_condition_spec.rb +64 -0
- data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
- data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
- data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
- data/spec/models/operator_schema_spec.rb +40 -0
- data/spec/models/paginated_collection_list_spec.rb +46 -0
- data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
- data/spec/models/patched_ticket_request_spec.rb +24 -0
- data/spec/models/project_spec.rb +6 -0
- data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
- data/spec/models/sync_status_spec.rb +6 -0
- data/spec/models/tag_spec.rb +6 -0
- data/spec/models/team_spec.rb +6 -0
- data/spec/models/ticket_request_spec.rb +24 -0
- data/spec/models/ticket_spec.rb +18 -0
- data/spec/models/user_spec.rb +6 -0
- metadata +132 -72
@@ -21,8 +21,10 @@ module MergeTicketingClient
|
|
21
21
|
# The third-party API ID of the matching object.
|
22
22
|
attr_accessor :remote_id
|
23
23
|
|
24
|
+
# The author of the Comment, if the author is a User.
|
24
25
|
attr_accessor :user
|
25
26
|
|
27
|
+
# The author of the Comment, if the author is a Contact.
|
26
28
|
attr_accessor :contact
|
27
29
|
|
28
30
|
# The comment's text body.
|
@@ -31,6 +33,7 @@ module MergeTicketingClient
|
|
31
33
|
# The comment's text body formatted as html.
|
32
34
|
attr_accessor :html_body
|
33
35
|
|
36
|
+
# The ticket associated with the comment.
|
34
37
|
attr_accessor :ticket
|
35
38
|
|
36
39
|
# Whether or not the comment is internal.
|
@@ -43,6 +46,8 @@ module MergeTicketingClient
|
|
43
46
|
|
44
47
|
attr_accessor :remote_was_deleted
|
45
48
|
|
49
|
+
attr_accessor :field_mappings
|
50
|
+
|
46
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
47
52
|
def self.attribute_map
|
48
53
|
{
|
@@ -56,7 +61,8 @@ module MergeTicketingClient
|
|
56
61
|
:'is_private' => :'is_private',
|
57
62
|
:'remote_created_at' => :'remote_created_at',
|
58
63
|
:'remote_data' => :'remote_data',
|
59
|
-
:'remote_was_deleted' => :'remote_was_deleted'
|
64
|
+
:'remote_was_deleted' => :'remote_was_deleted',
|
65
|
+
:'field_mappings' => :'field_mappings'
|
60
66
|
}
|
61
67
|
end
|
62
68
|
|
@@ -78,7 +84,8 @@ module MergeTicketingClient
|
|
78
84
|
:'is_private' => :'Boolean',
|
79
85
|
:'remote_created_at' => :'Time',
|
80
86
|
:'remote_data' => :'Array<RemoteData>',
|
81
|
-
:'remote_was_deleted' => :'Boolean'
|
87
|
+
:'remote_was_deleted' => :'Boolean',
|
88
|
+
:'field_mappings' => :'Hash<String, Object>'
|
82
89
|
}
|
83
90
|
end
|
84
91
|
|
@@ -94,6 +101,7 @@ module MergeTicketingClient
|
|
94
101
|
:'is_private',
|
95
102
|
:'remote_created_at',
|
96
103
|
:'remote_data',
|
104
|
+
:'field_mappings'
|
97
105
|
])
|
98
106
|
end
|
99
107
|
|
@@ -157,6 +165,12 @@ module MergeTicketingClient
|
|
157
165
|
if attributes.key?(:'remote_was_deleted')
|
158
166
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
159
167
|
end
|
168
|
+
|
169
|
+
if attributes.key?(:'field_mappings')
|
170
|
+
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
171
|
+
self.field_mappings = value
|
172
|
+
end
|
173
|
+
end
|
160
174
|
end
|
161
175
|
|
162
176
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -187,7 +201,8 @@ module MergeTicketingClient
|
|
187
201
|
is_private == o.is_private &&
|
188
202
|
remote_created_at == o.remote_created_at &&
|
189
203
|
remote_data == o.remote_data &&
|
190
|
-
remote_was_deleted == o.remote_was_deleted
|
204
|
+
remote_was_deleted == o.remote_was_deleted &&
|
205
|
+
field_mappings == o.field_mappings
|
191
206
|
end
|
192
207
|
|
193
208
|
# @see the `==` method
|
@@ -199,7 +214,7 @@ module MergeTicketingClient
|
|
199
214
|
# Calculates hash code according to all attributes.
|
200
215
|
# @return [Integer] Hash code
|
201
216
|
def hash
|
202
|
-
[id, remote_id, user, contact, body, html_body, ticket, is_private, remote_created_at, remote_data, remote_was_deleted].hash
|
217
|
+
[id, remote_id, user, contact, body, html_body, ticket, is_private, remote_created_at, remote_data, remote_was_deleted, field_mappings].hash
|
203
218
|
end
|
204
219
|
|
205
220
|
# Builds the object from hash
|
@@ -19,8 +19,10 @@ module MergeTicketingClient
|
|
19
19
|
# The third-party API ID of the matching object.
|
20
20
|
attr_accessor :remote_id
|
21
21
|
|
22
|
+
# The author of the Comment, if the author is a User.
|
22
23
|
attr_accessor :user
|
23
24
|
|
25
|
+
# The author of the Comment, if the author is a Contact.
|
24
26
|
attr_accessor :contact
|
25
27
|
|
26
28
|
# The comment's text body.
|
@@ -29,6 +31,7 @@ module MergeTicketingClient
|
|
29
31
|
# The comment's text body formatted as html.
|
30
32
|
attr_accessor :html_body
|
31
33
|
|
34
|
+
# The ticket associated with the comment.
|
32
35
|
attr_accessor :ticket
|
33
36
|
|
34
37
|
# Whether or not the comment is internal.
|
@@ -37,6 +40,10 @@ module MergeTicketingClient
|
|
37
40
|
# When the third party's comment was created.
|
38
41
|
attr_accessor :remote_created_at
|
39
42
|
|
43
|
+
attr_accessor :integration_params
|
44
|
+
|
45
|
+
attr_accessor :linked_account_params
|
46
|
+
|
40
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
48
|
def self.attribute_map
|
42
49
|
{
|
@@ -47,7 +54,9 @@ module MergeTicketingClient
|
|
47
54
|
:'html_body' => :'html_body',
|
48
55
|
:'ticket' => :'ticket',
|
49
56
|
:'is_private' => :'is_private',
|
50
|
-
:'remote_created_at' => :'remote_created_at'
|
57
|
+
:'remote_created_at' => :'remote_created_at',
|
58
|
+
:'integration_params' => :'integration_params',
|
59
|
+
:'linked_account_params' => :'linked_account_params'
|
51
60
|
}
|
52
61
|
end
|
53
62
|
|
@@ -66,7 +75,9 @@ module MergeTicketingClient
|
|
66
75
|
:'html_body' => :'String',
|
67
76
|
:'ticket' => :'String',
|
68
77
|
:'is_private' => :'Boolean',
|
69
|
-
:'remote_created_at' => :'Time'
|
78
|
+
:'remote_created_at' => :'Time',
|
79
|
+
:'integration_params' => :'Hash<String, Object>',
|
80
|
+
:'linked_account_params' => :'Hash<String, Object>'
|
70
81
|
}
|
71
82
|
end
|
72
83
|
|
@@ -80,7 +91,9 @@ module MergeTicketingClient
|
|
80
91
|
:'html_body',
|
81
92
|
:'ticket',
|
82
93
|
:'is_private',
|
83
|
-
:'remote_created_at'
|
94
|
+
:'remote_created_at',
|
95
|
+
:'integration_params',
|
96
|
+
:'linked_account_params'
|
84
97
|
])
|
85
98
|
end
|
86
99
|
|
@@ -130,6 +143,18 @@ module MergeTicketingClient
|
|
130
143
|
if attributes.key?(:'remote_created_at')
|
131
144
|
self.remote_created_at = attributes[:'remote_created_at']
|
132
145
|
end
|
146
|
+
|
147
|
+
if attributes.key?(:'integration_params')
|
148
|
+
if (value = attributes[:'integration_params']).is_a?(Hash)
|
149
|
+
self.integration_params = value
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.key?(:'linked_account_params')
|
154
|
+
if (value = attributes[:'linked_account_params']).is_a?(Hash)
|
155
|
+
self.linked_account_params = value
|
156
|
+
end
|
157
|
+
end
|
133
158
|
end
|
134
159
|
|
135
160
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -157,7 +182,9 @@ module MergeTicketingClient
|
|
157
182
|
html_body == o.html_body &&
|
158
183
|
ticket == o.ticket &&
|
159
184
|
is_private == o.is_private &&
|
160
|
-
remote_created_at == o.remote_created_at
|
185
|
+
remote_created_at == o.remote_created_at &&
|
186
|
+
integration_params == o.integration_params &&
|
187
|
+
linked_account_params == o.linked_account_params
|
161
188
|
end
|
162
189
|
|
163
190
|
# @see the `==` method
|
@@ -169,7 +196,7 @@ module MergeTicketingClient
|
|
169
196
|
# Calculates hash code according to all attributes.
|
170
197
|
# @return [Integer] Hash code
|
171
198
|
def hash
|
172
|
-
[remote_id, user, contact, body, html_body, ticket, is_private, remote_created_at].hash
|
199
|
+
[remote_id, user, contact, body, html_body, ticket, is_private, remote_created_at, integration_params, linked_account_params].hash
|
173
200
|
end
|
174
201
|
|
175
202
|
# 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.
|
@@ -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
|
-
#
|
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.
|
@@ -29,6 +29,8 @@ module MergeTicketingClient
|
|
29
29
|
|
30
30
|
attr_accessor :is_muted
|
31
31
|
|
32
|
+
attr_accessor :error_details
|
33
|
+
|
32
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
35
|
def self.attribute_map
|
34
36
|
{
|
@@ -38,7 +40,8 @@ module MergeTicketingClient
|
|
38
40
|
:'end_user' => :'end_user',
|
39
41
|
:'first_incident_time' => :'first_incident_time',
|
40
42
|
:'last_incident_time' => :'last_incident_time',
|
41
|
-
:'is_muted' => :'is_muted'
|
43
|
+
:'is_muted' => :'is_muted',
|
44
|
+
:'error_details' => :'error_details'
|
42
45
|
}
|
43
46
|
end
|
44
47
|
|
@@ -56,7 +59,8 @@ module MergeTicketingClient
|
|
56
59
|
:'end_user' => :'Hash<String, Object>',
|
57
60
|
:'first_incident_time' => :'Time',
|
58
61
|
:'last_incident_time' => :'Time',
|
59
|
-
:'is_muted' => :'Boolean'
|
62
|
+
:'is_muted' => :'Boolean',
|
63
|
+
:'error_details' => :'Hash<String, Object>'
|
60
64
|
}
|
61
65
|
end
|
62
66
|
|
@@ -112,6 +116,12 @@ module MergeTicketingClient
|
|
112
116
|
if attributes.key?(:'is_muted')
|
113
117
|
self.is_muted = attributes[:'is_muted']
|
114
118
|
end
|
119
|
+
|
120
|
+
if attributes.key?(:'error_details')
|
121
|
+
if (value = attributes[:'error_details']).is_a?(Hash)
|
122
|
+
self.error_details = value
|
123
|
+
end
|
124
|
+
end
|
115
125
|
end
|
116
126
|
|
117
127
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -143,7 +153,8 @@ module MergeTicketingClient
|
|
143
153
|
end_user == o.end_user &&
|
144
154
|
first_incident_time == o.first_incident_time &&
|
145
155
|
last_incident_time == o.last_incident_time &&
|
146
|
-
is_muted == o.is_muted
|
156
|
+
is_muted == o.is_muted &&
|
157
|
+
error_details == o.error_details
|
147
158
|
end
|
148
159
|
|
149
160
|
# @see the `==` method
|
@@ -155,7 +166,7 @@ module MergeTicketingClient
|
|
155
166
|
# Calculates hash code according to all attributes.
|
156
167
|
# @return [Integer] Hash code
|
157
168
|
def hash
|
158
|
-
[id, status, error_description, end_user, first_incident_time, last_incident_time, is_muted].hash
|
169
|
+
[id, status, error_description, end_user, first_incident_time, last_incident_time, is_muted, error_details].hash
|
159
170
|
end
|
160
171
|
|
161
172
|
# Builds the object from hash
|