merge_ticketing_client 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE.md +16 -0
- data/README.md +208 -0
- data/Rakefile +10 -0
- data/docs/Account.md +28 -0
- data/docs/AccountDetails.md +36 -0
- data/docs/AccountDetailsAndActions.md +36 -0
- data/docs/AccountDetailsAndActionsIntegration.md +32 -0
- data/docs/AccountDetailsAndActionsStatusEnum.md +15 -0
- data/docs/AccountDetailsApi.md +79 -0
- data/docs/AccountIntegration.md +28 -0
- data/docs/AccountToken.md +20 -0
- data/docs/AccountTokenApi.md +79 -0
- data/docs/AccountsApi.md +177 -0
- data/docs/Attachment.md +36 -0
- data/docs/AttachmentRequest.md +30 -0
- data/docs/AttachmentsApi.md +335 -0
- data/docs/AvailableActions.md +22 -0
- data/docs/AvailableActionsApi.md +79 -0
- data/docs/CategoriesEnum.md +15 -0
- data/docs/CategoryEnum.md +15 -0
- data/docs/Comment.md +38 -0
- data/docs/CommentEndpointRequest.md +18 -0
- data/docs/CommentRequest.md +32 -0
- data/docs/CommentResponse.md +24 -0
- data/docs/CommentsApi.md +335 -0
- data/docs/Contact.md +34 -0
- data/docs/ContactsApi.md +181 -0
- data/docs/DataPassthroughRequest.md +32 -0
- data/docs/DebugModeLog.md +22 -0
- data/docs/DebugModelLogSummary.md +22 -0
- data/docs/DeleteAccountApi.md +78 -0
- data/docs/EncodingEnum.md +15 -0
- data/docs/EndUserDetailsRequest.md +30 -0
- data/docs/ErrorValidationProblem.md +24 -0
- data/docs/ForceResyncApi.md +79 -0
- data/docs/GenerateKeyApi.md +79 -0
- data/docs/GenerateRemoteKeyRequest.md +18 -0
- data/docs/Issue.md +30 -0
- data/docs/IssueStatusEnum.md +15 -0
- data/docs/IssuesApi.md +177 -0
- data/docs/LinkToken.md +22 -0
- data/docs/LinkTokenApi.md +79 -0
- data/docs/LinkedAccountStatus.md +20 -0
- data/docs/LinkedAccountsApi.md +105 -0
- data/docs/MetaResponse.md +24 -0
- data/docs/MethodEnum.md +15 -0
- data/docs/ModelOperation.md +24 -0
- data/docs/MultipartFormFieldRequest.md +26 -0
- data/docs/PaginatedAccountDetailsAndActionsList.md +22 -0
- data/docs/PaginatedAccountList.md +22 -0
- data/docs/PaginatedAttachmentList.md +22 -0
- data/docs/PaginatedCommentList.md +22 -0
- data/docs/PaginatedContactList.md +22 -0
- data/docs/PaginatedIssueList.md +22 -0
- data/docs/PaginatedProjectList.md +22 -0
- data/docs/PaginatedSyncStatusList.md +22 -0
- data/docs/PaginatedTagList.md +22 -0
- data/docs/PaginatedTeamList.md +22 -0
- data/docs/PaginatedTicketList.md +22 -0
- data/docs/PaginatedUserList.md +22 -0
- data/docs/PassthroughApi.md +81 -0
- data/docs/Project.md +28 -0
- data/docs/ProjectsApi.md +261 -0
- data/docs/RegenerateKeyApi.md +79 -0
- data/docs/RemoteData.md +20 -0
- data/docs/RemoteKey.md +20 -0
- data/docs/RemoteKeyForRegenerationRequest.md +18 -0
- data/docs/RemoteResponse.md +28 -0
- data/docs/RequestFormatEnum.md +15 -0
- data/docs/SyncStatus.md +28 -0
- data/docs/SyncStatusApi.md +85 -0
- data/docs/SyncStatusStatusEnum.md +15 -0
- data/docs/Tag.md +24 -0
- data/docs/TagsApi.md +177 -0
- data/docs/Team.md +28 -0
- data/docs/TeamsApi.md +177 -0
- data/docs/Ticket.md +52 -0
- data/docs/TicketEndpointRequest.md +18 -0
- data/docs/TicketRequest.md +46 -0
- data/docs/TicketResponse.md +24 -0
- data/docs/TicketStatusEnum.md +15 -0
- data/docs/TicketingAttachmentEndpointRequest.md +18 -0
- data/docs/TicketingAttachmentResponse.md +24 -0
- data/docs/TicketsApi.md +425 -0
- data/docs/User.md +32 -0
- data/docs/UsersApi.md +181 -0
- data/docs/ValidationProblemSource.md +18 -0
- data/docs/WarningValidationProblem.md +24 -0
- data/docs/WebhookReceiver.md +22 -0
- data/docs/WebhookReceiverRequest.md +22 -0
- data/docs/WebhookReceiversApi.md +153 -0
- data/git_push.sh +58 -0
- data/lib/merge_ticketing_client/api/account_details_api.rb +84 -0
- data/lib/merge_ticketing_client/api/account_token_api.rb +83 -0
- data/lib/merge_ticketing_client/api/accounts_api.rb +182 -0
- data/lib/merge_ticketing_client/api/attachments_api.rb +337 -0
- data/lib/merge_ticketing_client/api/available_actions_api.rb +84 -0
- data/lib/merge_ticketing_client/api/comments_api.rb +337 -0
- data/lib/merge_ticketing_client/api/contacts_api.rb +196 -0
- data/lib/merge_ticketing_client/api/delete_account_api.rb +82 -0
- data/lib/merge_ticketing_client/api/force_resync_api.rb +84 -0
- data/lib/merge_ticketing_client/api/generate_key_api.rb +85 -0
- data/lib/merge_ticketing_client/api/issues_api.rb +181 -0
- data/lib/merge_ticketing_client/api/link_token_api.rb +85 -0
- data/lib/merge_ticketing_client/api/linked_accounts_api.rb +120 -0
- data/lib/merge_ticketing_client/api/passthrough_api.rb +92 -0
- data/lib/merge_ticketing_client/api/projects_api.rb +266 -0
- data/lib/merge_ticketing_client/api/regenerate_key_api.rb +85 -0
- data/lib/merge_ticketing_client/api/sync_status_api.rb +90 -0
- data/lib/merge_ticketing_client/api/tags_api.rb +182 -0
- data/lib/merge_ticketing_client/api/teams_api.rb +182 -0
- data/lib/merge_ticketing_client/api/tickets_api.rb +438 -0
- data/lib/merge_ticketing_client/api/users_api.rb +196 -0
- data/lib/merge_ticketing_client/api/webhook_receivers_api.rb +154 -0
- data/lib/merge_ticketing_client/api_client.rb +390 -0
- data/lib/merge_ticketing_client/api_error.rb +57 -0
- data/lib/merge_ticketing_client/configuration.rb +281 -0
- data/lib/merge_ticketing_client/models/account.rb +276 -0
- data/lib/merge_ticketing_client/models/account_details.rb +302 -0
- data/lib/merge_ticketing_client/models/account_details_and_actions.rb +327 -0
- data/lib/merge_ticketing_client/models/account_details_and_actions_integration.rb +310 -0
- data/lib/merge_ticketing_client/models/account_details_and_actions_status_enum.rb +46 -0
- data/lib/merge_ticketing_client/models/account_integration.rb +303 -0
- data/lib/merge_ticketing_client/models/account_token.rb +237 -0
- data/lib/merge_ticketing_client/models/attachment.rb +315 -0
- data/lib/merge_ticketing_client/models/attachment_request.rb +285 -0
- data/lib/merge_ticketing_client/models/available_actions.rb +249 -0
- data/lib/merge_ticketing_client/models/categories_enum.rb +48 -0
- data/lib/merge_ticketing_client/models/category_enum.rb +48 -0
- data/lib/merge_ticketing_client/models/comment.rb +325 -0
- data/lib/merge_ticketing_client/models/comment_endpoint_request.rb +223 -0
- data/lib/merge_ticketing_client/models/comment_request.rb +295 -0
- data/lib/merge_ticketing_client/models/comment_response.rb +266 -0
- data/lib/merge_ticketing_client/models/contact.rb +307 -0
- data/lib/merge_ticketing_client/models/data_passthrough_request.rb +352 -0
- data/lib/merge_ticketing_client/models/debug_mode_log.rb +251 -0
- data/lib/merge_ticketing_client/models/debug_model_log_summary.rb +251 -0
- data/lib/merge_ticketing_client/models/encoding_enum.rb +46 -0
- data/lib/merge_ticketing_client/models/end_user_details_request.rb +430 -0
- data/lib/merge_ticketing_client/models/error_validation_problem.rb +260 -0
- data/lib/merge_ticketing_client/models/generate_remote_key_request.rb +243 -0
- data/lib/merge_ticketing_client/models/issue.rb +281 -0
- data/lib/merge_ticketing_client/models/issue_status_enum.rb +45 -0
- data/lib/merge_ticketing_client/models/link_token.rb +246 -0
- data/lib/merge_ticketing_client/models/linked_account_status.rb +237 -0
- data/lib/merge_ticketing_client/models/meta_response.rb +262 -0
- data/lib/merge_ticketing_client/models/method_enum.rb +50 -0
- data/lib/merge_ticketing_client/models/model_operation.rb +272 -0
- data/lib/merge_ticketing_client/models/multipart_form_field_request.rb +341 -0
- data/lib/merge_ticketing_client/models/paginated_account_details_and_actions_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_account_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_attachment_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_comment_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_contact_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_issue_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_project_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_sync_status_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_tag_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_team_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_ticket_list.rb +240 -0
- data/lib/merge_ticketing_client/models/paginated_user_list.rb +240 -0
- data/lib/merge_ticketing_client/models/project.rb +274 -0
- data/lib/merge_ticketing_client/models/remote_data.rb +234 -0
- data/lib/merge_ticketing_client/models/remote_key.rb +238 -0
- data/lib/merge_ticketing_client/models/remote_key_for_regeneration_request.rb +243 -0
- data/lib/merge_ticketing_client/models/remote_response.rb +290 -0
- data/lib/merge_ticketing_client/models/request_format_enum.rb +46 -0
- data/lib/merge_ticketing_client/models/sync_status.rb +294 -0
- data/lib/merge_ticketing_client/models/sync_status_status_enum.rb +48 -0
- data/lib/merge_ticketing_client/models/tag.rb +254 -0
- data/lib/merge_ticketing_client/models/team.rb +274 -0
- data/lib/merge_ticketing_client/models/ticket.rb +401 -0
- data/lib/merge_ticketing_client/models/ticket_endpoint_request.rb +223 -0
- data/lib/merge_ticketing_client/models/ticket_request.rb +371 -0
- data/lib/merge_ticketing_client/models/ticket_response.rb +266 -0
- data/lib/merge_ticketing_client/models/ticket_status_enum.rb +45 -0
- data/lib/merge_ticketing_client/models/ticketing_attachment_endpoint_request.rb +223 -0
- data/lib/merge_ticketing_client/models/ticketing_attachment_response.rb +266 -0
- data/lib/merge_ticketing_client/models/user.rb +296 -0
- data/lib/merge_ticketing_client/models/validation_problem_source.rb +223 -0
- data/lib/merge_ticketing_client/models/warning_validation_problem.rb +260 -0
- data/lib/merge_ticketing_client/models/webhook_receiver.rb +246 -0
- data/lib/merge_ticketing_client/models/webhook_receiver_request.rb +280 -0
- data/lib/merge_ticketing_client/version.rb +15 -0
- data/lib/merge_ticketing_client.rb +127 -0
- data/merge_ticketing_client.gemspec +38 -0
- data/pull_request_template.md +20 -0
- data/spec/api/account_details_api_spec.rb +46 -0
- data/spec/api/account_token_api_spec.rb +46 -0
- data/spec/api/accounts_api_spec.rb +68 -0
- data/spec/api/attachments_api_spec.rb +96 -0
- data/spec/api/available_actions_api_spec.rb +46 -0
- data/spec/api/comments_api_spec.rb +96 -0
- data/spec/api/contacts_api_spec.rb +70 -0
- data/spec/api/delete_account_api_spec.rb +46 -0
- data/spec/api/force_resync_api_spec.rb +46 -0
- data/spec/api/generate_key_api_spec.rb +46 -0
- data/spec/api/issues_api_spec.rb +69 -0
- data/spec/api/link_token_api_spec.rb +46 -0
- data/spec/api/linked_accounts_api_spec.rb +58 -0
- data/spec/api/passthrough_api_spec.rb +47 -0
- data/spec/api/projects_api_spec.rb +84 -0
- data/spec/api/regenerate_key_api_spec.rb +46 -0
- data/spec/api/sync_status_api_spec.rb +48 -0
- data/spec/api/tags_api_spec.rb +68 -0
- data/spec/api/teams_api_spec.rb +68 -0
- data/spec/api/tickets_api_spec.rb +115 -0
- data/spec/api/users_api_spec.rb +70 -0
- data/spec/api/webhook_receivers_api_spec.rb +58 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_details_and_actions_integration_spec.rb +76 -0
- data/spec/models/account_details_and_actions_spec.rb +88 -0
- data/spec/models/account_details_and_actions_status_enum_spec.rb +28 -0
- data/spec/models/account_details_spec.rb +88 -0
- data/spec/models/account_integration_spec.rb +64 -0
- data/spec/models/account_spec.rb +64 -0
- data/spec/models/account_token_spec.rb +40 -0
- data/spec/models/attachment_request_spec.rb +70 -0
- data/spec/models/attachment_spec.rb +88 -0
- data/spec/models/available_actions_spec.rb +46 -0
- data/spec/models/categories_enum_spec.rb +28 -0
- data/spec/models/category_enum_spec.rb +28 -0
- data/spec/models/comment_endpoint_request_spec.rb +34 -0
- data/spec/models/comment_request_spec.rb +76 -0
- data/spec/models/comment_response_spec.rb +52 -0
- data/spec/models/comment_spec.rb +94 -0
- data/spec/models/contact_spec.rb +82 -0
- data/spec/models/data_passthrough_request_spec.rb +76 -0
- data/spec/models/debug_mode_log_spec.rb +46 -0
- data/spec/models/debug_model_log_summary_spec.rb +46 -0
- data/spec/models/encoding_enum_spec.rb +28 -0
- data/spec/models/end_user_details_request_spec.rb +70 -0
- data/spec/models/error_validation_problem_spec.rb +52 -0
- data/spec/models/generate_remote_key_request_spec.rb +34 -0
- data/spec/models/issue_spec.rb +70 -0
- data/spec/models/issue_status_enum_spec.rb +28 -0
- data/spec/models/link_token_spec.rb +46 -0
- data/spec/models/linked_account_status_spec.rb +40 -0
- data/spec/models/meta_response_spec.rb +52 -0
- data/spec/models/method_enum_spec.rb +28 -0
- data/spec/models/model_operation_spec.rb +52 -0
- data/spec/models/multipart_form_field_request_spec.rb +58 -0
- data/spec/models/paginated_account_details_and_actions_list_spec.rb +46 -0
- data/spec/models/paginated_account_list_spec.rb +46 -0
- data/spec/models/paginated_attachment_list_spec.rb +46 -0
- data/spec/models/paginated_comment_list_spec.rb +46 -0
- data/spec/models/paginated_contact_list_spec.rb +46 -0
- data/spec/models/paginated_issue_list_spec.rb +46 -0
- data/spec/models/paginated_project_list_spec.rb +46 -0
- data/spec/models/paginated_sync_status_list_spec.rb +46 -0
- data/spec/models/paginated_tag_list_spec.rb +46 -0
- data/spec/models/paginated_team_list_spec.rb +46 -0
- data/spec/models/paginated_ticket_list_spec.rb +46 -0
- data/spec/models/paginated_user_list_spec.rb +46 -0
- data/spec/models/project_spec.rb +64 -0
- data/spec/models/remote_data_spec.rb +40 -0
- data/spec/models/remote_key_for_regeneration_request_spec.rb +34 -0
- data/spec/models/remote_key_spec.rb +40 -0
- data/spec/models/remote_response_spec.rb +64 -0
- data/spec/models/request_format_enum_spec.rb +28 -0
- data/spec/models/sync_status_spec.rb +64 -0
- data/spec/models/sync_status_status_enum_spec.rb +28 -0
- data/spec/models/tag_spec.rb +52 -0
- data/spec/models/team_spec.rb +64 -0
- data/spec/models/ticket_endpoint_request_spec.rb +34 -0
- data/spec/models/ticket_request_spec.rb +118 -0
- data/spec/models/ticket_response_spec.rb +52 -0
- data/spec/models/ticket_spec.rb +136 -0
- data/spec/models/ticket_status_enum_spec.rb +28 -0
- data/spec/models/ticketing_attachment_endpoint_request_spec.rb +34 -0
- data/spec/models/ticketing_attachment_response_spec.rb +52 -0
- data/spec/models/user_spec.rb +76 -0
- data/spec/models/validation_problem_source_spec.rb +34 -0
- data/spec/models/warning_validation_problem_spec.rb +52 -0
- data/spec/models/webhook_receiver_request_spec.rb +46 -0
- data/spec/models/webhook_receiver_spec.rb +46 -0
- data/spec/spec_helper.rb +111 -0
- metadata +454 -0
@@ -0,0 +1,281 @@
|
|
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
|
+
module MergeTicketingClient
|
14
|
+
class Configuration
|
15
|
+
# Defines url scheme
|
16
|
+
attr_accessor :scheme
|
17
|
+
|
18
|
+
# Defines url host
|
19
|
+
attr_accessor :host
|
20
|
+
|
21
|
+
# Defines url base path
|
22
|
+
attr_accessor :base_path
|
23
|
+
|
24
|
+
# Define server configuration index
|
25
|
+
attr_accessor :server_index
|
26
|
+
|
27
|
+
# Define server operation configuration index
|
28
|
+
attr_accessor :server_operation_index
|
29
|
+
|
30
|
+
# Default server variables
|
31
|
+
attr_accessor :server_variables
|
32
|
+
|
33
|
+
# Default server operation variables
|
34
|
+
attr_accessor :server_operation_variables
|
35
|
+
|
36
|
+
# Defines API keys used with API Key authentications.
|
37
|
+
#
|
38
|
+
# @return [Hash] key: parameter name, value: parameter value (API key)
|
39
|
+
#
|
40
|
+
# @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
|
41
|
+
# config.api_key['api_key'] = 'xxx'
|
42
|
+
attr_accessor :api_key
|
43
|
+
|
44
|
+
# Defines API key prefixes used with API Key authentications.
|
45
|
+
#
|
46
|
+
# @return [Hash] key: parameter name, value: API key prefix
|
47
|
+
#
|
48
|
+
# @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
|
49
|
+
# config.api_key_prefix['api_key'] = 'Token'
|
50
|
+
attr_accessor :api_key_prefix
|
51
|
+
|
52
|
+
# Defines the username used with HTTP basic authentication.
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
attr_accessor :username
|
56
|
+
|
57
|
+
# Defines the password used with HTTP basic authentication.
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
attr_accessor :password
|
61
|
+
|
62
|
+
# Defines the access token (Bearer) used with OAuth2.
|
63
|
+
attr_accessor :access_token
|
64
|
+
|
65
|
+
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
66
|
+
# details will be logged with `logger.debug` (see the `logger` attribute).
|
67
|
+
# Default to false.
|
68
|
+
#
|
69
|
+
# @return [true, false]
|
70
|
+
attr_accessor :debugging
|
71
|
+
|
72
|
+
# Defines the logger used for debugging.
|
73
|
+
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
74
|
+
#
|
75
|
+
# @return [#debug]
|
76
|
+
attr_accessor :logger
|
77
|
+
|
78
|
+
# Defines the temporary folder to store downloaded files
|
79
|
+
# (for API endpoints that have file response).
|
80
|
+
# Default to use `Tempfile`.
|
81
|
+
#
|
82
|
+
# @return [String]
|
83
|
+
attr_accessor :temp_folder_path
|
84
|
+
|
85
|
+
# The time limit for HTTP request in seconds.
|
86
|
+
# Default to 0 (never times out).
|
87
|
+
attr_accessor :timeout
|
88
|
+
|
89
|
+
# Set this to false to skip client side validation in the operation.
|
90
|
+
# Default to true.
|
91
|
+
# @return [true, false]
|
92
|
+
attr_accessor :client_side_validation
|
93
|
+
|
94
|
+
### TLS/SSL setting
|
95
|
+
# Set this to false to skip verifying SSL certificate when calling API from https server.
|
96
|
+
# Default to true.
|
97
|
+
#
|
98
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
99
|
+
#
|
100
|
+
# @return [true, false]
|
101
|
+
attr_accessor :verify_ssl
|
102
|
+
|
103
|
+
### TLS/SSL setting
|
104
|
+
# Set this to false to skip verifying SSL host name
|
105
|
+
# Default to true.
|
106
|
+
#
|
107
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
108
|
+
#
|
109
|
+
# @return [true, false]
|
110
|
+
attr_accessor :verify_ssl_host
|
111
|
+
|
112
|
+
### TLS/SSL setting
|
113
|
+
# Set this to customize the certificate file to verify the peer.
|
114
|
+
#
|
115
|
+
# @return [String] the path to the certificate file
|
116
|
+
#
|
117
|
+
# @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
|
118
|
+
# https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
|
119
|
+
attr_accessor :ssl_ca_cert
|
120
|
+
|
121
|
+
### TLS/SSL setting
|
122
|
+
# Client certificate file (for client certificate)
|
123
|
+
attr_accessor :cert_file
|
124
|
+
|
125
|
+
### TLS/SSL setting
|
126
|
+
# Client private key file (for client certificate)
|
127
|
+
attr_accessor :key_file
|
128
|
+
|
129
|
+
# Set this to customize parameters encoding of array parameter with multi collectionFormat.
|
130
|
+
# Default to nil.
|
131
|
+
#
|
132
|
+
# @see The params_encoding option of Ethon. Related source code:
|
133
|
+
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
134
|
+
attr_accessor :params_encoding
|
135
|
+
|
136
|
+
attr_accessor :inject_format
|
137
|
+
|
138
|
+
attr_accessor :force_ending_format
|
139
|
+
|
140
|
+
def initialize
|
141
|
+
@scheme = 'https'
|
142
|
+
@host = 'api.merge.dev'
|
143
|
+
@base_path = '/api/ticketing/v1'
|
144
|
+
@server_index = 0
|
145
|
+
@server_operation_index = {}
|
146
|
+
@server_variables = {}
|
147
|
+
@server_operation_variables = {}
|
148
|
+
@api_key = {}
|
149
|
+
@api_key_prefix = {}
|
150
|
+
@timeout = 0
|
151
|
+
@client_side_validation = true
|
152
|
+
@verify_ssl = true
|
153
|
+
@verify_ssl_host = true
|
154
|
+
@params_encoding = nil
|
155
|
+
@cert_file = nil
|
156
|
+
@key_file = nil
|
157
|
+
@debugging = false
|
158
|
+
@inject_format = false
|
159
|
+
@force_ending_format = false
|
160
|
+
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
161
|
+
|
162
|
+
yield(self) if block_given?
|
163
|
+
end
|
164
|
+
|
165
|
+
# The default Configuration object.
|
166
|
+
def self.default
|
167
|
+
@@default ||= Configuration.new
|
168
|
+
end
|
169
|
+
|
170
|
+
def configure
|
171
|
+
yield(self) if block_given?
|
172
|
+
end
|
173
|
+
|
174
|
+
def scheme=(scheme)
|
175
|
+
# remove :// from scheme
|
176
|
+
@scheme = scheme.sub(/:\/\//, '')
|
177
|
+
end
|
178
|
+
|
179
|
+
def host=(host)
|
180
|
+
# remove http(s):// and anything after a slash
|
181
|
+
@host = host.sub(/https?:\/\//, '').split('/').first
|
182
|
+
end
|
183
|
+
|
184
|
+
def base_path=(base_path)
|
185
|
+
# Add leading and trailing slashes to base_path
|
186
|
+
@base_path = "/#{base_path}".gsub(/\/+/, '/')
|
187
|
+
@base_path = '' if @base_path == '/'
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns base URL for specified operation based on server settings
|
191
|
+
def base_url(operation = nil)
|
192
|
+
index = server_operation_index.fetch(operation, server_index)
|
193
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
|
194
|
+
|
195
|
+
server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
196
|
+
end
|
197
|
+
|
198
|
+
# Gets API key (with prefix if set).
|
199
|
+
# @param [String] param_name the parameter name of API key auth
|
200
|
+
def api_key_with_prefix(param_name, param_alias = nil)
|
201
|
+
key = @api_key[param_name]
|
202
|
+
key = @api_key.fetch(param_alias, key) unless param_alias.nil?
|
203
|
+
if @api_key_prefix[param_name]
|
204
|
+
"#{@api_key_prefix[param_name]} #{key}"
|
205
|
+
else
|
206
|
+
key
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# Gets Basic Auth token string
|
211
|
+
def basic_auth_token
|
212
|
+
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns Auth Settings hash for api client.
|
216
|
+
def auth_settings
|
217
|
+
{
|
218
|
+
'tokenAuth' =>
|
219
|
+
{
|
220
|
+
type: 'api_key',
|
221
|
+
in: 'header',
|
222
|
+
key: 'Authorization',
|
223
|
+
value: api_key_with_prefix('tokenAuth')
|
224
|
+
},
|
225
|
+
}
|
226
|
+
end
|
227
|
+
|
228
|
+
# Returns an array of Server setting
|
229
|
+
def server_settings
|
230
|
+
[
|
231
|
+
{
|
232
|
+
url: "https://api.merge.dev/api/ticketing/v1",
|
233
|
+
description: "Production",
|
234
|
+
},
|
235
|
+
{
|
236
|
+
url: "https://api-sandbox.merge.dev/api/ticketing/v1",
|
237
|
+
description: "Sandbox",
|
238
|
+
}
|
239
|
+
]
|
240
|
+
end
|
241
|
+
|
242
|
+
def operation_server_settings
|
243
|
+
{
|
244
|
+
}
|
245
|
+
end
|
246
|
+
|
247
|
+
# Returns URL based on server settings
|
248
|
+
#
|
249
|
+
# @param index array index of the server settings
|
250
|
+
# @param variables hash of variable and the corresponding value
|
251
|
+
def server_url(index, variables = {}, servers = nil)
|
252
|
+
servers = server_settings if servers == nil
|
253
|
+
|
254
|
+
# check array index out of bound
|
255
|
+
if (index < 0 || index >= servers.size)
|
256
|
+
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
257
|
+
end
|
258
|
+
|
259
|
+
server = servers[index]
|
260
|
+
url = server[:url]
|
261
|
+
|
262
|
+
return url unless server.key? :variables
|
263
|
+
|
264
|
+
# go through variable and assign a value
|
265
|
+
server[:variables].each do |name, variable|
|
266
|
+
if variables.key?(name)
|
267
|
+
if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
|
268
|
+
url.gsub! "{" + name.to_s + "}", variables[name]
|
269
|
+
else
|
270
|
+
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
271
|
+
end
|
272
|
+
else
|
273
|
+
# use default value
|
274
|
+
url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
url
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
@@ -0,0 +1,276 @@
|
|
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 Account Object ### Description The `Account` object is used to represent the account that a ticket is associated with. The account is a company that may be a customer. This does not represent the company that is receiving the ticket. ### Usage Example TODO
|
18
|
+
class Account
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# The third-party API ID of the matching object.
|
22
|
+
attr_accessor :remote_id
|
23
|
+
|
24
|
+
# The account's name.
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
# The account's domain names.
|
28
|
+
attr_accessor :domains
|
29
|
+
|
30
|
+
attr_accessor :remote_data
|
31
|
+
|
32
|
+
# Indicates whether or not this object has been deleted by third party webhooks.
|
33
|
+
attr_accessor :remote_was_deleted
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'id' => :'id',
|
39
|
+
:'remote_id' => :'remote_id',
|
40
|
+
:'name' => :'name',
|
41
|
+
:'domains' => :'domains',
|
42
|
+
:'remote_data' => :'remote_data',
|
43
|
+
:'remote_was_deleted' => :'remote_was_deleted'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
def self.acceptable_attributes
|
49
|
+
attribute_map.values
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.openapi_types
|
54
|
+
{
|
55
|
+
:'id' => :'String',
|
56
|
+
:'remote_id' => :'String',
|
57
|
+
:'name' => :'String',
|
58
|
+
:'domains' => :'Array<String>',
|
59
|
+
:'remote_data' => :'Array<RemoteData>',
|
60
|
+
:'remote_was_deleted' => :'Boolean'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# List of attributes with nullable: true
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
:'remote_id',
|
68
|
+
:'name',
|
69
|
+
:'domains',
|
70
|
+
:'remote_data',
|
71
|
+
])
|
72
|
+
end
|
73
|
+
|
74
|
+
# Initializes the object
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
76
|
+
def initialize(attributes = {})
|
77
|
+
if (!attributes.is_a?(Hash))
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MergeTicketingClient::Account` initialize method"
|
79
|
+
end
|
80
|
+
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
82
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
83
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MergeTicketingClient::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
85
|
+
end
|
86
|
+
h[k.to_sym] = v
|
87
|
+
}
|
88
|
+
|
89
|
+
if attributes.key?(:'id')
|
90
|
+
self.id = attributes[:'id']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'remote_id')
|
94
|
+
self.remote_id = attributes[:'remote_id']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'name')
|
98
|
+
self.name = attributes[:'name']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'domains')
|
102
|
+
if (value = attributes[:'domains']).is_a?(Array)
|
103
|
+
self.domains = value
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'remote_data')
|
108
|
+
if (value = attributes[:'remote_data']).is_a?(Array)
|
109
|
+
self.remote_data = value
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'remote_was_deleted')
|
114
|
+
self.remote_was_deleted = attributes[:'remote_was_deleted']
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
119
|
+
# @return Array for valid properties with the reasons
|
120
|
+
def list_invalid_properties
|
121
|
+
invalid_properties = Array.new
|
122
|
+
invalid_properties
|
123
|
+
end
|
124
|
+
|
125
|
+
# Check to see if the all the properties in the model are valid
|
126
|
+
# @return true if the model is valid
|
127
|
+
def valid?
|
128
|
+
true
|
129
|
+
end
|
130
|
+
|
131
|
+
# Checks equality by comparing each attribute.
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def ==(o)
|
134
|
+
return true if self.equal?(o)
|
135
|
+
self.class == o.class &&
|
136
|
+
id == o.id &&
|
137
|
+
remote_id == o.remote_id &&
|
138
|
+
name == o.name &&
|
139
|
+
domains == o.domains &&
|
140
|
+
remote_data == o.remote_data &&
|
141
|
+
remote_was_deleted == o.remote_was_deleted
|
142
|
+
end
|
143
|
+
|
144
|
+
# @see the `==` method
|
145
|
+
# @param [Object] Object to be compared
|
146
|
+
def eql?(o)
|
147
|
+
self == o
|
148
|
+
end
|
149
|
+
|
150
|
+
# Calculates hash code according to all attributes.
|
151
|
+
# @return [Integer] Hash code
|
152
|
+
def hash
|
153
|
+
[id, remote_id, name, domains, remote_data, remote_was_deleted].hash
|
154
|
+
end
|
155
|
+
|
156
|
+
# Builds the object from hash
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
158
|
+
# @return [Object] Returns the model itself
|
159
|
+
def self.build_from_hash(attributes)
|
160
|
+
new.build_from_hash(attributes)
|
161
|
+
end
|
162
|
+
|
163
|
+
# Builds the object from hash
|
164
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
165
|
+
# @return [Object] Returns the model itself
|
166
|
+
def build_from_hash(attributes)
|
167
|
+
return nil unless attributes.is_a?(Hash)
|
168
|
+
self.class.openapi_types.each_pair do |key, type|
|
169
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
170
|
+
self.send("#{key}=", nil)
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
172
|
+
# check to ensure the input is an array given that the attribute
|
173
|
+
# is documented as an array but the input is not
|
174
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
175
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
176
|
+
end
|
177
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
178
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
self
|
183
|
+
end
|
184
|
+
|
185
|
+
# Deserializes the data based on type
|
186
|
+
# @param string type Data type
|
187
|
+
# @param string value Value to be deserialized
|
188
|
+
# @return [Object] Deserialized data
|
189
|
+
def _deserialize(type, value)
|
190
|
+
case type.to_sym
|
191
|
+
when :Time
|
192
|
+
Time.parse(value)
|
193
|
+
when :Date
|
194
|
+
Date.parse(value)
|
195
|
+
when :String
|
196
|
+
value
|
197
|
+
when :Integer
|
198
|
+
value.to_i
|
199
|
+
when :Float
|
200
|
+
value.to_f
|
201
|
+
when :Boolean
|
202
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
203
|
+
true
|
204
|
+
else
|
205
|
+
false
|
206
|
+
end
|
207
|
+
when :Object
|
208
|
+
# generic object (usually a Hash), return directly
|
209
|
+
value
|
210
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
211
|
+
inner_type = Regexp.last_match[:inner_type]
|
212
|
+
value.map { |v| _deserialize(inner_type, v) }
|
213
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
214
|
+
k_type = Regexp.last_match[:k_type]
|
215
|
+
v_type = Regexp.last_match[:v_type]
|
216
|
+
{}.tap do |hash|
|
217
|
+
value.each do |k, v|
|
218
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
219
|
+
end
|
220
|
+
end
|
221
|
+
else # model
|
222
|
+
# models (e.g. Pet) or oneOf
|
223
|
+
klass = MergeTicketingClient.const_get(type)
|
224
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
# Returns the string representation of the object
|
229
|
+
# @return [String] String presentation of the object
|
230
|
+
def to_s
|
231
|
+
to_hash.to_s
|
232
|
+
end
|
233
|
+
|
234
|
+
# to_body is an alias to to_hash (backward compatibility)
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
236
|
+
def to_body
|
237
|
+
to_hash
|
238
|
+
end
|
239
|
+
|
240
|
+
# Returns the object in the form of hash
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
242
|
+
def to_hash
|
243
|
+
hash = {}
|
244
|
+
self.class.attribute_map.each_pair do |attr, param|
|
245
|
+
value = self.send(attr)
|
246
|
+
if value.nil?
|
247
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
248
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
249
|
+
end
|
250
|
+
|
251
|
+
hash[param] = _to_hash(value)
|
252
|
+
end
|
253
|
+
hash
|
254
|
+
end
|
255
|
+
|
256
|
+
# Outputs non-array value in the form of hash
|
257
|
+
# For object, use to_hash. Otherwise, just return the value
|
258
|
+
# @param [Object] value Any valid value
|
259
|
+
# @return [Hash] Returns the value in the form of hash
|
260
|
+
def _to_hash(value)
|
261
|
+
if value.is_a?(Array)
|
262
|
+
value.compact.map { |v| _to_hash(v) }
|
263
|
+
elsif value.is_a?(Hash)
|
264
|
+
{}.tap do |hash|
|
265
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
266
|
+
end
|
267
|
+
elsif value.respond_to? :to_hash
|
268
|
+
value.to_hash
|
269
|
+
else
|
270
|
+
value
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
end
|
275
|
+
|
276
|
+
end
|