pingram 1.0.33 → 1.0.35
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/account_api.rb +5 -2
- data/lib/pingram/api/user_api.rb +0 -248
- data/lib/pingram/api/webhooks_api.rb +12 -12
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/create_account_request_plan.rb +2 -2
- data/lib/pingram/models/get_usage_history_query.rb +14 -4
- data/lib/pingram/models/get_usage_history_response.rb +1 -1
- data/lib/pingram/models/get_usage_history_response_items_inner.rb +1 -1
- data/lib/pingram/models/user_preferences_get_response.rb +222 -0
- data/lib/pingram/models/user_preferences_get_response_notifications_inner.rb +227 -0
- data/lib/pingram/models/user_preferences_get_response_preferences_inner.rb +249 -0
- data/lib/pingram/models/user_preferences_get_response_sub_notifications_inner.rb +216 -0
- data/lib/pingram/models/user_preferences_post_request_inner.rb +268 -0
- data/lib/pingram/models/user_preferences_post_response_inner.rb +253 -0
- data/lib/pingram/models/user_preferences_post_response_inner_channels_states_inner.rb +240 -0
- data/lib/pingram/models/webhook_endpoint.rb +3 -3
- data/lib/pingram/models/webhook_endpoint_upsert_request.rb +2 -2
- data/lib/pingram/models/webhook_endpoints_response_endpoints_inner.rb +3 -3
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.4/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.4/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- metadata +9 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16e5866cf88c570d5219281eac2aa300e150afd378c6e7fe224340ee2f795807
|
|
4
|
+
data.tar.gz: ff9aac6a50b3b824c504f088b735fed9d322ba8678dfde2a6eaffcba1482ad32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a42cfe7d24d7e446f0d7ce850399146ec36f17d40560c875079acb473914553bf237f36211a3de62c08b52d162964355a1cb31d593ae74379238151bc2d9248
|
|
7
|
+
data.tar.gz: ad4256a9220959dc81ad049a30b1207f8f3ca22e2b380dea9cf2a41a9918d22df0e075581987dadc3e7ae6cf31c04e49f1a070ddd97b2c5de5e9a3d2091b910f
|
data/Gemfile.lock
CHANGED
|
@@ -250,20 +250,22 @@ module Pingram
|
|
|
250
250
|
return data, status_code, headers
|
|
251
251
|
end
|
|
252
252
|
|
|
253
|
-
# Get historical usage for the authenticated account over a date range.
|
|
253
|
+
# Get historical usage for the authenticated account over a date range, summed by UTC calendar month or billing cycle from daily counts.
|
|
254
254
|
# @param start_date [String] Start date (YYYY-MM-DD) for the range
|
|
255
255
|
# @param end_date [String] End date (YYYY-MM-DD) for the range
|
|
256
256
|
# @param [Hash] opts the optional parameters
|
|
257
|
+
# @option opts [String] :group_by calendar (UTC months, default) or billing (account billing cycles)
|
|
257
258
|
# @return [GetUsageHistoryResponse]
|
|
258
259
|
def account_get_usage_history(start_date, end_date, opts = {})
|
|
259
260
|
data, _status_code, _headers = account_get_usage_history_with_http_info(start_date, end_date, opts)
|
|
260
261
|
data
|
|
261
262
|
end
|
|
262
263
|
|
|
263
|
-
# Get historical usage for the authenticated account over a date range.
|
|
264
|
+
# Get historical usage for the authenticated account over a date range, summed by UTC calendar month or billing cycle from daily counts.
|
|
264
265
|
# @param start_date [String] Start date (YYYY-MM-DD) for the range
|
|
265
266
|
# @param end_date [String] End date (YYYY-MM-DD) for the range
|
|
266
267
|
# @param [Hash] opts the optional parameters
|
|
268
|
+
# @option opts [String] :group_by calendar (UTC months, default) or billing (account billing cycles)
|
|
267
269
|
# @return [Array<(GetUsageHistoryResponse, Integer, Hash)>] GetUsageHistoryResponse data, response status code and response headers
|
|
268
270
|
def account_get_usage_history_with_http_info(start_date, end_date, opts = {})
|
|
269
271
|
if @api_client.config.debugging
|
|
@@ -284,6 +286,7 @@ module Pingram
|
|
|
284
286
|
query_params = opts[:query_params] || {}
|
|
285
287
|
query_params[:'startDate'] = start_date
|
|
286
288
|
query_params[:'endDate'] = end_date
|
|
289
|
+
query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
|
|
287
290
|
|
|
288
291
|
# header parameters
|
|
289
292
|
header_params = opts[:header_params] || {}
|
data/lib/pingram/api/user_api.rb
CHANGED
|
@@ -74,122 +74,6 @@ module Pingram
|
|
|
74
74
|
return data, status_code, headers
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
-
# Get in-app notifications for a user
|
|
78
|
-
# @param [Hash] opts the optional parameters
|
|
79
|
-
# @option opts [String] :before Timestamp or ISO date to fetch notifications before
|
|
80
|
-
# @option opts [Float] :count Number of notifications to return (default 10)
|
|
81
|
-
# @return [GetInappNotificationsResponse]
|
|
82
|
-
def user_get_in_app_notifications(opts = {})
|
|
83
|
-
data, _status_code, _headers = user_get_in_app_notifications_with_http_info(opts)
|
|
84
|
-
data
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# Get in-app notifications for a user
|
|
88
|
-
# @param [Hash] opts the optional parameters
|
|
89
|
-
# @option opts [String] :before Timestamp or ISO date to fetch notifications before
|
|
90
|
-
# @option opts [Float] :count Number of notifications to return (default 10)
|
|
91
|
-
# @return [Array<(GetInappNotificationsResponse, Integer, Hash)>] GetInappNotificationsResponse data, response status code and response headers
|
|
92
|
-
def user_get_in_app_notifications_with_http_info(opts = {})
|
|
93
|
-
if @api_client.config.debugging
|
|
94
|
-
@api_client.config.logger.debug 'Calling API: UserApi.user_get_in_app_notifications ...'
|
|
95
|
-
end
|
|
96
|
-
# resource path
|
|
97
|
-
local_var_path = '/user/inapp'
|
|
98
|
-
|
|
99
|
-
# query parameters
|
|
100
|
-
query_params = opts[:query_params] || {}
|
|
101
|
-
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
102
|
-
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
103
|
-
|
|
104
|
-
# header parameters
|
|
105
|
-
header_params = opts[:header_params] || {}
|
|
106
|
-
# HTTP header 'Accept' (if needed)
|
|
107
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
108
|
-
|
|
109
|
-
# form parameters
|
|
110
|
-
form_params = opts[:form_params] || {}
|
|
111
|
-
|
|
112
|
-
# http body (model)
|
|
113
|
-
post_body = opts[:debug_body]
|
|
114
|
-
|
|
115
|
-
# return_type
|
|
116
|
-
return_type = opts[:debug_return_type] || 'GetInappNotificationsResponse'
|
|
117
|
-
|
|
118
|
-
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
119
|
-
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
120
|
-
|
|
121
|
-
new_options = opts.merge(
|
|
122
|
-
:operation => :"UserApi.user_get_in_app_notifications",
|
|
123
|
-
:header_params => header_params,
|
|
124
|
-
:query_params => query_params,
|
|
125
|
-
:form_params => form_params,
|
|
126
|
-
:body => post_body,
|
|
127
|
-
:auth_names => auth_names,
|
|
128
|
-
:return_type => return_type
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
132
|
-
if @api_client.config.debugging
|
|
133
|
-
@api_client.config.logger.debug "API called: UserApi#user_get_in_app_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
134
|
-
end
|
|
135
|
-
return data, status_code, headers
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
# Get the count of unread in-app notifications for a user
|
|
139
|
-
# @param [Hash] opts the optional parameters
|
|
140
|
-
# @return [InappUnreadCountResponse]
|
|
141
|
-
def user_get_in_app_unread_count(opts = {})
|
|
142
|
-
data, _status_code, _headers = user_get_in_app_unread_count_with_http_info(opts)
|
|
143
|
-
data
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# Get the count of unread in-app notifications for a user
|
|
147
|
-
# @param [Hash] opts the optional parameters
|
|
148
|
-
# @return [Array<(InappUnreadCountResponse, Integer, Hash)>] InappUnreadCountResponse data, response status code and response headers
|
|
149
|
-
def user_get_in_app_unread_count_with_http_info(opts = {})
|
|
150
|
-
if @api_client.config.debugging
|
|
151
|
-
@api_client.config.logger.debug 'Calling API: UserApi.user_get_in_app_unread_count ...'
|
|
152
|
-
end
|
|
153
|
-
# resource path
|
|
154
|
-
local_var_path = '/user/inapp/unread'
|
|
155
|
-
|
|
156
|
-
# query parameters
|
|
157
|
-
query_params = opts[:query_params] || {}
|
|
158
|
-
|
|
159
|
-
# header parameters
|
|
160
|
-
header_params = opts[:header_params] || {}
|
|
161
|
-
# HTTP header 'Accept' (if needed)
|
|
162
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
163
|
-
|
|
164
|
-
# form parameters
|
|
165
|
-
form_params = opts[:form_params] || {}
|
|
166
|
-
|
|
167
|
-
# http body (model)
|
|
168
|
-
post_body = opts[:debug_body]
|
|
169
|
-
|
|
170
|
-
# return_type
|
|
171
|
-
return_type = opts[:debug_return_type] || 'InappUnreadCountResponse'
|
|
172
|
-
|
|
173
|
-
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
174
|
-
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
175
|
-
|
|
176
|
-
new_options = opts.merge(
|
|
177
|
-
:operation => :"UserApi.user_get_in_app_unread_count",
|
|
178
|
-
:header_params => header_params,
|
|
179
|
-
:query_params => query_params,
|
|
180
|
-
:form_params => form_params,
|
|
181
|
-
:body => post_body,
|
|
182
|
-
:auth_names => auth_names,
|
|
183
|
-
:return_type => return_type
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
187
|
-
if @api_client.config.debugging
|
|
188
|
-
@api_client.config.logger.debug "API called: UserApi#user_get_in_app_unread_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
189
|
-
end
|
|
190
|
-
return data, status_code, headers
|
|
191
|
-
end
|
|
192
|
-
|
|
193
77
|
# Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.
|
|
194
78
|
# @param user_id [String] User ID
|
|
195
79
|
# @param [Hash] opts the optional parameters
|
|
@@ -322,137 +206,5 @@ module Pingram
|
|
|
322
206
|
end
|
|
323
207
|
return data, status_code, headers
|
|
324
208
|
end
|
|
325
|
-
|
|
326
|
-
# Mark in-app web notifications as seen/read for a user
|
|
327
|
-
# @param in_app_notification_unread_clear_request [InAppNotificationUnreadClearRequest]
|
|
328
|
-
# @param [Hash] opts the optional parameters
|
|
329
|
-
# @return [SuccessResponse]
|
|
330
|
-
def user_mark_in_app_notifications_as_seen(in_app_notification_unread_clear_request, opts = {})
|
|
331
|
-
data, _status_code, _headers = user_mark_in_app_notifications_as_seen_with_http_info(in_app_notification_unread_clear_request, opts)
|
|
332
|
-
data
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
# Mark in-app web notifications as seen/read for a user
|
|
336
|
-
# @param in_app_notification_unread_clear_request [InAppNotificationUnreadClearRequest]
|
|
337
|
-
# @param [Hash] opts the optional parameters
|
|
338
|
-
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
|
339
|
-
def user_mark_in_app_notifications_as_seen_with_http_info(in_app_notification_unread_clear_request, opts = {})
|
|
340
|
-
if @api_client.config.debugging
|
|
341
|
-
@api_client.config.logger.debug 'Calling API: UserApi.user_mark_in_app_notifications_as_seen ...'
|
|
342
|
-
end
|
|
343
|
-
# verify the required parameter 'in_app_notification_unread_clear_request' is set
|
|
344
|
-
if @api_client.config.client_side_validation && in_app_notification_unread_clear_request.nil?
|
|
345
|
-
fail ArgumentError, "Missing the required parameter 'in_app_notification_unread_clear_request' when calling UserApi.user_mark_in_app_notifications_as_seen"
|
|
346
|
-
end
|
|
347
|
-
# resource path
|
|
348
|
-
local_var_path = '/user/inapp/unread'
|
|
349
|
-
|
|
350
|
-
# query parameters
|
|
351
|
-
query_params = opts[:query_params] || {}
|
|
352
|
-
|
|
353
|
-
# header parameters
|
|
354
|
-
header_params = opts[:header_params] || {}
|
|
355
|
-
# HTTP header 'Accept' (if needed)
|
|
356
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
357
|
-
# HTTP header 'Content-Type'
|
|
358
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
359
|
-
if !content_type.nil?
|
|
360
|
-
header_params['Content-Type'] = content_type
|
|
361
|
-
end
|
|
362
|
-
|
|
363
|
-
# form parameters
|
|
364
|
-
form_params = opts[:form_params] || {}
|
|
365
|
-
|
|
366
|
-
# http body (model)
|
|
367
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(in_app_notification_unread_clear_request)
|
|
368
|
-
|
|
369
|
-
# return_type
|
|
370
|
-
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
|
371
|
-
|
|
372
|
-
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
373
|
-
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
374
|
-
|
|
375
|
-
new_options = opts.merge(
|
|
376
|
-
:operation => :"UserApi.user_mark_in_app_notifications_as_seen",
|
|
377
|
-
:header_params => header_params,
|
|
378
|
-
:query_params => query_params,
|
|
379
|
-
:form_params => form_params,
|
|
380
|
-
:body => post_body,
|
|
381
|
-
:auth_names => auth_names,
|
|
382
|
-
:return_type => return_type
|
|
383
|
-
)
|
|
384
|
-
|
|
385
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
386
|
-
if @api_client.config.debugging
|
|
387
|
-
@api_client.config.logger.debug "API called: UserApi#user_mark_in_app_notifications_as_seen\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
388
|
-
end
|
|
389
|
-
return data, status_code, headers
|
|
390
|
-
end
|
|
391
|
-
|
|
392
|
-
# Update in-app web notification status (opened, archived, clicked, etc.)
|
|
393
|
-
# @param in_app_notification_patch_request [InAppNotificationPatchRequest]
|
|
394
|
-
# @param [Hash] opts the optional parameters
|
|
395
|
-
# @return [SuccessResponse]
|
|
396
|
-
def user_update_in_app_notification_status(in_app_notification_patch_request, opts = {})
|
|
397
|
-
data, _status_code, _headers = user_update_in_app_notification_status_with_http_info(in_app_notification_patch_request, opts)
|
|
398
|
-
data
|
|
399
|
-
end
|
|
400
|
-
|
|
401
|
-
# Update in-app web notification status (opened, archived, clicked, etc.)
|
|
402
|
-
# @param in_app_notification_patch_request [InAppNotificationPatchRequest]
|
|
403
|
-
# @param [Hash] opts the optional parameters
|
|
404
|
-
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
|
405
|
-
def user_update_in_app_notification_status_with_http_info(in_app_notification_patch_request, opts = {})
|
|
406
|
-
if @api_client.config.debugging
|
|
407
|
-
@api_client.config.logger.debug 'Calling API: UserApi.user_update_in_app_notification_status ...'
|
|
408
|
-
end
|
|
409
|
-
# verify the required parameter 'in_app_notification_patch_request' is set
|
|
410
|
-
if @api_client.config.client_side_validation && in_app_notification_patch_request.nil?
|
|
411
|
-
fail ArgumentError, "Missing the required parameter 'in_app_notification_patch_request' when calling UserApi.user_update_in_app_notification_status"
|
|
412
|
-
end
|
|
413
|
-
# resource path
|
|
414
|
-
local_var_path = '/user/inapp'
|
|
415
|
-
|
|
416
|
-
# query parameters
|
|
417
|
-
query_params = opts[:query_params] || {}
|
|
418
|
-
|
|
419
|
-
# header parameters
|
|
420
|
-
header_params = opts[:header_params] || {}
|
|
421
|
-
# HTTP header 'Accept' (if needed)
|
|
422
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
423
|
-
# HTTP header 'Content-Type'
|
|
424
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
425
|
-
if !content_type.nil?
|
|
426
|
-
header_params['Content-Type'] = content_type
|
|
427
|
-
end
|
|
428
|
-
|
|
429
|
-
# form parameters
|
|
430
|
-
form_params = opts[:form_params] || {}
|
|
431
|
-
|
|
432
|
-
# http body (model)
|
|
433
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(in_app_notification_patch_request)
|
|
434
|
-
|
|
435
|
-
# return_type
|
|
436
|
-
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
|
437
|
-
|
|
438
|
-
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
439
|
-
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
440
|
-
|
|
441
|
-
new_options = opts.merge(
|
|
442
|
-
:operation => :"UserApi.user_update_in_app_notification_status",
|
|
443
|
-
:header_params => header_params,
|
|
444
|
-
:query_params => query_params,
|
|
445
|
-
:form_params => form_params,
|
|
446
|
-
:body => post_body,
|
|
447
|
-
:auth_names => auth_names,
|
|
448
|
-
:return_type => return_type
|
|
449
|
-
)
|
|
450
|
-
|
|
451
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
452
|
-
if @api_client.config.debugging
|
|
453
|
-
@api_client.config.logger.debug "API called: UserApi#user_update_in_app_notification_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
454
|
-
end
|
|
455
|
-
return data, status_code, headers
|
|
456
|
-
end
|
|
457
209
|
end
|
|
458
210
|
end
|
|
@@ -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.
|
|
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 http or https 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.
|
|
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 http or https 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
|
|
@@ -85,8 +85,8 @@ module Pingram
|
|
|
85
85
|
return data, status_code, headers
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
# Delete
|
|
89
|
-
# @param endpoint_id [String]
|
|
88
|
+
# Delete one webhook endpoint by id from list or create. That URL stops receiving its events. Other endpoints on the account are left as they are.
|
|
89
|
+
# @param endpoint_id [String] Id of the webhook endpoint, from list or create.
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
91
91
|
# @return [nil]
|
|
92
92
|
def webhooks_delete_webhook(endpoint_id, opts = {})
|
|
@@ -94,8 +94,8 @@ module Pingram
|
|
|
94
94
|
nil
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
-
# Delete
|
|
98
|
-
# @param endpoint_id [String]
|
|
97
|
+
# Delete one webhook endpoint by id from list or create. That URL stops receiving its events. Other endpoints on the account are left as they are.
|
|
98
|
+
# @param endpoint_id [String] Id of the webhook endpoint, from list or create.
|
|
99
99
|
# @param [Hash] opts the optional parameters
|
|
100
100
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
101
101
|
def webhooks_delete_webhook_with_http_info(endpoint_id, opts = {})
|
|
@@ -146,7 +146,7 @@ module Pingram
|
|
|
146
146
|
return data, status_code, headers
|
|
147
147
|
end
|
|
148
148
|
|
|
149
|
-
# List
|
|
149
|
+
# List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
|
|
150
150
|
# @param [Hash] opts the optional parameters
|
|
151
151
|
# @return [WebhookEndpointsResponse]
|
|
152
152
|
def webhooks_list_webhooks(opts = {})
|
|
@@ -154,7 +154,7 @@ module Pingram
|
|
|
154
154
|
data
|
|
155
155
|
end
|
|
156
156
|
|
|
157
|
-
# List
|
|
157
|
+
# List webhook endpoints on the current account, including each id, URL, subscribed events, and signing secret. Use the id with update or delete.
|
|
158
158
|
# @param [Hash] opts the optional parameters
|
|
159
159
|
# @return [Array<(WebhookEndpointsResponse, Integer, Hash)>] WebhookEndpointsResponse data, response status code and response headers
|
|
160
160
|
def webhooks_list_webhooks_with_http_info(opts = {})
|
|
@@ -201,8 +201,8 @@ module Pingram
|
|
|
201
201
|
return data, status_code, headers
|
|
202
202
|
end
|
|
203
203
|
|
|
204
|
-
#
|
|
205
|
-
# @param endpoint_id [String]
|
|
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 http or https.
|
|
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
|
|
208
208
|
# @return [WebhookEndpoint]
|
|
@@ -211,8 +211,8 @@ module Pingram
|
|
|
211
211
|
data
|
|
212
212
|
end
|
|
213
213
|
|
|
214
|
-
#
|
|
215
|
-
# @param endpoint_id [String]
|
|
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 http or https.
|
|
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
|
|
218
218
|
# @return [Array<(WebhookEndpoint, Integer, Hash)>] WebhookEndpoint data, response status code and response headers
|
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.35"
|
|
36
36
|
@default_headers = {
|
|
37
37
|
'Content-Type' => 'application/json',
|
|
38
38
|
'User-Agent' => @user_agent
|
|
@@ -125,7 +125,7 @@ module Pingram
|
|
|
125
125
|
def valid?
|
|
126
126
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
127
|
return false if @tier.nil?
|
|
128
|
-
tier_validator = EnumAttributeValidator.new('String', ["budget_20", "budget_50", "budget_100", "budget_250", "budget_500", "budget_1000"
|
|
128
|
+
tier_validator = EnumAttributeValidator.new('String', ["budget_20", "budget_50", "budget_100", "budget_250", "budget_500", "budget_1000"])
|
|
129
129
|
return false unless tier_validator.valid?(@tier)
|
|
130
130
|
return false if @source_billing_account_id.nil?
|
|
131
131
|
true
|
|
@@ -134,7 +134,7 @@ module Pingram
|
|
|
134
134
|
# Custom attribute writer method checking allowed values (enum).
|
|
135
135
|
# @param [Object] tier Object to be assigned
|
|
136
136
|
def tier=(tier)
|
|
137
|
-
validator = EnumAttributeValidator.new('String', ["budget_20", "budget_50", "budget_100", "budget_250", "budget_500", "budget_1000"
|
|
137
|
+
validator = EnumAttributeValidator.new('String', ["budget_20", "budget_50", "budget_100", "budget_250", "budget_500", "budget_1000"])
|
|
138
138
|
unless validator.valid?(tier)
|
|
139
139
|
fail ArgumentError, "invalid value for \"tier\", must be one of #{validator.allowable_values}."
|
|
140
140
|
end
|
|
@@ -22,11 +22,15 @@ module Pingram
|
|
|
22
22
|
# End date (YYYY-MM-DD) for the range
|
|
23
23
|
attr_accessor :end_date
|
|
24
24
|
|
|
25
|
+
# calendar = UTC calendar months (YYYY-MM). billing = account billing cycles (YYYY-MM-DD period start). Defaults to calendar.
|
|
26
|
+
attr_accessor :group_by
|
|
27
|
+
|
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
29
|
def self.attribute_map
|
|
27
30
|
{
|
|
28
31
|
:'start_date' => :'startDate',
|
|
29
|
-
:'end_date' => :'endDate'
|
|
32
|
+
:'end_date' => :'endDate',
|
|
33
|
+
:'group_by' => :'groupBy'
|
|
30
34
|
}
|
|
31
35
|
end
|
|
32
36
|
|
|
@@ -44,7 +48,8 @@ module Pingram
|
|
|
44
48
|
def self.openapi_types
|
|
45
49
|
{
|
|
46
50
|
:'start_date' => :'String',
|
|
47
|
-
:'end_date' => :'String'
|
|
51
|
+
:'end_date' => :'String',
|
|
52
|
+
:'group_by' => :'String'
|
|
48
53
|
}
|
|
49
54
|
end
|
|
50
55
|
|
|
@@ -81,6 +86,10 @@ module Pingram
|
|
|
81
86
|
else
|
|
82
87
|
self.end_date = nil
|
|
83
88
|
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'group_by')
|
|
91
|
+
self.group_by = attributes[:'group_by']
|
|
92
|
+
end
|
|
84
93
|
end
|
|
85
94
|
|
|
86
95
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -134,7 +143,8 @@ module Pingram
|
|
|
134
143
|
return true if self.equal?(o)
|
|
135
144
|
self.class == o.class &&
|
|
136
145
|
start_date == o.start_date &&
|
|
137
|
-
end_date == o.end_date
|
|
146
|
+
end_date == o.end_date &&
|
|
147
|
+
group_by == o.group_by
|
|
138
148
|
end
|
|
139
149
|
|
|
140
150
|
# @see the `==` method
|
|
@@ -146,7 +156,7 @@ module Pingram
|
|
|
146
156
|
# Calculates hash code according to all attributes.
|
|
147
157
|
# @return [Integer] Hash code
|
|
148
158
|
def hash
|
|
149
|
-
[start_date, end_date].hash
|
|
159
|
+
[start_date, end_date, group_by].hash
|
|
150
160
|
end
|
|
151
161
|
|
|
152
162
|
# Builds the object from hash
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Pingram
|
|
17
17
|
# Response for GET /account/usage/history
|
|
18
18
|
class GetUsageHistoryResponse < ApiModelBase
|
|
19
|
-
# Array of usage items, one per month in the
|
|
19
|
+
# Array of usage items, one per calendar month or billing cycle in the range
|
|
20
20
|
attr_accessor :items
|
|
21
21
|
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Pingram
|
|
17
17
|
# Single usage item in historical response
|
|
18
18
|
class GetUsageHistoryResponseItemsInner < ApiModelBase
|
|
19
|
-
#
|
|
19
|
+
# YYYY-MM for calendar months, or YYYY-MM-DD billing-period start.
|
|
20
20
|
attr_accessor :year_month
|
|
21
21
|
|
|
22
22
|
attr_accessor :counts
|