activitysmith 1.13.0 → 1.14.0
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/README.md +27 -5
- data/generated/activitysmith_openapi/api/push_notifications_api.rb +80 -2
- data/generated/activitysmith_openapi/models/app_icon_badge_count_update_response.rb +34 -4
- data/generated/activitysmith_openapi/models/live_activity_end_response.rb +64 -4
- data/generated/activitysmith_openapi/models/live_activity_start_response.rb +35 -4
- data/generated/activitysmith_openapi/models/live_activity_stream_delete_response.rb +53 -4
- data/generated/activitysmith_openapi/models/live_activity_stream_put_response.rb +54 -4
- data/generated/activitysmith_openapi/models/live_activity_update_response.rb +76 -4
- data/generated/activitysmith_openapi/models/push_notification_replace_request.rb +434 -0
- data/generated/activitysmith_openapi/models/push_notification_replace_response.rb +298 -0
- data/generated/activitysmith_openapi/models/push_notification_response.rb +63 -4
- data/generated/activitysmith_openapi.rb +2 -0
- data/generated/openapi-source.json +2 -2
- data/lib/activitysmith/notifications.rb +12 -0
- data/lib/activitysmith/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a2ee0516e542f1c17496efa764ce0c069b86d2252c477b9627844324bbbb5dbc
|
|
4
|
+
data.tar.gz: 5d819aaac4d797aa055dee752a93a30d22014470ed3b8da62dc16144554650be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40b1fc816fb5ec2ab730e145c005a53543477d24d519b06b4666b574b94e5948bf4b66c6dea72669cbd3386a4f4490faa1831873d4034754a17619139845e145
|
|
7
|
+
data.tar.gz: a9e93c08d13d6f33ac83aa6ad2b185af99d981a9e35b08e81bc3a4751434312f2a51b13f1d6582008ecb75ac036382805a06f91d5d1718073e07b45c603dba7a
|
data/README.md
CHANGED
|
@@ -44,7 +44,7 @@ activitysmith.notifications.send(
|
|
|
44
44
|
|
|
45
45
|

|
|
46
46
|
|
|
47
|
-
Set `icon` to a publicly accessible HTTPS image URL to show
|
|
47
|
+
Set `icon` to a publicly accessible HTTPS image URL to show a logo or avatar alongside a smaller ActivitySmith app icon. With a custom icon, iOS may omit the subtitle from the notification.
|
|
48
48
|
|
|
49
49
|
```ruby
|
|
50
50
|
activitysmith.notifications.send(
|
|
@@ -206,6 +206,29 @@ activitysmith.notifications.send(
|
|
|
206
206
|
)
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
+
### Replace a Push Notification
|
|
210
|
+
|
|
211
|
+
Every send returns a `notification_id`. Pass it to `replace` to update a Push Notification you already sent, for example when an incident you alerted on is resolved. The replacement takes the old notification's place on the Lock Screen and in history instead of stacking a second one. It arrives silently, without sound or waking the screen, and goes to the same recipients as the original.
|
|
212
|
+
|
|
213
|
+
Omit `metadata` or `tags` to keep their stored values.
|
|
214
|
+
|
|
215
|
+
```ruby
|
|
216
|
+
sent = activitysmith.notifications.send(
|
|
217
|
+
{
|
|
218
|
+
title: "🚨 checkout-api is down",
|
|
219
|
+
message: "500 errors on 62% of requests."
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
activitysmith.notifications.replace(
|
|
224
|
+
sent.notification_id,
|
|
225
|
+
{
|
|
226
|
+
title: "✅ checkout-api recovered",
|
|
227
|
+
message: "Error rate is back to normal. Incident resolved."
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
```
|
|
231
|
+
|
|
209
232
|
## Live Activities
|
|
210
233
|
|
|
211
234
|
Choose the Live Activity type that matches what you want to show:
|
|
@@ -242,6 +265,9 @@ Choose the Live Activity type that matches what you want to show:
|
|
|
242
265
|
|
|
243
266
|
Use a stable `stream_key` to identify the metric, job, deployment, or system you want to keep visible. The first `stream(...)` call starts the Live Activity. Later calls with the same `stream_key` update it.
|
|
244
267
|
|
|
268
|
+
> [!WARNING]
|
|
269
|
+
> iOS limits how often a Live Activity can update. Short bursts that end, like deployment steps, are fine. If one Live Activity keeps updating more often than every couple of minutes, iOS throttles it until the budget refills, roughly an hour, even though the API still returns `200`. [Learn more](https://activitysmith.com/docs/live-activity-stream#update-frequency-and-ios-limits)
|
|
270
|
+
|
|
245
271
|
#### Value
|
|
246
272
|
|
|
247
273
|

|
|
@@ -749,7 +775,3 @@ end
|
|
|
749
775
|
### [RubyGems Package](https://rubygems.org/gems/activitysmith)
|
|
750
776
|
|
|
751
777
|
Install the ActivitySmith Ruby SDK from RubyGems
|
|
752
|
-
|
|
753
|
-
### [Source Code](https://github.com/ActivitySmithHQ/activitysmith-ruby)
|
|
754
|
-
|
|
755
|
-
View the Ruby SDK source on GitHub
|
|
@@ -19,8 +19,86 @@ module OpenapiClient
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Replace a push notification
|
|
23
|
+
# Replaces a Push Notification you already sent, using the `notification_id` from the send response. The replacement takes the original's place on the Lock Screen and in Notification Center instead of appearing as a second notification. It is delivered silently, with no sound or screen wake, to the same recipients as the original. Notification history is updated in place.
|
|
24
|
+
# @param notification_id [String] The `notification_id` returned when the Push Notification was sent.
|
|
25
|
+
# @param push_notification_replace_request [PushNotificationReplaceRequest]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [PushNotificationReplaceResponse]
|
|
28
|
+
def replace_push_notification(notification_id, push_notification_replace_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = replace_push_notification_with_http_info(notification_id, push_notification_replace_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Replace a push notification
|
|
34
|
+
# Replaces a Push Notification you already sent, using the `notification_id` from the send response. The replacement takes the original's place on the Lock Screen and in Notification Center instead of appearing as a second notification. It is delivered silently, with no sound or screen wake, to the same recipients as the original. Notification history is updated in place.
|
|
35
|
+
# @param notification_id [String] The `notification_id` returned when the Push Notification was sent.
|
|
36
|
+
# @param push_notification_replace_request [PushNotificationReplaceRequest]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(PushNotificationReplaceResponse, Integer, Hash)>] PushNotificationReplaceResponse data, response status code and response headers
|
|
39
|
+
def replace_push_notification_with_http_info(notification_id, push_notification_replace_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: PushNotificationsApi.replace_push_notification ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'notification_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && notification_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'notification_id' when calling PushNotificationsApi.replace_push_notification"
|
|
46
|
+
end
|
|
47
|
+
if @api_client.config.client_side_validation && notification_id.to_s.length < 1
|
|
48
|
+
fail ArgumentError, 'invalid value for "notification_id" when calling PushNotificationsApi.replace_push_notification, the character length must be great than or equal to 1.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# verify the required parameter 'push_notification_replace_request' is set
|
|
52
|
+
if @api_client.config.client_side_validation && push_notification_replace_request.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'push_notification_replace_request' when calling PushNotificationsApi.replace_push_notification"
|
|
54
|
+
end
|
|
55
|
+
# resource path
|
|
56
|
+
local_var_path = '/push-notification/{notification_id}'.sub('{' + 'notification_id' + '}', CGI.escape(notification_id.to_s))
|
|
57
|
+
|
|
58
|
+
# query parameters
|
|
59
|
+
query_params = opts[:query_params] || {}
|
|
60
|
+
|
|
61
|
+
# header parameters
|
|
62
|
+
header_params = opts[:header_params] || {}
|
|
63
|
+
# HTTP header 'Accept' (if needed)
|
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
65
|
+
# HTTP header 'Content-Type'
|
|
66
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
67
|
+
if !content_type.nil?
|
|
68
|
+
header_params['Content-Type'] = content_type
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# form parameters
|
|
72
|
+
form_params = opts[:form_params] || {}
|
|
73
|
+
|
|
74
|
+
# http body (model)
|
|
75
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(push_notification_replace_request)
|
|
76
|
+
|
|
77
|
+
# return_type
|
|
78
|
+
return_type = opts[:debug_return_type] || 'PushNotificationReplaceResponse'
|
|
79
|
+
|
|
80
|
+
# auth_names
|
|
81
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
|
82
|
+
|
|
83
|
+
new_options = opts.merge(
|
|
84
|
+
:operation => :"PushNotificationsApi.replace_push_notification",
|
|
85
|
+
:header_params => header_params,
|
|
86
|
+
:query_params => query_params,
|
|
87
|
+
:form_params => form_params,
|
|
88
|
+
:body => post_body,
|
|
89
|
+
:auth_names => auth_names,
|
|
90
|
+
:return_type => return_type
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug "API called: PushNotificationsApi#replace_push_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
96
|
+
end
|
|
97
|
+
return data, status_code, headers
|
|
98
|
+
end
|
|
99
|
+
|
|
22
100
|
# Send a push notification
|
|
23
|
-
# Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional `icon` shows a custom image, such as a
|
|
101
|
+
# Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional `icon` shows a custom image, such as a logo or avatar, next to a smaller app icon. Optional `interruption_level` sets how urgently iOS presents the notification. Optional tags to organize and filter notification history.
|
|
24
102
|
# @param push_notification_request [PushNotificationRequest]
|
|
25
103
|
# @param [Hash] opts the optional parameters
|
|
26
104
|
# @return [PushNotificationResponse]
|
|
@@ -30,7 +108,7 @@ module OpenapiClient
|
|
|
30
108
|
end
|
|
31
109
|
|
|
32
110
|
# Send a push notification
|
|
33
|
-
# Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional `icon` shows a custom image, such as a
|
|
111
|
+
# Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional `icon` shows a custom image, such as a logo or avatar, next to a smaller app icon. Optional `interruption_level` sets how urgently iOS presents the notification. Optional tags to organize and filter notification history.
|
|
34
112
|
# @param push_notification_request [PushNotificationRequest]
|
|
35
113
|
# @param [Hash] opts the optional parameters
|
|
36
114
|
# @return [Array<(PushNotificationResponse, Integer, Hash)>] PushNotificationResponse data, response status code and response headers
|
|
@@ -35,6 +35,15 @@ module OpenapiClient
|
|
|
35
35
|
|
|
36
36
|
attr_accessor :timestamp
|
|
37
37
|
|
|
38
|
+
# Number of device tokens targeted.
|
|
39
|
+
attr_accessor :devices_targeted
|
|
40
|
+
|
|
41
|
+
# Number of device tokens deactivated because APNs reported them unregistered.
|
|
42
|
+
attr_accessor :devices_deactivated
|
|
43
|
+
|
|
44
|
+
# Number of targeted device tokens APNs reported as unregistered.
|
|
45
|
+
attr_accessor :devices_unregistered
|
|
46
|
+
|
|
38
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
48
|
def self.attribute_map
|
|
40
49
|
{
|
|
@@ -45,7 +54,10 @@ module OpenapiClient
|
|
|
45
54
|
:'devices_notified' => :'devices_notified',
|
|
46
55
|
:'users_notified' => :'users_notified',
|
|
47
56
|
:'effective_channel_slugs' => :'effective_channel_slugs',
|
|
48
|
-
:'timestamp' => :'timestamp'
|
|
57
|
+
:'timestamp' => :'timestamp',
|
|
58
|
+
:'devices_targeted' => :'devices_targeted',
|
|
59
|
+
:'devices_deactivated' => :'devices_deactivated',
|
|
60
|
+
:'devices_unregistered' => :'devices_unregistered'
|
|
49
61
|
}
|
|
50
62
|
end
|
|
51
63
|
|
|
@@ -64,7 +76,10 @@ module OpenapiClient
|
|
|
64
76
|
:'devices_notified' => :'Integer',
|
|
65
77
|
:'users_notified' => :'Integer',
|
|
66
78
|
:'effective_channel_slugs' => :'Array<String>',
|
|
67
|
-
:'timestamp' => :'Time'
|
|
79
|
+
:'timestamp' => :'Time',
|
|
80
|
+
:'devices_targeted' => :'Integer',
|
|
81
|
+
:'devices_deactivated' => :'Integer',
|
|
82
|
+
:'devices_unregistered' => :'Integer'
|
|
68
83
|
}
|
|
69
84
|
end
|
|
70
85
|
|
|
@@ -134,6 +149,18 @@ module OpenapiClient
|
|
|
134
149
|
else
|
|
135
150
|
self.timestamp = nil
|
|
136
151
|
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'devices_targeted')
|
|
154
|
+
self.devices_targeted = attributes[:'devices_targeted']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'devices_deactivated')
|
|
158
|
+
self.devices_deactivated = attributes[:'devices_deactivated']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'devices_unregistered')
|
|
162
|
+
self.devices_unregistered = attributes[:'devices_unregistered']
|
|
163
|
+
end
|
|
137
164
|
end
|
|
138
165
|
|
|
139
166
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -221,7 +248,10 @@ module OpenapiClient
|
|
|
221
248
|
devices_notified == o.devices_notified &&
|
|
222
249
|
users_notified == o.users_notified &&
|
|
223
250
|
effective_channel_slugs == o.effective_channel_slugs &&
|
|
224
|
-
timestamp == o.timestamp
|
|
251
|
+
timestamp == o.timestamp &&
|
|
252
|
+
devices_targeted == o.devices_targeted &&
|
|
253
|
+
devices_deactivated == o.devices_deactivated &&
|
|
254
|
+
devices_unregistered == o.devices_unregistered
|
|
225
255
|
end
|
|
226
256
|
|
|
227
257
|
# @see the `==` method
|
|
@@ -233,7 +263,7 @@ module OpenapiClient
|
|
|
233
263
|
# Calculates hash code according to all attributes.
|
|
234
264
|
# @return [Integer] Hash code
|
|
235
265
|
def hash
|
|
236
|
-
[success, badge, devices_updated, users_updated, devices_notified, users_notified, effective_channel_slugs, timestamp].hash
|
|
266
|
+
[success, badge, devices_updated, users_updated, devices_notified, users_notified, effective_channel_slugs, timestamp, devices_targeted, devices_deactivated, devices_unregistered].hash
|
|
237
267
|
end
|
|
238
268
|
|
|
239
269
|
# Builds the object from hash
|
|
@@ -26,6 +26,21 @@ module OpenapiClient
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :timestamp
|
|
28
28
|
|
|
29
|
+
# True when the Live Activity had already ended and the request had no effect.
|
|
30
|
+
attr_accessor :ignored
|
|
31
|
+
|
|
32
|
+
attr_accessor :message
|
|
33
|
+
|
|
34
|
+
attr_accessor :end_reason
|
|
35
|
+
|
|
36
|
+
# True when the Live Activity was marked complete without a confirmed APNs end delivery.
|
|
37
|
+
attr_accessor :forced_completion
|
|
38
|
+
|
|
39
|
+
attr_accessor :warning
|
|
40
|
+
|
|
41
|
+
# Per-device delivery errors when some devices could not be reached.
|
|
42
|
+
attr_accessor :errors
|
|
43
|
+
|
|
29
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
45
|
def self.attribute_map
|
|
31
46
|
{
|
|
@@ -33,7 +48,13 @@ module OpenapiClient
|
|
|
33
48
|
:'activity_id' => :'activity_id',
|
|
34
49
|
:'devices_queued' => :'devices_queued',
|
|
35
50
|
:'devices_notified' => :'devices_notified',
|
|
36
|
-
:'timestamp' => :'timestamp'
|
|
51
|
+
:'timestamp' => :'timestamp',
|
|
52
|
+
:'ignored' => :'ignored',
|
|
53
|
+
:'message' => :'message',
|
|
54
|
+
:'end_reason' => :'end_reason',
|
|
55
|
+
:'forced_completion' => :'forced_completion',
|
|
56
|
+
:'warning' => :'warning',
|
|
57
|
+
:'errors' => :'errors'
|
|
37
58
|
}
|
|
38
59
|
end
|
|
39
60
|
|
|
@@ -49,13 +70,20 @@ module OpenapiClient
|
|
|
49
70
|
:'activity_id' => :'String',
|
|
50
71
|
:'devices_queued' => :'Integer',
|
|
51
72
|
:'devices_notified' => :'Integer',
|
|
52
|
-
:'timestamp' => :'Time'
|
|
73
|
+
:'timestamp' => :'Time',
|
|
74
|
+
:'ignored' => :'Boolean',
|
|
75
|
+
:'message' => :'String',
|
|
76
|
+
:'end_reason' => :'String',
|
|
77
|
+
:'forced_completion' => :'Boolean',
|
|
78
|
+
:'warning' => :'String',
|
|
79
|
+
:'errors' => :'Array<String>'
|
|
53
80
|
}
|
|
54
81
|
end
|
|
55
82
|
|
|
56
83
|
# List of attributes with nullable: true
|
|
57
84
|
def self.openapi_nullable
|
|
58
85
|
Set.new([
|
|
86
|
+
:'end_reason',
|
|
59
87
|
])
|
|
60
88
|
end
|
|
61
89
|
|
|
@@ -99,6 +127,32 @@ module OpenapiClient
|
|
|
99
127
|
else
|
|
100
128
|
self.timestamp = nil
|
|
101
129
|
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'ignored')
|
|
132
|
+
self.ignored = attributes[:'ignored']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'message')
|
|
136
|
+
self.message = attributes[:'message']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'end_reason')
|
|
140
|
+
self.end_reason = attributes[:'end_reason']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'forced_completion')
|
|
144
|
+
self.forced_completion = attributes[:'forced_completion']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'warning')
|
|
148
|
+
self.warning = attributes[:'warning']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'errors')
|
|
152
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
|
153
|
+
self.errors = value
|
|
154
|
+
end
|
|
155
|
+
end
|
|
102
156
|
end
|
|
103
157
|
|
|
104
158
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -140,7 +194,13 @@ module OpenapiClient
|
|
|
140
194
|
activity_id == o.activity_id &&
|
|
141
195
|
devices_queued == o.devices_queued &&
|
|
142
196
|
devices_notified == o.devices_notified &&
|
|
143
|
-
timestamp == o.timestamp
|
|
197
|
+
timestamp == o.timestamp &&
|
|
198
|
+
ignored == o.ignored &&
|
|
199
|
+
message == o.message &&
|
|
200
|
+
end_reason == o.end_reason &&
|
|
201
|
+
forced_completion == o.forced_completion &&
|
|
202
|
+
warning == o.warning &&
|
|
203
|
+
errors == o.errors
|
|
144
204
|
end
|
|
145
205
|
|
|
146
206
|
# @see the `==` method
|
|
@@ -152,7 +212,7 @@ module OpenapiClient
|
|
|
152
212
|
# Calculates hash code according to all attributes.
|
|
153
213
|
# @return [Integer] Hash code
|
|
154
214
|
def hash
|
|
155
|
-
[success, activity_id, devices_queued, devices_notified, timestamp].hash
|
|
215
|
+
[success, activity_id, devices_queued, devices_notified, timestamp, ignored, message, end_reason, forced_completion, warning, errors].hash
|
|
156
216
|
end
|
|
157
217
|
|
|
158
218
|
# Builds the object from hash
|
|
@@ -31,6 +31,14 @@ module OpenapiClient
|
|
|
31
31
|
|
|
32
32
|
attr_accessor :timestamp
|
|
33
33
|
|
|
34
|
+
# Present when starting this Live Activity ended an older one to stay within the device limit.
|
|
35
|
+
attr_accessor :ended_activity_id
|
|
36
|
+
|
|
37
|
+
attr_accessor :message
|
|
38
|
+
|
|
39
|
+
# Per-device delivery errors when some devices could not be reached.
|
|
40
|
+
attr_accessor :errors
|
|
41
|
+
|
|
34
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
43
|
def self.attribute_map
|
|
36
44
|
{
|
|
@@ -40,7 +48,10 @@ module OpenapiClient
|
|
|
40
48
|
:'activity_id' => :'activity_id',
|
|
41
49
|
:'effective_channel_slugs' => :'effective_channel_slugs',
|
|
42
50
|
:'tags' => :'tags',
|
|
43
|
-
:'timestamp' => :'timestamp'
|
|
51
|
+
:'timestamp' => :'timestamp',
|
|
52
|
+
:'ended_activity_id' => :'ended_activity_id',
|
|
53
|
+
:'message' => :'message',
|
|
54
|
+
:'errors' => :'errors'
|
|
44
55
|
}
|
|
45
56
|
end
|
|
46
57
|
|
|
@@ -58,7 +69,10 @@ module OpenapiClient
|
|
|
58
69
|
:'activity_id' => :'String',
|
|
59
70
|
:'effective_channel_slugs' => :'Array<String>',
|
|
60
71
|
:'tags' => :'Array<String>',
|
|
61
|
-
:'timestamp' => :'Time'
|
|
72
|
+
:'timestamp' => :'Time',
|
|
73
|
+
:'ended_activity_id' => :'String',
|
|
74
|
+
:'message' => :'String',
|
|
75
|
+
:'errors' => :'Array<String>'
|
|
62
76
|
}
|
|
63
77
|
end
|
|
64
78
|
|
|
@@ -120,6 +134,20 @@ module OpenapiClient
|
|
|
120
134
|
else
|
|
121
135
|
self.timestamp = nil
|
|
122
136
|
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'ended_activity_id')
|
|
139
|
+
self.ended_activity_id = attributes[:'ended_activity_id']
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'message')
|
|
143
|
+
self.message = attributes[:'message']
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'errors')
|
|
147
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
|
148
|
+
self.errors = value
|
|
149
|
+
end
|
|
150
|
+
end
|
|
123
151
|
end
|
|
124
152
|
|
|
125
153
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -163,7 +191,10 @@ module OpenapiClient
|
|
|
163
191
|
activity_id == o.activity_id &&
|
|
164
192
|
effective_channel_slugs == o.effective_channel_slugs &&
|
|
165
193
|
tags == o.tags &&
|
|
166
|
-
timestamp == o.timestamp
|
|
194
|
+
timestamp == o.timestamp &&
|
|
195
|
+
ended_activity_id == o.ended_activity_id &&
|
|
196
|
+
message == o.message &&
|
|
197
|
+
errors == o.errors
|
|
167
198
|
end
|
|
168
199
|
|
|
169
200
|
# @see the `==` method
|
|
@@ -175,7 +206,7 @@ module OpenapiClient
|
|
|
175
206
|
# Calculates hash code according to all attributes.
|
|
176
207
|
# @return [Integer] Hash code
|
|
177
208
|
def hash
|
|
178
|
-
[success, devices_notified, users_notified, activity_id, effective_channel_slugs, tags, timestamp].hash
|
|
209
|
+
[success, devices_notified, users_notified, activity_id, effective_channel_slugs, tags, timestamp, ended_activity_id, message, errors].hash
|
|
179
210
|
end
|
|
180
211
|
|
|
181
212
|
# Builds the object from hash
|
|
@@ -30,6 +30,18 @@ module OpenapiClient
|
|
|
30
30
|
|
|
31
31
|
attr_accessor :timestamp
|
|
32
32
|
|
|
33
|
+
# True when the stream was already ended and the request had no effect.
|
|
34
|
+
attr_accessor :ignored
|
|
35
|
+
|
|
36
|
+
attr_accessor :message
|
|
37
|
+
|
|
38
|
+
attr_accessor :forced_completion
|
|
39
|
+
|
|
40
|
+
attr_accessor :warning
|
|
41
|
+
|
|
42
|
+
# Per-device delivery errors when some devices could not be reached.
|
|
43
|
+
attr_accessor :errors
|
|
44
|
+
|
|
33
45
|
class EnumAttributeValidator
|
|
34
46
|
attr_reader :datatype
|
|
35
47
|
attr_reader :allowable_values
|
|
@@ -61,7 +73,12 @@ module OpenapiClient
|
|
|
61
73
|
:'activity_id' => :'activity_id',
|
|
62
74
|
:'devices_queued' => :'devices_queued',
|
|
63
75
|
:'devices_notified' => :'devices_notified',
|
|
64
|
-
:'timestamp' => :'timestamp'
|
|
76
|
+
:'timestamp' => :'timestamp',
|
|
77
|
+
:'ignored' => :'ignored',
|
|
78
|
+
:'message' => :'message',
|
|
79
|
+
:'forced_completion' => :'forced_completion',
|
|
80
|
+
:'warning' => :'warning',
|
|
81
|
+
:'errors' => :'errors'
|
|
65
82
|
}
|
|
66
83
|
end
|
|
67
84
|
|
|
@@ -79,7 +96,12 @@ module OpenapiClient
|
|
|
79
96
|
:'activity_id' => :'String',
|
|
80
97
|
:'devices_queued' => :'Integer',
|
|
81
98
|
:'devices_notified' => :'Integer',
|
|
82
|
-
:'timestamp' => :'Time'
|
|
99
|
+
:'timestamp' => :'Time',
|
|
100
|
+
:'ignored' => :'Boolean',
|
|
101
|
+
:'message' => :'String',
|
|
102
|
+
:'forced_completion' => :'Boolean',
|
|
103
|
+
:'warning' => :'String',
|
|
104
|
+
:'errors' => :'Array<String>'
|
|
83
105
|
}
|
|
84
106
|
end
|
|
85
107
|
|
|
@@ -140,6 +162,28 @@ module OpenapiClient
|
|
|
140
162
|
else
|
|
141
163
|
self.timestamp = nil
|
|
142
164
|
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'ignored')
|
|
167
|
+
self.ignored = attributes[:'ignored']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'message')
|
|
171
|
+
self.message = attributes[:'message']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'forced_completion')
|
|
175
|
+
self.forced_completion = attributes[:'forced_completion']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'warning')
|
|
179
|
+
self.warning = attributes[:'warning']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'errors')
|
|
183
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
|
184
|
+
self.errors = value
|
|
185
|
+
end
|
|
186
|
+
end
|
|
143
187
|
end
|
|
144
188
|
|
|
145
189
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -200,7 +244,12 @@ module OpenapiClient
|
|
|
200
244
|
activity_id == o.activity_id &&
|
|
201
245
|
devices_queued == o.devices_queued &&
|
|
202
246
|
devices_notified == o.devices_notified &&
|
|
203
|
-
timestamp == o.timestamp
|
|
247
|
+
timestamp == o.timestamp &&
|
|
248
|
+
ignored == o.ignored &&
|
|
249
|
+
message == o.message &&
|
|
250
|
+
forced_completion == o.forced_completion &&
|
|
251
|
+
warning == o.warning &&
|
|
252
|
+
errors == o.errors
|
|
204
253
|
end
|
|
205
254
|
|
|
206
255
|
# @see the `==` method
|
|
@@ -212,7 +261,7 @@ module OpenapiClient
|
|
|
212
261
|
# Calculates hash code according to all attributes.
|
|
213
262
|
# @return [Integer] Hash code
|
|
214
263
|
def hash
|
|
215
|
-
[success, operation, stream_key, activity_id, devices_queued, devices_notified, timestamp].hash
|
|
264
|
+
[success, operation, stream_key, activity_id, devices_queued, devices_notified, timestamp, ignored, message, forced_completion, warning, errors].hash
|
|
216
265
|
end
|
|
217
266
|
|
|
218
267
|
# Builds the object from hash
|
|
@@ -37,8 +37,21 @@ module OpenapiClient
|
|
|
37
37
|
# Optional tags to organize and filter notification history.
|
|
38
38
|
attr_accessor :tags
|
|
39
39
|
|
|
40
|
+
# Present on `updated` responses when the current Live Activity has received more than 12 updates and has averaged more than one update every 2 minutes since it started. The update is still sent, but iOS may throttle Live Activities that update this often.
|
|
41
|
+
attr_accessor :warning
|
|
42
|
+
|
|
40
43
|
attr_accessor :timestamp
|
|
41
44
|
|
|
45
|
+
# True when the request had no effect.
|
|
46
|
+
attr_accessor :ignored
|
|
47
|
+
|
|
48
|
+
attr_accessor :remote_push_sent
|
|
49
|
+
|
|
50
|
+
attr_accessor :message
|
|
51
|
+
|
|
52
|
+
# Per-device delivery errors when some devices could not be reached.
|
|
53
|
+
attr_accessor :errors
|
|
54
|
+
|
|
42
55
|
class EnumAttributeValidator
|
|
43
56
|
attr_reader :datatype
|
|
44
57
|
attr_reader :allowable_values
|
|
@@ -74,7 +87,12 @@ module OpenapiClient
|
|
|
74
87
|
:'users_notified' => :'users_notified',
|
|
75
88
|
:'effective_channel_slugs' => :'effective_channel_slugs',
|
|
76
89
|
:'tags' => :'tags',
|
|
77
|
-
:'
|
|
90
|
+
:'warning' => :'warning',
|
|
91
|
+
:'timestamp' => :'timestamp',
|
|
92
|
+
:'ignored' => :'ignored',
|
|
93
|
+
:'remote_push_sent' => :'remote_push_sent',
|
|
94
|
+
:'message' => :'message',
|
|
95
|
+
:'errors' => :'errors'
|
|
78
96
|
}
|
|
79
97
|
end
|
|
80
98
|
|
|
@@ -96,7 +114,12 @@ module OpenapiClient
|
|
|
96
114
|
:'users_notified' => :'Integer',
|
|
97
115
|
:'effective_channel_slugs' => :'Array<String>',
|
|
98
116
|
:'tags' => :'Array<String>',
|
|
99
|
-
:'
|
|
117
|
+
:'warning' => :'String',
|
|
118
|
+
:'timestamp' => :'Time',
|
|
119
|
+
:'ignored' => :'Boolean',
|
|
120
|
+
:'remote_push_sent' => :'Boolean',
|
|
121
|
+
:'message' => :'String',
|
|
122
|
+
:'errors' => :'Array<String>'
|
|
100
123
|
}
|
|
101
124
|
end
|
|
102
125
|
|
|
@@ -172,11 +195,33 @@ module OpenapiClient
|
|
|
172
195
|
end
|
|
173
196
|
end
|
|
174
197
|
|
|
198
|
+
if attributes.key?(:'warning')
|
|
199
|
+
self.warning = attributes[:'warning']
|
|
200
|
+
end
|
|
201
|
+
|
|
175
202
|
if attributes.key?(:'timestamp')
|
|
176
203
|
self.timestamp = attributes[:'timestamp']
|
|
177
204
|
else
|
|
178
205
|
self.timestamp = nil
|
|
179
206
|
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'ignored')
|
|
209
|
+
self.ignored = attributes[:'ignored']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'remote_push_sent')
|
|
213
|
+
self.remote_push_sent = attributes[:'remote_push_sent']
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'message')
|
|
217
|
+
self.message = attributes[:'message']
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if attributes.key?(:'errors')
|
|
221
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
|
222
|
+
self.errors = value
|
|
223
|
+
end
|
|
224
|
+
end
|
|
180
225
|
end
|
|
181
226
|
|
|
182
227
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -241,7 +286,12 @@ module OpenapiClient
|
|
|
241
286
|
users_notified == o.users_notified &&
|
|
242
287
|
effective_channel_slugs == o.effective_channel_slugs &&
|
|
243
288
|
tags == o.tags &&
|
|
244
|
-
|
|
289
|
+
warning == o.warning &&
|
|
290
|
+
timestamp == o.timestamp &&
|
|
291
|
+
ignored == o.ignored &&
|
|
292
|
+
remote_push_sent == o.remote_push_sent &&
|
|
293
|
+
message == o.message &&
|
|
294
|
+
errors == o.errors
|
|
245
295
|
end
|
|
246
296
|
|
|
247
297
|
# @see the `==` method
|
|
@@ -253,7 +303,7 @@ module OpenapiClient
|
|
|
253
303
|
# Calculates hash code according to all attributes.
|
|
254
304
|
# @return [Integer] Hash code
|
|
255
305
|
def hash
|
|
256
|
-
[success, operation, stream_key, activity_id, previous_activity_id, devices_notified, devices_queued, users_notified, effective_channel_slugs, tags, timestamp].hash
|
|
306
|
+
[success, operation, stream_key, activity_id, previous_activity_id, devices_notified, devices_queued, users_notified, effective_channel_slugs, tags, warning, timestamp, ignored, remote_push_sent, message, errors].hash
|
|
257
307
|
end
|
|
258
308
|
|
|
259
309
|
# Builds the object from hash
|