pingram 1.0.30 → 1.0.32
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 +4 -4
- data/Gemfile.lock +2 -2
- data/lib/pingram/api/broadcasts_api.rb +912 -0
- data/lib/pingram/api/library_api.rb +161 -0
- data/lib/pingram/api/webhooks_api.rb +117 -39
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +20 -0
- data/lib/pingram/models/broadcast_metrics_response.rb +480 -0
- data/lib/pingram/models/broadcast_response.rb +525 -0
- data/lib/pingram/models/broadcast_response_audience.rb +161 -0
- data/lib/pingram/models/create_broadcast_request.rb +366 -0
- data/lib/pingram/models/create_library_request.rb +192 -0
- data/lib/pingram/models/create_library_response.rb +346 -0
- data/lib/pingram/models/get_users_response_users_inner.rb +13 -1
- data/lib/pingram/models/get_users_response_users_inner_properties_value.rb +104 -0
- data/lib/pingram/models/list_broadcast_recipients_response.rb +175 -0
- data/lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb +324 -0
- data/lib/pingram/models/list_broadcasts_response.rb +175 -0
- data/lib/pingram/models/list_broadcasts_response_broadcasts_inner.rb +487 -0
- data/lib/pingram/models/list_library_response.rb +175 -0
- data/lib/pingram/models/list_library_response_items_inner.rb +344 -0
- data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
- data/lib/pingram/models/mfa_status_response.rb +1 -1
- data/lib/pingram/models/post_user_request.rb +16 -4
- data/lib/pingram/models/schedule_broadcast_request.rb +165 -0
- data/lib/pingram/models/sender_post_body_to.rb +13 -1
- data/lib/pingram/models/sender_post_body_user.rb +13 -1
- data/lib/pingram/models/update_broadcast_request.rb +264 -0
- data/lib/pingram/models/user.rb +13 -1
- data/lib/pingram/models/{events_webhook_response.rb → webhook_endpoint.rb} +22 -22
- data/lib/pingram/models/{events_webhook_upsert_request.rb → webhook_endpoint_upsert_request.rb} +4 -4
- data/lib/pingram/models/webhook_endpoints_response.rb +168 -0
- data/lib/pingram/models/webhook_endpoints_response_endpoints_inner.rb +261 -0
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +21 -2
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.3.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.3}/gem_make.out +11 -10
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.3/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.3}/mkmf.log +10 -6
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/Makefile +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/console.c +98 -13
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/extconf.rb +15 -1
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/lib/io/console/size.rb +4 -2
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.3/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.9.2.gemspec → io-console-0.9.3.gemspec} +3 -3
- metadata +39 -20
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/lib/io/console.so +0 -0
- /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.3}/gem.build_complete +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/.document +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/BSDL +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/COPYING +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/README.md +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/win32_vk.inc +0 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
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 LibraryApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create an upload slot in the account library. PUT the file to the returned uploadUrl with the same Content-Type, then use the returned url in emails and the editor.
|
|
23
|
+
# @param use_case [String] Library use-case
|
|
24
|
+
# @param create_library_request [CreateLibraryRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CreateLibraryResponse]
|
|
27
|
+
def library_create(use_case, create_library_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = library_create_with_http_info(use_case, create_library_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create an upload slot in the account library. PUT the file to the returned uploadUrl with the same Content-Type, then use the returned url in emails and the editor.
|
|
33
|
+
# @param use_case [String] Library use-case
|
|
34
|
+
# @param create_library_request [CreateLibraryRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CreateLibraryResponse, Integer, Hash)>] CreateLibraryResponse data, response status code and response headers
|
|
37
|
+
def library_create_with_http_info(use_case, create_library_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: LibraryApi.library_create ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'use_case' is set
|
|
42
|
+
if @api_client.config.client_side_validation && use_case.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'use_case' when calling LibraryApi.library_create"
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'create_library_request' is set
|
|
46
|
+
if @api_client.config.client_side_validation && create_library_request.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'create_library_request' when calling LibraryApi.library_create"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/library/{useCase}'.sub('{' + 'useCase' + '}', CGI.escape(use_case.to_s))
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = opts[:query_params] || {}
|
|
54
|
+
|
|
55
|
+
# header parameters
|
|
56
|
+
header_params = opts[:header_params] || {}
|
|
57
|
+
# HTTP header 'Accept' (if needed)
|
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
59
|
+
# HTTP header 'Content-Type'
|
|
60
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
61
|
+
if !content_type.nil?
|
|
62
|
+
header_params['Content-Type'] = content_type
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# form parameters
|
|
66
|
+
form_params = opts[:form_params] || {}
|
|
67
|
+
|
|
68
|
+
# http body (model)
|
|
69
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_library_request)
|
|
70
|
+
|
|
71
|
+
# return_type
|
|
72
|
+
return_type = opts[:debug_return_type] || 'CreateLibraryResponse'
|
|
73
|
+
|
|
74
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
75
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
76
|
+
|
|
77
|
+
new_options = opts.merge(
|
|
78
|
+
:operation => :"LibraryApi.library_create",
|
|
79
|
+
:header_params => header_params,
|
|
80
|
+
:query_params => query_params,
|
|
81
|
+
:form_params => form_params,
|
|
82
|
+
:body => post_body,
|
|
83
|
+
:auth_names => auth_names,
|
|
84
|
+
:return_type => return_type
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
88
|
+
if @api_client.config.debugging
|
|
89
|
+
@api_client.config.logger.debug "API called: LibraryApi#library_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
90
|
+
end
|
|
91
|
+
return data, status_code, headers
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# List files in the account library for a use-case, newest first. Paginate with limit (default 50, max 100) and nextToken.
|
|
95
|
+
# @param use_case [String] Library use-case
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @option opts [Float] :limit Max items to return (default 50)
|
|
98
|
+
# @option opts [String] :next_token Pagination token
|
|
99
|
+
# @return [ListLibraryResponse]
|
|
100
|
+
def library_list(use_case, opts = {})
|
|
101
|
+
data, _status_code, _headers = library_list_with_http_info(use_case, opts)
|
|
102
|
+
data
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# List files in the account library for a use-case, newest first. Paginate with limit (default 50, max 100) and nextToken.
|
|
106
|
+
# @param use_case [String] Library use-case
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @option opts [Float] :limit Max items to return (default 50)
|
|
109
|
+
# @option opts [String] :next_token Pagination token
|
|
110
|
+
# @return [Array<(ListLibraryResponse, Integer, Hash)>] ListLibraryResponse data, response status code and response headers
|
|
111
|
+
def library_list_with_http_info(use_case, opts = {})
|
|
112
|
+
if @api_client.config.debugging
|
|
113
|
+
@api_client.config.logger.debug 'Calling API: LibraryApi.library_list ...'
|
|
114
|
+
end
|
|
115
|
+
# verify the required parameter 'use_case' is set
|
|
116
|
+
if @api_client.config.client_side_validation && use_case.nil?
|
|
117
|
+
fail ArgumentError, "Missing the required parameter 'use_case' when calling LibraryApi.library_list"
|
|
118
|
+
end
|
|
119
|
+
# resource path
|
|
120
|
+
local_var_path = '/library/{useCase}'.sub('{' + 'useCase' + '}', CGI.escape(use_case.to_s))
|
|
121
|
+
|
|
122
|
+
# query parameters
|
|
123
|
+
query_params = opts[:query_params] || {}
|
|
124
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
125
|
+
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
|
126
|
+
|
|
127
|
+
# header parameters
|
|
128
|
+
header_params = opts[:header_params] || {}
|
|
129
|
+
# HTTP header 'Accept' (if needed)
|
|
130
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
131
|
+
|
|
132
|
+
# form parameters
|
|
133
|
+
form_params = opts[:form_params] || {}
|
|
134
|
+
|
|
135
|
+
# http body (model)
|
|
136
|
+
post_body = opts[:debug_body]
|
|
137
|
+
|
|
138
|
+
# return_type
|
|
139
|
+
return_type = opts[:debug_return_type] || 'ListLibraryResponse'
|
|
140
|
+
|
|
141
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
142
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
143
|
+
|
|
144
|
+
new_options = opts.merge(
|
|
145
|
+
:operation => :"LibraryApi.library_list",
|
|
146
|
+
:header_params => header_params,
|
|
147
|
+
:query_params => query_params,
|
|
148
|
+
:form_params => form_params,
|
|
149
|
+
:body => post_body,
|
|
150
|
+
:auth_names => auth_names,
|
|
151
|
+
:return_type => return_type
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
155
|
+
if @api_client.config.debugging
|
|
156
|
+
@api_client.config.logger.debug "API called: LibraryApi#library_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
157
|
+
end
|
|
158
|
+
return data, status_code, headers
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
@@ -19,23 +19,95 @@ module Pingram
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
22
|
+
# Create a webhook.
|
|
23
|
+
# @param webhook_endpoint_upsert_request [WebhookEndpointUpsertRequest]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [WebhookEndpoint]
|
|
26
|
+
def webhooks_create_webhook(webhook_endpoint_upsert_request, opts = {})
|
|
27
|
+
data, _status_code, _headers = webhooks_create_webhook_with_http_info(webhook_endpoint_upsert_request, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Create a webhook.
|
|
32
|
+
# @param webhook_endpoint_upsert_request [WebhookEndpointUpsertRequest]
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(WebhookEndpoint, Integer, Hash)>] WebhookEndpoint data, response status code and response headers
|
|
35
|
+
def webhooks_create_webhook_with_http_info(webhook_endpoint_upsert_request, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_create_webhook ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'webhook_endpoint_upsert_request' is set
|
|
40
|
+
if @api_client.config.client_side_validation && webhook_endpoint_upsert_request.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'webhook_endpoint_upsert_request' when calling WebhooksApi.webhooks_create_webhook"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/webhooks'
|
|
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(webhook_endpoint_upsert_request)
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'WebhookEndpoint'
|
|
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 => :"WebhooksApi.webhooks_create_webhook",
|
|
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: WebhooksApi#webhooks_create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Delete a webhook.
|
|
89
|
+
# @param endpoint_id [String] Webhook endpoint id
|
|
23
90
|
# @param [Hash] opts the optional parameters
|
|
24
91
|
# @return [nil]
|
|
25
|
-
def
|
|
26
|
-
|
|
92
|
+
def webhooks_delete_webhook(endpoint_id, opts = {})
|
|
93
|
+
webhooks_delete_webhook_with_http_info(endpoint_id, opts)
|
|
27
94
|
nil
|
|
28
95
|
end
|
|
29
96
|
|
|
30
|
-
# Delete
|
|
97
|
+
# Delete a webhook.
|
|
98
|
+
# @param endpoint_id [String] Webhook endpoint id
|
|
31
99
|
# @param [Hash] opts the optional parameters
|
|
32
100
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
33
|
-
def
|
|
101
|
+
def webhooks_delete_webhook_with_http_info(endpoint_id, opts = {})
|
|
34
102
|
if @api_client.config.debugging
|
|
35
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_delete_webhook ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'endpoint_id' is set
|
|
106
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling WebhooksApi.webhooks_delete_webhook"
|
|
36
108
|
end
|
|
37
109
|
# resource path
|
|
38
|
-
local_var_path = '/webhooks/
|
|
110
|
+
local_var_path = '/webhooks/{endpointId}'.sub('{' + 'endpointId' + '}', CGI.escape(endpoint_id.to_s))
|
|
39
111
|
|
|
40
112
|
# query parameters
|
|
41
113
|
query_params = opts[:query_params] || {}
|
|
@@ -58,7 +130,7 @@ module Pingram
|
|
|
58
130
|
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
59
131
|
|
|
60
132
|
new_options = opts.merge(
|
|
61
|
-
:operation => :"WebhooksApi.
|
|
133
|
+
:operation => :"WebhooksApi.webhooks_delete_webhook",
|
|
62
134
|
:header_params => header_params,
|
|
63
135
|
:query_params => query_params,
|
|
64
136
|
:form_params => form_params,
|
|
@@ -69,28 +141,28 @@ module Pingram
|
|
|
69
141
|
|
|
70
142
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
71
143
|
if @api_client.config.debugging
|
|
72
|
-
@api_client.config.logger.debug "API called: WebhooksApi#
|
|
144
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
145
|
end
|
|
74
146
|
return data, status_code, headers
|
|
75
147
|
end
|
|
76
148
|
|
|
77
|
-
#
|
|
149
|
+
# List webhooks for the current account.
|
|
78
150
|
# @param [Hash] opts the optional parameters
|
|
79
|
-
# @return [
|
|
80
|
-
def
|
|
81
|
-
data, _status_code, _headers =
|
|
151
|
+
# @return [WebhookEndpointsResponse]
|
|
152
|
+
def webhooks_list_webhooks(opts = {})
|
|
153
|
+
data, _status_code, _headers = webhooks_list_webhooks_with_http_info(opts)
|
|
82
154
|
data
|
|
83
155
|
end
|
|
84
156
|
|
|
85
|
-
#
|
|
157
|
+
# List webhooks for the current account.
|
|
86
158
|
# @param [Hash] opts the optional parameters
|
|
87
|
-
# @return [Array<(
|
|
88
|
-
def
|
|
159
|
+
# @return [Array<(WebhookEndpointsResponse, Integer, Hash)>] WebhookEndpointsResponse data, response status code and response headers
|
|
160
|
+
def webhooks_list_webhooks_with_http_info(opts = {})
|
|
89
161
|
if @api_client.config.debugging
|
|
90
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.
|
|
162
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_list_webhooks ...'
|
|
91
163
|
end
|
|
92
164
|
# resource path
|
|
93
|
-
local_var_path = '/webhooks
|
|
165
|
+
local_var_path = '/webhooks'
|
|
94
166
|
|
|
95
167
|
# query parameters
|
|
96
168
|
query_params = opts[:query_params] || {}
|
|
@@ -107,13 +179,13 @@ module Pingram
|
|
|
107
179
|
post_body = opts[:debug_body]
|
|
108
180
|
|
|
109
181
|
# return_type
|
|
110
|
-
return_type = opts[:debug_return_type] || '
|
|
182
|
+
return_type = opts[:debug_return_type] || 'WebhookEndpointsResponse'
|
|
111
183
|
|
|
112
184
|
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
113
185
|
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
114
186
|
|
|
115
187
|
new_options = opts.merge(
|
|
116
|
-
:operation => :"WebhooksApi.
|
|
188
|
+
:operation => :"WebhooksApi.webhooks_list_webhooks",
|
|
117
189
|
:header_params => header_params,
|
|
118
190
|
:query_params => query_params,
|
|
119
191
|
:form_params => form_params,
|
|
@@ -124,34 +196,40 @@ module Pingram
|
|
|
124
196
|
|
|
125
197
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
126
198
|
if @api_client.config.debugging
|
|
127
|
-
@api_client.config.logger.debug "API called: WebhooksApi#
|
|
199
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_list_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
200
|
end
|
|
129
201
|
return data, status_code, headers
|
|
130
202
|
end
|
|
131
203
|
|
|
132
|
-
#
|
|
133
|
-
# @param
|
|
204
|
+
# Update a webhook. The signing secret is preserved.
|
|
205
|
+
# @param endpoint_id [String] Webhook endpoint id
|
|
206
|
+
# @param webhook_endpoint_upsert_request [WebhookEndpointUpsertRequest]
|
|
134
207
|
# @param [Hash] opts the optional parameters
|
|
135
|
-
# @return [
|
|
136
|
-
def
|
|
137
|
-
data, _status_code, _headers =
|
|
208
|
+
# @return [WebhookEndpoint]
|
|
209
|
+
def webhooks_update_webhook(endpoint_id, webhook_endpoint_upsert_request, opts = {})
|
|
210
|
+
data, _status_code, _headers = webhooks_update_webhook_with_http_info(endpoint_id, webhook_endpoint_upsert_request, opts)
|
|
138
211
|
data
|
|
139
212
|
end
|
|
140
213
|
|
|
141
|
-
#
|
|
142
|
-
# @param
|
|
214
|
+
# Update a webhook. The signing secret is preserved.
|
|
215
|
+
# @param endpoint_id [String] Webhook endpoint id
|
|
216
|
+
# @param webhook_endpoint_upsert_request [WebhookEndpointUpsertRequest]
|
|
143
217
|
# @param [Hash] opts the optional parameters
|
|
144
|
-
# @return [Array<(
|
|
145
|
-
def
|
|
218
|
+
# @return [Array<(WebhookEndpoint, Integer, Hash)>] WebhookEndpoint data, response status code and response headers
|
|
219
|
+
def webhooks_update_webhook_with_http_info(endpoint_id, webhook_endpoint_upsert_request, opts = {})
|
|
146
220
|
if @api_client.config.debugging
|
|
147
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.
|
|
221
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_update_webhook ...'
|
|
222
|
+
end
|
|
223
|
+
# verify the required parameter 'endpoint_id' is set
|
|
224
|
+
if @api_client.config.client_side_validation && endpoint_id.nil?
|
|
225
|
+
fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling WebhooksApi.webhooks_update_webhook"
|
|
148
226
|
end
|
|
149
|
-
# verify the required parameter '
|
|
150
|
-
if @api_client.config.client_side_validation &&
|
|
151
|
-
fail ArgumentError, "Missing the required parameter '
|
|
227
|
+
# verify the required parameter 'webhook_endpoint_upsert_request' is set
|
|
228
|
+
if @api_client.config.client_side_validation && webhook_endpoint_upsert_request.nil?
|
|
229
|
+
fail ArgumentError, "Missing the required parameter 'webhook_endpoint_upsert_request' when calling WebhooksApi.webhooks_update_webhook"
|
|
152
230
|
end
|
|
153
231
|
# resource path
|
|
154
|
-
local_var_path = '/webhooks/
|
|
232
|
+
local_var_path = '/webhooks/{endpointId}'.sub('{' + 'endpointId' + '}', CGI.escape(endpoint_id.to_s))
|
|
155
233
|
|
|
156
234
|
# query parameters
|
|
157
235
|
query_params = opts[:query_params] || {}
|
|
@@ -170,16 +248,16 @@ module Pingram
|
|
|
170
248
|
form_params = opts[:form_params] || {}
|
|
171
249
|
|
|
172
250
|
# http body (model)
|
|
173
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
251
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_endpoint_upsert_request)
|
|
174
252
|
|
|
175
253
|
# return_type
|
|
176
|
-
return_type = opts[:debug_return_type] || '
|
|
254
|
+
return_type = opts[:debug_return_type] || 'WebhookEndpoint'
|
|
177
255
|
|
|
178
256
|
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
179
257
|
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
180
258
|
|
|
181
259
|
new_options = opts.merge(
|
|
182
|
-
:operation => :"WebhooksApi.
|
|
260
|
+
:operation => :"WebhooksApi.webhooks_update_webhook",
|
|
183
261
|
:header_params => header_params,
|
|
184
262
|
:query_params => query_params,
|
|
185
263
|
:form_params => form_params,
|
|
@@ -190,7 +268,7 @@ module Pingram
|
|
|
190
268
|
|
|
191
269
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
192
270
|
if @api_client.config.debugging
|
|
193
|
-
@api_client.config.logger.debug "API called: WebhooksApi#
|
|
271
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhooks_update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
194
272
|
end
|
|
195
273
|
return data, status_code, headers
|
|
196
274
|
end
|
data/lib/pingram/api_client.rb
CHANGED
|
@@ -32,7 +32,7 @@ module Pingram
|
|
|
32
32
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
33
33
|
def initialize(config = Configuration.default)
|
|
34
34
|
@config = config
|
|
35
|
-
@user_agent = "pingram-ruby/1.0.
|
|
35
|
+
@user_agent = "pingram-ruby/1.0.32"
|
|
36
36
|
@default_headers = {
|
|
37
37
|
'Content-Type' => 'application/json',
|
|
38
38
|
'User-Agent' => @user_agent
|
|
@@ -14,6 +14,8 @@ require_relative 'api/accounts_api'
|
|
|
14
14
|
|
|
15
15
|
require_relative 'api/addresses_api'
|
|
16
16
|
|
|
17
|
+
require_relative 'api/broadcasts_api'
|
|
18
|
+
|
|
17
19
|
require_relative 'api/components_api'
|
|
18
20
|
|
|
19
21
|
require_relative 'api/default_api'
|
|
@@ -32,6 +34,8 @@ require_relative 'api/insights_api'
|
|
|
32
34
|
|
|
33
35
|
require_relative 'api/keys_api'
|
|
34
36
|
|
|
37
|
+
require_relative 'api/library_api'
|
|
38
|
+
|
|
35
39
|
require_relative 'api/logs_api'
|
|
36
40
|
|
|
37
41
|
require_relative 'api/members_api'
|
|
@@ -92,6 +96,8 @@ module Pingram
|
|
|
92
96
|
|
|
93
97
|
@addresses = Pingram::AddressesApi.new(@api_client)
|
|
94
98
|
|
|
99
|
+
@broadcasts = Pingram::BroadcastsApi.new(@api_client)
|
|
100
|
+
|
|
95
101
|
@components = Pingram::ComponentsApi.new(@api_client)
|
|
96
102
|
|
|
97
103
|
@default_api = Pingram::DefaultApi.new(@api_client)
|
|
@@ -110,6 +116,8 @@ module Pingram
|
|
|
110
116
|
|
|
111
117
|
@keys = Pingram::KeysApi.new(@api_client)
|
|
112
118
|
|
|
119
|
+
@library = Pingram::LibraryApi.new(@api_client)
|
|
120
|
+
|
|
113
121
|
@logs = Pingram::LogsApi.new(@api_client)
|
|
114
122
|
|
|
115
123
|
@members = Pingram::MembersApi.new(@api_client)
|
|
@@ -157,6 +165,12 @@ module Pingram
|
|
|
157
165
|
end
|
|
158
166
|
|
|
159
167
|
|
|
168
|
+
# @return [Pingram::BroadcastsApi]
|
|
169
|
+
def broadcasts
|
|
170
|
+
@broadcasts
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
|
|
160
174
|
# @return [Pingram::ComponentsApi]
|
|
161
175
|
def components
|
|
162
176
|
@components
|
|
@@ -211,6 +225,12 @@ module Pingram
|
|
|
211
225
|
end
|
|
212
226
|
|
|
213
227
|
|
|
228
|
+
# @return [Pingram::LibraryApi]
|
|
229
|
+
def library
|
|
230
|
+
@library
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
|
|
214
234
|
# @return [Pingram::LogsApi]
|
|
215
235
|
def logs
|
|
216
236
|
@logs
|