pingram 1.0.31 → 1.0.33

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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/account_api.rb +2 -2
  4. data/lib/pingram/api/broadcasts_api.rb +912 -0
  5. data/lib/pingram/api/library_api.rb +161 -0
  6. data/lib/pingram/api/sub_notifications_api.rb +167 -0
  7. data/lib/pingram/api_client.rb +1 -1
  8. data/lib/pingram/client_wrapper.rb +30 -0
  9. data/lib/pingram/models/broadcast_metrics_response.rb +480 -0
  10. data/lib/pingram/models/broadcast_response.rb +525 -0
  11. data/lib/pingram/models/broadcast_response_audience.rb +161 -0
  12. data/lib/pingram/models/create_broadcast_request.rb +366 -0
  13. data/lib/pingram/models/create_library_request.rb +192 -0
  14. data/lib/pingram/models/create_library_response.rb +346 -0
  15. data/lib/pingram/models/get_users_response_users_inner.rb +13 -1
  16. data/lib/pingram/models/get_users_response_users_inner_properties_value.rb +104 -0
  17. data/lib/pingram/models/list_broadcast_recipients_response.rb +175 -0
  18. data/lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb +324 -0
  19. data/lib/pingram/models/list_broadcasts_response.rb +175 -0
  20. data/lib/pingram/models/list_broadcasts_response_broadcasts_inner.rb +487 -0
  21. data/lib/pingram/models/list_library_response.rb +175 -0
  22. data/lib/pingram/models/list_library_response_items_inner.rb +344 -0
  23. data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
  24. data/lib/pingram/models/mfa_status_response.rb +1 -1
  25. data/lib/pingram/models/post_user_request.rb +16 -4
  26. data/lib/pingram/models/schedule_broadcast_request.rb +165 -0
  27. data/lib/pingram/models/sender_post_body_to.rb +13 -1
  28. data/lib/pingram/models/sender_post_body_user.rb +13 -1
  29. data/lib/pingram/models/sub_notification.rb +242 -0
  30. data/lib/pingram/models/sub_notification_put_request.rb +164 -0
  31. data/lib/pingram/models/update_broadcast_request.rb +264 -0
  32. data/lib/pingram/models/user.rb +13 -1
  33. data/lib/pingram/version.rb +1 -1
  34. data/lib/pingram.rb +20 -0
  35. data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.4.gem +0 -0
  36. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  37. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  38. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.4}/gem_make.out +12 -10
  39. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.4/io/console.so +0 -0
  40. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.4}/mkmf.log +33 -6
  41. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  42. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
  43. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  44. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  45. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/ext/io/console/Makefile +3 -3
  46. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/ext/io/console/console.c +101 -13
  47. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/ext/io/console/extconf.rb +27 -2
  48. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/lib/io/console/size.rb +4 -2
  49. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.4/lib/io/console.so +0 -0
  50. data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.9.2.gemspec → io-console-0.9.4.gemspec} +3 -3
  51. metadata +38 -18
  52. data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.2.gem +0 -0
  53. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/io/console.so +0 -0
  54. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/lib/io/console.so +0 -0
  55. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.4}/gem.build_complete +0 -0
  56. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/.document +0 -0
  57. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/BSDL +0 -0
  58. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/COPYING +0 -0
  59. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/README.md +0 -0
  60. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/ext/io/console/win32_vk.inc +0 -0
@@ -38,6 +38,9 @@ module Pingram
38
38
 
39
39
  attr_accessor :slack_token
40
40
 
41
+ # Custom key-value properties synced by the developer, used for audience segmentation (e.g. broadcast filters on user.properties.plan). Incremental identify calls shallow-merge keys (unset keys are preserved). Limits: max 25 keys, key length <= 64, string values <= 256 chars, serialized size <= 1KB.
42
+ attr_accessor :properties
43
+
41
44
  # Last activity timestamp. Updated automatically. Read-only.
42
45
  attr_accessor :last_seen_time
43
46
 
@@ -60,6 +63,7 @@ module Pingram
60
63
  :'timezone' => :'timezone',
61
64
  :'slack_channel' => :'slackChannel',
62
65
  :'slack_token' => :'slackToken',
66
+ :'properties' => :'properties',
63
67
  :'last_seen_time' => :'lastSeenTime',
64
68
  :'updated_at' => :'updatedAt',
65
69
  :'created_at' => :'createdAt',
@@ -88,6 +92,7 @@ module Pingram
88
92
  :'timezone' => :'String',
89
93
  :'slack_channel' => :'String',
90
94
  :'slack_token' => :'GetUsersResponseUsersInnerSlackToken',
95
+ :'properties' => :'Hash<String, GetUsersResponseUsersInnerPropertiesValue>',
91
96
  :'last_seen_time' => :'String',
92
97
  :'updated_at' => :'String',
93
98
  :'created_at' => :'String',
@@ -155,6 +160,12 @@ module Pingram
155
160
  self.slack_token = attributes[:'slack_token']
156
161
  end
157
162
 
163
+ if attributes.key?(:'properties')
164
+ if (value = attributes[:'properties']).is_a?(Hash)
165
+ self.properties = value
166
+ end
167
+ end
168
+
158
169
  if attributes.key?(:'last_seen_time')
159
170
  self.last_seen_time = attributes[:'last_seen_time']
160
171
  end
@@ -215,6 +226,7 @@ module Pingram
215
226
  timezone == o.timezone &&
216
227
  slack_channel == o.slack_channel &&
217
228
  slack_token == o.slack_token &&
229
+ properties == o.properties &&
218
230
  last_seen_time == o.last_seen_time &&
