activitysmith 1.10.0 → 1.11.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.
@@ -21,16 +21,24 @@ module OpenapiClient
21
21
 
22
22
  attr_accessor :limit
23
23
 
24
- # Current number of active Live Activities.
24
+ # Highest number of active Live Activities among the targeted devices.
25
25
  attr_accessor :active
26
26
 
27
+ # Number of targeted devices that have reached the enforced iOS Live Activity concurrency threshold. Included only when targeted devices have mixed capacity.
28
+ attr_accessor :blocked_devices
29
+
30
+ # Total number of targeted devices. Included only when targeted devices have mixed capacity.
31
+ attr_accessor :targeted_devices
32
+
27
33
  # Attribute mapping from ruby-style variable name to JSON key.
28
34
  def self.attribute_map
29
35
  {
30
36
  :'error' => :'error',
31
37
  :'message' => :'message',
32
38
  :'limit' => :'limit',
33
- :'active' => :'active'
39
+ :'active' => :'active',
40
+ :'blocked_devices' => :'blocked_devices',
41
+ :'targeted_devices' => :'targeted_devices'
34
42
  }
35
43
  end
36
44
 
@@ -45,7 +53,9 @@ module OpenapiClient
45
53
  :'error' => :'String',
46
54
  :'message' => :'String',
47
55
  :'limit' => :'Integer',
48
- :'active' => :'Integer'
56
+ :'active' => :'Integer',
57
+ :'blocked_devices' => :'Integer',
58
+ :'targeted_devices' => :'Integer'
49
59
  }
50
60
  end
51
61
 
@@ -93,6 +103,14 @@ module OpenapiClient
93
103
  else
94
104
  self.active = nil
95
105
  end
106
+
107
+ if attributes.key?(:'blocked_devices')
108
+ self.blocked_devices = attributes[:'blocked_devices']
109
+ end
110
+
111
+ if attributes.key?(:'targeted_devices')
112
+ self.targeted_devices = attributes[:'targeted_devices']
113
+ end
96
114
  end
97
115
 
98
116
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -138,7 +156,9 @@ module OpenapiClient
138
156
  error == o.error &&
139
157
  message == o.message &&
140
158
  limit == o.limit &&
141
- active == o.active
159
+ active == o.active &&
160
+ blocked_devices == o.blocked_devices &&
161
+ targeted_devices == o.targeted_devices
142
162
  end
143
163
 
144
164
  # @see the `==` method
@@ -150,7 +170,7 @@ module OpenapiClient
150
170
  # Calculates hash code according to all attributes.
151
171
  # @return [Integer] Hash code
152
172
  def hash
153
- [error, message, limit, active].hash
173
+ [error, message, limit, active, blocked_devices, targeted_devices].hash
154
174
  end
155
175
 
156
176
  # Builds the object from hash
@@ -16,6 +16,9 @@ require 'time'
16
16
  module OpenapiClient
17
17
  # Start a new Live Activity. The response includes activity_id for later update and end calls.
18
18
  class LiveActivityStartRequest
19
+ # Additional information shown in notification and Live Activity details in ActivitySmith. Not displayed in the Push Notification or Live Activity on the device. Values must be strings, finite numbers, or booleans. At most 50 entries and 16 KB of serialized UTF-8 JSON. Omit on updates to preserve existing Metadata; send {} to clear it.
20
+ attr_accessor :metadata
21
+
19
22
  attr_accessor :content_state
20
23
 
21
24
  attr_accessor :action
@@ -33,6 +36,7 @@ module OpenapiClient
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
39
+ :'metadata' => :'metadata',
36
40
  :'content_state' => :'content_state',
37
41
  :'action' => :'action',
38
42
  :'secondary_action' => :'secondary_action',
@@ -50,6 +54,7 @@ module OpenapiClient
50
54
  # Attribute type mapping.
51
55
  def self.openapi_types
