pingram 1.0.31 → 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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/broadcasts_api.rb +912 -0
  4. data/lib/pingram/api/library_api.rb +161 -0
  5. data/lib/pingram/api_client.rb +1 -1
  6. data/lib/pingram/client_wrapper.rb +20 -0
  7. data/lib/pingram/models/broadcast_metrics_response.rb +480 -0
  8. data/lib/pingram/models/broadcast_response.rb +525 -0
  9. data/lib/pingram/models/broadcast_response_audience.rb +161 -0
  10. data/lib/pingram/models/create_broadcast_request.rb +366 -0
  11. data/lib/pingram/models/create_library_request.rb +192 -0
  12. data/lib/pingram/models/create_library_response.rb +346 -0
  13. data/lib/pingram/models/get_users_response_users_inner.rb +13 -1
  14. data/lib/pingram/models/get_users_response_users_inner_properties_value.rb +104 -0
  15. data/lib/pingram/models/list_broadcast_recipients_response.rb +175 -0
  16. data/lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb +324 -0
  17. data/lib/pingram/models/list_broadcasts_response.rb +175 -0
  18. data/lib/pingram/models/list_broadcasts_response_broadcasts_inner.rb +487 -0
  19. data/lib/pingram/models/list_library_response.rb +175 -0
  20. data/lib/pingram/models/list_library_response_items_inner.rb +344 -0
  21. data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
  22. data/lib/pingram/models/mfa_status_response.rb +1 -1
  23. data/lib/pingram/models/post_user_request.rb +16 -4
  24. data/lib/pingram/models/schedule_broadcast_request.rb +165 -0
  25. data/lib/pingram/models/sender_post_body_to.rb +13 -1
  26. data/lib/pingram/models/sender_post_body_user.rb +13 -1
  27. data/lib/pingram/models/update_broadcast_request.rb +264 -0
  28. data/lib/pingram/models/user.rb +13 -1
  29. data/lib/pingram/version.rb +1 -1
  30. data/lib/pingram.rb +17 -0
  31. data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.3.gem +0 -0
  32. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  33. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  34. 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
  35. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.3/io/console.so +0 -0
  36. 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
  37. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  38. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
  39. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  40. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  41. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/ext/io/console/Makefile +2 -2
  42. 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
  43. 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
  44. 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
  45. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.3/lib/io/console.so +0 -0
  46. data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.9.2.gemspec → io-console-0.9.3.gemspec} +3 -3
  47. metadata +35 -18
  48. data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.2.gem +0 -0
  49. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/io/console.so +0 -0
  50. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/lib/io/console.so +0 -0
  51. /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
  52. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/.document +0 -0
  53. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/BSDL +0 -0
  54. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/COPYING +0 -0
  55. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.3}/README.md +0 -0
  56. /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,324 @@
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 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ class ListBroadcastRecipientsResponseRecipientsInner < ApiModelBase
18
+ attr_accessor :tracking_id
19
+
20
+ attr_accessor :user_id
21
+
22
+ attr_accessor :email
23
+
24
+ attr_accessor :sent_at
25
+
26
+ attr_accessor :delivered_at
27
+
28
+ attr_accessor :opened_at
29
+
30
+ attr_accessor :clicked_at
31
+
32
+ attr_accessor :bounced_at
33
+
34
+ attr_accessor :bounce_type
35
+
36
+ attr_accessor :complained_at
37
+
38
+ attr_accessor :unsubscribed_at
39
+
40
+ attr_accessor :skipped_at
41
+
42
+ attr_accessor :skip_reason
43
+
44
+ attr_accessor :failed_at
45
+
46
+ attr_accessor :fail_reason
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'tracking_id' => :'trackingId',
52
+ :'user_id' => :'userId',
53
+ :'email' => :'email',
54
+ :'sent_at' => :'sentAt',
55
+ :'delivered_at' => :'deliveredAt',
56
+ :'opened_at' => :'openedAt',
57
+ :'clicked_at' => :'clickedAt',
58
+ :'bounced_at' => :'bouncedAt',
59
+ :'bounce_type' => :'bounceType',
60
+ :'complained_at' => :'complainedAt',
61
+ :'unsubscribed_at' => :'unsubscribedAt',
62
+ :'skipped_at' => :'skippedAt',
63
+ :'skip_reason' => :'skipReason',
64
+ :'failed_at' => :'failedAt',
65
+ :'fail_reason' => :'failReason'
66
+ }
67
+ end
68
+
69
+ # Returns attribute mapping this model knows about
70
+ def self.acceptable_attribute_map
71
+ attribute_map
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ acceptable_attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'tracking_id' => :'String',
83
+ :'user_id' => :'String',
84
+ :'email' => :'String',
85
+ :'sent_at' => :'String',
86
+ :'delivered_at' => :'String',
87
+ :'opened_at' => :'String',
88
+ :'clicked_at' => :'String',
89
+ :'bounced_at' => :'String',
90
+ :'bounce_type' => :'String',
91
+ :'complained_at' => :'String',
92
+ :'unsubscribed_at' => :'String',
93
+ :'skipped_at' => :'String',
94
+ :'skip_reason' => :'String',
95
+ :'failed_at' => :'String',
96
+ :'fail_reason' => :'String'
97
+ }
98
+ end
99
+
100
+ # List of attributes with nullable: true
101
+ def self.openapi_nullable
102
+ Set.new([
103
+ ])
104
+ end
105
+
106
+ # Initializes the object
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ def initialize(attributes = {})
109
+ if (!attributes.is_a?(Hash))
110
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ListBroadcastRecipientsResponseRecipientsInner` initialize method"
111
+ end
112
+
113
+ # check to see if the attribute exists and convert string to symbol for hash key
114
+ acceptable_attribute_map = self.class.acceptable_attribute_map
115
+ attributes = attributes.each_with_object({}) { |(k, v), h|
116
+ if (!acceptable_attribute_map.key?(k.to_sym))
117
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ListBroadcastRecipientsResponseRecipientsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
118
+ end
119
+ h[k.to_sym] = v
120
+ }
121
+
122
+ if attributes.key?(:'tracking_id')
123
+ self.tracking_id = attributes[:'tracking_id']
124
+ else
125
+ self.tracking_id = nil
126
+ end
127
+
128
+ if attributes.key?(:'user_id')
129
+ self.user_id = attributes[:'user_id']
130
+ else
131
+ self.user_id = nil
132
+ end
133
+
134
+ if attributes.key?(:'email')
135
+ self.email = attributes[:'email']
136
+ else
137
+ self.email = nil
138
+ end
139
+
140
+ if attributes.key?(:'sent_at')
141
+ self.sent_at = attributes[:'sent_at']
142
+ end
143
+
144
+ if attributes.key?(:'delivered_at')
145
+ self.delivered_at = attributes[:'delivered_at']
146
+ end
147
+
148
+ if attributes.key?(:'opened_at')
149
+ self.opened_at = attributes[:'opened_at']
150
+ end
151
+
152
+ if attributes.key?(:'clicked_at')
153
+ self.clicked_at = attributes[:'clicked_at']
154
+ end
155
+
156
+ if attributes.key?(:'bounced_at')
157
+ self.bounced_at = attributes[:'bounced_at']
158
+ end
159
+
160
+ if attributes.key?(:'bounce_type')
161
+ self.bounce_type = attributes[:'bounce_type']
162
+ end
163
+
164
+ if attributes.key?(:'complained_at')
165
+ self.complained_at = attributes[:'complained_at']
166
+ end
167
+
168
+ if attributes.key?(:'unsubscribed_at')
169
+ self.unsubscribed_at = attributes[:'unsubscribed_at']
170
+ end
171
+
172
+ if attributes.key?(:'skipped_at')
173
+ self.skipped_at = attributes[:'skipped_at']
174
+ end
175
+
176
+ if attributes.key?(:'skip_reason')
177
+ self.skip_reason = attributes[:'skip_reason']
178
+ end
179
+
180
+ if attributes.key?(:'failed_at')
181
+ self.failed_at = attributes[:'failed_at']
182
+ end
183
+
184
+ if attributes.key?(:'fail_reason')
185
+ self.fail_reason = attributes[:'fail_reason']
186
+ end
187
+ end
188
+
189
+ # Show invalid properties with the reasons. Usually used together with valid?
190
+ # @return Array for valid properties with the reasons
191
+ def list_invalid_properties
192
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
193
+ invalid_properties = Array.new
194
+ if @tracking_id.nil?
195
+ invalid_properties.push('invalid value for "tracking_id", tracking_id cannot be nil.')
196
+ end
197
+
198
+ if @user_id.nil?
199
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
200
+ end
201
+
202
+ if @email.nil?
203
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
204
+ end
205
+
206
+ invalid_properties
207
+ end
208
+
209
+ # Check to see if the all the properties in the model are valid
210
+ # @return true if the model is valid
211
+ def valid?
212
+ warn '[DEPRECATED] the `valid?` method is obsolete'
213
+ return false if @tracking_id.nil?
214
+ return false if @user_id.nil?
215
+ return false if @email.nil?
216
+ true
217
+ end
218
+
219
+ # Custom attribute writer method with validation
220
+ # @param [Object] tracking_id Value to be assigned
221
+ def tracking_id=(tracking_id)
222
+ if tracking_id.nil?
223
+ fail ArgumentError, 'tracking_id cannot be nil'
224
+ end
225
+
226
+ @tracking_id = tracking_id
227
+ end
228
+
229
+ # Custom attribute writer method with validation
230
+ # @param [Object] user_id Value to be assigned
231
+ def user_id=(user_id)
232
+ if user_id.nil?
233
+ fail ArgumentError, 'user_id cannot be nil'
234
+ end
235
+
236
+ @user_id = user_id
237
+ end
238
+
239
+ # Custom attribute writer method with validation
240
+ # @param [Object] email Value to be assigned
241
+ def email=(email)
242
+ if email.nil?
243
+ fail ArgumentError, 'email cannot be nil'
244
+ end
245
+
246
+ @email = email
247
+ end
248
+
249
+ # Checks equality by comparing each attribute.
250
+ # @param [Object] Object to be compared
251
+ def ==(o)
252
+ return true if self.equal?(o)
253
+ self.class == o.class &&
254
+ tracking_id == o.tracking_id &&
255
+ user_id == o.user_id &&
256
+ email == o.email &&
257
+ sent_at == o.sent_at &&
258
+ delivered_at == o.delivered_at &&
259
+ opened_at == o.opened_at &&
260
+ clicked_at == o.clicked_at &&
261
+ bounced_at == o.bounced_at &&
262
+ bounce_type == o.bounce_type &&
263
+ complained_at == o.complained_at &&
264
+ unsubscribed_at == o.unsubscribed_at &&
265
+ skipped_at == o.skipped_at &&
266
+ skip_reason == o.skip_reason &&
267
+ failed_at == o.failed_at &&
268
+ fail_reason == o.fail_reason
269
+ end
270
+
271
+ # @see the `==` method
272
+ # @param [Object] Object to be compared
273
+ def eql?(o)
274
+ self == o
275
+ end
276
+
277
+ # Calculates hash code according to all attributes.
278
+ # @return [Integer] Hash code
279
+ def hash
280
+ [tracking_id, user_id, email, sent_at, delivered_at, opened_at, clicked_at, bounced_at, bounce_type, complained_at, unsubscribed_at, skipped_at, skip_reason, failed_at, fail_reason].hash
281
+ end
282
+
283
+ # Builds the object from hash
284
+ # @param [Hash] attributes Model attributes in the form of hash
285
+ # @return [Object] Returns the model itself
286
+ def self.build_from_hash(attributes)
287
+ return nil unless attributes.is_a?(Hash)
288
+ attributes = attributes.transform_keys(&:to_sym)
289
+ transformed_hash = {}
290
+ openapi_types.each_pair do |key, type|
291
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
292
+ transformed_hash["#{key}"] = nil
293
+ elsif type =~ /\AArray<(.*)>/i
294
+ # check to ensure the input is an array given that the attribute
295
+ # is documented as an array but the input is not
296
+ if attributes[attribute_map[key]].is_a?(Array)
297
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
298
+ end
299
+ elsif !attributes[attribute_map[key]].nil?
300
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
301
+ end
302
+ end
303
+ new(transformed_hash)
304
+ end
305
+
306
+ # Returns the object in the form of hash
307
+ # @return [Hash] Returns the object in the form of hash
308
+ def to_hash
309
+ hash = {}
310
+ self.class.attribute_map.each_pair do |attr, param|
311
+ value = self.send(attr)
312
+ if value.nil?
313
+ is_nullable = self.class.openapi_nullable.include?(attr)
314
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
315
+ end
316
+
317
+ hash[param] = _to_hash(value)
318
+ end
319
+ hash
320
+ end
321
+
322
+ end
323
+
324
+ end
@@ -0,0 +1,175 @@
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 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ class ListBroadcastsResponse < ApiModelBase
18
+ attr_accessor :broadcasts
19
+
20
+ attr_accessor :next_token
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'broadcasts' => :'broadcasts',
26
+ :'next_token' => :'nextToken'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'broadcasts' => :'Array<ListBroadcastsResponseBroadcastsInner>',
44
+ :'next_token' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ListBroadcastsResponse` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ListBroadcastsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'broadcasts')
71
+ if (value = attributes[:'broadcasts']).is_a?(Array)
72
+ self.broadcasts = value
73
+ end
74
+ else
75
+ self.broadcasts = nil
76
+ end
77
+
78
+ if attributes.key?(:'next_token')
79
+ self.next_token = attributes[:'next_token']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @broadcasts.nil?
89
+ invalid_properties.push('invalid value for "broadcasts", broadcasts cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ return false if @broadcasts.nil?
100
+ true
101
+ end
102
+
103
+ # Custom attribute writer method with validation
104
+ # @param [Object] broadcasts Value to be assigned
105
+ def broadcasts=(broadcasts)
106
+ if broadcasts.nil?
107
+ fail ArgumentError, 'broadcasts cannot be nil'
108
+ end
109
+
110
+ @broadcasts = broadcasts
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ broadcasts == o.broadcasts &&
119
+ next_token == o.next_token
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [broadcasts, next_token].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ if value.nil?
164
+ is_nullable = self.class.openapi_nullable.include?(attr)
165
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
166
+ end
167
+
168
+ hash[param] = _to_hash(value)
169
+ end
170
+ hash
171
+ end
172
+
173
+ end
174
+
175
+ end