merge_ticketing_client 1.0.3 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +72 -0
- data/README.md +17 -6
- data/docs/AccessLevelEnum.md +15 -0
- data/docs/Account.md +14 -11
- data/docs/AccountIntegration.md +5 -1
- data/docs/AccountsApi.md +4 -4
- data/docs/AsyncPassthroughApi.md +155 -0
- data/docs/AsyncPassthroughReciept.md +18 -0
- data/docs/Attachment.md +18 -15
- data/docs/AttachmentRequest.md +10 -9
- data/docs/AttachmentsApi.md +80 -4
- data/docs/Collection.md +18 -13
- data/docs/CollectionsApi.md +92 -6
- data/docs/Comment.md +19 -16
- data/docs/CommentRequest.md +11 -10
- data/docs/CommentsApi.md +6 -4
- data/docs/CommonModelScopesBodyRequest.md +22 -0
- data/docs/ConditionSchema.md +1 -1
- data/docs/Contact.md +17 -14
- data/docs/ContactsApi.md +4 -4
- data/docs/DataPassthroughRequest.md +11 -10
- data/docs/DeleteAccountApi.md +9 -9
- data/docs/EnabledActionsEnum.md +15 -0
- data/docs/EndUserDetailsRequest.md +4 -2
- data/docs/ForceResyncApi.md +1 -1
- data/docs/Issue.md +11 -10
- data/docs/IssuesApi.md +6 -6
- data/docs/ItemFormatEnum.md +15 -0
- data/docs/ItemSchema.md +22 -0
- data/docs/ItemTypeEnum.md +15 -0
- data/docs/LinkedAccountCondition.md +9 -8
- data/docs/LinkedAccountConditionRequest.md +6 -5
- data/docs/LinkedAccountsApi.md +2 -2
- data/docs/MetaResponse.md +9 -6
- data/docs/MultipartFormFieldRequest.md +1 -1
- data/docs/PatchedTicketRequest.md +23 -22
- data/docs/Project.md +14 -11
- data/docs/ProjectsApi.md +5 -5
- data/docs/RemoteData.md +5 -4
- data/docs/RemoteField.md +7 -6
- data/docs/RemoteFieldClass.md +9 -11
- data/docs/RemoteFieldRequest.md +20 -0
- data/docs/RemoteResponse.md +10 -9
- data/docs/SyncStatus.md +1 -1
- data/docs/SyncStatusApi.md +1 -1
- data/docs/Tag.md +12 -9
- data/docs/TagsApi.md +4 -4
- data/docs/Team.md +14 -11
- data/docs/TeamsApi.md +4 -4
- data/docs/Ticket.md +30 -29
- data/docs/TicketRequest.md +24 -23
- data/docs/TicketsApi.md +9 -11
- data/docs/User.md +17 -14
- data/docs/UsersApi.md +6 -6
- data/lib/merge_ticketing_client/api/accounts_api.rb +4 -4
- data/lib/merge_ticketing_client/api/async_passthrough_api.rb +160 -0
- data/lib/merge_ticketing_client/api/attachments_api.rb +75 -4
- data/lib/merge_ticketing_client/api/collections_api.rb +93 -6
- data/lib/merge_ticketing_client/api/comments_api.rb +7 -4
- data/lib/merge_ticketing_client/api/contacts_api.rb +4 -4
- data/lib/merge_ticketing_client/api/delete_account_api.rb +7 -7
- data/lib/merge_ticketing_client/api/force_resync_api.rb +2 -2
- data/lib/merge_ticketing_client/api/issues_api.rb +6 -6
- data/lib/merge_ticketing_client/api/linked_accounts_api.rb +3 -3
- data/lib/merge_ticketing_client/api/projects_api.rb +5 -5
- data/lib/merge_ticketing_client/api/sync_status_api.rb +2 -2
- data/lib/merge_ticketing_client/api/tags_api.rb +4 -4
- data/lib/merge_ticketing_client/api/teams_api.rb +4 -4
- data/lib/merge_ticketing_client/api/tickets_api.rb +11 -14
- data/lib/merge_ticketing_client/api/users_api.rb +6 -6
- data/lib/merge_ticketing_client/models/access_level_enum.rb +46 -0
- data/lib/merge_ticketing_client/models/account.rb +27 -17
- data/lib/merge_ticketing_client/models/account_integration.rb +29 -7
- data/lib/merge_ticketing_client/models/async_passthrough_reciept.rb +223 -0
- data/lib/merge_ticketing_client/models/attachment.rb +29 -19
- data/lib/merge_ticketing_client/models/attachment_request.rb +2 -2
- data/lib/merge_ticketing_client/models/categories_enum.rb +2 -1
- data/lib/merge_ticketing_client/models/category_enum.rb +2 -1
- data/lib/merge_ticketing_client/models/collection.rb +39 -18
- data/lib/merge_ticketing_client/models/comment.rb +27 -17
- data/lib/merge_ticketing_client/models/common_model_scopes_body_request.rb +274 -0
- data/lib/merge_ticketing_client/models/condition_schema.rb +1 -0
- data/lib/merge_ticketing_client/models/contact.rb +27 -17
- data/lib/merge_ticketing_client/models/enabled_actions_enum.rb +45 -0
- data/lib/merge_ticketing_client/models/end_user_details_request.rb +19 -6
- data/lib/merge_ticketing_client/models/issue.rb +3 -2
- data/lib/merge_ticketing_client/models/item_format_enum.rb +49 -0
- data/lib/merge_ticketing_client/models/item_schema.rb +238 -0
- data/lib/merge_ticketing_client/models/item_type_enum.rb +49 -0
- data/lib/merge_ticketing_client/models/meta_response.rb +12 -1
- data/lib/merge_ticketing_client/models/multipart_form_field_request.rb +1 -1
- data/lib/merge_ticketing_client/models/patched_ticket_request.rb +18 -18
- data/lib/merge_ticketing_client/models/project.rb +27 -17
- data/lib/merge_ticketing_client/models/remote_data.rb +6 -9
- data/lib/merge_ticketing_client/models/remote_field.rb +18 -15
- data/lib/merge_ticketing_client/models/remote_field_class.rb +22 -39
- data/lib/merge_ticketing_client/models/remote_field_request.rb +234 -0
- data/lib/merge_ticketing_client/models/sync_status_status_enum.rb +2 -1
- data/lib/merge_ticketing_client/models/tag.rb +27 -17
- data/lib/merge_ticketing_client/models/team.rb +27 -17
- data/lib/merge_ticketing_client/models/ticket.rb +25 -26
- data/lib/merge_ticketing_client/models/ticket_request.rb +18 -18
- data/lib/merge_ticketing_client/models/user.rb +27 -17
- data/lib/merge_ticketing_client/version.rb +1 -1
- data/lib/merge_ticketing_client.rb +9 -1
- data/spec/api/accounts_api_spec.rb +2 -2
- data/spec/api/async_passthrough_api_spec.rb +59 -0
- data/spec/api/attachments_api_spec.rb +15 -2
- data/spec/api/collections_api_spec.rb +20 -3
- data/spec/api/comments_api_spec.rb +3 -2
- data/spec/api/contacts_api_spec.rb +2 -2
- data/spec/api/delete_account_api_spec.rb +2 -2
- data/spec/api/force_resync_api_spec.rb +1 -1
- data/spec/api/issues_api_spec.rb +3 -3
- data/spec/api/linked_accounts_api_spec.rb +1 -1
- data/spec/api/projects_api_spec.rb +2 -2
- data/spec/api/sync_status_api_spec.rb +1 -1
- data/spec/api/tags_api_spec.rb +2 -2
- data/spec/api/teams_api_spec.rb +2 -2
- data/spec/api/tickets_api_spec.rb +21 -4
- data/spec/api/users_api_spec.rb +2 -2
- data/spec/models/access_level_enum_spec.rb +28 -0
- data/spec/models/account_integration_spec.rb +12 -0
- data/spec/models/account_spec.rb +8 -2
- data/spec/models/async_passthrough_reciept_spec.rb +34 -0
- data/spec/models/attachment_request_spec.rb +0 -12
- data/spec/models/attachment_spec.rb +8 -2
- data/spec/models/collection_spec.rb +14 -2
- data/spec/models/comment_request_spec.rb +0 -12
- data/spec/models/comment_spec.rb +8 -2
- data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
- data/spec/models/contact_spec.rb +8 -2
- data/spec/models/enabled_actions_enum_spec.rb +28 -0
- data/spec/models/end_user_details_request_spec.rb +6 -0
- data/spec/models/field_format_enum_spec.rb +28 -0
- data/spec/models/field_type_enum_spec.rb +28 -0
- data/spec/models/item_format_enum_spec.rb +28 -0
- data/spec/models/item_schema_spec.rb +46 -0
- data/spec/models/item_type_enum_spec.rb +28 -0
- data/spec/models/meta_response_spec.rb +6 -0
- data/spec/models/paginated_remote_field_class_list_spec.rb +46 -0
- data/spec/models/patched_ticket_request_spec.rb +6 -18
- data/spec/models/project_spec.rb +8 -2
- data/spec/models/remote_field_class_spec.rb +88 -0
- data/spec/models/remote_field_request_spec.rb +40 -0
- data/spec/models/remote_field_spec.rb +40 -0
- data/spec/models/tag_spec.rb +8 -2
- data/spec/models/team_spec.rb +8 -2
- data/spec/models/ticket_request_spec.rb +6 -24
- data/spec/models/ticket_spec.rb +16 -10
- data/spec/models/user_spec.rb +8 -2
- metadata +139 -92
@@ -15,15 +15,15 @@ require 'time'
|
|
15
15
|
|
16
16
|
module MergeTicketingClient
|
17
17
|
class RemoteField
|
18
|
-
attr_accessor :value
|
19
|
-
|
20
18
|
attr_accessor :remote_field_class
|
21
19
|
|
20
|
+
attr_accessor :value
|
21
|
+
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
23
|
def self.attribute_map
|
24
24
|
{
|
25
|
-
:'
|
26
|
-
:'
|
25
|
+
:'remote_field_class' => :'remote_field_class',
|
26
|
+
:'value' => :'value'
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
@@ -35,16 +35,14 @@ module MergeTicketingClient
|
|
35
35
|
# Attribute type mapping.
|
36
36
|
def self.openapi_types
|
37
37
|
{
|
38
|
-
:'
|
39
|
-
:'
|
38
|
+
:'remote_field_class' => :'RemoteFieldClass',
|
39
|
+
:'value' => :'Hash<String, Object>'
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
43
43
|
# List of attributes with nullable: true
|
44
44
|
def self.openapi_nullable
|
45
45
|
Set.new([
|
46
|
-
:'value',
|
47
|
-
:'remote_field_class'
|
48
46
|
])
|
49
47
|
end
|
50
48
|
|
@@ -63,27 +61,32 @@ module MergeTicketingClient
|
|
63
61
|
h[k.to_sym] = v
|
64
62
|
}
|
65
63
|
|
64
|
+
if attributes.key?(:'remote_field_class')
|
65
|
+
self.remote_field_class = attributes[:'remote_field_class']
|
66
|
+
end
|
67
|
+
|
66
68
|
if attributes.key?(:'value')
|
67
69
|
if (value = attributes[:'value']).is_a?(Hash)
|
68
70
|
self.value = value
|
69
71
|
end
|
70
72
|
end
|
71
|
-
|
72
|
-
if attributes.key?(:'remote_field_class')
|
73
|
-
self.remote_field_class = attributes[:'remote_field_class']
|
74
|
-
end
|
75
73
|
end
|
76
74
|
|
77
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
78
76
|
# @return Array for valid properties with the reasons
|
79
77
|
def list_invalid_properties
|
80
78
|
invalid_properties = Array.new
|
79
|
+
if @remote_field_class.nil?
|
80
|
+
invalid_properties.push('invalid value for "remote_field_class", remote_field_class cannot be nil.')
|
81
|
+
end
|
82
|
+
|
81
83
|
invalid_properties
|
82
84
|
end
|
83
85
|
|
84
86
|
# Check to see if the all the properties in the model are valid
|
85
87
|
# @return true if the model is valid
|
86
88
|
def valid?
|
89
|
+
return false if @remote_field_class.nil?
|
87
90
|
true
|
88
91
|
end
|
89
92
|
|
@@ -92,8 +95,8 @@ module MergeTicketingClient
|
|
92
95
|
def ==(o)
|
93
96
|
return true if self.equal?(o)
|
94
97
|
self.class == o.class &&
|
95
|
-
|
96
|
-
|
98
|
+
remote_field_class == o.remote_field_class &&
|
99
|
+
value == o.value
|
97
100
|
end
|
98
101
|
|
99
102
|
# @see the `==` method
|
@@ -105,7 +108,7 @@ module MergeTicketingClient
|
|
105
108
|
# Calculates hash code according to all attributes.
|
106
109
|
# @return [Integer] Hash code
|
107
110
|
def hash
|
108
|
-
[
|
111
|
+
[remote_field_class, value].hash
|
109
112
|
end
|
110
113
|
|
111
114
|
# Builds the object from hash
|
@@ -15,12 +15,16 @@ require 'time'
|
|
15
15
|
|
16
16
|
module MergeTicketingClient
|
17
17
|
class RemoteFieldClass
|
18
|
+
attr_accessor :id
|
19
|
+
|
18
20
|
attr_accessor :display_name
|
19
21
|
|
20
22
|
attr_accessor :remote_key_name
|
21
23
|
|
22
24
|
attr_accessor :description
|
23
25
|
|
26
|
+
attr_accessor :is_custom
|
27
|
+
|
24
28
|
attr_accessor :is_required
|
25
29
|
|
26
30
|
attr_accessor :field_type
|
@@ -31,26 +35,19 @@ module MergeTicketingClient
|
|
31
35
|
|
32
36
|
attr_accessor :item_schema
|
33
37
|
|
34
|
-
attr_accessor :is_custom
|
35
|
-
|
36
|
-
attr_accessor :id
|
37
|
-
|
38
|
-
attr_accessor :remote_fields
|
39
|
-
|
40
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
39
|
def self.attribute_map
|
42
40
|
{
|
41
|
+
:'id' => :'id',
|
43
42
|
:'display_name' => :'display_name',
|
44
43
|
:'remote_key_name' => :'remote_key_name',
|
45
44
|
:'description' => :'description',
|
45
|
+
:'is_custom' => :'is_custom',
|
46
46
|
:'is_required' => :'is_required',
|
47
47
|
:'field_type' => :'field_type',
|
48
48
|
:'field_format' => :'field_format',
|
49
49
|
:'field_choices' => :'field_choices',
|
50
|
-
:'item_schema' => :'item_schema'
|
51
|
-
:'is_custom' => :'is_custom',
|
52
|
-
:'id' => :'id',
|
53
|
-
:'remote_fields' => :'remote_fields'
|
50
|
+
:'item_schema' => :'item_schema'
|
54
51
|
}
|
55
52
|
end
|
56
53
|
|
@@ -62,29 +59,22 @@ module MergeTicketingClient
|
|
62
59
|
# Attribute type mapping.
|
63
60
|
def self.openapi_types
|
64
61
|
{
|
62
|
+
:'id' => :'String',
|
65
63
|
:'display_name' => :'String',
|
66
64
|
:'remote_key_name' => :'String',
|
67
65
|
:'description' => :'String',
|
66
|
+
:'is_custom' => :'Boolean',
|
68
67
|
:'is_required' => :'Boolean',
|
69
68
|
:'field_type' => :'FieldTypeEnum',
|
70
69
|
:'field_format' => :'FieldFormatEnum',
|
71
70
|
:'field_choices' => :'Array<String>',
|
72
|
-
:'item_schema' => :'
|
73
|
-
:'is_custom' => :'Boolean',
|
74
|
-
:'id' => :'String',
|
75
|
-
:'remote_fields' => :'Array<RemoteField>'
|
71
|
+
:'item_schema' => :'ItemSchema'
|
76
72
|
}
|
77
73
|
end
|
78
74
|
|
79
75
|
# List of attributes with nullable: true
|
80
76
|
def self.openapi_nullable
|
81
77
|
Set.new([
|
82
|
-
:'display_name',
|
83
|
-
:'remote_key_name',
|
84
|
-
:'description',
|
85
|
-
:'field_choices',
|
86
|
-
:'item_schema',
|
87
|
-
:'is_custom',
|
88
78
|
])
|
89
79
|
end
|
90
80
|
|
@@ -103,6 +93,10 @@ module MergeTicketingClient
|
|
103
93
|
h[k.to_sym] = v
|
104
94
|
}
|
105
95
|
|
96
|
+
if attributes.key?(:'id')
|
97
|
+
self.id = attributes[:'id']
|
98
|
+
end
|
99
|
+
|
106
100
|
if attributes.key?(:'display_name')
|
107
101
|
self.display_name = attributes[:'display_name']
|
108
102
|
end
|
@@ -115,6 +109,10 @@ module MergeTicketingClient
|
|
115
109
|
self.description = attributes[:'description']
|
116
110
|
end
|
117
111
|
|
112
|
+
if attributes.key?(:'is_custom')
|
113
|
+
self.is_custom = attributes[:'is_custom']
|
114
|
+
end
|
115
|
+
|
118
116
|
if attributes.key?(:'is_required')
|
119
117
|
self.is_required = attributes[:'is_required']
|
120
118
|
end
|
@@ -136,20 +134,6 @@ module MergeTicketingClient
|
|
136
134
|
if attributes.key?(:'item_schema')
|
137
135
|
self.item_schema = attributes[:'item_schema']
|
138
136
|
end
|
139
|
-
|
140
|
-
if attributes.key?(:'is_custom')
|
141
|
-
self.is_custom = attributes[:'is_custom']
|
142
|
-
end
|
143
|
-
|
144
|
-
if attributes.key?(:'id')
|
145
|
-
self.id = attributes[:'id']
|
146
|
-
end
|
147
|
-
|
148
|
-
if attributes.key?(:'remote_fields')
|
149
|
-
if (value = attributes[:'remote_fields']).is_a?(Array)
|
150
|
-
self.remote_fields = value
|
151
|
-
end
|
152
|
-
end
|
153
137
|
end
|
154
138
|
|
155
139
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -170,17 +154,16 @@ module MergeTicketingClient
|
|
170
154
|
def ==(o)
|
171
155
|
return true if self.equal?(o)
|
172
156
|
self.class == o.class &&
|
157
|
+
id == o.id &&
|
173
158
|
display_name == o.display_name &&
|
174
159
|
remote_key_name == o.remote_key_name &&
|
175
160
|
description == o.description &&
|
161
|
+
is_custom == o.is_custom &&
|
176
162
|
is_required == o.is_required &&
|
177
163
|
field_type == o.field_type &&
|
178
164
|
field_format == o.field_format &&
|
179
165
|
field_choices == o.field_choices &&
|
180
|
-
item_schema == o.item_schema
|
181
|
-
is_custom == o.is_custom &&
|
182
|
-
id == o.id &&
|
183
|
-
remote_fields == o.remote_fields
|
166
|
+
item_schema == o.item_schema
|
184
167
|
end
|
185
168
|
|
186
169
|
# @see the `==` method
|
@@ -192,7 +175,7 @@ module MergeTicketingClient
|
|
192
175
|
# Calculates hash code according to all attributes.
|
193
176
|
# @return [Integer] Hash code
|
194
177
|
def hash
|
195
|
-
[display_name, remote_key_name, description, is_required, field_type, field_format, field_choices, item_schema
|
178
|
+
[id, display_name, remote_key_name, description, is_custom, is_required, field_type, field_format, field_choices, item_schema].hash
|
196
179
|
end
|
197
180
|
|
198
181
|
# Builds the object from hash
|
@@ -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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MergeTicketingClient
|
17
|
+
class RemoteFieldRequest
|
18
|
+
attr_accessor :remote_field_class
|
19
|
+
|
20
|
+
attr_accessor :value
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'remote_field_class' => :'remote_field_class',
|
26
|
+
:'value' => :'value'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'remote_field_class' => :'String',
|
39
|
+
:'value' => :'Hash<String, Object>'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeTicketingClient::RemoteFieldRequest` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeTicketingClient::RemoteFieldRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'remote_field_class')
|
65
|
+
self.remote_field_class = attributes[:'remote_field_class']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'value')
|
69
|
+
if (value = attributes[:'value']).is_a?(Hash)
|
70
|
+
self.value = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
if @remote_field_class.nil?
|
80
|
+
invalid_properties.push('invalid value for "remote_field_class", remote_field_class cannot be nil.')
|
81
|
+
end
|
82
|
+
|
83
|
+
invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
return false if @remote_field_class.nil?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
remote_field_class == o.remote_field_class &&
|
99
|
+
value == o.value
|
100
|
+
end
|
101
|
+
|
102
|
+
# @see the `==` method
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Integer] Hash code
|
110
|
+
def hash
|
111
|
+
[remote_field_class, value].hash
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def self.build_from_hash(attributes)
|
118
|
+
new.build_from_hash(attributes)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
self.class.openapi_types.each_pair do |key, type|
|
127
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
128
|
+
self.send("#{key}=", nil)
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
133
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
134
|
+
end
|
135
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
136
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
self
|
141
|
+
end
|
142
|
+
|
143
|
+
# Deserializes the data based on type
|
144
|
+
# @param string type Data type
|
145
|
+
# @param string value Value to be deserialized
|
146
|
+
# @return [Object] Deserialized data
|
147
|
+
def _deserialize(type, value)
|
148
|
+
case type.to_sym
|
149
|
+
when :Time
|
150
|
+
Time.parse(value)
|
151
|
+
when :Date
|
152
|
+
Date.parse(value)
|
153
|
+
when :String
|
154
|
+
value
|
155
|
+
when :Integer
|
156
|
+
value.to_i
|
157
|
+
when :Float
|
158
|
+
value.to_f
|
159
|
+
when :Boolean
|
160
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
161
|
+
true
|
162
|
+
else
|
163
|
+
false
|
164
|
+
end
|
165
|
+
when :Object
|
166
|
+
# generic object (usually a Hash), return directly
|
167
|
+
value
|
168
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
169
|
+
inner_type = Regexp.last_match[:inner_type]
|
170
|
+
value.map { |v| _deserialize(inner_type, v) }
|
171
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
172
|
+
k_type = Regexp.last_match[:k_type]
|
173
|
+
v_type = Regexp.last_match[:v_type]
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each do |k, v|
|
176
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
else # model
|
180
|
+
# models (e.g. Pet) or oneOf
|
181
|
+
klass = MergeTicketingClient.const_get(type)
|
182
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_body
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the object in the form of hash
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
if value.nil?
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
207
|
+
end
|
208
|
+
|
209
|
+
hash[param] = _to_hash(value)
|
210
|
+
end
|
211
|
+
hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Outputs non-array value in the form of hash
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
216
|
+
# @param [Object] value Any valid value
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
218
|
+
def _to_hash(value)
|
219
|
+
if value.is_a?(Array)
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
221
|
+
elsif value.is_a?(Hash)
|
222
|
+
{}.tap do |hash|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
224
|
+
end
|
225
|
+
elsif value.respond_to? :to_hash
|
226
|
+
value.to_hash
|
227
|
+
else
|
228
|
+
value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
@@ -20,6 +20,7 @@ module MergeTicketingClient
|
|
20
20
|
FAILED = "FAILED".freeze
|
21
21
|
DISABLED = "DISABLED".freeze
|
22
22
|
PAUSED = "PAUSED".freeze
|
23
|
+
PARTIALLY_SYNCED = "PARTIALLY_SYNCED".freeze
|
23
24
|
|
24
25
|
MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
|
25
26
|
|
@@ -31,7 +32,7 @@ module MergeTicketingClient
|
|
31
32
|
# @return [String] The enum value
|
32
33
|
def build_from_hash(value)
|
33
34
|
@raw_value = value
|
34
|
-
if ["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", ].include? value
|
35
|
+
if ["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED", ].include? value
|
35
36
|
@value = value
|
36
37
|
else
|
37
38
|
@value = MERGE_NONSTANDARD_VALUE
|
@@ -22,21 +22,25 @@ module MergeTicketingClient
|
|
22
22
|
# The tag's name.
|
23
23
|
attr_accessor :name
|
24
24
|
|
25
|
-
attr_accessor :remote_data
|
26
|
-
|
27
25
|
# Indicates whether or not this object has been deleted by third party webhooks.
|
28
26
|
attr_accessor :remote_was_deleted
|
29
27
|
|
28
|
+
# This is the datetime that this object was last updated by Merge
|
29
|
+
attr_accessor :modified_at
|
30
|
+
|
30
31
|
attr_accessor :field_mappings
|
31
32
|
|
33
|
+
attr_accessor :remote_data
|
34
|
+
|
32
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
36
|
def self.attribute_map
|
34
37
|
{
|
35
38
|
:'remote_id' => :'remote_id',
|
36
39
|
:'name' => :'name',
|
37
|
-
:'remote_data' => :'remote_data',
|
38
40
|
:'remote_was_deleted' => :'remote_was_deleted',
|
39
|
-
:'
|
41
|
+
:'modified_at' => :'modified_at',
|
42
|
+
:'field_mappings' => :'field_mappings',
|
43
|
+
:'remote_data' => :'remote_data'
|
40
44
|
}
|
41
45
|
end
|
42
46
|
|
@@ -50,9 +54,10 @@ module MergeTicketingClient
|
|
50
54
|
{
|
51
55
|
:'remote_id' => :'String',
|
52
56
|
:'name' => :'String',
|
53
|
-
:'remote_data' => :'Array<RemoteData>',
|
54
57
|
:'remote_was_deleted' => :'Boolean',
|
55
|
-
:'
|
58
|
+
:'modified_at' => :'Time',
|
59
|
+
:'field_mappings' => :'Hash<String, Object>',
|
60
|
+
:'remote_data' => :'Array<RemoteData>'
|
56
61
|
}
|
57
62
|
end
|
58
63
|
|
@@ -61,8 +66,8 @@ module MergeTicketingClient
|
|
61
66
|
Set.new([
|
62
67
|
:'remote_id',
|
63
68
|
:'name',
|
64
|
-
:'
|
65
|
-
:'
|
69
|
+
:'field_mappings',
|
70
|
+
:'remote_data'
|
66
71
|
])
|
67
72
|
end
|
68
73
|
|
@@ -89,21 +94,25 @@ module MergeTicketingClient
|
|
89
94
|
self.name = attributes[:'name']
|
90
95
|
end
|
91
96
|
|
92
|
-
if attributes.key?(:'remote_data')
|
93
|
-
if (value = attributes[:'remote_data']).is_a?(Array)
|
94
|
-
self.remote_data = value
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
97
|
if attributes.key?(:'remote_was_deleted')
|
99
98
|
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
100
99
|
end
|
101
100
|
|
101
|
+
if attributes.key?(:'modified_at')
|
102
|
+
self.modified_at = attributes[:'modified_at']
|
103
|
+
end
|
104
|
+
|
102
105
|
if attributes.key?(:'field_mappings')
|
103
106
|
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
104
107
|
self.field_mappings = value
|
105
108
|
end
|
106
109
|
end
|
110
|
+
|
111
|
+
if attributes.key?(:'remote_data')
|
112
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
113
|
+
self.remote_data = value
|
114
|
+
end
|
115
|
+
end
|
107
116
|
end
|
108
117
|
|
109
118
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -126,9 +135,10 @@ module MergeTicketingClient
|
|
126
135
|
self.class == o.class &&
|
127
136
|
remote_id == o.remote_id &&
|
128
137
|
name == o.name &&
|
129
|
-
remote_data == o.remote_data &&
|
130
138
|
remote_was_deleted == o.remote_was_deleted &&
|
131
|
-
|
139
|
+
modified_at == o.modified_at &&
|
140
|
+
field_mappings == o.field_mappings &&
|
141
|
+
remote_data == o.remote_data
|
132
142
|
end
|
133
143
|
|
134
144
|
# @see the `==` method
|
@@ -140,7 +150,7 @@ module MergeTicketingClient
|
|
140
150
|
# Calculates hash code according to all attributes.
|
141
151
|
# @return [Integer] Hash code
|
142
152
|
def hash
|
143
|
-
[remote_id, name,
|
153
|
+
[remote_id, name, remote_was_deleted, modified_at, field_mappings, remote_data].hash
|
144
154
|
end
|
145
155
|
|
146
156
|
# Builds the object from hash
|