52
56
  {
57
+ :'metadata' => :'Hash<String, MetadataValue>',
53
58
  :'content_state' => :'ContentStateStart',
54
59
  :'action' => :'LiveActivityAction',
55
60
  :'secondary_action' => :'LiveActivityAction',
@@ -80,6 +85,12 @@ module OpenapiClient
80
85
  h[k.to_sym] = v
81
86
  }
82
87
 
88
+ if attributes.key?(:'metadata')
89
+ if (value = attributes[:'metadata']).is_a?(Hash)
90
+ self.metadata = value
91
+ end
92
+ end
93
+
83
94
  if attributes.key?(:'content_state')
84
95
  self.content_state = attributes[:'content_state']
85
96
  else
@@ -114,6 +125,10 @@ module OpenapiClient
114
125
  def list_invalid_properties
115
126
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
127
  invalid_properties = Array.new
128
+ if !@metadata.nil? && @metadata.length > 50
129
+ invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 50.')
130
+ end
131
+
117
132
  if @content_state.nil?
118
133
  invalid_properties.push('invalid value for "content_state", content_state cannot be nil.')
119
134
  end
@@ -125,15 +140,31 @@ module OpenapiClient
125
140
  # @return true if the model is valid
126
141
  def valid?
127
142
  warn '[DEPRECATED] the `valid?` method is obsolete'
143
+ return false if !@metadata.nil? && @metadata.length > 50
128
144
  return false if @content_state.nil?
129
145
  true
130
146
  end
131
147
 
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] metadata Value to be assigned
150
+ def metadata=(metadata)
151
+ if metadata.nil?
152
+ fail ArgumentError, 'metadata cannot be nil'
153
+ end
154
+
155
+ if metadata.length > 50
156
+ fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 50.'
157
+ end
158
+
159
+ @metadata = metadata
160
+ end
161
+
132
162
  # Checks equality by comparing each attribute.
133
163
  # @param [Object] Object to be compared
134
164
  def ==(o)
135
165
  return true if self.equal?(o)
136
166
  self.class == o.class &&
167
+ metadata == o.metadata &&
137
168
  content_state == o.content_state &&
138
169
  action == o.action &&
139
170
  secondary_action == o.secondary_action &&
@@ -151,7 +182,7 @@ module OpenapiClient
151
182
  # Calculates hash code according to all attributes.
152
183
  # @return [Integer] Hash code
153
184
  def hash
154
- [content_state, action, secondary_action, alert, target, tags].hash
185
+ [metadata, content_state, action, secondary_action, alert, target, tags].hash
155
186
  end
156
187
 
157
188
  # Builds the object from hash
@@ -16,6 +16,12 @@ require 'time'
16
16
  module OpenapiClient
17
17
  # Optional payload for ending a managed stream. When omitted, ActivitySmith ends the stream using the latest known state when possible.
18
18
  class LiveActivityStreamDeleteRequest
19
+ # Additional information shown in notification and Live Activity details in ActivitySmith. Not displayed in the Push Notification or Live Activity on the device. Values must be strings, finite numbers, or booleans. At most 50 entries and 16 KB of serialized UTF-8 JSON. Omit on updates to preserve existing Metadata; send {} to clear it.
20
+ attr_accessor :metadata
21
+
22
+ # Optional tags to organize and filter notification history.
23
+ attr_accessor :tags
24
+
19
25
  attr_accessor :content_state
20
26
 
21
27
  attr_accessor :action
@@ -28,6 +34,8 @@ module OpenapiClient
28
34
  # Attribute mapping from ruby-style variable name to JSON key.
29
35
  def self.attribute_map
