pingram 1.0.37 → 1.0.39
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/library_api.rb +2 -2
- data/lib/pingram/api/logs_api.rb +124 -2
- data/lib/pingram/api/profile_api.rb +0 -66
- data/lib/pingram/api/webhooks_api.rb +4 -4
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/{change_email_request.rb → confirm_change_email_request.rb} +19 -19
- data/lib/pingram/models/create_library_request.rb +1 -1
- data/lib/pingram/models/get_logs_response_messages_inner.rb +4 -0
- data/lib/pingram/models/get_logs_response_messages_inner_attachments_inner.rb +52 -4
- data/lib/pingram/models/logs_delivery_status_response.rb +168 -0
- data/lib/pingram/models/logs_delivery_status_response_statuses_inner.rb +266 -0
- data/lib/pingram/models/logs_get_response_logs_inner.rb +60 -1
- data/lib/pingram/models/start_change_email_request.rb +201 -0
- data/lib/pingram/models/webhook_endpoint_upsert_request.rb +1 -1
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +4 -1
- data/vendor/bundle/ruby/3.2.0/cache/date-3.6.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.6.0/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.6.0/gem_make.out +26 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{date-3.5.1 → date-3.6.0}/mkmf.log +55 -2
- data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/Makefile +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_core.c +293 -77
- data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_parse.c +14 -4
- data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_strptime.c +13 -13
- data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/extconf.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/lib/date.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/date-3.6.0/lib/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/{date-3.5.1.gemspec → date-3.6.0.gemspec} +3 -3
- metadata +27 -24
- data/vendor/bundle/ruby/3.2.0/cache/date-3.5.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/date_core.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +0 -24
- data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/lib/date_core.so +0 -0
- /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{date-3.5.1 → date-3.6.0}/gem.build_complete +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/BSDL +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/COPYING +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/README.md +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_strftime.c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_tmx.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/prereq.mk +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/zonetab.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/zonetab.list +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3521645359a81dc82e84e9f12ae5d019dce125e556cb5661cd04eb924cc7bc9a
|
|
4
|
+
data.tar.gz: 12080816cec42686dd955540577e9ba52b07b4f82cab9fcbc3cca78cd3c8e8c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8a97c832a2bd1a1d643f4730b1928cea3282c08c061d9d9d39c860202112576fd42c9ef10797064759d857f8403fa74df7b4de40a5e7a91e7f891df684e7e22
|
|
7
|
+
data.tar.gz: 8abc49f3658f4c83b5d046a3429eb03dbe0ed36c4b302c01a9cdaf70fb9b3e226de7c193da3ca674f5e64e4db9667279340cfbbf13b389fb4f217b158e44f8b6
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
pingram (1.0.
|
|
4
|
+
pingram (1.0.39)
|
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -11,7 +11,7 @@ GEM
|
|
|
11
11
|
byebug (13.0.0)
|
|
12
12
|
reline (>= 0.6.0)
|
|
13
13
|
coderay (1.1.3)
|
|
14
|
-
date (3.
|
|
14
|
+
date (3.6.0)
|
|
15
15
|
diff-lcs (1.6.2)
|
|
16
16
|
ethon (0.18.0)
|
|
17
17
|
ffi (>= 1.15.0)
|
|
@@ -19,7 +19,7 @@ module Pingram
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Create an upload slot in the account library. PUT the file to the returned uploadUrl with
|
|
22
|
+
# Create an upload slot in the account library. contentType must be image/png, image/jpeg, image/gif, or image/webp. PUT the file to the returned uploadUrl with that Content-Type, then use the returned url in emails and the editor.
|
|
23
23
|
# @param use_case [String] Library use-case
|
|
24
24
|
# @param create_library_request [CreateLibraryRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
@@ -29,7 +29,7 @@ module Pingram
|
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
# Create an upload slot in the account library. PUT the file to the returned uploadUrl with
|
|
32
|
+
# Create an upload slot in the account library. contentType must be image/png, image/jpeg, image/gif, or image/webp. PUT the file to the returned uploadUrl with that Content-Type, then use the returned url in emails and the editor.
|
|
33
33
|
# @param use_case [String] Library use-case
|
|
34
34
|
# @param create_library_request [CreateLibraryRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
data/lib/pingram/api/logs_api.rb
CHANGED
|
@@ -19,6 +19,67 @@ module Pingram
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Look up email and SMS delivery status for up to 25 tracking IDs. Each entry is the tracking id, channel (EMAIL or SMS), status, and the time that status was recorded. The result does not include recipients, phone numbers, user ids, request bodies, IP addresses, account ids, or user-agent data. Unknown tracking ids are omitted. Other channels are not included.
|
|
23
|
+
# @param tracking_ids [String] Comma-separated tracking IDs (URL encoded, max 25)
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [LogsDeliveryStatusResponse]
|
|
26
|
+
def logs_get_delivery_status(tracking_ids, opts = {})
|
|
27
|
+
data, _status_code, _headers = logs_get_delivery_status_with_http_info(tracking_ids, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Look up email and SMS delivery status for up to 25 tracking IDs. Each entry is the tracking id, channel (EMAIL or SMS), status, and the time that status was recorded. The result does not include recipients, phone numbers, user ids, request bodies, IP addresses, account ids, or user-agent data. Unknown tracking ids are omitted. Other channels are not included.
|
|
32
|
+
# @param tracking_ids [String] Comma-separated tracking IDs (URL encoded, max 25)
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(LogsDeliveryStatusResponse, Integer, Hash)>] LogsDeliveryStatusResponse data, response status code and response headers
|
|
35
|
+
def logs_get_delivery_status_with_http_info(tracking_ids, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: LogsApi.logs_get_delivery_status ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'tracking_ids' is set
|
|
40
|
+
if @api_client.config.client_side_validation && tracking_ids.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'tracking_ids' when calling LogsApi.logs_get_delivery_status"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/logs/status/{trackingIds}'.sub('{' + 'trackingIds' + '}', CGI.escape(tracking_ids.to_s))
|
|
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
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:debug_body]
|
|
59
|
+
|
|
60
|
+
# return_type
|
|
61
|
+
return_type = opts[:debug_return_type] || 'LogsDeliveryStatusResponse'
|
|
62
|
+
|
|
63
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
64
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
65
|
+
|
|
66
|
+
new_options = opts.merge(
|
|
67
|
+
:operation => :"LogsApi.logs_get_delivery_status",
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: LogsApi#logs_get_delivery_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
return data, status_code, headers
|
|
81
|
+
end
|
|
82
|
+
|
|
22
83
|
# Get log retention period in days for the account
|
|
23
84
|
# @param [Hash] opts the optional parameters
|
|
24
85
|
# @return [LogsRetentionResponse]
|
|
@@ -135,7 +196,7 @@ module Pingram
|
|
|
135
196
|
return data, status_code, headers
|
|
136
197
|
end
|
|
137
198
|
|
|
138
|
-
# Get logs by tracking IDs (comma-separated, max 25 IDs).
|
|
199
|
+
# Get logs by tracking IDs (comma-separated, max 25 IDs). Returns full log objects with personally identifiable information (recipients, user ids, phone numbers, and request details). For a simple delivery check, use Get Delivery Status.
|
|
139
200
|
# @param tracking_ids [String] Comma-separated tracking IDs (URL encoded)
|
|
140
201
|
# @param [Hash] opts the optional parameters
|
|
141
202
|
# @return [LogsGetResponse]
|
|
@@ -144,7 +205,7 @@ module Pingram
|
|
|
144
205
|
data
|
|
145
206
|
end
|
|
146
207
|
|
|
147
|
-
# Get logs by tracking IDs (comma-separated, max 25 IDs).
|
|
208
|
+
# Get logs by tracking IDs (comma-separated, max 25 IDs). Returns full log objects with personally identifiable information (recipients, user ids, phone numbers, and request details). For a simple delivery check, use Get Delivery Status.
|
|
148
209
|
# @param tracking_ids [String] Comma-separated tracking IDs (URL encoded)
|
|
149
210
|
# @param [Hash] opts the optional parameters
|
|
150
211
|
# @return [Array<(LogsGetResponse, Integer, Hash)>] LogsGetResponse data, response status code and response headers
|
|
@@ -257,6 +318,67 @@ module Pingram
|
|
|
257
318
|
return data, status_code, headers
|
|
258
319
|
end
|
|
259
320
|
|
|
321
|
+
# Resend the EMAIL_INBOUND webhook for one inbound email. Uses the original tracking ID and does not count another email. Refused when the message is older than 30 days.
|
|
322
|
+
# @param tracking_id [String] Tracking ID of the inbound email
|
|
323
|
+
# @param [Hash] opts the optional parameters
|
|
324
|
+
# @return [MessageResponse]
|
|
325
|
+
def logs_retry_inbound(tracking_id, opts = {})
|
|
326
|
+
data, _status_code, _headers = logs_retry_inbound_with_http_info(tracking_id, opts)
|
|
327
|
+
data
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Resend the EMAIL_INBOUND webhook for one inbound email. Uses the original tracking ID and does not count another email. Refused when the message is older than 30 days.
|
|
331
|
+
# @param tracking_id [String] Tracking ID of the inbound email
|
|
332
|
+
# @param [Hash] opts the optional parameters
|
|
333
|
+
# @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
|
|
334
|
+
def logs_retry_inbound_with_http_info(tracking_id, opts = {})
|
|
335
|
+
if @api_client.config.debugging
|
|
336
|
+
@api_client.config.logger.debug 'Calling API: LogsApi.logs_retry_inbound ...'
|
|
337
|
+
end
|
|
338
|
+
# verify the required parameter 'tracking_id' is set
|
|
339
|
+
if @api_client.config.client_side_validation && tracking_id.nil?
|
|
340
|
+
fail ArgumentError, "Missing the required parameter 'tracking_id' when calling LogsApi.logs_retry_inbound"
|
|
341
|
+
end
|
|
342
|
+
# resource path
|
|
343
|
+
local_var_path = '/logs/retry/{trackingId}'.sub('{' + 'trackingId' + '}', CGI.escape(tracking_id.to_s))
|
|
344
|
+
|
|
345
|
+
# query parameters
|
|
346
|
+
query_params = opts[:query_params] || {}
|
|
347
|
+
|
|
348
|
+
# header parameters
|
|
349
|
+
header_params = opts[:header_params] || {}
|
|
350
|
+
# HTTP header 'Accept' (if needed)
|
|
351
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
352
|
+
|
|
353
|
+
# form parameters
|
|
354
|
+
form_params = opts[:form_params] || {}
|
|
355
|
+
|
|
356
|
+
# http body (model)
|
|
357
|
+
post_body = opts[:debug_body]
|
|
358
|
+
|
|
359
|
+
# return_type
|
|
360
|
+
return_type = opts[:debug_return_type] || 'MessageResponse'
|
|
361
|
+
|
|
362
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
363
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
364
|
+
|
|
365
|
+
new_options = opts.merge(
|
|
366
|
+
:operation => :"LogsApi.logs_retry_inbound",
|
|
367
|
+
:header_params => header_params,
|
|
368
|
+
:query_params => query_params,
|
|
369
|
+
:form_params => form_params,
|
|
370
|
+
:body => post_body,
|
|
371
|
+
:auth_names => auth_names,
|
|
372
|
+
:return_type => return_type
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
376
|
+
if @api_client.config.debugging
|
|
377
|
+
@api_client.config.logger.debug "API called: LogsApi#logs_retry_inbound\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
378
|
+
end
|
|
379
|
+
return data, status_code, headers
|
|
380
|
+
end
|
|
381
|
+
|
|
260
382
|
# Start an asynchronous log search over a date range. Returns a `queryId`; poll with Get Log Query Results until status is Complete.
|
|
261
383
|
# @param log_query_post_body [LogQueryPostBody]
|
|
262
384
|
# @param [Hash] opts the optional parameters
|
|
@@ -85,72 +85,6 @@ module Pingram
|
|
|
85
85
|
return data, status_code, headers
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
# Change the email address of the authenticated user
|
|
89
|
-
# @param change_email_request [ChangeEmailRequest]
|
|
90
|
-
# @param [Hash] opts the optional parameters
|
|
91
|
-
# @return [SuccessResponse]
|
|
92
|
-
def profile_change_email(change_email_request, opts = {})
|
|
93
|
-
data, _status_code, _headers = profile_change_email_with_http_info(change_email_request, opts)
|
|
94
|
-
data
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
# Change the email address of the authenticated user
|
|
98
|
-
# @param change_email_request [ChangeEmailRequest]
|
|
99
|
-
# @param [Hash] opts the optional parameters
|
|
100
|
-
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
|
101
|
-
def profile_change_email_with_http_info(change_email_request, opts = {})
|
|
102
|
-
if @api_client.config.debugging
|
|
103
|
-
@api_client.config.logger.debug 'Calling API: ProfileApi.profile_change_email ...'
|
|
104
|
-
end
|
|
105
|
-
# verify the required parameter 'change_email_request' is set
|
|
106
|
-
if @api_client.config.client_side_validation && change_email_request.nil?
|
|
107
|
-
fail ArgumentError, "Missing the required parameter 'change_email_request' when calling ProfileApi.profile_change_email"
|
|
108
|
-
end
|
|
109
|
-
# resource path
|
|
110
|
-
local_var_path = '/profile/change-email'
|
|
111
|
-
|
|
112
|
-
# query parameters
|
|
113
|
-
query_params = opts[:query_params] || {}
|
|
114
|
-
|
|
115
|
-
# header parameters
|
|
116
|
-
header_params = opts[:header_params] || {}
|
|
117
|
-
# HTTP header 'Accept' (if needed)
|
|
118
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
|
-
# HTTP header 'Content-Type'
|
|
120
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
121
|
-
if !content_type.nil?
|
|
122
|
-
header_params['Content-Type'] = content_type
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
# form parameters
|
|
126
|
-
form_params = opts[:form_params] || {}
|
|
127
|
-
|
|
128
|
-
# http body (model)
|
|
129
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(change_email_request)
|
|
130
|
-
|
|
131
|
-
# return_type
|
|
132
|
-
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
|
133
|
-
|
|
134
|
-
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
135
|
-
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
136
|
-
|
|
137
|
-
new_options = opts.merge(
|
|
138
|
-
:operation => :"ProfileApi.profile_change_email",
|
|
139
|
-
:header_params => header_params,
|
|
140
|
-
:query_params => query_params,
|
|
141
|
-
:form_params => form_params,
|
|
142
|
-
:body => post_body,
|
|
143
|
-
:auth_names => auth_names,
|
|
144
|
-
:return_type => return_type
|
|
145
|
-
)
|
|
146
|
-
|
|
147
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
148
|
-
if @api_client.config.debugging
|
|
149
|
-
@api_client.config.logger.debug "API called: ProfileApi#profile_change_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
150
|
-
end
|
|
151
|
-
return data, status_code, headers
|
|
152
|
-
end
|
|
153
|
-
|
|
154
88
|
# Permanently delete the authenticated user's account
|
|
155
89
|
# @param delete_account_request [DeleteAccountRequest]
|
|
156
90
|
# @param [Hash] opts the optional parameters
|
|
@@ -19,7 +19,7 @@ module Pingram
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be
|
|
22
|
+
# Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx.
|
|
23
23
|
# @param webhook_endpoint_upsert_request [WebhookEndpointUpsertRequest]
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [WebhookEndpoint]
|
|
@@ -28,7 +28,7 @@ module Pingram
|
|
|
28
28
|
data
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
# Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be
|
|
31
|
+
# Create a webhook endpoint. Pingram POSTs signed JSON to the URL when one of the subscribed events happens. The response includes id and a signing secret starting with pingram_whsecret_. Save it and verify the X-Pingram-Signature header. Updates keep this secret. At most 10 endpoints per account. The URL must be a public HTTPS URL and should return 2xx.
|
|
32
32
|
# @param webhook_endpoint_upsert_request [WebhookEndpointUpsertRequest]
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(WebhookEndpoint, Integer, Hash)>] WebhookEndpoint data, response status code and response headers
|
|
@@ -201,7 +201,7 @@ module Pingram
|
|
|
201
201
|
return data, status_code, headers
|
|
202
202
|
end
|
|
203
203
|
|
|
204
|
-
# Replace one webhook endpoint's URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be
|
|
204
|
+
# Replace one webhook endpoint's URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be a public HTTPS URL.
|
|
205
205
|
# @param endpoint_id [String] Id of the webhook endpoint, from list or create.
|
|
206
206
|
# @param webhook_endpoint_upsert_request [WebhookEndpointUpsertRequest]
|
|
207
207
|
# @param [Hash] opts the optional parameters
|
|
@@ -211,7 +211,7 @@ module Pingram
|
|
|
211
211
|
data
|
|
212
212
|
end
|
|
213
213
|
|
|
214
|
-
# Replace one webhook endpoint's URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be
|
|
214
|
+
# Replace one webhook endpoint's URL and its full event subscription. endpointId comes from list or create. The signing secret stays the same. events is the complete set; omitting an event unsubscribes it. The URL must be a public HTTPS URL.
|
|
215
215
|
# @param endpoint_id [String] Id of the webhook endpoint, from list or create.
|
|
216
216
|
# @param webhook_endpoint_upsert_request [WebhookEndpointUpsertRequest]
|
|
217
217
|
# @param [Hash] opts the optional parameters
|
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.39"
|
|
36
36
|
@default_headers = {
|
|
37
37
|
'Content-Type' => 'application/json',
|
|
38
38
|
'User-Agent' => @user_agent
|
|
@@ -14,13 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
|
-
class
|
|
18
|
-
attr_accessor :
|
|
17
|
+
class ConfirmChangeEmailRequest < ApiModelBase
|
|
18
|
+
attr_accessor :code
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
21
|
def self.attribute_map
|
|
22
22
|
{
|
|
23
|
-
:'
|
|
23
|
+
:'code' => :'code'
|
|
24
24
|
}
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -37,7 +37,7 @@ module Pingram
|
|
|
37
37
|
# Attribute type mapping.
|
|
38
38
|
def self.openapi_types
|
|
39
39
|
{
|
|
40
|
-
:'
|
|
40
|
+
:'code' => :'String'
|
|
41
41
|
}
|
|
42
42
|
end
|
|
43
43
|
|
|
@@ -51,22 +51,22 @@ module Pingram
|
|
|
51
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
52
|
def initialize(attributes = {})
|
|
53
53
|
if (!attributes.is_a?(Hash))
|
|
54
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ConfirmChangeEmailRequest` initialize method"
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
58
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
60
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ConfirmChangeEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
62
|
end
|
|
63
63
|
h[k.to_sym] = v
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
if attributes.key?(:'
|
|
67
|
-
self.
|
|
66
|
+
if attributes.key?(:'code')
|
|
67
|
+
self.code = attributes[:'code']
|
|
68
68
|
else
|
|
69
|
-
self.
|
|
69
|
+
self.code = nil
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
72
|
|
|
@@ -75,8 +75,8 @@ module Pingram
|
|
|
75
75
|
def list_invalid_properties
|
|
76
76
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
77
|
invalid_properties = Array.new
|
|
78
|
-
if @
|
|
79
|
-
invalid_properties.push('invalid value for "
|
|
78
|
+
if @code.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
invalid_properties
|
|
@@ -86,18 +86,18 @@ module Pingram
|
|
|
86
86
|
# @return true if the model is valid
|
|
87
87
|
def valid?
|
|
88
88
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
-
return false if @
|
|
89
|
+
return false if @code.nil?
|
|
90
90
|
true
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
# Custom attribute writer method with validation
|
|
94
|
-
# @param [Object]
|
|
95
|
-
def
|
|
96
|
-
if
|
|
97
|
-
fail ArgumentError, '
|
|
94
|
+
# @param [Object] code Value to be assigned
|
|
95
|
+
def code=(code)
|
|
96
|
+
if code.nil?
|
|
97
|
+
fail ArgumentError, 'code cannot be nil'
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
@
|
|
100
|
+
@code = code
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
# Checks equality by comparing each attribute.
|
|
@@ -105,7 +105,7 @@ module Pingram
|
|
|
105
105
|
def ==(o)
|
|
106
106
|
return true if self.equal?(o)
|
|
107
107
|
self.class == o.class &&
|
|
108
|
-
|
|
108
|
+
code == o.code
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
# @see the `==` method
|
|
@@ -117,7 +117,7 @@ module Pingram
|
|
|
117
117
|
# Calculates hash code according to all attributes.
|
|
118
118
|
# @return [Integer] Hash code
|
|
119
119
|
def hash
|
|
120
|
-
[
|
|
120
|
+
[code].hash
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
# Builds the object from hash
|
|
@@ -18,7 +18,7 @@ module Pingram
|
|
|
18
18
|
# Original filename, including extension (e.g. hero.png).
|
|
19
19
|
attr_accessor :filename
|
|
20
20
|
|
|
21
|
-
# MIME type of
|
|
21
|
+
# Image MIME type. One of image/png, image/jpeg, image/gif, or image/webp.
|
|
22
22
|
attr_accessor :content_type
|
|
23
23
|
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -23,6 +23,7 @@ module Pingram
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :epoch_ms
|
|
25
25
|
|
|
26
|
+
# Address that received the mail. Same value as `matched.email` on the EMAIL_INBOUND webhook, including when that address was only in Cc or Bcc.
|
|
26
27
|
attr_accessor :inbox
|
|
27
28
|
|
|
28
29
|
attr_accessor :from
|
|
@@ -31,10 +32,13 @@ module Pingram
|
|
|
31
32
|
|
|
32
33
|
attr_accessor :subject
|
|
33
34
|
|
|
35
|
+
# Original To header addresses. Not the address that received the mail.
|
|
34
36
|
attr_accessor :to
|
|
35
37
|
|
|
38
|
+
# Original Cc header addresses.
|
|
36
39
|
attr_accessor :cc
|
|
37
40
|
|
|
41
|
+
# Bcc header addresses still on the delivered message. Usually omitted, because the Bcc header is removed before delivery.
|
|
38
42
|
attr_accessor :bcc
|
|
39
43
|
|
|
40
44
|
attr_accessor :reply_to
|
|
@@ -15,21 +15,51 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
17
|
class GetLogsResponseMessagesInnerAttachmentsInner < ApiModelBase
|
|
18
|
+
# Original filename from the message.
|
|
18
19
|
attr_accessor :filename
|
|
19
20
|
|
|
21
|
+
# MIME type of the file.
|
|
20
22
|
attr_accessor :content_type
|
|
21
23
|
|
|
24
|
+
# Size in bytes. This response does not include the file bytes.
|
|
22
25
|
attr_accessor :size
|
|
23
26
|
|
|
27
|
+
# Content-ID with angle brackets removed, so it matches `cid:` references in `bodyHtml`. Omitted when the part has no Content-ID.
|
|
24
28
|
attr_accessor :content_id
|
|
25
29
|
|
|
30
|
+
# `inline` when the HTML body references this file; `attachment` when it is a separate file. Omitted when the message does not say which.
|
|
31
|
+
attr_accessor :content_disposition
|
|
32
|
+
|
|
33
|
+
class EnumAttributeValidator
|
|
34
|
+
attr_reader :datatype
|
|
35
|
+
attr_reader :allowable_values
|
|
36
|
+
|
|
37
|
+
def initialize(datatype, allowable_values)
|
|
38
|
+
@allowable_values = allowable_values.map do |value|
|
|
39
|
+
case datatype.to_s
|
|
40
|
+
when /Integer/i
|
|
41
|
+
value.to_i
|
|
42
|
+
when /Float/i
|
|
43
|
+
value.to_f
|
|
44
|
+
else
|
|
45
|
+
value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def valid?(value)
|
|
51
|
+
!value || allowable_values.include?(value)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
26
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
56
|
def self.attribute_map
|
|
28
57
|
{
|
|
29
58
|
:'filename' => :'filename',
|
|
30
59
|
:'content_type' => :'contentType',
|
|
31
60
|
:'size' => :'size',
|
|
32
|
-
:'content_id' => :'contentId'
|
|
61
|
+
:'content_id' => :'contentId',
|
|
62
|
+
:'content_disposition' => :'contentDisposition'
|
|
33
63
|
}
|
|
34
64
|
end
|
|
35
65
|
|
|
@@ -49,7 +79,8 @@ module Pingram
|
|
|
49
79
|
:'filename' => :'String',
|
|
50
80
|
:'content_type' => :'String',
|
|
51
81
|
:'size' => :'Float',
|
|
52
|
-
:'content_id' => :'String'
|
|
82
|
+
:'content_id' => :'String',
|
|
83
|
+
:'content_disposition' => :'String'
|
|
53
84
|
}
|
|
54
85
|
end
|
|
55
86
|
|
|
@@ -96,6 +127,10 @@ module Pingram
|
|
|
96
127
|
if attributes.key?(:'content_id')
|
|
97
128
|
self.content_id = attributes[:'content_id']
|
|
98
129
|
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'content_disposition')
|
|
132
|
+
self.content_disposition = attributes[:'content_disposition']
|
|
133
|
+
end
|
|
99
134
|
end
|
|
100
135
|
|
|
101
136
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -125,6 +160,8 @@ module Pingram
|
|
|
125
160
|
return false if @filename.nil?
|
|
126
161
|
return false if @content_type.nil?
|
|
127
162
|
return false if @size.nil?
|
|
163
|
+
content_disposition_validator = EnumAttributeValidator.new('String', ["inline", "attachment"])
|
|
164
|
+
return false unless content_disposition_validator.valid?(@content_disposition)
|
|
128
165
|
true
|
|
129
166
|
end
|
|
130
167
|
|
|
@@ -158,6 +195,16 @@ module Pingram
|
|
|
158
195
|
@size = size
|
|
159
196
|
end
|
|
160
197
|
|
|
198
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
199
|
+
# @param [Object] content_disposition Object to be assigned
|
|
200
|
+
def content_disposition=(content_disposition)
|
|
201
|
+
validator = EnumAttributeValidator.new('String', ["inline", "attachment"])
|
|
202
|
+
unless validator.valid?(content_disposition)
|
|
203
|
+
fail ArgumentError, "invalid value for \"content_disposition\", must be one of #{validator.allowable_values}."
|
|
204
|
+
end
|
|
205
|
+
@content_disposition = content_disposition
|
|
206
|
+
end
|
|
207
|
+
|
|
161
208
|
# Checks equality by comparing each attribute.
|
|
162
209
|
# @param [Object] Object to be compared
|
|
163
210
|
def ==(o)
|
|
@@ -166,7 +213,8 @@ module Pingram
|
|
|
166
213
|
filename == o.filename &&
|
|
167
214
|
content_type == o.content_type &&
|
|
168
215
|
size == o.size &&
|
|
169
|
-
content_id == o.content_id
|
|
216
|
+
content_id == o.content_id &&
|
|
217
|
+
content_disposition == o.content_disposition
|
|
170
218
|
end
|
|
171
219
|
|
|
172
220
|
# @see the `==` method
|
|
@@ -178,7 +226,7 @@ module Pingram
|
|
|
178
226
|
# Calculates hash code according to all attributes.
|
|
179
227
|
# @return [Integer] Hash code
|
|
180
228
|
def hash
|
|
181
|
-
[filename, content_type, size, content_id].hash
|
|
229
|
+
[filename, content_type, size, content_id, content_disposition].hash
|
|
182
230
|
end
|
|
183
231
|
|
|
184
232
|
# Builds the object from hash
|