Skip to content

Commit a643234

Browse files
author
OneSignal
committed
Update Ruby API
1 parent d983521 commit a643234

12 files changed

+751
-10
lines changed

docs/DeliveryData.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
| Name | Type | Description | Notes |
66
| ---- | ---- | ----------- | ----- |
7-
| **successful** | **Integer** | | [optional] |
8-
| **failed** | **Integer** | | [optional] |
9-
| **errored** | **Integer** | | [optional] |
10-
| **converted** | **Integer** | | [optional] |
11-
| **received** | **Integer** | | [optional] |
7+
| **successful** | **Integer** | Number of messages delivered to push servers, mobile carriers, or email service providers. | [optional] |
8+
| **failed** | **Integer** | Number of messages sent to unsubscribed devices. | [optional] |
9+
| **errored** | **Integer** | Number of errors reported. | [optional] |
10+
| **converted** | **Integer** | Number of messages that were clicked. | [optional] |
11+
| **received** | **Integer** | Number of devices that received the message. | [optional] |
1212

1313
## Example
1414

docs/PlatformDeliveryData.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
| **safari_web_push** | [**DeliveryData**](DeliveryData.md) | | [optional] |
1111
| **android** | [**DeliveryData**](DeliveryData.md) | | [optional] |
1212
| **ios** | [**DeliveryData**](DeliveryData.md) | | [optional] |
13+
| **sms** | [**DeliveryData**](DeliveryData.md) | | [optional] |
14+
| **email** | [**DeliveryData**](DeliveryData.md) | | [optional] |
1315

1416
## Example
1517

@@ -22,7 +24,9 @@ instance = OneSignal::PlatformDeliveryData.new(
2224
firefox_web_push: null,
2325
safari_web_push: null,
2426
android: null,
25-
ios: null
27+
ios: null,
28+
sms: null,
29+
email: null
2630
)
2731
```
2832

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# OneSignal::PlatformDeliveryDataEmailAllOf
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **opened** | **Integer** | Number of times an email has been opened. | [optional] |
8+
| **unique_opens** | **Integer** | Number of unique recipients who have opened your email. | [optional] |
9+
| **clicks** | **Integer** | Number of clicked links from your email. This can include the recipient clicking email links multiple times. | [optional] |
10+
| **unique_clicks** | **Integer** | Number of unique clicks that your recipients have made on links from your email. | [optional] |
11+
| **bounced** | **Integer** | Number of recipients who registered as a hard or soft bounce and didn't receive your email. | [optional] |
12+
| **reported_spam** | **Integer** | Number of recipients who reported this email as spam. | [optional] |
13+
| **unsubscribed** | **Integer** | Number of recipients who opted out of your emails using the unsubscribe link in this email. | [optional] |
14+
15+
## Example
16+
17+
```ruby
18+
require 'onesignal'
19+
20+
instance = OneSignal::PlatformDeliveryDataEmailAllOf.new(
21+
opened: null,
22+
unique_opens: null,
23+
clicks: null,
24+
unique_clicks: null,
25+
bounced: null,
26+
reported_spam: null,
27+
unsubscribed: null
28+
)
29+
```
30+

docs/PlatformDeliveryDataSmsAllOf.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# OneSignal::PlatformDeliveryDataSmsAllOf
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **provider_successful** | **Integer** | Number of messages reported as delivered successfully by the SMS service provider. | [optional] |
8+
| **provider_failed** | **Integer** | Number of recipients who didn't receive your message as reported by the SMS service provider. | [optional] |
9+
| **provider_errored** | **Integer** | Number of errors reported by the SMS service provider. | [optional] |
10+
11+
## Example
12+
13+
```ruby
14+
require 'onesignal'
15+
16+
instance = OneSignal::PlatformDeliveryDataSmsAllOf.new(
17+
provider_successful: null,
18+
provider_failed: null,
19+
provider_errored: null
20+
)
21+
```
22+

lib/onesignal.rb

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
require 'onesignal/models/outcome_data'
5757
require 'onesignal/models/outcomes_data'
5858
require 'onesignal/models/platform_delivery_data'
59+
require 'onesignal/models/platform_delivery_data_email_all_of'
60+
require 'onesignal/models/platform_delivery_data_sms_all_of'
5961
require 'onesignal/models/player'
6062
require 'onesignal/models/player_notification_target'
6163
require 'onesignal/models/player_slice'

lib/onesignal/models/delivery_data.rb

+5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515

1616
module OneSignal
1717
class DeliveryData
18+
# Number of messages delivered to push servers, mobile carriers, or email service providers.
1819
attr_accessor :successful
1920

21+
# Number of messages sent to unsubscribed devices.
2022
attr_accessor :failed
2123

24+
# Number of errors reported.
2225
attr_accessor :errored
2326

27+
# Number of messages that were clicked.
2428
attr_accessor :converted
2529

30+
# Number of devices that received the message.
2631
attr_accessor :received
2732

2833
# Attribute mapping from ruby-style variable name to JSON key.

lib/onesignal/models/platform_delivery_data.rb

+24-4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class PlatformDeliveryData
2828

2929
attr_accessor :ios
3030

31+
attr_accessor :sms
32+
33+
attr_accessor :email
34+
3135
# Attribute mapping from ruby-style variable name to JSON key.
3236
def self.attribute_map
3337
{
@@ -36,7 +40,9 @@ def self.attribute_map
3640
:'firefox_web_push' => :'firefox_web_push',
3741
:'safari_web_push' => :'safari_web_push',
3842
:'android' => :'android',
39-
:'ios' => :'ios'
43+
:'ios' => :'ios',
44+
:'sms' => :'sms',
45+
:'email' => :'email'
4046
}
4147
end
4248

@@ -53,13 +59,17 @@ def self.openapi_types
5359
:'firefox_web_push' => :'DeliveryData',
5460
:'safari_web_push' => :'DeliveryData',
5561
:'android' => :'DeliveryData',
56-
:'ios' => :'DeliveryData'
62+
:'ios' => :'DeliveryData',
63+
:'sms' => :'DeliveryData',
64+
:'email' => :'DeliveryData'
5765
}
5866
end
5967

6068
# List of attributes with nullable: true
6169
def self.openapi_nullable
6270
Set.new([
71+
:'sms',
72+
:'email'
6373
])
6474
end
6575

@@ -101,6 +111,14 @@ def initialize(attributes = {})
101111
if attributes.key?(:'ios')
102112
self.ios = attributes[:'ios']
103113
end
114+
115+
if attributes.key?(:'sms')
116+
self.sms = attributes[:'sms']
117+
end
118+
119+
if attributes.key?(:'email')
120+
self.email = attributes[:'email']
121+
end
104122
end
105123

106124
# Show invalid properties with the reasons. Usually used together with valid?
@@ -126,7 +144,9 @@ def ==(o)
126144
firefox_web_push == o.firefox_web_push &&
127145
safari_web_push == o.safari_web_push &&
128146
android == o.android &&
129-
ios == o.ios
147+
ios == o.ios &&
148+
sms == o.sms &&
149+
email == o.email
130150
end
131151

132152
# @see the `==` method
@@ -138,7 +158,7 @@ def eql?(o)
138158
# Calculates hash code according to all attributes.
139159
# @return [Integer] Hash code
140160
def hash
141-
[edge_web_push, chrome_web_push, firefox_web_push, safari_web_push, android, ios].hash
161+
[edge_web_push, chrome_web_push, firefox_web_push, safari_web_push, android, ios, sms, email].hash
142162
end
143163

144164
# Builds the object from hash

0 commit comments

Comments
 (0)