158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
# File 'lib/merge_ruby_client/ticketing/link_token/client.rb', line 158
def create(end_user_email_address:, end_user_organization_name:, end_user_origin_id:, categories:,
integration: nil, link_expiry_mins: nil, should_create_magic_link_url: nil, hide_admin_magic_link: nil, common_models: nil, category_common_model_scopes: nil, language: nil, integration_specific_config: nil, request_options: nil)
Async do
response = @request_client.conn.post do |req|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
req.["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
req.["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
req. = {
**(req. || {}),
**@request_client.,
**(request_options&. || {})
}.compact
unless request_options.nil? || request_options&.additional_query_parameters.nil?
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
end
req.body = {
**(request_options&.additional_body_parameters || {}),
end_user_email_address: end_user_email_address,
end_user_organization_name: end_user_organization_name,
end_user_origin_id: end_user_origin_id,
categories: categories,
integration: integration,
link_expiry_mins: link_expiry_mins,
should_create_magic_link_url: should_create_magic_link_url,
hide_admin_magic_link: hide_admin_magic_link,
common_models: common_models,
category_common_model_scopes: category_common_model_scopes,
language: language,
integration_specific_config: integration_specific_config
}.compact
req.url "#{@request_client.get_url(request_options: request_options)}/ticketing/v1/link-token"
end
Merge::Ticketing::LinkToken.from_json(json_object: response.body)
end
end
|