pingram 1.0.0 → 1.0.1
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 +1 -1
- data/lib/pingram/api/templates_api.rb +0 -73
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/get_templates_list_response_inner_any_of.rb +4 -13
- data/lib/pingram/models/template_patch_request.rb +1 -11
- data/lib/pingram/models/template_post_request.rb +1 -11
- data/lib/pingram/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8fa3e26c7e5afa45e1ca10b5db3146e17a8762c780b58ddd6faa12f46beff5dd
|
|
4
|
+
data.tar.gz: 40dd7c81e987dfd1bc6712e6efdc3966f4a55340a0bf249bc3c1492da6347acd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe0a51b6f97655ab7aae2d0ed4d82cea96186b945b1d2cf72dd4ff5df85f5f995c51966819c8d91eab6349b556a3d676545a3c13b7cbdcb24d25e2dde780c400
|
|
7
|
+
data.tar.gz: 348a7721e3e4b99dff472630ae6f9ba74ffb782f9ff93cfba62125ea4c747cb580adb6818ae9c08d90f7db01fd78ca463ec3a001eb68648ca8ed0e9f9948828b
|
data/Gemfile.lock
CHANGED
|
@@ -241,79 +241,6 @@ module Pingram
|
|
|
241
241
|
return data, status_code, headers
|
|
242
242
|
end
|
|
243
243
|
|
|
244
|
-
# Initiate AI-powered template migration from complex to simple HTML
|
|
245
|
-
# @param notification_id [String] Notification ID
|
|
246
|
-
# @param channel [String] Channel type
|
|
247
|
-
# @param template_id [String] Template ID
|
|
248
|
-
# @param [Hash] opts the optional parameters
|
|
249
|
-
# @return [Template]
|
|
250
|
-
def templates_initiate_migration(notification_id, channel, template_id, opts = {})
|
|
251
|
-
data, _status_code, _headers = templates_initiate_migration_with_http_info(notification_id, channel, template_id, opts)
|
|
252
|
-
data
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
# Initiate AI-powered template migration from complex to simple HTML
|
|
256
|
-
# @param notification_id [String] Notification ID
|
|
257
|
-
# @param channel [String] Channel type
|
|
258
|
-
# @param template_id [String] Template ID
|
|
259
|
-
# @param [Hash] opts the optional parameters
|
|
260
|
-
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
261
|
-
def templates_initiate_migration_with_http_info(notification_id, channel, template_id, opts = {})
|
|
262
|
-
if @api_client.config.debugging
|
|
263
|
-
@api_client.config.logger.debug 'Calling API: TemplatesApi.templates_initiate_migration ...'
|
|
264
|
-
end
|
|
265
|
-
# verify the required parameter 'notification_id' is set
|
|
266
|
-
if @api_client.config.client_side_validation && notification_id.nil?
|
|
267
|
-
fail ArgumentError, "Missing the required parameter 'notification_id' when calling TemplatesApi.templates_initiate_migration"
|
|
268
|
-
end
|
|
269
|
-
# verify the required parameter 'channel' is set
|
|
270
|
-
if @api_client.config.client_side_validation && channel.nil?
|
|
271
|
-
fail ArgumentError, "Missing the required parameter 'channel' when calling TemplatesApi.templates_initiate_migration"
|
|
272
|
-
end
|
|
273
|
-
# verify the required parameter 'template_id' is set
|
|
274
|
-
if @api_client.config.client_side_validation && template_id.nil?
|
|
275
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.templates_initiate_migration"
|
|
276
|
-
end
|
|
277
|
-
# resource path
|
|
278
|
-
local_var_path = '/notifications/{notificationId}/{channel}/templates/{templateId}/migrate'.sub('{' + 'notificationId' + '}', CGI.escape(notification_id.to_s)).sub('{' + 'channel' + '}', CGI.escape(channel.to_s)).sub('{' + 'templateId' + '}', CGI.escape(template_id.to_s))
|
|
279
|
-
|
|
280
|
-
# query parameters
|
|
281
|
-
query_params = opts[:query_params] || {}
|
|
282
|
-
|
|
283
|
-
# header parameters
|
|
284
|
-
header_params = opts[:header_params] || {}
|
|
285
|
-
# HTTP header 'Accept' (if needed)
|
|
286
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
287
|
-
|
|
288
|
-
# form parameters
|
|
289
|
-
form_params = opts[:form_params] || {}
|
|
290
|
-
|
|
291
|
-
# http body (model)
|
|
292
|
-
post_body = opts[:debug_body]
|
|
293
|
-
|
|
294
|
-
# return_type
|
|
295
|
-
return_type = opts[:debug_return_type] || 'Template'
|
|
296
|
-
|
|
297
|
-
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
298
|
-
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
299
|
-
|
|
300
|
-
new_options = opts.merge(
|
|
301
|
-
:operation => :"TemplatesApi.templates_initiate_migration",
|
|
302
|
-
:header_params => header_params,
|
|
303
|
-
:query_params => query_params,
|
|
304
|
-
:form_params => form_params,
|
|
305
|
-
:body => post_body,
|
|
306
|
-
:auth_names => auth_names,
|
|
307
|
-
:return_type => return_type
|
|
308
|
-
)
|
|
309
|
-
|
|
310
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
311
|
-
if @api_client.config.debugging
|
|
312
|
-
@api_client.config.logger.debug "API called: TemplatesApi#templates_initiate_migration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
313
|
-
end
|
|
314
|
-
return data, status_code, headers
|
|
315
|
-
end
|
|
316
|
-
|
|
317
244
|
# List all templates for a notification and channel
|
|
318
245
|
# @param notification_id [String] Notification ID
|
|
319
246
|
# @param channel [String] Channel type
|
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.1"
|
|
36
36
|
@default_headers = {
|
|
37
37
|
'Content-Type' => 'application/json',
|
|
38
38
|
'User-Agent' => @user_agent
|
|
@@ -39,8 +39,6 @@ module Pingram
|
|
|
39
39
|
|
|
40
40
|
attr_accessor :sender_email
|
|
41
41
|
|
|
42
|
-
attr_accessor :migration
|
|
43
|
-
|
|
44
42
|
class EnumAttributeValidator
|
|
45
43
|
attr_reader :datatype
|
|
46
44
|
attr_reader :allowable_values
|
|
@@ -77,8 +75,7 @@ module Pingram
|
|
|
77
75
|
:'internal' => :'internal',
|
|
78
76
|
:'subject' => :'subject',
|
|
79
77
|
:'sender_name' => :'senderName',
|
|
80
|
-
:'sender_email' => :'senderEmail'
|
|
81
|
-
:'migration' => :'migration'
|
|
78
|
+
:'sender_email' => :'senderEmail'
|
|
82
79
|
}
|
|
83
80
|
end
|
|
84
81
|
|
|
@@ -106,8 +103,7 @@ module Pingram
|
|
|
106
103
|
:'internal' => :'String',
|
|
107
104
|
:'subject' => :'String',
|
|
108
105
|
:'sender_name' => :'String',
|
|
109
|
-
:'sender_email' => :'String'
|
|
110
|
-
:'migration' => :'String'
|
|
106
|
+
:'sender_email' => :'String'
|
|
111
107
|
}
|
|
112
108
|
end
|
|
113
109
|
|
|
@@ -202,10 +198,6 @@ module Pingram
|
|
|
202
198
|
else
|
|
203
199
|
self.sender_email = nil
|
|
204
200
|
end
|
|
205
|
-
|
|
206
|
-
if attributes.key?(:'migration')
|
|
207
|
-
self.migration = attributes[:'migration']
|
|
208
|
-
end
|
|
209
201
|
end
|
|
210
202
|
|
|
211
203
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -389,8 +381,7 @@ module Pingram
|
|
|
389
381
|
internal == o.internal &&
|
|
390
382
|
subject == o.subject &&
|
|
391
383
|
sender_name == o.sender_name &&
|
|
392
|
-
sender_email == o.sender_email
|
|
393
|
-
migration == o.migration
|
|
384
|
+
sender_email == o.sender_email
|
|
394
385
|
end
|
|
395
386
|
|
|
396
387
|
# @see the `==` method
|
|
@@ -402,7 +393,7 @@ module Pingram
|
|
|
402
393
|
# Calculates hash code according to all attributes.
|
|
403
394
|
# @return [Integer] Hash code
|
|
404
395
|
def hash
|
|
405
|
-
[env_id, notification_id, template_id, channel, default, is_default_for, html, preview_text, internal, subject, sender_name, sender_email
|
|
396
|
+
[env_id, notification_id, template_id, channel, default, is_default_for, html, preview_text, internal, subject, sender_name, sender_email].hash
|
|
406
397
|
end
|
|
407
398
|
|
|
408
399
|
# Builds the object from hash
|
|
@@ -34,9 +34,6 @@ module Pingram
|
|
|
34
34
|
# Sender email address.
|
|
35
35
|
attr_accessor :sender_email
|
|
36
36
|
|
|
37
|
-
# Migration metadata (e.g. from template migration).
|
|
38
|
-
attr_accessor :migration
|
|
39
|
-
|
|
40
37
|
# Notification title (in-app).
|
|
41
38
|
attr_accessor :title
|
|
42
39
|
|
|
@@ -77,7 +74,6 @@ module Pingram
|
|
|
77
74
|
:'subject' => :'subject',
|
|
78
75
|
:'sender_name' => :'senderName',
|
|
79
76
|
:'sender_email' => :'senderEmail',
|
|
80
|
-
:'migration' => :'migration',
|
|
81
77
|
:'title' => :'title',
|
|
82
78
|
:'redirect_url' => :'redirectURL',
|
|
83
79
|
:'image_url' => :'imageURL',
|
|
@@ -111,7 +107,6 @@ module Pingram
|
|
|
111
107
|
:'subject' => :'String',
|
|
112
108
|
:'sender_name' => :'String',
|
|
113
109
|
:'sender_email' => :'String',
|
|
114
|
-
:'migration' => :'String',
|
|
115
110
|
:'title' => :'String',
|
|
116
111
|
:'redirect_url' => :'String',
|
|
117
112
|
:'image_url' => :'String',
|
|
@@ -172,10 +167,6 @@ module Pingram
|
|
|
172
167
|
self.sender_email = attributes[:'sender_email']
|
|
173
168
|
end
|
|
174
169
|
|
|
175
|
-
if attributes.key?(:'migration')
|
|
176
|
-
self.migration = attributes[:'migration']
|
|
177
|
-
end
|
|
178
|
-
|
|
179
170
|
if attributes.key?(:'title')
|
|
180
171
|
self.title = attributes[:'title']
|
|
181
172
|
end
|
|
@@ -249,7 +240,6 @@ module Pingram
|
|
|
249
240
|
subject == o.subject &&
|
|
250
241
|
sender_name == o.sender_name &&
|
|
251
242
|
sender_email == o.sender_email &&
|
|
252
|
-
migration == o.migration &&
|
|
253
243
|
title == o.title &&
|
|
254
244
|
redirect_url == o.redirect_url &&
|
|
255
245
|
image_url == o.image_url &&
|
|
@@ -272,7 +262,7 @@ module Pingram
|
|
|
272
262
|
# Calculates hash code according to all attributes.
|
|
273
263
|
# @return [Integer] Hash code
|
|
274
264
|
def hash
|
|
275
|
-
[html, preview_text, internal, subject, sender_name, sender_email,
|
|
265
|
+
[html, preview_text, internal, subject, sender_name, sender_email, title, redirect_url, image_url, instant, batch, text, message, icon, url, blocks, username].hash
|
|
276
266
|
end
|
|
277
267
|
|
|
278
268
|
# Builds the object from hash
|
|
@@ -37,9 +37,6 @@ module Pingram
|
|
|
37
37
|
# Sender email address.
|
|
38
38
|
attr_accessor :sender_email
|
|
39
39
|
|
|
40
|
-
# Migration metadata (e.g. from template migration).
|
|
41
|
-
attr_accessor :migration
|
|
42
|
-
|
|
43
40
|
# Notification title (in-app).
|
|
44
41
|
attr_accessor :title
|
|
45
42
|
|
|
@@ -81,7 +78,6 @@ module Pingram
|
|
|
81
78
|
:'subject' => :'subject',
|
|
82
79
|
:'sender_name' => :'senderName',
|
|
83
80
|
:'sender_email' => :'senderEmail',
|
|
84
|
-
:'migration' => :'migration',
|
|
85
81
|
:'title' => :'title',
|
|
86
82
|
:'redirect_url' => :'redirectURL',
|
|
87
83
|
:'image_url' => :'imageURL',
|
|
@@ -116,7 +112,6 @@ module Pingram
|
|
|
116
112
|
:'subject' => :'String',
|
|
117
113
|
:'sender_name' => :'String',
|
|
118
114
|
:'sender_email' => :'String',
|
|
119
|
-
:'migration' => :'String',
|
|
120
115
|
:'title' => :'String',
|
|
121
116
|
:'redirect_url' => :'String',
|
|
122
117
|
:'image_url' => :'String',
|
|
@@ -183,10 +178,6 @@ module Pingram
|
|
|
183
178
|
self.sender_email = attributes[:'sender_email']
|
|
184
179
|
end
|
|
185
180
|
|
|
186
|
-
if attributes.key?(:'migration')
|
|
187
|
-
self.migration = attributes[:'migration']
|
|
188
|
-
end
|
|
189
|
-
|
|
190
181
|
if attributes.key?(:'title')
|
|
191
182
|
self.title = attributes[:'title']
|
|
192
183
|
end
|
|
@@ -276,7 +267,6 @@ module Pingram
|
|
|
276
267
|
subject == o.subject &&
|
|
277
268
|
sender_name == o.sender_name &&
|
|
278
269
|
sender_email == o.sender_email &&
|
|
279
|
-
migration == o.migration &&
|
|
280
270
|
title == o.title &&
|
|
281
271
|
redirect_url == o.redirect_url &&
|
|
282
272
|
image_url == o.image_url &&
|
|
@@ -299,7 +289,7 @@ module Pingram
|
|
|
299
289
|
# Calculates hash code according to all attributes.
|
|
300
290
|
# @return [Integer] Hash code
|
|
301
291
|
def hash
|
|
302
|
-
[template_id, html, preview_text, internal, subject, sender_name, sender_email,
|
|
292
|
+
[template_id, html, preview_text, internal, subject, sender_name, sender_email, title, redirect_url, image_url, instant, batch, text, message, icon, url, blocks, username].hash
|
|
303
293
|
end
|
|
304
294
|
|
|
305
295
|
# Builds the object from hash
|
data/lib/pingram/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pingram
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pingram
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|