pingram 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +54 -0
- data/Rakefile +10 -0
- data/lib/pingram/api/account_api.rb +506 -0
- data/lib/pingram/api/addresses_api.rb +209 -0
- data/lib/pingram/api/components_api.rb +396 -0
- data/lib/pingram/api/default_api.rb +88 -0
- data/lib/pingram/api/domains_api.rb +204 -0
- data/lib/pingram/api/editor_api.rb +88 -0
- data/lib/pingram/api/environments_api.rb +215 -0
- data/lib/pingram/api/health_api.rb +77 -0
- data/lib/pingram/api/insights_api.rb +88 -0
- data/lib/pingram/api/keys_api.rb +204 -0
- data/lib/pingram/api/logs_api.rb +375 -0
- data/lib/pingram/api/members_api.rb +433 -0
- data/lib/pingram/api/sender_api.rb +221 -0
- data/lib/pingram/api/templates_api.rb +479 -0
- data/lib/pingram/api/types_api.rb +335 -0
- data/lib/pingram/api/user_api.rb +587 -0
- data/lib/pingram/api/users_api.rb +228 -0
- data/lib/pingram/api_client.rb +397 -0
- data/lib/pingram/api_error.rb +58 -0
- data/lib/pingram/api_model_base.rb +88 -0
- data/lib/pingram/client_wrapper.rb +212 -0
- data/lib/pingram/configuration.rb +330 -0
- data/lib/pingram/models/account_addresses_response.rb +166 -0
- data/lib/pingram/models/account_addresses_response_addresses_inner.rb +301 -0
- data/lib/pingram/models/account_get_response.rb +354 -0
- data/lib/pingram/models/account_get_response_pending_downgrade_usage_limit.rb +201 -0
- data/lib/pingram/models/address_response.rb +164 -0
- data/lib/pingram/models/auto_join_get_response.rb +192 -0
- data/lib/pingram/models/auto_join_post_response.rb +192 -0
- data/lib/pingram/models/auto_join_request_body.rb +166 -0
- data/lib/pingram/models/bee_token_v2.rb +190 -0
- data/lib/pingram/models/billing_post_request_body.rb +216 -0
- data/lib/pingram/models/billing_post_response_body.rb +367 -0
- data/lib/pingram/models/billing_post_response_body_pending_downgrade_usage_limit.rb +202 -0
- data/lib/pingram/models/channels_enum.rb +45 -0
- data/lib/pingram/models/create_account_request_body.rb +164 -0
- data/lib/pingram/models/create_account_response.rb +190 -0
- data/lib/pingram/models/create_address_request.rb +182 -0
- data/lib/pingram/models/create_key_request.rb +227 -0
- data/lib/pingram/models/create_key_response.rb +308 -0
- data/lib/pingram/models/delete_key_response.rb +165 -0
- data/lib/pingram/models/delete_user_response.rb +164 -0
- data/lib/pingram/models/email_auth_token_post_request.rb +147 -0
- data/lib/pingram/models/email_component_patch_request.rb +174 -0
- data/lib/pingram/models/email_component_post_request.rb +217 -0
- data/lib/pingram/models/email_component_response.rb +424 -0
- data/lib/pingram/models/email_component_response_referenced_by_inner.rb +238 -0
- data/lib/pingram/models/environment.rb +270 -0
- data/lib/pingram/models/environment_create_request.rb +164 -0
- data/lib/pingram/models/environment_patch_request.rb +176 -0
- data/lib/pingram/models/get_account_metadata_response.rb +164 -0
- data/lib/pingram/models/get_account_metadata_response_user_account_metadata.rb +216 -0
- data/lib/pingram/models/get_email_components_response_inner.rb +424 -0
- data/lib/pingram/models/get_environments_response_inner.rb +270 -0
- data/lib/pingram/models/get_inapp_notifications_response.rb +166 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner.rb +389 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.rb +206 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.rb +191 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.rb +164 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.rb +190 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template.rb +103 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.rb +301 -0
- data/lib/pingram/models/get_keys_response.rb +168 -0
- data/lib/pingram/models/get_keys_response_keys_inner.rb +371 -0
- data/lib/pingram/models/get_logs_response.rb +175 -0
- data/lib/pingram/models/get_logs_response_messages_inner.rb +419 -0
- data/lib/pingram/models/get_logs_response_messages_inner_attachments_inner.rb +225 -0
- data/lib/pingram/models/get_members_response_inner.rb +236 -0
- data/lib/pingram/models/get_metrics_response_inner.rb +238 -0
- data/lib/pingram/models/get_metrics_response_inner_messages_inner.rb +159 -0
- data/lib/pingram/models/get_notifications_response_inner.rb +317 -0
- data/lib/pingram/models/get_notifications_response_inner_deduplication.rb +164 -0
- data/lib/pingram/models/get_notifications_response_inner_options.rb +201 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email.rb +242 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_daily.rb +173 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_monthly.rb +216 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_weekly.rb +182 -0
- data/lib/pingram/models/get_notifications_response_inner_templates_inner.rb +214 -0
- data/lib/pingram/models/get_notifications_response_inner_throttling.rb +294 -0
- data/lib/pingram/models/get_senders_response_inner.rb +342 -0
- data/lib/pingram/models/get_templates_response.rb +103 -0
- data/lib/pingram/models/get_users_response.rb +201 -0
- data/lib/pingram/models/get_users_response_users_inner.rb +268 -0
- data/lib/pingram/models/get_users_response_users_inner_email_suppression_status.rb +214 -0
- data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner.rb +252 -0
- data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner_device.rb +209 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token.rb +317 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_authed_user.rb +192 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_enterprise.rb +156 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.rb +174 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_response_metadata.rb +200 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner.rb +164 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.rb +191 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.rb +190 -0
- data/lib/pingram/models/in_app_notification_patch_request.rb +231 -0
- data/lib/pingram/models/in_app_notification_unread_clear_request.rb +156 -0
- data/lib/pingram/models/inapp_unread_count_response.rb +164 -0
- data/lib/pingram/models/inbound_request_body.rb +103 -0
- data/lib/pingram/models/inbound_response_body.rb +216 -0
- data/lib/pingram/models/inbound_response_body_results_inner.rb +216 -0
- data/lib/pingram/models/ingishts_post_request.rb +288 -0
- data/lib/pingram/models/ingishts_post_request_label_options.rb +147 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner.rb +208 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.rb +211 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.rb +171 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.rb +159 -0
- data/lib/pingram/models/intercom_webhook.rb +293 -0
- data/lib/pingram/models/intercom_webhook_data.rb +164 -0
- data/lib/pingram/models/intercom_webhook_data_item.rb +103 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of.rb +453 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts.rb +216 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.rb +199 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_source.rb +260 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_source_author.rb +208 -0
- data/lib/pingram/models/invite_post_response.rb +156 -0
- data/lib/pingram/models/log_query_post_body.rb +251 -0
- data/lib/pingram/models/logs_bulk_request.rb +167 -0
- data/lib/pingram/models/logs_get_response.rb +167 -0
- data/lib/pingram/models/logs_get_response_logs_inner.rb +1808 -0
- data/lib/pingram/models/logs_query_response.rb +165 -0
- data/lib/pingram/models/logs_query_result_response.rb +194 -0
- data/lib/pingram/models/logs_retention_response.rb +165 -0
- data/lib/pingram/models/logs_tail_response.rb +167 -0
- data/lib/pingram/models/member_invite_request.rb +173 -0
- data/lib/pingram/models/member_update_request.rb +164 -0
- data/lib/pingram/models/message_response.rb +164 -0
- data/lib/pingram/models/notification.rb +317 -0
- data/lib/pingram/models/notification_create_request.rb +227 -0
- data/lib/pingram/models/notification_patch_request.rb +203 -0
- data/lib/pingram/models/post_email_test_request.rb +303 -0
- data/lib/pingram/models/post_email_test_response.rb +175 -0
- data/lib/pingram/models/post_senders_request_body.rb +164 -0
- data/lib/pingram/models/post_user_request.rb +215 -0
- data/lib/pingram/models/sender_post_body.rb +324 -0
- data/lib/pingram/models/sender_post_body_email.rb +217 -0
- data/lib/pingram/models/sender_post_body_inapp.rb +182 -0
- data/lib/pingram/models/sender_post_body_mobile_push.rb +190 -0
- data/lib/pingram/models/sender_post_body_options.rb +165 -0
- data/lib/pingram/models/sender_post_body_options_apn.rb +201 -0
- data/lib/pingram/models/sender_post_body_options_email.rb +209 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner.rb +103 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of.rb +190 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of1.rb +199 -0
- data/lib/pingram/models/sender_post_body_options_fcm.rb +147 -0
- data/lib/pingram/models/sender_post_body_options_fcm_android.rb +208 -0
- data/lib/pingram/models/sender_post_body_slack.rb +299 -0
- data/lib/pingram/models/sender_post_body_slack_metadata.rb +173 -0
- data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner.rb +257 -0
- data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.rb +174 -0
- data/lib/pingram/models/sender_post_body_sms.rb +156 -0
- data/lib/pingram/models/sender_post_body_sms_auto_reply.rb +164 -0
- data/lib/pingram/models/sender_post_body_to.rb +251 -0
- data/lib/pingram/models/sender_post_body_user.rb +268 -0
- data/lib/pingram/models/sender_post_body_web_push.rb +208 -0
- data/lib/pingram/models/sender_post_response.rb +192 -0
- data/lib/pingram/models/set_default_template_request.rb +204 -0
- data/lib/pingram/models/slack_interactivity_response.rb +165 -0
- data/lib/pingram/models/slack_oauth_request.rb +190 -0
- data/lib/pingram/models/success_response.rb +164 -0
- data/lib/pingram/models/supabase_configure_request.rb +242 -0
- data/lib/pingram/models/supabase_configure_response.rb +173 -0
- data/lib/pingram/models/supabase_o_auth_request.rb +216 -0
- data/lib/pingram/models/supabase_o_auth_response.rb +173 -0
- data/lib/pingram/models/supabase_projects_response.rb +166 -0
- data/lib/pingram/models/supabase_projects_response_projects_inner.rb +268 -0
- data/lib/pingram/models/supabase_status_response.rb +208 -0
- data/lib/pingram/models/template.rb +301 -0
- data/lib/pingram/models/template_patch_request.rb +104 -0
- data/lib/pingram/models/template_patch_request_any_of.rb +199 -0
- data/lib/pingram/models/template_patch_request_any_of1.rb +187 -0
- data/lib/pingram/models/template_patch_request_any_of1_batch.rb +217 -0
- data/lib/pingram/models/template_patch_request_any_of1_instant.rb +184 -0
- data/lib/pingram/models/template_post_request.rb +346 -0
- data/lib/pingram/models/template_post_request_batch.rb +217 -0
- data/lib/pingram/models/template_post_request_instant.rb +183 -0
- data/lib/pingram/models/update_address_request.rb +182 -0
- data/lib/pingram/models/user.rb +268 -0
- data/lib/pingram/models/user_suppression_delete_response.rb +164 -0
- data/lib/pingram/models/webhook_response.rb +182 -0
- data/lib/pingram/version.rb +15 -0
- data/lib/pingram.rb +215 -0
- data/pingram.gemspec +38 -0
- metadata +270 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#NotificationAPI
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Pingram
|
|
16
|
+
class TypesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a new notification
|
|
23
|
+
# @param notification_create_request [NotificationCreateRequest]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [Notification]
|
|
26
|
+
def types_create_notification_type(notification_create_request, opts = {})
|
|
27
|
+
data, _status_code, _headers = types_create_notification_type_with_http_info(notification_create_request, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Create a new notification
|
|
32
|
+
# @param notification_create_request [NotificationCreateRequest]
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
35
|
+
def types_create_notification_type_with_http_info(notification_create_request, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TypesApi.types_create_notification_type ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'notification_create_request' is set
|
|
40
|
+
if @api_client.config.client_side_validation && notification_create_request.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'notification_create_request' when calling TypesApi.types_create_notification_type"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/types'
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
53
|
+
# HTTP header 'Content-Type'
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(notification_create_request)
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
67
|
+
|
|
68
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"TypesApi.types_create_notification_type",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: TypesApi#types_create_notification_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Delete a notification
|
|
89
|
+
# @param notification_id [String] The notification ID
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [nil]
|
|
92
|
+
def types_delete_notification_type(notification_id, opts = {})
|
|
93
|
+
types_delete_notification_type_with_http_info(notification_id, opts)
|
|
94
|
+
nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Delete a notification
|
|
98
|
+
# @param notification_id [String] The notification ID
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
101
|
+
def types_delete_notification_type_with_http_info(notification_id, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: TypesApi.types_delete_notification_type ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'notification_id' is set
|
|
106
|
+
if @api_client.config.client_side_validation && notification_id.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'notification_id' when calling TypesApi.types_delete_notification_type"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/types/{notificationId}'.sub('{' + 'notificationId' + '}', CGI.escape(notification_id.to_s))
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
|
|
115
|
+
# header parameters
|
|
116
|
+
header_params = opts[:header_params] || {}
|
|
117
|
+
|
|
118
|
+
# form parameters
|
|
119
|
+
form_params = opts[:form_params] || {}
|
|
120
|
+
|
|
121
|
+
# http body (model)
|
|
122
|
+
post_body = opts[:debug_body]
|
|
123
|
+
|
|
124
|
+
# return_type
|
|
125
|
+
return_type = opts[:debug_return_type]
|
|
126
|
+
|
|
127
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
128
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
129
|
+
|
|
130
|
+
new_options = opts.merge(
|
|
131
|
+
:operation => :"TypesApi.types_delete_notification_type",
|
|
132
|
+
:header_params => header_params,
|
|
133
|
+
:query_params => query_params,
|
|
134
|
+
:form_params => form_params,
|
|
135
|
+
:body => post_body,
|
|
136
|
+
:auth_names => auth_names,
|
|
137
|
+
:return_type => return_type
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
141
|
+
if @api_client.config.debugging
|
|
142
|
+
@api_client.config.logger.debug "API called: TypesApi#types_delete_notification_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
143
|
+
end
|
|
144
|
+
return data, status_code, headers
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Get a specific notification by ID
|
|
148
|
+
# @param notification_id [String] The notification ID
|
|
149
|
+
# @param [Hash] opts the optional parameters
|
|
150
|
+
# @return [Array<GetNotificationsResponseInner>]
|
|
151
|
+
def types_get_notification_type(notification_id, opts = {})
|
|
152
|
+
data, _status_code, _headers = types_get_notification_type_with_http_info(notification_id, opts)
|
|
153
|
+
data
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Get a specific notification by ID
|
|
157
|
+
# @param notification_id [String] The notification ID
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @return [Array<(Array<GetNotificationsResponseInner>, Integer, Hash)>] Array<GetNotificationsResponseInner> data, response status code and response headers
|
|
160
|
+
def types_get_notification_type_with_http_info(notification_id, opts = {})
|
|
161
|
+
if @api_client.config.debugging
|
|
162
|
+
@api_client.config.logger.debug 'Calling API: TypesApi.types_get_notification_type ...'
|
|
163
|
+
end
|
|
164
|
+
# verify the required parameter 'notification_id' is set
|
|
165
|
+
if @api_client.config.client_side_validation && notification_id.nil?
|
|
166
|
+
fail ArgumentError, "Missing the required parameter 'notification_id' when calling TypesApi.types_get_notification_type"
|
|
167
|
+
end
|
|
168
|
+
# resource path
|
|
169
|
+
local_var_path = '/types/{notificationId}'.sub('{' + 'notificationId' + '}', CGI.escape(notification_id.to_s))
|
|
170
|
+
|
|
171
|
+
# query parameters
|
|
172
|
+
query_params = opts[:query_params] || {}
|
|
173
|
+
|
|
174
|
+
# header parameters
|
|
175
|
+
header_params = opts[:header_params] || {}
|
|
176
|
+
# HTTP header 'Accept' (if needed)
|
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
178
|
+
|
|
179
|
+
# form parameters
|
|
180
|
+
form_params = opts[:form_params] || {}
|
|
181
|
+
|
|
182
|
+
# http body (model)
|
|
183
|
+
post_body = opts[:debug_body]
|
|
184
|
+
|
|
185
|
+
# return_type
|
|
186
|
+
return_type = opts[:debug_return_type] || 'Array<GetNotificationsResponseInner>'
|
|
187
|
+
|
|
188
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
189
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
190
|
+
|
|
191
|
+
new_options = opts.merge(
|
|
192
|
+
:operation => :"TypesApi.types_get_notification_type",
|
|
193
|
+
:header_params => header_params,
|
|
194
|
+
:query_params => query_params,
|
|
195
|
+
:form_params => form_params,
|
|
196
|
+
:body => post_body,
|
|
197
|
+
:auth_names => auth_names,
|
|
198
|
+
:return_type => return_type
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
202
|
+
if @api_client.config.debugging
|
|
203
|
+
@api_client.config.logger.debug "API called: TypesApi#types_get_notification_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
204
|
+
end
|
|
205
|
+
return data, status_code, headers
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Get all notifications for an account with their templates
|
|
209
|
+
# @param [Hash] opts the optional parameters
|
|
210
|
+
# @return [Array<GetNotificationsResponseInner>]
|
|
211
|
+
def types_list_notification_types(opts = {})
|
|
212
|
+
data, _status_code, _headers = types_list_notification_types_with_http_info(opts)
|
|
213
|
+
data
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Get all notifications for an account with their templates
|
|
217
|
+
# @param [Hash] opts the optional parameters
|
|
218
|
+
# @return [Array<(Array<GetNotificationsResponseInner>, Integer, Hash)>] Array<GetNotificationsResponseInner> data, response status code and response headers
|
|
219
|
+
def types_list_notification_types_with_http_info(opts = {})
|
|
220
|
+
if @api_client.config.debugging
|
|
221
|
+
@api_client.config.logger.debug 'Calling API: TypesApi.types_list_notification_types ...'
|
|
222
|
+
end
|
|
223
|
+
# resource path
|
|
224
|
+
local_var_path = '/types'
|
|
225
|
+
|
|
226
|
+
# query parameters
|
|
227
|
+
query_params = opts[:query_params] || {}
|
|
228
|
+
|
|
229
|
+
# header parameters
|
|
230
|
+
header_params = opts[:header_params] || {}
|
|
231
|
+
# HTTP header 'Accept' (if needed)
|
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
233
|
+
|
|
234
|
+
# form parameters
|
|
235
|
+
form_params = opts[:form_params] || {}
|
|
236
|
+
|
|
237
|
+
# http body (model)
|
|
238
|
+
post_body = opts[:debug_body]
|
|
239
|
+
|
|
240
|
+
# return_type
|
|
241
|
+
return_type = opts[:debug_return_type] || 'Array<GetNotificationsResponseInner>'
|
|
242
|
+
|
|
243
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
244
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
245
|
+
|
|
246
|
+
new_options = opts.merge(
|
|
247
|
+
:operation => :"TypesApi.types_list_notification_types",
|
|
248
|
+
:header_params => header_params,
|
|
249
|
+
:query_params => query_params,
|
|
250
|
+
:form_params => form_params,
|
|
251
|
+
:body => post_body,
|
|
252
|
+
:auth_names => auth_names,
|
|
253
|
+
:return_type => return_type
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug "API called: TypesApi#types_list_notification_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
259
|
+
end
|
|
260
|
+
return data, status_code, headers
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Update a notification's settings
|
|
264
|
+
# @param notification_id [String] The notification ID
|
|
265
|
+
# @param notification_patch_request [NotificationPatchRequest]
|
|
266
|
+
# @param [Hash] opts the optional parameters
|
|
267
|
+
# @return [Notification]
|
|
268
|
+
def types_update_notification_type(notification_id, notification_patch_request, opts = {})
|
|
269
|
+
data, _status_code, _headers = types_update_notification_type_with_http_info(notification_id, notification_patch_request, opts)
|
|
270
|
+
data
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Update a notification's settings
|
|
274
|
+
# @param notification_id [String] The notification ID
|
|
275
|
+
# @param notification_patch_request [NotificationPatchRequest]
|
|
276
|
+
# @param [Hash] opts the optional parameters
|
|
277
|
+
# @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
|
|
278
|
+
def types_update_notification_type_with_http_info(notification_id, notification_patch_request, opts = {})
|
|
279
|
+
if @api_client.config.debugging
|
|
280
|
+
@api_client.config.logger.debug 'Calling API: TypesApi.types_update_notification_type ...'
|
|
281
|
+
end
|
|
282
|
+
# verify the required parameter 'notification_id' is set
|
|
283
|
+
if @api_client.config.client_side_validation && notification_id.nil?
|
|
284
|
+
fail ArgumentError, "Missing the required parameter 'notification_id' when calling TypesApi.types_update_notification_type"
|
|
285
|
+
end
|
|
286
|
+
# verify the required parameter 'notification_patch_request' is set
|
|
287
|
+
if @api_client.config.client_side_validation && notification_patch_request.nil?
|
|
288
|
+
fail ArgumentError, "Missing the required parameter 'notification_patch_request' when calling TypesApi.types_update_notification_type"
|
|
289
|
+
end
|
|
290
|
+
# resource path
|
|
291
|
+
local_var_path = '/types/{notificationId}'.sub('{' + 'notificationId' + '}', CGI.escape(notification_id.to_s))
|
|
292
|
+
|
|
293
|
+
# query parameters
|
|
294
|
+
query_params = opts[:query_params] || {}
|
|
295
|
+
|
|
296
|
+
# header parameters
|
|
297
|
+
header_params = opts[:header_params] || {}
|
|
298
|
+
# HTTP header 'Accept' (if needed)
|
|
299
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
300
|
+
# HTTP header 'Content-Type'
|
|
301
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
302
|
+
if !content_type.nil?
|
|
303
|
+
header_params['Content-Type'] = content_type
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# form parameters
|
|
307
|
+
form_params = opts[:form_params] || {}
|
|
308
|
+
|
|
309
|
+
# http body (model)
|
|
310
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(notification_patch_request)
|
|
311
|
+
|
|
312
|
+
# return_type
|
|
313
|
+
return_type = opts[:debug_return_type] || 'Notification'
|
|
314
|
+
|
|
315
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
316
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
317
|
+
|
|
318
|
+
new_options = opts.merge(
|
|
319
|
+
:operation => :"TypesApi.types_update_notification_type",
|
|
320
|
+
:header_params => header_params,
|
|
321
|
+
:query_params => query_params,
|
|
322
|
+
:form_params => form_params,
|
|
323
|
+
:body => post_body,
|
|
324
|
+
:auth_names => auth_names,
|
|
325
|
+
:return_type => return_type
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
329
|
+
if @api_client.config.debugging
|
|
330
|
+
@api_client.config.logger.debug "API called: TypesApi#types_update_notification_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
331
|
+
end
|
|
332
|
+
return data, status_code, headers
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
end
|