pingram 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1068d240160a74f07c492a15382fc450ae928defc754df7ce84e0d532f2b9944
4
- data.tar.gz: bc727c4b567e5c013a247e22fc13dc99f2be55ceaf39eb46f665f64eb4debfde
3
+ metadata.gz: bc6660f67916fa675695a13305efe810001d1df21c9e285337469d43a3dde6ec
4
+ data.tar.gz: d524333c31763799b4d4c616631e8e17e7302015e067af9e58b4a72131f61722
5
5
  SHA512:
6
- metadata.gz: a31bf5263da40a7e522ad5ebb6f69c70780635df3b71890b9d606772f915e3c8696cecb3c124cfe3ced3990cf01a6e09564c5abb73a4e03424789565c90ace2c
7
- data.tar.gz: 470b1cf267a4bf4153eebc53485342a88868db905cdaeb0504c69761ebac358749c8324a0792af5e7ca036c61686b4abd414bafdd454ac9c7b1f2f218cfdf87f
6
+ metadata.gz: dce1a3f9e59d7157beec155a7e4ec1a96620caec8b6b9d7d14cc32892ba1f5c01c0a405bd5c3870c16d4a26f50d30bb2f51946f7b3b4dc4e82389c9a27554a29
7
+ data.tar.gz: b4498c54781244db68765030f4865c77a9b3ce840e33cd4d9f492d740b41ccc4b6d2373a2fe898ef25885e6e12393b56de949449aaf2a873680b5d3a754611c1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pingram (1.0.2)
4
+ pingram (1.0.3)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -0,0 +1,370 @@
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 PushSettingsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete Apple Push Notification (APN) configuration for the current account.
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [nil]
25
+ def push_settings_delete_push_apn_settings(opts = {})
26
+ push_settings_delete_push_apn_settings_with_http_info(opts)
27
+ nil
28
+ end
29
+
30
+ # Delete Apple Push Notification (APN) configuration for the current account.
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
33
+ def push_settings_delete_push_apn_settings_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: PushSettingsApi.push_settings_delete_push_apn_settings ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/settings/push/apn'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+
46
+ # form parameters
47
+ form_params = opts[:form_params] || {}
48
+
49
+ # http body (model)
50
+ post_body = opts[:debug_body]
51
+
52
+ # return_type
53
+ return_type = opts[:debug_return_type]
54
+
55
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
56
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
57
+
58
+ new_options = opts.merge(
59
+ :operation => :"PushSettingsApi.push_settings_delete_push_apn_settings",
60
+ :header_params => header_params,
61
+ :query_params => query_params,
62
+ :form_params => form_params,
63
+ :body => post_body,
64
+ :auth_names => auth_names,
65
+ :return_type => return_type
66
+ )
67
+
68
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
69
+ if @api_client.config.debugging
70
+ @api_client.config.logger.debug "API called: PushSettingsApi#push_settings_delete_push_apn_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
71
+ end
72
+ return data, status_code, headers
73
+ end
74
+
75
+ # Delete Firebase Cloud Messaging (FCM) configuration for the current account.
76
+ # @param [Hash] opts the optional parameters
77
+ # @return [nil]
78
+ def push_settings_delete_push_fcm_settings(opts = {})
79
+ push_settings_delete_push_fcm_settings_with_http_info(opts)
80
+ nil
81
+ end
82
+
83
+ # Delete Firebase Cloud Messaging (FCM) configuration for the current account.
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
86
+ def push_settings_delete_push_fcm_settings_with_http_info(opts = {})
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug 'Calling API: PushSettingsApi.push_settings_delete_push_fcm_settings ...'
89
+ end
90
+ # resource path
91
+ local_var_path = '/settings/push/fcm'
92
+
93
+ # query parameters
94
+ query_params = opts[:query_params] || {}
95
+
96
+ # header parameters
97
+ header_params = opts[:header_params] || {}
98
+
99
+ # form parameters
100
+ form_params = opts[:form_params] || {}
101
+
102
+ # http body (model)
103
+ post_body = opts[:debug_body]
104
+
105
+ # return_type
106
+ return_type = opts[:debug_return_type]
107
+
108
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
109
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
110
+
111
+ new_options = opts.merge(
112
+ :operation => :"PushSettingsApi.push_settings_delete_push_fcm_settings",
113
+ :header_params => header_params,
114
+ :query_params => query_params,
115
+ :form_params => form_params,
116
+ :body => post_body,
117
+ :auth_names => auth_names,
118
+ :return_type => return_type
119
+ )
120
+
121
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
122
+ if @api_client.config.debugging
123
+ @api_client.config.logger.debug "API called: PushSettingsApi#push_settings_delete_push_fcm_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
124
+ end
125
+ return data, status_code, headers
126
+ end
127
+
128
+ # Get Apple Push Notification (APN) configuration for the current account.
129
+ # @param [Hash] opts the optional parameters
130
+ # @return [APNConfig]
131
+ def push_settings_get_push_apn_settings(opts = {})
132
+ data, _status_code, _headers = push_settings_get_push_apn_settings_with_http_info(opts)
133
+ data
134
+ end
135
+
136
+ # Get Apple Push Notification (APN) configuration for the current account.
137
+ # @param [Hash] opts the optional parameters
138
+ # @return [Array<(APNConfig, Integer, Hash)>] APNConfig data, response status code and response headers
139
+ def push_settings_get_push_apn_settings_with_http_info(opts = {})
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug 'Calling API: PushSettingsApi.push_settings_get_push_apn_settings ...'
142
+ end
143
+ # resource path
144
+ local_var_path = '/settings/push/apn'
145
+
146
+ # query parameters
147
+ query_params = opts[:query_params] || {}
148
+
149
+ # header parameters
150
+ header_params = opts[:header_params] || {}
151
+ # HTTP header 'Accept' (if needed)
152
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
153
+
154
+ # form parameters
155
+ form_params = opts[:form_params] || {}
156
+
157
+ # http body (model)
158
+ post_body = opts[:debug_body]
159
+
160
+ # return_type
161
+ return_type = opts[:debug_return_type] || 'APNConfig'
162
+
163
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
164
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
165
+
166
+ new_options = opts.merge(
167
+ :operation => :"PushSettingsApi.push_settings_get_push_apn_settings",
168
+ :header_params => header_params,
169
+ :query_params => query_params,
170
+ :form_params => form_params,
171
+ :body => post_body,
172
+ :auth_names => auth_names,
173
+ :return_type => return_type
174
+ )
175
+
176
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
177
+ if @api_client.config.debugging
178
+ @api_client.config.logger.debug "API called: PushSettingsApi#push_settings_get_push_apn_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
179
+ end
180
+ return data, status_code, headers
181
+ end
182
+
183
+ # Get Firebase Cloud Messaging (FCM) configuration for the current account.
184
+ # @param [Hash] opts the optional parameters
185
+ # @return [PushSettingsFCMResponse]
186
+ def push_settings_get_push_fcm_settings(opts = {})
187
+ data, _status_code, _headers = push_settings_get_push_fcm_settings_with_http_info(opts)
188
+ data
189
+ end
190
+
191
+ # Get Firebase Cloud Messaging (FCM) configuration for the current account.
192
+ # @param [Hash] opts the optional parameters
193
+ # @return [Array<(PushSettingsFCMResponse, Integer, Hash)>] PushSettingsFCMResponse data, response status code and response headers
194
+ def push_settings_get_push_fcm_settings_with_http_info(opts = {})
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug 'Calling API: PushSettingsApi.push_settings_get_push_fcm_settings ...'
197
+ end
198
+ # resource path
199
+ local_var_path = '/settings/push/fcm'
200
+
201
+ # query parameters
202
+ query_params = opts[:query_params] || {}
203
+
204
+ # header parameters
205
+ header_params = opts[:header_params] || {}
206
+ # HTTP header 'Accept' (if needed)
207
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
208
+
209
+ # form parameters
210
+ form_params = opts[:form_params] || {}
211
+
212
+ # http body (model)
213
+ post_body = opts[:debug_body]
214
+
215
+ # return_type
216
+ return_type = opts[:debug_return_type] || 'PushSettingsFCMResponse'
217
+
218
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
219
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
220
+
221
+ new_options = opts.merge(
222
+ :operation => :"PushSettingsApi.push_settings_get_push_fcm_settings",
223
+ :header_params => header_params,
224
+ :query_params => query_params,
225
+ :form_params => form_params,
226
+ :body => post_body,
227
+ :auth_names => auth_names,
228
+ :return_type => return_type
229
+ )
230
+
231
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
232
+ if @api_client.config.debugging
233
+ @api_client.config.logger.debug "API called: PushSettingsApi#push_settings_get_push_fcm_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
+ end
235
+ return data, status_code, headers
236
+ end
237
+
238
+ # Create or update Apple Push Notification (APN) configuration for the current account.
239
+ # @param apn_config [APNConfig]
240
+ # @param [Hash] opts the optional parameters
241
+ # @return [APNConfig]
242
+ def push_settings_upsert_push_apn_settings(apn_config, opts = {})
243
+ data, _status_code, _headers = push_settings_upsert_push_apn_settings_with_http_info(apn_config, opts)
244
+ data
245
+ end
246
+
247
+ # Create or update Apple Push Notification (APN) configuration for the current account.
248
+ # @param apn_config [APNConfig]
249
+ # @param [Hash] opts the optional parameters
250
+ # @return [Array<(APNConfig, Integer, Hash)>] APNConfig data, response status code and response headers
251
+ def push_settings_upsert_push_apn_settings_with_http_info(apn_config, opts = {})
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug 'Calling API: PushSettingsApi.push_settings_upsert_push_apn_settings ...'
254
+ end
255
+ # verify the required parameter 'apn_config' is set
256
+ if @api_client.config.client_side_validation && apn_config.nil?
257
+ fail ArgumentError, "Missing the required parameter 'apn_config' when calling PushSettingsApi.push_settings_upsert_push_apn_settings"
258
+ end
259
+ # resource path
260
+ local_var_path = '/settings/push/apn'
261
+
262
+ # query parameters
263
+ query_params = opts[:query_params] || {}
264
+
265
+ # header parameters
266
+ header_params = opts[:header_params] || {}
267
+ # HTTP header 'Accept' (if needed)
268
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
269
+ # HTTP header 'Content-Type'
270
+ content_type = @api_client.select_header_content_type(['application/json'])
271
+ if !content_type.nil?
272
+ header_params['Content-Type'] = content_type
273
+ end
274
+
275
+ # form parameters
276
+ form_params = opts[:form_params] || {}
277
+
278
+ # http body (model)
279
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(apn_config)
280
+
281
+ # return_type
282
+ return_type = opts[:debug_return_type] || 'APNConfig'
283
+
284
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
285
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
286
+
287
+ new_options = opts.merge(
288
+ :operation => :"PushSettingsApi.push_settings_upsert_push_apn_settings",
289
+ :header_params => header_params,
290
+ :query_params => query_params,
291
+ :form_params => form_params,
292
+ :body => post_body,
293
+ :auth_names => auth_names,
294
+ :return_type => return_type
295
+ )
296
+
297
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
298
+ if @api_client.config.debugging
299
+ @api_client.config.logger.debug "API called: PushSettingsApi#push_settings_upsert_push_apn_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
300
+ end
301
+ return data, status_code, headers
302
+ end
303
+
304
+ # Create or update Firebase Cloud Messaging (FCM) configuration for the current account.
305
+ # @param push_settings_fcm_put_request [PushSettingsFCMPutRequest]
306
+ # @param [Hash] opts the optional parameters
307
+ # @return [PushSettingsFCMResponse]
308
+ def push_settings_upsert_push_fcm_settings(push_settings_fcm_put_request, opts = {})
309
+ data, _status_code, _headers = push_settings_upsert_push_fcm_settings_with_http_info(push_settings_fcm_put_request, opts)
310
+ data
311
+ end
312
+
313
+ # Create or update Firebase Cloud Messaging (FCM) configuration for the current account.
314
+ # @param push_settings_fcm_put_request [PushSettingsFCMPutRequest]
315
+ # @param [Hash] opts the optional parameters
316
+ # @return [Array<(PushSettingsFCMResponse, Integer, Hash)>] PushSettingsFCMResponse data, response status code and response headers
317
+ def push_settings_upsert_push_fcm_settings_with_http_info(push_settings_fcm_put_request, opts = {})
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug 'Calling API: PushSettingsApi.push_settings_upsert_push_fcm_settings ...'
320
+ end
321
+ # verify the required parameter 'push_settings_fcm_put_request' is set
322
+ if @api_client.config.client_side_validation && push_settings_fcm_put_request.nil?
323
+ fail ArgumentError, "Missing the required parameter 'push_settings_fcm_put_request' when calling PushSettingsApi.push_settings_upsert_push_fcm_settings"
324
+ end
325
+ # resource path
326
+ local_var_path = '/settings/push/fcm'
327
+
328
+ # query parameters
329
+ query_params = opts[:query_params] || {}
330
+
331
+ # header parameters
332
+ header_params = opts[:header_params] || {}
333
+ # HTTP header 'Accept' (if needed)
334
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
335
+ # HTTP header 'Content-Type'
336
+ content_type = @api_client.select_header_content_type(['application/json'])
337
+ if !content_type.nil?
338
+ header_params['Content-Type'] = content_type
339
+ end
340
+
341
+ # form parameters
342
+ form_params = opts[:form_params] || {}
343
+
344
+ # http body (model)
345
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(push_settings_fcm_put_request)
346
+
347
+ # return_type
348
+ return_type = opts[:debug_return_type] || 'PushSettingsFCMResponse'
349
+
350
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
351
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
352
+
353
+ new_options = opts.merge(
354
+ :operation => :"PushSettingsApi.push_settings_upsert_push_fcm_settings",
355
+ :header_params => header_params,
356
+ :query_params => query_params,
357
+ :form_params => form_params,
358
+ :body => post_body,
359
+ :auth_names => auth_names,
360
+ :return_type => return_type
361
+ )
362
+
363
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
364
+ if @api_client.config.debugging
365
+ @api_client.config.logger.debug "API called: PushSettingsApi#push_settings_upsert_push_fcm_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
366
+ end
367
+ return data, status_code, headers
368
+ end
369
+ end
370
+ end
@@ -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.2"
35
+ @user_agent = "pingram-ruby/1.0.3"
36
36
  @default_headers = {
37
37
  'Content-Type' => 'application/json',
38
38
  'User-Agent' => @user_agent
@@ -33,6 +33,8 @@ require_relative 'api/members_api'
33
33
 
34
34
  require_relative 'api/organization_api'
35
35
 
36
+ require_relative 'api/push_settings_api'
37
+
36
38
  require_relative 'api/sender_api'
37
39
 
38
40
  require_relative 'api/templates_api'
@@ -91,6 +93,8 @@ module Pingram
91
93
 
92
94
  @organization = Pingram::OrganizationApi.new(@api_client)
93
95
 
96
+ @push_settings = Pingram::PushsettingsApi.new(@api_client)
97
+
94
98
  @sender = Pingram::SenderApi.new(@api_client)
95
99
 
96
100
  @templates = Pingram::TemplatesApi.new(@api_client)
@@ -184,6 +188,12 @@ module Pingram
184
188
  end
185
189
 
186
190
 
191
+ # @return [Pingram::PushsettingsApi]
192
+ def push_settings
193
+ @push_settings
194
+ end
195
+
196
+
187
197
  # @return [Pingram::SenderApi]
188
198
  def sender
189
199
  @sender
@@ -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 APNConfig < ApiModelBase
18
+ attr_accessor :key_id
19
+
20
+ attr_accessor :key
21
+
22
+ attr_accessor :team_id
23
+
24
+ attr_accessor :topic
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'key_id' => :'KeyId',
30
+ :'key' => :'Key',
31
+ :'team_id' => :'TeamId',
32
+ :'topic' => :'Topic'
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
+ :'key_id' => :'String',
50
+ :'key' => :'String',
51
+ :'team_id' => :'String',
52
+ :'topic' => :'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::APNConfig` 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::APNConfig`. 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?(:'key_id')
79
+ self.key_id = attributes[:'key_id']
80
+ else
81
+ self.key_id = nil
82
+ end
83
+
84
+ if attributes.key?(:'key')
85
+ self.key = attributes[:'key']
86
+ else
87
+ self.key = nil
88
+ end
89
+
90
+ if attributes.key?(:'team_id')
91
+ self.team_id = attributes[:'team_id']
92
+ else
93
+ self.team_id = nil
94
+ end
95
+
96
+ if attributes.key?(:'topic')
97
+ self.topic = attributes[:'topic']
98
+ else
99
+ self.topic = 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 @key_id.nil?
109
+ invalid_properties.push('invalid value for "key_id", key_id cannot be nil.')
110
+ end
111
+
112
+ if @key.nil?
113
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
114
+ end
115
+
116
+ if @team_id.nil?
117
+ invalid_properties.push('invalid value for "team_id", team_id cannot be nil.')
118
+ end
119
+
120
+ if @topic.nil?
121
+ invalid_properties.push('invalid value for "topic", topic 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 @key_id.nil?
132
+ return false if @key.nil?
133
+ return false if @team_id.nil?
134
+ return false if @topic.nil?
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] key_id Value to be assigned
140
+ def key_id=(key_id)
141
+ if key_id.nil?
142
+ fail ArgumentError, 'key_id cannot be nil'
143
+ end
144
+
145
+ @key_id = key_id
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] key Value to be assigned
150
+ def key=(key)
151
+ if key.nil?
152
+ fail ArgumentError, 'key cannot be nil'
153
+ end
154
+
155
+ @key = key
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] team_id Value to be assigned
160
+ def team_id=(team_id)
161
+ if team_id.nil?
162
+ fail ArgumentError, 'team_id cannot be nil'
163
+ end
164
+
165
+ @team_id = team_id
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] topic Value to be assigned
170
+ def topic=(topic)
171
+ if topic.nil?
172
+ fail ArgumentError, 'topic cannot be nil'
173
+ end
174
+
175
+ @topic = topic
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
+ key_id == o.key_id &&
184
+ key == o.key &&
185
+ team_id == o.team_id &&
186
+ topic == o.topic
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
+ [key_id, key, team_id, topic].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 PushSettingsFCMPutRequest < ApiModelBase
18
+ attr_accessor :fcm_config
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'fcm_config' => :'fcmConfig'
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
+ :'fcm_config' => :'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::PushSettingsFCMPutRequest` 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::PushSettingsFCMPutRequest`. 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?(:'fcm_config')
67
+ self.fcm_config = attributes[:'fcm_config']
68
+ else
69
+ self.fcm_config = 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 @fcm_config.nil?
79
+ invalid_properties.push('invalid value for "fcm_config", fcm_config 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 @fcm_config.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] fcm_config Value to be assigned
95
+ def fcm_config=(fcm_config)
96
+ if fcm_config.nil?
97
+ fail ArgumentError, 'fcm_config cannot be nil'
98
+ end
99
+
100
+ @fcm_config = fcm_config
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
+ fcm_config == o.fcm_config
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
+ [fcm_config].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
@@ -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 PushSettingsFCMResponse < ApiModelBase
18
+ attr_accessor :fcm_config
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'fcm_config' => :'fcmConfig'
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
+ :'fcm_config' => :'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::PushSettingsFCMResponse` 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::PushSettingsFCMResponse`. 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?(:'fcm_config')
67
+ self.fcm_config = attributes[:'fcm_config']
68
+ else
69
+ self.fcm_config = 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 @fcm_config.nil?
79
+ invalid_properties.push('invalid value for "fcm_config", fcm_config 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 @fcm_config.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] fcm_config Value to be assigned
95
+ def fcm_config=(fcm_config)
96
+ if fcm_config.nil?
97
+ fail ArgumentError, 'fcm_config cannot be nil'
98
+ end
99
+
100
+ @fcm_config = fcm_config
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
+ fcm_config == o.fcm_config
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
+ [fcm_config].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
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Pingram
14
- VERSION = '1.0.2'
14
+ VERSION = '1.0.3'
15
15
  end
data/lib/pingram.rb CHANGED
@@ -19,6 +19,7 @@ require 'pingram/configuration'
19
19
  require 'pingram/client_wrapper'
20
20
 
21
21
  # Models
22
+ require 'pingram/models/apn_config'
22
23
  require 'pingram/models/account_addresses_response'
23
24
  require 'pingram/models/account_addresses_response_addresses_inner'
24
25
  require 'pingram/models/account_get_response'
@@ -148,6 +149,8 @@ require 'pingram/models/post_email_test_request'
148
149
  require 'pingram/models/post_email_test_response'
149
150
  require 'pingram/models/post_senders_request_body'
150
151
  require 'pingram/models/post_user_request'
152
+ require 'pingram/models/push_settings_fcm_put_request'
153
+ require 'pingram/models/push_settings_fcm_response'
151
154
  require 'pingram/models/sender_post_body'
152
155
  require 'pingram/models/sender_post_body_call'
153
156
  require 'pingram/models/sender_post_body_email'
@@ -203,6 +206,7 @@ require 'pingram/api/keys_api'
203
206
  require 'pingram/api/logs_api'
204
207
  require 'pingram/api/members_api'
205
208
  require 'pingram/api/organization_api'
209
+ require 'pingram/api/push_settings_api'
206
210
  require 'pingram/api/sender_api'
207
211
  require 'pingram/api/templates_api'
208
212
  require 'pingram/api/types_api'
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.2
4
+ version: 1.0.3
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-08 00:00:00.000000000 Z
11
+ date: 2026-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -76,6 +76,7 @@ files:
76
76
  - lib/pingram/api/logs_api.rb
77
77
  - lib/pingram/api/members_api.rb
78
78
  - lib/pingram/api/organization_api.rb
79
+ - lib/pingram/api/push_settings_api.rb
79
80
  - lib/pingram/api/sender_api.rb
80
81
  - lib/pingram/api/templates_api.rb
81
82
  - lib/pingram/api/types_api.rb
@@ -91,6 +92,7 @@ files:
91
92
  - lib/pingram/models/account_addresses_response_addresses_inner.rb
92
93
  - lib/pingram/models/account_get_response.rb
93
94
  - lib/pingram/models/address_response.rb
95
+ - lib/pingram/models/apn_config.rb
94
96
  - lib/pingram/models/auto_join_get_response.rb
95
97
  - lib/pingram/models/auto_join_post_response.rb
96
98
  - lib/pingram/models/auto_join_request_body.rb
@@ -216,6 +218,8 @@ files:
216
218
  - lib/pingram/models/post_email_test_response.rb
217
219
  - lib/pingram/models/post_senders_request_body.rb
218
220
  - lib/pingram/models/post_user_request.rb
221
+ - lib/pingram/models/push_settings_fcm_put_request.rb
222
+ - lib/pingram/models/push_settings_fcm_response.rb
219
223
  - lib/pingram/models/sender_post_body.rb
220
224
  - lib/pingram/models/sender_post_body_call.rb
221
225
  - lib/pingram/models/sender_post_body_email.rb