30
36
  {
37
+ :'metadata' => :'metadata',
38
+ :'tags' => :'tags',
31
39
  :'content_state' => :'content_state',
32
40
  :'action' => :'action',
33
41
  :'secondary_action' => :'secondary_action',
@@ -43,6 +51,8 @@ module OpenapiClient
43
51
  # Attribute type mapping.
44
52
  def self.openapi_types
45
53
  {
54
+ :'metadata' => :'Hash<String, MetadataValue>',
55
+ :'tags' => :'Array<String>',
46
56
  :'content_state' => :'StreamContentState',
47
57
  :'action' => :'LiveActivityAction',
48
58
  :'secondary_action' => :'LiveActivityAction',
@@ -71,6 +81,18 @@ module OpenapiClient
71
81
  h[k.to_sym] = v
72
82
  }
73
83
 
84
+ if attributes.key?(:'metadata')
85
+ if (value = attributes[:'metadata']).is_a?(Hash)
86
+ self.metadata = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'tags')
91
+ if (value = attributes[:'tags']).is_a?(Array)
92
+ self.tags = value
93
+ end
94
+ end
95
+
74
96
  if attributes.key?(:'content_state')
75
97
  self.content_state = attributes[:'content_state']
76
98
  end
@@ -93,6 +115,10 @@ module OpenapiClient
93
115
  def list_invalid_properties
94
116
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
117
  invalid_properties = Array.new
118
+ if !@metadata.nil? && @metadata.length > 50
119
+ invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 50.')
120
+ end
121
+
96
122
  invalid_properties
97
123
  end
98
124
 
@@ -100,14 +126,31 @@ module OpenapiClient
100
126
  # @return true if the model is valid
101
127
  def valid?
102
128
  warn '[DEPRECATED] the `valid?` method is obsolete'
129
+ return false if !@metadata.nil? && @metadata.length > 50
103
130
  true
104
131
  end
105
132
 
133
+ # Custom attribute writer method with validation
134
+ # @param [Object] metadata Value to be assigned
135
+ def metadata=(metadata)
136
+ if metadata.nil?
137
+ fail ArgumentError, 'metadata cannot be nil'
138
+ end
139
+
140
+ if metadata.length > 50
141
+ fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 50.'
142
+ end
143
+
144
+ @metadata = metadata
145
+ end
146
+
106
147
  # Checks equality by comparing each attribute.
107
148
  # @param [Object] Object to be compared
108
149
  def ==(o)
109
150
  return true if self.equal?(o)
110
151
  self.class == o.class &&
152
+ metadata == o.metadata &&
153
+ tags == o.tags &&
111
154
  content_state == o.content_state &&
112
155
  action == o.action &&
113
156
  secondary_action == o.secondary_action &&
@@ -123,7 +166,7 @@ module OpenapiClient
123
166
  # Calculates hash code according to all attributes.
124
167
  # @return [Integer] Hash code
125
168
  def hash
126
- [content_state, action, secondary_action, alert].hash
169
+ [metadata, tags, content_state, action, secondary_action, alert].hash
127
170
  end
128
171
 
129
172
  # Builds the object from hash
@@ -16,6 +16,9 @@ require 'time'
16
16
  module OpenapiClient
17
17
  # Send the latest state for a managed Live Activity stream. channels is the streamlined form for stream targeting. target.channels is also accepted for compatibility. If both are provided, they must match.
18
18
  class LiveActivityStreamRequest
19
+ # Additional information shown in notification and Live Activity details in ActivitySmith. Not displayed in the Push Notification or Live Activity on the device. Values must be strings, finite numbers, or booleans. At most 50 entries and 16 KB of serialized UTF-8 JSON. Omit on updates to preserve existing Metadata; send {} to clear it.
20
+ attr_accessor :metadata
21
+
19
22
  attr_accessor :content_state
20
23
 
21
24
  attr_accessor :action
@@ -36,6 +39,7 @@ module OpenapiClient
36
39
  # Attribute mapping from ruby-style variable name to JSON key.
37
40
  def self.attribute_map