219
231
  updated_at == o.updated_at &&
220
232
  created_at == o.created_at &&
@@ -230,7 +242,7 @@ module Pingram
230
242
  # Calculates hash code according to all attributes.
231
243
  # @return [Integer] Hash code
232
244
  def hash
233
- [id, email, number, push_tokens, web_push_tokens, timezone, slack_channel, slack_token, last_seen_time, updated_at, created_at, email_suppression_status].hash
245
+ [id, email, number, push_tokens, web_push_tokens, timezone, slack_channel, slack_token, properties, last_seen_time, updated_at, created_at, email_suppression_status].hash
234
246
  end
235
247
 
236
248
  # Builds the object from hash
@@ -0,0 +1,242 @@
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 SubNotification < ApiModelBase
18
+ attr_accessor :account_id
19
+
20
+ attr_accessor :notification_id
21
+
22
+ attr_accessor :sub_notification_id
23
+
24
+ attr_accessor :title
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'account_id' => :'accountId',
30
+ :'notification_id' => :'notificationId',
31
+ :'sub_notification_id' => :'subNotificationId',
32
+ :'title' => :'title'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'account_id' => :'String',
50
+ :'notification_id' => :'String',
51
+ :'sub_notification_id' => :'String',
52
+ :'title' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::SubNotification` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::SubNotification`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'account_id')
79
+ self.account_id = attributes[:'account_id']
80
+ else
81
+ self.account_id = nil
82
+ end
83
+
84
+ if attributes.key?(:'notification_id')
85
+ self.notification_id = attributes[:'notification_id']
86
+ else
87
+ self.notification_id = nil
88
+ end
89
+
90
+ if attributes.key?(:'sub_notification_id')
91
+ self.sub_notification_id = attributes[:'sub_notification_id']
92
+ else
93
+ self.sub_notification_id = nil
94
+ end
95
+
96
+ if attributes.key?(:'title')
97
+ self.title = attributes[:'title']
98
+ else
99
+ self.title = nil
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ if @account_id.nil?
109
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
110
+ end
111
+
112
+ if @notification_id.nil?
113
+ invalid_properties.push('invalid value for "notification_id", notification_id cannot be nil.')
114
+ end
115
+
116
+ if @sub_notification_id.nil?
117
+ invalid_properties.push('invalid value for "sub_notification_id", sub_notification_id cannot be nil.')
118
+ end
119
+
120
+ if @title.nil?
121
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @account_id.nil?
132
+ return false if @notification_id.nil?
133
+ return false if @sub_notification_id.nil?
134
+ return false if @title.nil?
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] account_id Value to be assigned
140
+ def account_id=(account_id)
141
+ if account_id.nil?
142
+ fail ArgumentError, 'account_id cannot be nil'
143
+ end
144
+
145
+ @account_id = account_id
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] notification_id Value to be assigned
150
+ def notification_id=(notification_id)
151
+ if notification_id.nil?
152
+ fail ArgumentError, 'notification_id cannot be nil'
153
+ end
154
+
155
+ @notification_id = notification_id
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] sub_notification_id Value to be assigned
160
+ def sub_notification_id=(sub_notification_id)
161
+ if sub_notification_id.nil?
162
+ fail ArgumentError, 'sub_notification_id cannot be nil'
163
+ end
164
+
165
+ @sub_notification_id = sub_notification_id
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] title Value to be assigned
170
+ def title=(title)
171
+ if title.nil?
172
+ fail ArgumentError, 'title cannot be nil'
173
+ end
174
+
175
+ @title = title
176
+ end
177
+
178
+ # Checks equality by comparing each attribute.
179
+ # @param [Object] Object to be compared
180
+ def ==(o)
181
+ return true if self.equal?(o)
182
+ self.class == o.class &&
183
+ account_id == o.account_id &&
184
+ notification_id == o.notification_id &&
185
+ sub_notification_id == o.sub_notification_id &&
186
+ title == o.title
187
+ end
188
+
189
+ # @see the `==` method
190
+ # @param [Object] Object to be compared
191
+ def eql?(o)
192
+ self == o
193
+ end
194
+
195
+ # Calculates hash code according to all attributes.
196
+ # @return [Integer] Hash code
197
+ def hash
198
+ [account_id, notification_id, sub_notification_id, title].hash
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def self.build_from_hash(attributes)
205
+ return nil unless attributes.is_a?(Hash)
206
+ attributes = attributes.transform_keys(&:to_sym)
207
+ transformed_hash = {}
208
+ openapi_types.each_pair do |key, type|
209
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = nil
211
+ elsif type =~ /\AArray<(.*)>/i
212
+ # check to ensure the input is an array given that the attribute
213
+ # is documented as an array but the input is not
214
+ if attributes[attribute_map[key]].is_a?(Array)
215
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
216
+ end
217
+ elsif !attributes[attribute_map[key]].nil?
218
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
219
+ end
220
+ end
221
+ new(transformed_hash)
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ end
241
+
242
+ end
@@ -0,0 +1,164 @@
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 SubNotificationPUTRequest < ApiModelBase
18
+ attr_accessor :title
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'title' => :'title'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'title' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::SubNotificationPUTRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::SubNotificationPUTRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'title')
67
+ self.title = attributes[:'title']
68
+ else
69
+ self.title = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @title.nil?
79
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @title.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] title Value to be assigned
95
+ def title=(title)
96
+ if title.nil?
97
+ fail ArgumentError, 'title cannot be nil'
98
+ end
99
+
100
+ @title = title
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ title == o.title
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [title].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end