activitysmith 0.1.2 → 0.1.4

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: c6c8b5cc25342b8da0333e0707a6ed1711756441e9b0e81e2f30dad878d14cea
4
- data.tar.gz: 93456d1812c1ed2b66f630d9d1386bb8ca08b4f347c012de15316727635b182c
3
+ metadata.gz: 92ff52dffee98f8e68d36abbca3498e68279622b6e820aa70e88936a294eb2f6
4
+ data.tar.gz: 150aa535fe16e634805a2cc8ede6da77b01f1b78a7121b42b262c1170c6b374a
5
5
  SHA512:
6
- metadata.gz: a6860c5182149f48ad3b998f71e3a106d27149d63946c9e8e23088eea263309f38b03237ffa0d756961207b4568907c114c3fbd5597ce3e460442076a6b8a8c8
7
- data.tar.gz: 4ed9cbf7c51a2aa08d2a3dc6e809d555f348a14f2957830401f2043887a3fd16827ec955b1e4bb267379571b01f4cfb92c5503a8c81907f2d1e5645ce0d0592c
6
+ metadata.gz: 6adf38e736e35c3710fc9a00b1c5e38dc2de92237067004581dc77b1048e215b0739ee4220a63cb4db13c66e20a3f4dfc269435a963b850d4fcc6404ebe6dc7e
7
+ data.tar.gz: c2adc5af02b9b8350c542343869847a2d38aa1fb937c46871e0f029cd44f45202d5cf475c9e21b8541bb78a3e0e92ef7777db6be7afa4cf8c2273b8ba1766378
data/README.md CHANGED
@@ -24,12 +24,34 @@ activitysmith = ActivitySmith::Client.new(api_key: ENV.fetch("ACTIVITYSMITH_API_
24
24
 
25
25
  ### Send a Push Notification
26
26
 
27
+ <p align="center">
28
+ <img src="https://cdn.activitysmith.com/features/new-subscription-push-notification.png" alt="Push notification example" width="680" />
29
+ </p>
30
+
27
31
  ```ruby
28
32
  response = activitysmith.notifications.send(
29
33
  {
30
- title: "Build Failed",
31
- message: "CI pipeline failed on main branch",
32
- channels: ["devs", "ops"] # Optional
34
+ title: "New subscription 💸",
35
+ message: "Customer upgraded to Pro plan",
36
+ redirection: "https://crm.example.com/customers/cus_9f3a1d", # Optional
37
+ actions: [ # Optional (max 4)
38
+ {
39
+ title: "Open CRM Profile",
40
+ type: "open_url",
41
+ url: "https://crm.example.com/customers/cus_9f3a1d"
42
+ },
43
+ {
44
+ title: "Start Onboarding Workflow",
45
+ type: "webhook",
46
+ url: "https://hooks.example.com/activitysmith/onboarding/start",
47
+ method: "POST",
48
+ body: {
49
+ customer_id: "cus_9f3a1d",
50
+ plan: "pro"
51
+ }
52
+ }
53
+ ],
54
+ channels: ["sales", "customer-success"] # Optional
33
55
  }
34
56
  )
35
57
 
@@ -39,13 +61,17 @@ puts response.devices_notified
39
61
 
40
62
  ### Start a Live Activity
41
63
 
64
+ <p align="center">
65
+ <img src="https://cdn.activitysmith.com/features/start-live-activity.png" alt="Start live activity example" width="680" />
66
+ </p>
67
+
42
68
  ```ruby
43
69
  start = activitysmith.live_activities.start(
44
70
  {
45
71
  content_state: {
46
- title: "ActivitySmith API Deployment",
47
- subtitle: "start",
48
- number_of_steps: 4,
72
+ title: "Nightly database backup",
73
+ subtitle: "create snapshot",
74
+ number_of_steps: 3,
49
75
  current_step: 1,
50
76
  type: "segmented_progress",
51
77
  color: "yellow"
@@ -59,14 +85,18 @@ activity_id = start.activity_id
59
85
 
60
86
  ### Update a Live Activity
61
87
 
88
+ <p align="center">
89
+ <img src="https://cdn.activitysmith.com/features/update-live-activity.png" alt="Update live activity example" width="680" />
90
+ </p>
91
+
62
92
  ```ruby
63
93
  update = activitysmith.live_activities.update(
64
94
  {
65
95
  activity_id: activity_id,
66
96
  content_state: {
67
- title: "ActivitySmith API Deployment",
68
- subtitle: "npm i & pm2",
69
- current_step: 3
97
+ title: "Nightly database backup",
98
+ subtitle: "upload archive",
99
+ current_step: 2
70
100
  }
71
101
  }
72
102
  )
@@ -76,15 +106,19 @@ puts update.devices_notified
76
106
 
77
107
  ### End a Live Activity
78
108
 
109
+ <p align="center">
110
+ <img src="https://cdn.activitysmith.com/features/end-live-activity.png" alt="End live activity example" width="680" />
111
+ </p>
112
+
79
113
  ```ruby
80
114
  finish = activitysmith.live_activities.end(
81
115
  {
82
116
  activity_id: activity_id,
83
117
  content_state: {
84
- title: "ActivitySmith API Deployment",
85
- subtitle: "done",
86
- current_step: 4,
87
- auto_dismiss_minutes: 3
118
+ title: "Nightly database backup",
119
+ subtitle: "verify restore",
120
+ current_step: 3,
121
+ auto_dismiss_minutes: 2
88
122
  }
89
123
  }
90
124
  )
@@ -97,7 +131,7 @@ puts finish.success
97
131
  ```ruby
98
132
  begin
99
133
  activitysmith.notifications.send(
100
- { title: "Build Failed" }
134
+ { title: "New subscription 💸" }
101
135
  )
102
136
  rescue OpenapiClient::ApiError => err
103
137
  puts "Request failed: #{err.code} #{err.message}"
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Send a push notification
23
- # Sends a push notification to devices matched by API key scope and optional target channels.
23
+ # Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL (tap) and up to 4 interactive actions (long-press on iOS).
24
24
  # @param push_notification_request [PushNotificationRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [PushNotificationResponse]
@@ -30,7 +30,7 @@ module OpenapiClient
30
30
  end
31
31
 
32
32
  # Send a push notification
33
- # Sends a push notification to devices matched by API key scope and optional target channels.
33
+ # Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL (tap) and up to 4 interactive actions (long-press on iOS).
34
34
  # @param push_notification_request [PushNotificationRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(PushNotificationResponse, Integer, Hash)>] PushNotificationResponse data, response status code and response headers
@@ -0,0 +1,322 @@
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
+ class PushNotificationAction
18
+ # Button title displayed in iOS expanded notification UI.
19
+ attr_accessor :title
20
+
21
+ attr_accessor :type
22
+
23
+ # HTTPS URL. For open_url it is opened in browser. For webhook it is called by ActivitySmith backend.
24
+ attr_accessor :url
25
+
26
+ # Webhook HTTP method. Used only when type=webhook.
27
+ attr_accessor :method
28
+
29
+ # Optional webhook payload body. Used only when type=webhook.
30
+ attr_accessor :body
31
+
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'title' => :'title',
58
+ :'type' => :'type',
59
+ :'url' => :'url',
60
+ :'method' => :'method',
61
+ :'body' => :'body'
62
+ }
63
+ end
64
+
65
+ # Returns all the JSON keys this model knows about
66
+ def self.acceptable_attributes
67
+ attribute_map.values
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.openapi_types
72
+ {
73
+ :'title' => :'String',
74
+ :'type' => :'PushNotificationActionType',
75
+ :'url' => :'String',
76
+ :'method' => :'PushNotificationWebhookMethod',
77
+ :'body' => :'Hash<String, Object>'
78
+ }
79
+ end
80
+
81
+ # List of attributes with nullable: true
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ ])
85
+ end
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ def initialize(attributes = {})
90
+ if (!attributes.is_a?(Hash))
91
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::PushNotificationAction` initialize method"
92
+ end
93
+
94
+ # check to see if the attribute exists and convert string to symbol for hash key
95
+ attributes = attributes.each_with_object({}) { |(k, v), h|
96
+ if (!self.class.attribute_map.key?(k.to_sym))
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::PushNotificationAction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
98
+ end
99
+ h[k.to_sym] = v
100
+ }
101
+
102
+ if attributes.key?(:'title')
103
+ self.title = attributes[:'title']
104
+ else
105
+ self.title = nil
106
+ end
107
+
108
+ if attributes.key?(:'type')
109
+ self.type = attributes[:'type']
110
+ else
111
+ self.type = nil
112
+ end
113
+
114
+ if attributes.key?(:'url')
115
+ self.url = attributes[:'url']
116
+ else
117
+ self.url = nil
118
+ end
119
+
120
+ if attributes.key?(:'method')
121
+ self.method = attributes[:'method']
122
+ else
123
+ self.method = 'POST'
124
+ end
125
+
126
+ if attributes.key?(:'body')
127
+ if (value = attributes[:'body']).is_a?(Hash)
128
+ self.body = value
129
+ end
130
+ end
131
+ end
132
+
133
+ # Show invalid properties with the reasons. Usually used together with valid?
134
+ # @return Array for valid properties with the reasons
135
+ def list_invalid_properties
136
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
137
+ invalid_properties = Array.new
138
+ if @title.nil?
139
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
140
+ end
141
+
142
+ if @type.nil?
143
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
144
+ end
145
+
146
+ if @url.nil?
147
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
148
+ end
149
+
150
+ pattern = Regexp.new(/^https:\/\//)
151
+ if @url !~ pattern
152
+ invalid_properties.push("invalid value for \"url\", must conform to the pattern #{pattern}.")
153
+ end
154
+
155
+ invalid_properties
156
+ end
157
+
158
+ # Check to see if the all the properties in the model are valid
159
+ # @return true if the model is valid
160
+ def valid?
161
+ warn '[DEPRECATED] the `valid?` method is obsolete'
162
+ return false if @title.nil?
163
+ return false if @type.nil?
164
+ return false if @url.nil?
165
+ return false if @url !~ Regexp.new(/^https:\/\//)
166
+ true
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] url Value to be assigned
171
+ def url=(url)
172
+ if url.nil?
173
+ fail ArgumentError, 'url cannot be nil'
174
+ end
175
+
176
+ pattern = Regexp.new(/^https:\/\//)
177
+ if url !~ pattern
178
+ fail ArgumentError, "invalid value for \"url\", must conform to the pattern #{pattern}."
179
+ end
180
+
181
+ @url = url
182
+ end
183
+
184
+ # Checks equality by comparing each attribute.
185
+ # @param [Object] Object to be compared
186
+ def ==(o)
187
+ return true if self.equal?(o)
188
+ self.class == o.class &&
189
+ title == o.title &&
190
+ type == o.type &&
191
+ url == o.url &&
192
+ method == o.method &&
193
+ body == o.body
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Integer] Hash code
204
+ def hash
205
+ [title, type, url, method, body].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ return nil unless attributes.is_a?(Hash)
213
+ attributes = attributes.transform_keys(&:to_sym)
214
+ transformed_hash = {}
215
+ openapi_types.each_pair do |key, type|
216
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = nil
218
+ elsif type =~ /\AArray<(.*)>/i
219
+ # check to ensure the input is an array given that the attribute
220
+ # is documented as an array but the input is not
221
+ if attributes[attribute_map[key]].is_a?(Array)
222
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
223
+ end
224
+ elsif !attributes[attribute_map[key]].nil?
225
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
226
+ end
227
+ end
228
+ new(transformed_hash)
229
+ end
230
+
231
+ # Deserializes the data based on type
232
+ # @param string type Data type
233
+ # @param string value Value to be deserialized
234
+ # @return [Object] Deserialized data
235
+ def self._deserialize(type, value)
236
+ case type.to_sym
237
+ when :Time
238
+ Time.parse(value)
239
+ when :Date
240
+ Date.parse(value)
241
+ when :String
242
+ value.to_s
243
+ when :Integer
244
+ value.to_i
245
+ when :Float
246
+ value.to_f
247
+ when :Boolean
248
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
249
+ true
250
+ else
251
+ false
252
+ end
253
+ when :Object
254
+ # generic object (usually a Hash), return directly
255
+ value
256
+ when /\AArray<(?<inner_type>.+)>\z/
257
+ inner_type = Regexp.last_match[:inner_type]
258
+ value.map { |v| _deserialize(inner_type, v) }
259
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
260
+ k_type = Regexp.last_match[:k_type]
261
+ v_type = Regexp.last_match[:v_type]
262
+ {}.tap do |hash|
263
+ value.each do |k, v|
264
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
265
+ end
266
+ end
267
+ else # model
268
+ # models (e.g. Pet) or oneOf
269
+ klass = OpenapiClient.const_get(type)
270
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
271
+ end
272
+ end
273
+
274
+ # Returns the string representation of the object
275
+ # @return [String] String presentation of the object
276
+ def to_s
277
+ to_hash.to_s
278
+ end
279
+
280
+ # to_body is an alias to to_hash (backward compatibility)
281
+ # @return [Hash] Returns the object in the form of hash
282
+ def to_body
283
+ to_hash
284
+ end
285
+
286
+ # Returns the object in the form of hash
287
+ # @return [Hash] Returns the object in the form of hash
288
+ def to_hash
289
+ hash = {}
290
+ self.class.attribute_map.each_pair do |attr, param|
291
+ value = self.send(attr)
292
+ if value.nil?
293
+ is_nullable = self.class.openapi_nullable.include?(attr)
294
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
295
+ end
296
+
297
+ hash[param] = _to_hash(value)
298
+ end
299
+ hash
300
+ end
301
+
302
+ # Outputs non-array value in the form of hash
303
+ # For object, use to_hash. Otherwise, just return the value
304
+ # @param [Object] value Any valid value
305
+ # @return [Hash] Returns the value in the form of hash
306
+ def _to_hash(value)
307
+ if value.is_a?(Array)
308
+ value.compact.map { |v| _to_hash(v) }
309
+ elsif value.is_a?(Hash)
310
+ {}.tap do |hash|
311
+ value.each { |k, v| hash[k] = _to_hash(v) }
312
+ end
313
+ elsif value.respond_to? :to_hash
314
+ value.to_hash
315
+ else
316
+ value
317
+ end
318
+ end
319
+
320
+ end
321
+
322
+ end
@@ -0,0 +1,40 @@
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
+ class PushNotificationActionType
18
+ OPEN_URL = "open_url".freeze
19
+ WEBHOOK = "webhook".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [OPEN_URL, WEBHOOK].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if PushNotificationActionType.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #PushNotificationActionType"
38
+ end
39
+ end
40
+ end
@@ -21,6 +21,12 @@ module OpenapiClient
21
21
 
22
22
  attr_accessor :subtitle
23
23
 
24
+ # Optional HTTPS URL opened when user taps the notification body.
25
+ attr_accessor :redirection
26
+
27
+ # Optional interactive actions shown on iOS long-press.
28
+ attr_accessor :actions
29
+
24
30
  attr_accessor :payload
25
31
 
26
32
  attr_accessor :badge
@@ -35,6 +41,8 @@ module OpenapiClient
35
41
  :'title' => :'title',
36
42
  :'message' => :'message',
37
43
  :'subtitle' => :'subtitle',
44
+ :'redirection' => :'redirection',
45
+ :'actions' => :'actions',
38
46
  :'payload' => :'payload',
39
47
  :'badge' => :'badge',
40
48
  :'sound' => :'sound',
@@ -53,6 +61,8 @@ module OpenapiClient
53
61
  :'title' => :'String',
54
62
  :'message' => :'String',
55
63
  :'subtitle' => :'String',
64
+ :'redirection' => :'String',
65
+ :'actions' => :'Array<PushNotificationAction>',
56
66
  :'payload' => :'Hash<String, Object>',
57
67
  :'badge' => :'Integer',
58
68
  :'sound' => :'String',
@@ -95,6 +105,16 @@ module OpenapiClient
95
105
  self.subtitle = attributes[:'subtitle']
96
106
  end
97
107
 
108
+ if attributes.key?(:'redirection')
109
+ self.redirection = attributes[:'redirection']
110
+ end
111
+
112
+ if attributes.key?(:'actions')
113
+ if (value = attributes[:'actions']).is_a?(Array)
114
+ self.actions = value
115
+ end
116
+ end
117
+
98
118
  if attributes.key?(:'payload')
99
119
  if (value = attributes[:'payload']).is_a?(Hash)
100
120
  self.payload = value
@@ -123,6 +143,15 @@ module OpenapiClient
123
143
  invalid_properties.push('invalid value for "title", title cannot be nil.')
124
144
  end
125
145
 
146
+ pattern = Regexp.new(/^https:\/\//)
147
+ if !@redirection.nil? && @redirection !~ pattern
148
+ invalid_properties.push("invalid value for \"redirection\", must conform to the pattern #{pattern}.")
149
+ end
150
+
151
+ if !@actions.nil? && @actions.length > 4
152
+ invalid_properties.push('invalid value for "actions", number of items must be less than or equal to 4.')
153
+ end
154
+
126
155
  invalid_properties
127
156
  end
128
157
 
@@ -131,9 +160,40 @@ module OpenapiClient
131
160
  def valid?
132
161
  warn '[DEPRECATED] the `valid?` method is obsolete'
133
162
  return false if @title.nil?
163
+ return false if !@redirection.nil? && @redirection !~ Regexp.new(/^https:\/\//)
164
+ return false if !@actions.nil? && @actions.length > 4
134
165
  true
135
166
  end
136
167
 
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] redirection Value to be assigned
170
+ def redirection=(redirection)
171
+ if redirection.nil?
172
+ fail ArgumentError, 'redirection cannot be nil'
173
+ end
174
+
175
+ pattern = Regexp.new(/^https:\/\//)
176
+ if redirection !~ pattern
177
+ fail ArgumentError, "invalid value for \"redirection\", must conform to the pattern #{pattern}."
178
+ end
179
+
180
+ @redirection = redirection
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] actions Value to be assigned
185
+ def actions=(actions)
186
+ if actions.nil?
187
+ fail ArgumentError, 'actions cannot be nil'
188
+ end
189
+
190
+ if actions.length > 4
191
+ fail ArgumentError, 'invalid value for "actions", number of items must be less than or equal to 4.'
192
+ end
193
+
194
+ @actions = actions
195
+ end
196
+
137
197
  # Checks equality by comparing each attribute.
138
198
  # @param [Object] Object to be compared
139
199
  def ==(o)
@@ -142,6 +202,8 @@ module OpenapiClient
142
202
  title == o.title &&
143
203
  message == o.message &&
144
204
  subtitle == o.subtitle &&
205
+ redirection == o.redirection &&
206
+ actions == o.actions &&
145
207
  payload == o.payload &&
146
208
  badge == o.badge &&
147
209
  sound == o.sound &&
@@ -157,7 +219,7 @@ module OpenapiClient
157
219
  # Calculates hash code according to all attributes.
158
220
  # @return [Integer] Hash code
159
221
  def hash
160
- [title, message, subtitle, payload, badge, sound, target].hash
222
+ [title, message, subtitle, redirection, actions, payload, badge, sound, target].hash
161
223
  end
162
224
 
163
225
  # Builds the object from hash
@@ -0,0 +1,40 @@
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
+ class PushNotificationWebhookMethod
18
+ GET = "GET".freeze
19
+ POST = "POST".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [GET, POST].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if PushNotificationWebhookMethod.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #PushNotificationWebhookMethod"
38
+ end
39
+ end
40
+ end
@@ -32,8 +32,11 @@ require 'activitysmith_openapi/models/live_activity_start_response'
32
32
  require 'activitysmith_openapi/models/live_activity_update_request'
33
33
  require 'activitysmith_openapi/models/live_activity_update_response'
34
34
  require 'activitysmith_openapi/models/no_recipients_error'
35
+ require 'activitysmith_openapi/models/push_notification_action'
36
+ require 'activitysmith_openapi/models/push_notification_action_type'
35
37
  require 'activitysmith_openapi/models/push_notification_request'
36
38
  require 'activitysmith_openapi/models/push_notification_response'
39
+ require 'activitysmith_openapi/models/push_notification_webhook_method'
37
40
  require 'activitysmith_openapi/models/rate_limit_error'
38
41
  require 'activitysmith_openapi/models/send_push_notification429_response'
39
42
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActivitySmith
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activitysmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ActivitySmith
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-16 00:00:00.000000000 Z
11
+ date: 2026-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -96,8 +96,11 @@ files:
96
96
  - generated/activitysmith_openapi/models/live_activity_update_request.rb
97
97
  - generated/activitysmith_openapi/models/live_activity_update_response.rb
98
98
  - generated/activitysmith_openapi/models/no_recipients_error.rb
99
+ - generated/activitysmith_openapi/models/push_notification_action.rb
100
+ - generated/activitysmith_openapi/models/push_notification_action_type.rb
99
101
  - generated/activitysmith_openapi/models/push_notification_request.rb
100
102
  - generated/activitysmith_openapi/models/push_notification_response.rb
103
+ - generated/activitysmith_openapi/models/push_notification_webhook_method.rb
101
104
  - generated/activitysmith_openapi/models/rate_limit_error.rb
102
105
  - generated/activitysmith_openapi/models/send_push_notification429_response.rb
103
106
  - generated/activitysmith_openapi/version.rb
@@ -112,7 +115,7 @@ licenses:
112
115
  metadata:
113
116
  homepage_uri: https://activitysmith.com/docs/sdks/ruby
114
117
  source_code_uri: https://github.com/ActivitySmithHQ/activitysmith-ruby
115
- post_install_message:
118
+ post_install_message:
116
119
  rdoc_options: []
117
120
  require_paths:
118
121
  - lib
@@ -127,8 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
130
  - !ruby/object:Gem::Version
128
131
  version: '0'
129
132
  requirements: []
130
- rubygems_version: 3.0.3.1
131
- signing_key:
133
+ rubygems_version: 3.4.19
134
+ signing_key:
132
135
  specification_version: 4
133
136
  summary: Official ActivitySmith Ruby SDK
134
137
  test_files: []