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.
- checksums.yaml +4 -4
- data/README.md +31 -6
- data/docs/Account.md +11 -10
- data/docs/AccountIntegration.md +1 -1
- data/docs/Attachment.md +15 -14
- data/docs/AttachmentRequest.md +11 -12
- data/docs/Collection.md +33 -0
- data/docs/CollectionTypeEnum.md +15 -0
- data/docs/CollectionsApi.md +193 -0
- data/docs/Comment.md +16 -15
- data/docs/CommentRequest.md +12 -13
- data/docs/ConditionSchema.md +30 -0
- data/docs/ConditionTypeEnum.md +15 -0
- data/docs/Contact.md +14 -13
- data/docs/DataPassthroughRequest.md +10 -11
- data/docs/EndUserDetailsRequest.md +2 -2
- data/docs/FieldFormatEnum.md +15 -0
- data/docs/FieldTypeEnum.md +15 -0
- data/docs/Issue.md +18 -17
- data/docs/LinkToken.md +1 -1
- data/docs/LinkedAccountCondition.md +27 -0
- data/docs/LinkedAccountConditionRequest.md +21 -0
- data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
- data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
- data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
- data/docs/MetaResponse.md +6 -7
- data/docs/OperatorSchema.md +20 -0
- data/docs/PaginatedCollectionList.md +22 -0
- data/docs/PaginatedConditionSchemaList.md +22 -0
- data/docs/PaginatedRemoteFieldClassList.md +22 -0
- data/docs/PatchedTicketRequest.md +25 -22
- data/docs/Project.md +11 -10
- data/docs/ProjectsApi.md +10 -8
- data/docs/RemoteData.md +4 -5
- data/docs/RemoteField.md +19 -0
- data/docs/RemoteFieldClass.md +38 -0
- data/docs/RemoteFieldClassItemSchema.md +22 -0
- data/docs/RemoteResponse.md +9 -10
- data/docs/SelectiveSyncApi.md +233 -0
- data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
- data/docs/SyncStatus.md +5 -3
- data/docs/Tag.md +9 -8
- data/docs/Team.md +11 -10
- data/docs/Ticket.md +32 -25
- data/docs/TicketRequest.md +26 -25
- data/docs/TicketsApi.md +141 -13
- data/docs/User.md +14 -13
- 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 +177 -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 +24 -20
- data/lib/merge_ticketing_client/models/categories_enum.rb +3 -2
- data/lib/merge_ticketing_client/models/category_enum.rb +3 -2
- 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 +25 -20
- 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/field_format_enum.rb +49 -0
- data/lib/merge_ticketing_client/models/field_type_enum.rb +49 -0
- 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/paginated_remote_field_class_list.rb +240 -0
- data/lib/merge_ticketing_client/models/patched_ticket_request.rb +57 -29
- 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/remote_data.rb +9 -7
- data/lib/merge_ticketing_client/models/remote_field.rb +231 -0
- data/lib/merge_ticketing_client/models/remote_field_class.rb +318 -0
- data/lib/merge_ticketing_client/models/remote_field_class_item_schema.rb +241 -0
- 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 +56 -7
- data/lib/merge_ticketing_client/models/ticket_request.rb +57 -40
- 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 +21 -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 +144 -72
@@ -16,12 +16,10 @@ require 'time'
|
|
16
16
|
module MergeTicketingClient
|
17
17
|
# # The Attachment Object ### Description The `Attachment` object is used to represent an attachment for a ticket. ### Usage Example TODO
|
18
18
|
class AttachmentRequest
|
19
|
-
# The third-party API ID of the matching object.
|
20
|
-
attr_accessor :remote_id
|
21
|
-
|
22
19
|
# The attachment's name.
|
23
20
|
attr_accessor :file_name
|
24
21
|
|
22
|
+
# The ticket associated with the attachment.
|
25
23
|
attr_accessor :ticket
|
26
24
|
|
27
25
|
# The attachment's url.
|
@@ -30,21 +28,23 @@ module MergeTicketingClient
|
|
30
28
|
# The attachment's file format.
|
31
29
|
attr_accessor :content_type
|
32
30
|
|
31
|
+
# The user who uploaded the attachment.
|
33
32
|
attr_accessor :uploaded_by
|
34
33
|
|
35
|
-
|
36
|
-
|
34
|
+
attr_accessor :integration_params
|
35
|
+
|
36
|
+
attr_accessor :linked_account_params
|
37
37
|
|
38
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
39
39
|
def self.attribute_map
|
40
40
|
{
|
41
|
-
:'remote_id' => :'remote_id',
|
42
41
|
:'file_name' => :'file_name',
|
43
42
|
:'ticket' => :'ticket',
|
44
43
|
:'file_url' => :'file_url',
|
45
44
|
:'content_type' => :'content_type',
|
46
45
|
:'uploaded_by' => :'uploaded_by',
|
47
|
-
:'
|
46
|
+
:'integration_params' => :'integration_params',
|
47
|
+
:'linked_account_params' => :'linked_account_params'
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
@@ -56,26 +56,26 @@ module MergeTicketingClient
|
|
56
56
|
# Attribute type mapping.
|
57
57
|
def self.openapi_types
|
58
58
|
{
|
59
|
-
:'remote_id' => :'String',
|
60
59
|
:'file_name' => :'String',
|
61
60
|
:'ticket' => :'String',
|
62
61
|
:'file_url' => :'String',
|
63
62
|
:'content_type' => :'String',
|
64
63
|
:'uploaded_by' => :'String',
|
65
|
-
:'
|
64
|
+
:'integration_params' => :'Hash<String, Object>',
|
65
|
+
:'linked_account_params' => :'Hash<String, Object>'
|
66
66
|
}
|
67
67
|
end
|
68
68
|
|
69
69
|
# List of attributes with nullable: true
|
70
70
|
def self.openapi_nullable
|
71
71
|
Set.new([
|
72
|
-
:'remote_id',
|
73
72
|
:'file_name',
|
74
73
|
:'ticket',
|
75
74
|
:'file_url',
|
76
75
|
:'content_type',
|
77
76
|
:'uploaded_by',
|
78
|
-
:'
|
77
|
+
:'integration_params',
|
78
|
+
:'linked_account_params'
|
79
79
|
])
|
80
80
|
end
|
81
81
|
|
@@ -94,10 +94,6 @@ module MergeTicketingClient
|
|
94
94
|
h[k.to_sym] = v
|
95
95
|
}
|
96
96
|
|
97
|
-
if attributes.key?(:'remote_id')
|
98
|
-
self.remote_id = attributes[:'remote_id']
|
99
|
-
end
|
100
|
-
|
101
97
|
if attributes.key?(:'file_name')
|
102
98
|
self.file_name = attributes[:'file_name']
|
103
99
|
end
|
@@ -118,8 +114,16 @@ module MergeTicketingClient
|
|
118
114
|
self.uploaded_by = attributes[:'uploaded_by']
|
119
115
|
end
|
120
116
|
|
121
|
-
if attributes.key?(:'
|
122
|
-
|
117
|
+
if attributes.key?(:'integration_params')
|
118
|
+
if (value = attributes[:'integration_params']).is_a?(Hash)
|
119
|
+
self.integration_params = value
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'linked_account_params')
|
124
|
+
if (value = attributes[:'linked_account_params']).is_a?(Hash)
|
125
|
+
self.linked_account_params = value
|
126
|
+
end
|
123
127
|
end
|
124
128
|
end
|
125
129
|
|
@@ -141,13 +145,13 @@ module MergeTicketingClient
|
|
141
145
|
def ==(o)
|
142
146
|
return true if self.equal?(o)
|
143
147
|
self.class == o.class &&
|
144
|
-
remote_id == o.remote_id &&
|
145
148
|
file_name == o.file_name &&
|
146
149
|
ticket == o.ticket &&
|
147
150
|
file_url == o.file_url &&
|
148
151
|
content_type == o.content_type &&
|
149
152
|
uploaded_by == o.uploaded_by &&
|
150
|
-
|
153
|
+
integration_params == o.integration_params &&
|
154
|
+
linked_account_params == o.linked_account_params
|
151
155
|
end
|
152
156
|
|
153
157
|
# @see the `==` method
|
@@ -159,7 +163,7 @@ module MergeTicketingClient
|
|
159
163
|
# Calculates hash code according to all attributes.
|
160
164
|
# @return [Integer] Hash code
|
161
165
|
def hash
|
162
|
-
[
|
166
|
+
[file_name, ticket, file_url, content_type, uploaded_by, integration_params, linked_account_params].hash
|
163
167
|
end
|
164
168
|
|
165
169
|
# Builds the object from hash
|
@@ -20,6 +20,7 @@ module MergeTicketingClient
|
|
20
20
|
ACCOUNTING = "accounting".freeze
|
21
21
|
TICKETING = "ticketing".freeze
|
22
22
|
CRM = "crm".freeze
|
23
|
+
MKTG = "mktg".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 ["hris", "ats", "accounting", "ticketing", "crm", ].include? value
|
35
|
+
if ["hris", "ats", "accounting", "ticketing", "crm", "mktg", ].include? value
|
35
36
|
@value = value
|
36
37
|
else
|
37
38
|
@value = MERGE_NONSTANDARD_VALUE
|
@@ -41,7 +42,7 @@ module MergeTicketingClient
|
|
41
42
|
end
|
42
43
|
|
43
44
|
def self.build_from_hash(value)
|
44
|
-
|
45
|
+
CategoriesEnum.new.build_from_hash(value)
|
45
46
|
end
|
46
47
|
end
|
47
48
|
|
@@ -20,6 +20,7 @@ module MergeTicketingClient
|
|
20
20
|
ACCOUNTING = "accounting".freeze
|
21
21
|
TICKETING = "ticketing".freeze
|
22
22
|
CRM = "crm".freeze
|
23
|
+
MKTG = "mktg".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 ["hris", "ats", "accounting", "ticketing", "crm", ].include? value
|
35
|
+
if ["hris", "ats", "accounting", "ticketing", "crm", "mktg", ].include? value
|
35
36
|
@value = value
|
36
37
|
else
|
37
38
|
@value = MERGE_NONSTANDARD_VALUE
|
@@ -41,7 +42,7 @@ module MergeTicketingClient
|
|
41
42
|
end
|
42
43
|
|
43
44
|
def self.build_from_hash(value)
|
44
|
-
|
45
|
+
CategoryEnum.new.build_from_hash(value)
|
45
46
|
end
|
46
47
|
end
|
47
48
|
|
@@ -0,0 +1,308 @@
|
|
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
|
+
# # The Collection Object ### Description The `Collection` object is used to represent collections of tickets. Collections may include other collections as sub collections. ### Usage Example TODO
|
18
|
+
class Collection
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The third-party API ID of the matching object.
|
22
|
+
attr_accessor :remote_id
|
23
|
+
|
24
|
+
# The collection's name.
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
# The collection's description.
|
28
|
+
attr_accessor :description
|
29
|
+
|
30
|
+
# The collection's type.
|
31
|
+
attr_accessor :collection_type
|
32
|
+
|
33
|
+
# The parent collection for this collection.
|
34
|
+
attr_accessor :parent_collection
|
35
|
+
|
36
|
+
attr_accessor :remote_data
|
37
|
+
|
38
|
+
# Indicates whether or not this object has been deleted by third party webhooks.
|
39
|
+
attr_accessor :remote_was_deleted
|
40
|
+
|
41
|
+
attr_accessor :field_mappings
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
:'id' => :'id',
|
47
|
+
:'remote_id' => :'remote_id',
|
48
|
+
:'name' => :'name',
|
49
|
+
:'description' => :'description',
|
50
|
+
:'collection_type' => :'collection_type',
|
51
|
+
:'parent_collection' => :'parent_collection',
|
52
|
+
:'remote_data' => :'remote_data',
|
53
|
+
:'remote_was_deleted' => :'remote_was_deleted',
|
54
|
+
:'field_mappings' => :'field_mappings'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Returns all the JSON keys this model knows about
|
59
|
+
def self.acceptable_attributes
|
60
|
+
attribute_map.values
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'id' => :'String',
|
67
|
+
:'remote_id' => :'String',
|
68
|
+
:'name' => :'String',
|
69
|
+
:'description' => :'String',
|
70
|
+
:'collection_type' => :'CollectionTypeEnum',
|
71
|
+
:'parent_collection' => :'String',
|
72
|
+
:'remote_data' => :'Array<RemoteData>',
|
73
|
+
:'remote_was_deleted' => :'Boolean',
|
74
|
+
:'field_mappings' => :'Hash<String, Object>'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# List of attributes with nullable: true
|
79
|
+
def self.openapi_nullable
|
80
|
+
Set.new([
|
81
|
+
:'remote_id',
|
82
|
+
:'name',
|
83
|
+
:'description',
|
84
|
+
:'collection_type',
|
85
|
+
:'parent_collection',
|
86
|
+
:'remote_data',
|
87
|
+
:'field_mappings'
|
88
|
+
])
|
89
|
+
end
|
90
|
+
|
91
|
+
# Initializes the object
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
def initialize(attributes = {})
|
94
|
+
if (!attributes.is_a?(Hash))
|
95
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeTicketingClient::Collection` initialize method"
|
96
|
+
end
|
97
|
+
|
98
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
99
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
100
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
101
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeTicketingClient::Collection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
102
|
+
end
|
103
|
+
h[k.to_sym] = v
|
104
|
+
}
|
105
|
+
|
106
|
+
if attributes.key?(:'id')
|
107
|
+
self.id = attributes[:'id']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'remote_id')
|
111
|
+
self.remote_id = attributes[:'remote_id']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'name')
|
115
|
+
self.name = attributes[:'name']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'description')
|
119
|
+
self.description = attributes[:'description']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'collection_type')
|
123
|
+
self.collection_type = attributes[:'collection_type']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'parent_collection')
|
127
|
+
self.parent_collection = attributes[:'parent_collection']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'remote_data')
|
131
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
132
|
+
self.remote_data = value
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'remote_was_deleted')
|
137
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'field_mappings')
|
141
|
+
if (value = attributes[:'field_mappings']).is_a?(Hash)
|
142
|
+
self.field_mappings = value
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
148
|
+
# @return Array for valid properties with the reasons
|
149
|
+
def list_invalid_properties
|
150
|
+
invalid_properties = Array.new
|
151
|
+
invalid_properties
|
152
|
+
end
|
153
|
+
|
154
|
+
# Check to see if the all the properties in the model are valid
|
155
|
+
# @return true if the model is valid
|
156
|
+
def valid?
|
157
|
+
true
|
158
|
+
end
|
159
|
+
|
160
|
+
# Checks equality by comparing each attribute.
|
161
|
+
# @param [Object] Object to be compared
|
162
|
+
def ==(o)
|
163
|
+
return true if self.equal?(o)
|
164
|
+
self.class == o.class &&
|
165
|
+
id == o.id &&
|
166
|
+
remote_id == o.remote_id &&
|
167
|
+
name == o.name &&
|
168
|
+
description == o.description &&
|
169
|
+
collection_type == o.collection_type &&
|
170
|
+
parent_collection == o.parent_collection &&
|
171
|
+
remote_data == o.remote_data &&
|
172
|
+
remote_was_deleted == o.remote_was_deleted &&
|
173
|
+
field_mappings == o.field_mappings
|
174
|
+
end
|
175
|
+
|
176
|
+
# @see the `==` method
|
177
|
+
# @param [Object] Object to be compared
|
178
|
+
def eql?(o)
|
179
|
+
self == o
|
180
|
+
end
|
181
|
+
|
182
|
+
# Calculates hash code according to all attributes.
|
183
|
+
# @return [Integer] Hash code
|
184
|
+
def hash
|
185
|
+
[id, remote_id, name, description, collection_type, parent_collection, remote_data, remote_was_deleted, field_mappings].hash
|
186
|
+
end
|
187
|
+
|
188
|
+
# Builds the object from hash
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
190
|
+
# @return [Object] Returns the model itself
|
191
|
+
def self.build_from_hash(attributes)
|
192
|
+
new.build_from_hash(attributes)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Builds the object from hash
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
+
# @return [Object] Returns the model itself
|
198
|
+
def build_from_hash(attributes)
|
199
|
+
return nil unless attributes.is_a?(Hash)
|
200
|
+
self.class.openapi_types.each_pair do |key, type|
|
201
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
202
|
+
self.send("#{key}=", nil)
|
203
|
+
elsif type =~ /\AArray<(.*)>/i
|
204
|
+
# check to ensure the input is an array given that the attribute
|
205
|
+
# is documented as an array but the input is not
|
206
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
207
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
208
|
+
end
|
209
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
210
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
self
|
215
|
+
end
|
216
|
+
|
217
|
+
# Deserializes the data based on type
|
218
|
+
# @param string type Data type
|
219
|
+
# @param string value Value to be deserialized
|
220
|
+
# @return [Object] Deserialized data
|
221
|
+
def _deserialize(type, value)
|
222
|
+
case type.to_sym
|
223
|
+
when :Time
|
224
|
+
Time.parse(value)
|
225
|
+
when :Date
|
226
|
+
Date.parse(value)
|
227
|
+
when :String
|
228
|
+
value
|
229
|
+
when :Integer
|
230
|
+
value.to_i
|
231
|
+
when :Float
|
232
|
+
value.to_f
|
233
|
+
when :Boolean
|
234
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
235
|
+
true
|
236
|
+
else
|
237
|
+
false
|
238
|
+
end
|
239
|
+
when :Object
|
240
|
+
# generic object (usually a Hash), return directly
|
241
|
+
value
|
242
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
243
|
+
inner_type = Regexp.last_match[:inner_type]
|
244
|
+
value.map { |v| _deserialize(inner_type, v) }
|
245
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
246
|
+
k_type = Regexp.last_match[:k_type]
|
247
|
+
v_type = Regexp.last_match[:v_type]
|
248
|
+
{}.tap do |hash|
|
249
|
+
value.each do |k, v|
|
250
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
251
|
+
end
|
252
|
+
end
|
253
|
+
else # model
|
254
|
+
# models (e.g. Pet) or oneOf
|
255
|
+
klass = MergeTicketingClient.const_get(type)
|
256
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
# Returns the string representation of the object
|
261
|
+
# @return [String] String presentation of the object
|
262
|
+
def to_s
|
263
|
+
to_hash.to_s
|
264
|
+
end
|
265
|
+
|
266
|
+
# to_body is an alias to to_hash (backward compatibility)
|
267
|
+
# @return [Hash] Returns the object in the form of hash
|
268
|
+
def to_body
|
269
|
+
to_hash
|
270
|
+
end
|
271
|
+
|
272
|
+
# Returns the object in the form of hash
|
273
|
+
# @return [Hash] Returns the object in the form of hash
|
274
|
+
def to_hash
|
275
|
+
hash = {}
|
276
|
+
self.class.attribute_map.each_pair do |attr, param|
|
277
|
+
value = self.send(attr)
|
278
|
+
if value.nil?
|
279
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
280
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
281
|
+
end
|
282
|
+
|
283
|
+
hash[param] = _to_hash(value)
|
284
|
+
end
|
285
|
+
hash
|
286
|
+
end
|
287
|
+
|
288
|
+
# Outputs non-array value in the form of hash
|
289
|
+
# For object, use to_hash. Otherwise, just return the value
|
290
|
+
# @param [Object] value Any valid value
|
291
|
+
# @return [Hash] Returns the value in the form of hash
|
292
|
+
def _to_hash(value)
|
293
|
+
if value.is_a?(Array)
|
294
|
+
value.compact.map { |v| _to_hash(v) }
|
295
|
+
elsif value.is_a?(Hash)
|
296
|
+
{}.tap do |hash|
|
297
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
298
|
+
end
|
299
|
+
elsif value.respond_to? :to_hash
|
300
|
+
value.to_hash
|
301
|
+
else
|
302
|
+
value
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
end
|
307
|
+
|
308
|
+
end
|
@@ -0,0 +1,45 @@
|
|
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 CollectionTypeEnum
|
18
|
+
LIST = "LIST".freeze
|
19
|
+
PROJECT = "PROJECT".freeze
|
20
|
+
|
21
|
+
MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
|
22
|
+
|
23
|
+
attr_accessor :value
|
24
|
+
attr_accessor :raw_value
|
25
|
+
|
26
|
+
# Builds the enum from string
|
27
|
+
# @param [String] The enum value in the form of the string
|
28
|
+
# @return [String] The enum value
|
29
|
+
def build_from_hash(value)
|
30
|
+
@raw_value = value
|
31
|
+
if ["LIST", "PROJECT", ].include? value
|
32
|
+
@value = value
|
33
|
+
else
|
34
|
+
@value = MERGE_NONSTANDARD_VALUE
|
35
|
+
end
|
36
|
+
|
37
|
+
self
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.build_from_hash(value)
|
41
|
+
CollectionTypeEnum.new.build_from_hash(value)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -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
|