38
41
  {
42
+ :'metadata' => :'metadata',
39
43
  :'content_state' => :'content_state',
40
44
  :'action' => :'action',
41
45
  :'secondary_action' => :'secondary_action',
@@ -54,6 +58,7 @@ module OpenapiClient
54
58
  # Attribute type mapping.
55
59
  def self.openapi_types
56
60
  {
61
+ :'metadata' => :'Hash<String, MetadataValue>',
57
62
  :'content_state' => :'StreamContentState',
58
63
  :'action' => :'LiveActivityAction',
59
64
  :'secondary_action' => :'LiveActivityAction',
@@ -85,6 +90,12 @@ module OpenapiClient
85
90
  h[k.to_sym] = v
86
91
  }
87
92
 
93
+ if attributes.key?(:'metadata')
94
+ if (value = attributes[:'metadata']).is_a?(Hash)
95
+ self.metadata = value
96
+ end
97
+ end
98
+
88
99
  if attributes.key?(:'content_state')
89
100
  self.content_state = attributes[:'content_state']
90
101
  else
@@ -125,6 +136,10 @@ module OpenapiClient
125
136
  def list_invalid_properties
126
137
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
138
  invalid_properties = Array.new
139
+ if !@metadata.nil? && @metadata.length > 50
140
+ invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 50.')
141
+ end
142
+
128
143
  if @content_state.nil?
129
144
  invalid_properties.push('invalid value for "content_state", content_state cannot be nil.')
130
145
  end
@@ -140,11 +155,26 @@ module OpenapiClient
140
155
  # @return true if the model is valid
141
156
  def valid?
142
157
  warn '[DEPRECATED] the `valid?` method is obsolete'
158
+ return false if !@metadata.nil? && @metadata.length > 50
143
159
  return false if @content_state.nil?
144
160
  return false if !@channels.nil? && @channels.length < 1
145
161
  true
146
162
  end
147
163
 
164
+ # Custom attribute writer method with validation
165
+ # @param [Object] metadata Value to be assigned
166
+ def metadata=(metadata)
167
+ if metadata.nil?
168
+ fail ArgumentError, 'metadata cannot be nil'
169
+ end
170
+
171
+ if metadata.length > 50
172
+ fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 50.'
173
+ end
174
+
175
+ @metadata = metadata
176
+ end
177
+
148
178
  # Custom attribute writer method with validation
149
179
  # @param [Object] channels Value to be assigned
150
180
  def channels=(channels)
@@ -164,6 +194,7 @@ module OpenapiClient
164
194
  def ==(o)
165
195
  return true if self.equal?(o)
166
196
  self.class == o.class &&
197
+ metadata == o.metadata &&
167
198
  content_state == o.content_state &&
168
199
  action == o.action &&
169
200
  secondary_action == o.secondary_action &&
@@ -182,7 +213,7 @@ module OpenapiClient
182
213
  # Calculates hash code according to all attributes.
183
214
  # @return [Integer] Hash code
184
215
  def hash
185
- [content_state, action, secondary_action, alert, channels, target, tags].hash
216
+ [metadata, content_state, action, secondary_action, alert, channels, target, tags].hash
186
217
  end
187
218
 
188
219
  # Builds the object from hash
@@ -16,8 +16,14 @@ require 'time'
16
16
  module OpenapiClient
17
17
  # Update an existing Live Activity by activity_id.
18
18
  class LiveActivityUpdateRequest
19
+ # Additional information shown in notification and Live Activity details in ActivitySmith. Not displayed in the Push Notification or Live Activity on the device. Values must be strings, finite numbers, or booleans. At most 50 entries and 16 KB of serialized UTF-8 JSON. Omit on updates to preserve existing Metadata; send {} to clear it.
20
+ attr_accessor :metadata
21
+
19
22
  attr_accessor :activity_id
20
23
 
24
+ # Tags for notification history. Omit to keep existing Tags, supply an array to replace them, or send an empty array to clear them.
25
+ attr_accessor :tags
26
+
21
27
  attr_accessor :content_state
22
28
 
23
29
  attr_accessor :action
@@ -28,7 +34,9 @@ module OpenapiClient
28
34
  # Attribute mapping from ruby-style variable name to JSON key.
29
35
  def self.attribute_map
30
36
  {
37
+ :'metadata' => :'metadata',
31
38
  :'activity_id' => :'activity_id',
39
+ :'tags' => :'tags',
32
40
  :'content_state' => :'content_state',
33
41
  :'action' => :'action',
34
42
  :'secondary_action' => :'secondary_action'
@@ -43,7 +51,9 @@ module OpenapiClient
43
51
  # Attribute type mapping.
44
52
  def self.openapi_types
45
53
  {
54
+ :'metadata' => :'Hash<String, MetadataValue>',
46
55
  :'activity_id' => :'String',
56
+ :'tags' => :'Array<String>',
47
57
  :'content_state' => :'ContentStateUpdate',
48
58
  :'action' => :'LiveActivityAction',
49
59
  :'secondary_action' => :'LiveActivityAction'
@@ -71,12 +81,24 @@ module OpenapiClient
71
81
  h[k.to_sym] = v
72
82
  }
73
83
 
84
+ if attributes.key?(:'metadata')
85
+ if (value = attributes[:'metadata']).is_a?(Hash)
86
+ self.metadata = value
87
+ end
88
+ end
89
+
74
90
  if attributes.key?(:'activity_id')
75
91
  self.activity_id = attributes[:'activity_id']
76
92
  else
77
93
  self.activity_id = nil
78
94
  end
79
95
 
96
+ if attributes.key?(:'tags')
97
+ if (value = attributes[:'tags']).is_a?(Array)
98
+ self.tags = value
99
+ end
100
+ end
101
+
80
102
  if attributes.key?(:'content_state')
81
103
  self.content_state = attributes[:'content_state']
82
104
  else
@@ -97,10 +119,18 @@ module OpenapiClient
97
119
  def list_invalid_properties
98
120
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
121
  invalid_properties = Array.new
122
+ if !@metadata.nil? && @metadata.length > 50
123
+ invalid_properties.push('invalid value for "metadata", number of items must be less than or equal to 50.')
124
+ end
125
+
100
126
  if @activity_id.nil?
101
127
  invalid_properties.push('invalid value for "activity_id", activity_id cannot be nil.')
102
128
  end
103
129
 
130
+ if !@tags.nil? && @tags.length > 20
131
+ invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 20.')
132
+ end
133
+
104
134
  if @content_state.nil?
105
135
  invalid_properties.push('invalid value for "content_state", content_state cannot be nil.')
106
136
  end
@@ -112,17 +142,49 @@ module OpenapiClient
112
142
  # @return true if the model is valid
113
143
  def valid?
114
144
  warn '[DEPRECATED] the `valid?` method is obsolete'
145
+ return false if !@metadata.nil? && @metadata.length > 50
115
146
  return false if @activity_id.nil?
147
+ return false if !@tags.nil? && @tags.length > 20
116
148
  return false if @content_state.nil?
117
149
  true
118
150
  end
119
151
 
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] metadata Value to be assigned
154
+ def metadata=(metadata)
155
+ if metadata.nil?
156
+ fail ArgumentError, 'metadata cannot be nil'
157
+ end
158
+
159
+ if metadata.length > 50
160
+ fail ArgumentError, 'invalid value for "metadata", number of items must be less than or equal to 50.'
161
+ end
162
+
163
+ @metadata = metadata
164
+ end
165
+
166
+ # Custom attribute writer method with validation
167
+ # @param [Object] tags Value to be assigned
168
+ def tags=(tags)
169
+ if tags.nil?
170
+ fail ArgumentError, 'tags cannot be nil'
171
+ end
172
+
173
+ if tags.length > 20
174
+ fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 20.'
175
+ end
176
+
177
+ @tags = tags
178
+ end
179
+
120
180
  # Checks equality by comparing each attribute.
121
181
  # @param [Object] Object to be compared
122
182
  def ==(o)
123
183
  return true if self.equal?(o)
124
184
  self.class == o.class &&
185
+ metadata == o.metadata &&
125
186
  activity_id == o.activity_id &&
187
+ tags == o.tags &&
126
188
  content_state == o.content_state &&
127
189
  action == o.action &&
128
190
  secondary_action == o.secondary_action
@@ -137,7 +199,7 @@ module OpenapiClient
137
199
  # Calculates hash code according to all attributes.
138
200
  # @return [Integer] Hash code
139
201
  def hash
140
- [activity_id, content_state, action, secondary_action].hash
202
+ [metadata, activity_id, tags, content_state, action, secondary_action].hash
141
203
  end
142
204
 
143
205
  # Builds the object from hash
@@ -0,0 +1,106 @@
1
+ =begin
2
+ #ActivitySmith API
3
+
4
+ #Send push notifications and Live Activities to your own devices via a single API key.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.7.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ module MetadataValue
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'Boolean',
23
+ :'Float',
24
+ :'String'
25
+ ]
26
+ end
27
+
28
+ # Builds the object
29
+ # @param [Mixed] Data to be matched against the list of oneOf items
30
+ # @return [Object] Returns the model or the data itself
31
+ def build(data)
32
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
33
+ # Note:
34
+ # - We do not attempt to check whether exactly one item matches.
35
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
36
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
37
+ # - TODO: scalar values are de facto behaving as if they were nullable.
38
+ # - TODO: logging when debugging is set.
39
+ openapi_one_of.each do |klass|
40
+ begin
41
+ next if klass == :AnyType # "nullable: true"
42
+ typed_data = find_and_cast_into_type(klass, data)
43
+ return typed_data if typed_data
44
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
45
+ end
46
+ end
47
+
48
+ openapi_one_of.include?(:AnyType) ? data : nil
49
+ end
50
+
51
+ private
52
+
53
+ SchemaMismatchError = Class.new(StandardError)
54
+
55
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
56
+ def find_and_cast_into_type(klass, data)
57
+ return if data.nil?
58
+
59
+ case klass.to_s
60
+ when 'Boolean'
61
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
62
+ when 'Float'
63
+ return data if data.instance_of?(Float)
64
+ when 'Integer'
65
+ return data if data.instance_of?(Integer)
66
+ when 'Time'
67
+ return Time.parse(data)
68
+ when 'Date'
69
+ return Date.parse(data)
70
+ when 'String'
71
+ return data if data.instance_of?(String)
72
+ when 'Object' # "type: object"
73
+ return data if data.instance_of?(Hash)
74
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
75
+ if data.instance_of?(Array)
76
+ sub_type = Regexp.last_match[:sub_type]
77
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
78
+ end
79
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
80
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
81
+ sub_type = Regexp.last_match[:sub_type]
82
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
83
+ end
84
+ else # model
85
+ const = OpenapiClient.const_get(klass)
86
+ if const
87
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
88
+ model = const.build(data)
89
+ return model if model
90
+ else
91
+ # raise if data contains keys that are not known to the model
92
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
93
+ model = const.build_from_hash(data)
94
+ return model if model
95
+ end
96
+ end
97
+ end
98
+
99
+ raise # if no match by now, raise
100
+ rescue
101
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
102
+ end
103
+ end
104
+ end
105
+
106
+ end
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :type
22
22
 
23
- # Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
23
+ # Action URL. For open_url, use HTTP, HTTPS, Shortcuts, or an installed app’s custom URL scheme, such as spotify:// or spotify:track:123. Custom app schemes require iOS 1.13.4 build 2 or later; no web fallback is provided. Internal and executable schemes are blocked. For webhook, use an HTTPS URL called by the ActivitySmith backend.
24
24
  attr_accessor :url
25
25
 
26
26
  # Webhook HTTP method. Used only when type=webhook.