Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ A powerful way to send personalized messages at scale and build effective custom

This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 5.2.1
- Package version: 5.2.1-beta1
- API version: 5.3.0
- Package version: 5.3.0-beta1
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
For more information, please visit [https://onesignal.com](https://onesignal.com)

Expand All @@ -24,16 +24,16 @@ gem build onesignal.gemspec
Then either install the gem locally:

```shell
gem install ./onesignal-5.2.1-beta1.gem
gem install ./onesignal-5.3.0-beta1.gem
```

(for development, run `gem install --dev ./onesignal-5.2.1-beta1.gem` to install the development dependencies)
(for development, run `gem install --dev ./onesignal-5.3.0-beta1.gem` to install the development dependencies)

or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).

Finally add this to the Gemfile:

gem 'onesignal', '~> 5.2.1-beta1'
gem 'onesignal', '~> 5.3.0-beta1'

### Install from Git

Expand Down Expand Up @@ -86,16 +86,22 @@ All URIs are relative to *https://api.onesignal.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*OneSignal::DefaultApi* | [**cancel_notification**](docs/DefaultApi.md#cancel_notification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
*OneSignal::DefaultApi* | [**copy_template_to_app**](docs/DefaultApi.md#copy_template_to_app) | **POST** /templates/{template_id}/copy_to_app | Copy template to another app
*OneSignal::DefaultApi* | [**create_alias**](docs/DefaultApi.md#create_alias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
*OneSignal::DefaultApi* | [**create_alias_by_subscription**](docs/DefaultApi.md#create_alias_by_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
*OneSignal::DefaultApi* | [**create_api_key**](docs/DefaultApi.md#create_api_key) | **POST** /apps/{app_id}/auth/tokens | Create API key
*OneSignal::DefaultApi* | [**create_app**](docs/DefaultApi.md#create_app) | **POST** /apps | Create an app
*OneSignal::DefaultApi* | [**create_custom_events**](docs/DefaultApi.md#create_custom_events) | **POST** /apps/{app_id}/integrations/custom_events | Create custom events
*OneSignal::DefaultApi* | [**create_notification**](docs/DefaultApi.md#create_notification) | **POST** /notifications | Create notification
*OneSignal::DefaultApi* | [**create_segment**](docs/DefaultApi.md#create_segment) | **POST** /apps/{app_id}/segments | Create Segment
*OneSignal::DefaultApi* | [**create_subscription**](docs/DefaultApi.md#create_subscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
*OneSignal::DefaultApi* | [**create_template**](docs/DefaultApi.md#create_template) | **POST** /templates | Create template
*OneSignal::DefaultApi* | [**create_user**](docs/DefaultApi.md#create_user) | **POST** /apps/{app_id}/users |
*OneSignal::DefaultApi* | [**delete_alias**](docs/DefaultApi.md#delete_alias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
*OneSignal::DefaultApi* | [**delete_api_key**](docs/DefaultApi.md#delete_api_key) | **DELETE** /apps/{app_id}/auth/tokens/{token_id} | Delete API key
*OneSignal::DefaultApi* | [**delete_segment**](docs/DefaultApi.md#delete_segment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment
*OneSignal::DefaultApi* | [**delete_subscription**](docs/DefaultApi.md#delete_subscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
*OneSignal::DefaultApi* | [**delete_template**](docs/DefaultApi.md#delete_template) | **DELETE** /templates/{template_id} | Delete template
*OneSignal::DefaultApi* | [**delete_user**](docs/DefaultApi.md#delete_user) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
*OneSignal::DefaultApi* | [**export_events**](docs/DefaultApi.md#export_events) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events
*OneSignal::DefaultApi* | [**export_subscriptions**](docs/DefaultApi.md#export_subscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions
Expand All @@ -109,27 +115,43 @@ Class | Method | HTTP request | Description
*OneSignal::DefaultApi* | [**get_outcomes**](docs/DefaultApi.md#get_outcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
*OneSignal::DefaultApi* | [**get_segments**](docs/DefaultApi.md#get_segments) | **GET** /apps/{app_id}/segments | Get Segments
*OneSignal::DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
*OneSignal::DefaultApi* | [**rotate_api_key**](docs/DefaultApi.md#rotate_api_key) | **POST** /apps/{app_id}/auth/tokens/{token_id}/rotate | Rotate API key
*OneSignal::DefaultApi* | [**start_live_activity**](docs/DefaultApi.md#start_live_activity) | **POST** /apps/{app_id}/activities/activity/{activity_type} | Start Live Activity
*OneSignal::DefaultApi* | [**transfer_subscription**](docs/DefaultApi.md#transfer_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
*OneSignal::DefaultApi* | [**unsubscribe_email_with_token**](docs/DefaultApi.md#unsubscribe_email_with_token) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token
*OneSignal::DefaultApi* | [**update_api_key**](docs/DefaultApi.md#update_api_key) | **PATCH** /apps/{app_id}/auth/tokens/{token_id} | Update API key
*OneSignal::DefaultApi* | [**update_app**](docs/DefaultApi.md#update_app) | **PUT** /apps/{app_id} | Update an app
*OneSignal::DefaultApi* | [**update_live_activity**](docs/DefaultApi.md#update_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
*OneSignal::DefaultApi* | [**update_subscription**](docs/DefaultApi.md#update_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
*OneSignal::DefaultApi* | [**update_subscription_by_token**](docs/DefaultApi.md#update_subscription_by_token) | **PATCH** /apps/{app_id}/subscriptions_by_token/{token_type}/{token} | Update subscription by token
*OneSignal::DefaultApi* | [**update_template**](docs/DefaultApi.md#update_template) | **PATCH** /templates/{template_id} | Update template
*OneSignal::DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
*OneSignal::DefaultApi* | [**view_api_keys**](docs/DefaultApi.md#view_api_keys) | **GET** /apps/{app_id}/auth/tokens | View API keys
*OneSignal::DefaultApi* | [**view_template**](docs/DefaultApi.md#view_template) | **GET** /templates/{template_id} | View template
*OneSignal::DefaultApi* | [**view_templates**](docs/DefaultApi.md#view_templates) | **GET** /templates | View templates


## Documentation for Models

- [OneSignal::ApiKeyToken](docs/ApiKeyToken.md)
- [OneSignal::ApiKeyTokensListResponse](docs/ApiKeyTokensListResponse.md)
- [OneSignal::App](docs/App.md)
- [OneSignal::BasicNotification](docs/BasicNotification.md)
- [OneSignal::BasicNotificationAllOf](docs/BasicNotificationAllOf.md)
- [OneSignal::BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md)
- [OneSignal::Button](docs/Button.md)
- [OneSignal::CopyTemplateRequest](docs/CopyTemplateRequest.md)
- [OneSignal::CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
- [OneSignal::CreateApiKeyResponse](docs/CreateApiKeyResponse.md)
- [OneSignal::CreateNotificationSuccessResponse](docs/CreateNotificationSuccessResponse.md)
- [OneSignal::CreateSegmentConflictResponse](docs/CreateSegmentConflictResponse.md)
- [OneSignal::CreateSegmentSuccessResponse](docs/CreateSegmentSuccessResponse.md)
- [OneSignal::CreateTemplateRequest](docs/CreateTemplateRequest.md)
- [OneSignal::CreateUserConflictResponse](docs/CreateUserConflictResponse.md)
- [OneSignal::CreateUserConflictResponseErrorsInner](docs/CreateUserConflictResponseErrorsInner.md)
- [OneSignal::CreateUserConflictResponseErrorsItemsMeta](docs/CreateUserConflictResponseErrorsItemsMeta.md)
- [OneSignal::CustomEvent](docs/CustomEvent.md)
- [OneSignal::CustomEventsRequest](docs/CustomEventsRequest.md)
- [OneSignal::DeliveryData](docs/DeliveryData.md)
- [OneSignal::ExportEventsSuccessResponse](docs/ExportEventsSuccessResponse.md)
- [OneSignal::ExportSubscriptionsRequestBody](docs/ExportSubscriptionsRequestBody.md)
Expand Down Expand Up @@ -162,12 +184,18 @@ Class | Method | HTTP request | Description
- [OneSignal::Segment](docs/Segment.md)
- [OneSignal::SegmentData](docs/SegmentData.md)
- [OneSignal::SegmentNotificationTarget](docs/SegmentNotificationTarget.md)
- [OneSignal::StartLiveActivityRequest](docs/StartLiveActivityRequest.md)
- [OneSignal::StartLiveActivitySuccessResponse](docs/StartLiveActivitySuccessResponse.md)
- [OneSignal::Subscription](docs/Subscription.md)
- [OneSignal::SubscriptionBody](docs/SubscriptionBody.md)
- [OneSignal::SubscriptionNotificationTarget](docs/SubscriptionNotificationTarget.md)
- [OneSignal::TemplateResource](docs/TemplateResource.md)
- [OneSignal::TemplatesListResponse](docs/TemplatesListResponse.md)
- [OneSignal::TransferSubscriptionRequestBody](docs/TransferSubscriptionRequestBody.md)
- [OneSignal::UpdateApiKeyRequest](docs/UpdateApiKeyRequest.md)
- [OneSignal::UpdateLiveActivityRequest](docs/UpdateLiveActivityRequest.md)
- [OneSignal::UpdateLiveActivitySuccessResponse](docs/UpdateLiveActivitySuccessResponse.md)
- [OneSignal::UpdateTemplateRequest](docs/UpdateTemplateRequest.md)
- [OneSignal::UpdateUserRequest](docs/UpdateUserRequest.md)
- [OneSignal::User](docs/User.md)
- [OneSignal::UserIdentityBody](docs/UserIdentityBody.md)
Expand Down
28 changes: 28 additions & 0 deletions docs/ApiKeyToken.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# OneSignal::ApiKeyToken

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **token_id** | **String** | | [optional] |
| **updated_at** | **String** | | [optional] |
| **created_at** | **String** | | [optional] |
| **name** | **String** | | [optional] |
| **ip_allowlist_mode** | **String** | | [optional] |
| **ip_allowlist** | **Array<String>** | | [optional] |

## Example

```ruby
require 'onesignal'

instance = OneSignal::ApiKeyToken.new(
token_id: null,
updated_at: null,
created_at: null,
name: null,
ip_allowlist_mode: null,
ip_allowlist: null
)
```

18 changes: 18 additions & 0 deletions docs/ApiKeyTokensListResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# OneSignal::ApiKeyTokensListResponse

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **tokens** | [**Array<ApiKeyToken>**](ApiKeyToken.md) | | [optional] |

## Example

```ruby
require 'onesignal'

instance = OneSignal::ApiKeyTokensListResponse.new(
tokens: null
)
```

18 changes: 18 additions & 0 deletions docs/CopyTemplateRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# OneSignal::CopyTemplateRequest

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **target_app_id** | **String** | Destination OneSignal App ID in UUID v4 format. | |

## Example

```ruby
require 'onesignal'

instance = OneSignal::CopyTemplateRequest.new(
target_app_id: null
)
```

22 changes: 22 additions & 0 deletions docs/CreateApiKeyRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# OneSignal::CreateApiKeyRequest

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **name** | **String** | | [optional] |
| **ip_allowlist_mode** | **String** | | [optional] |
| **ip_allowlist** | **Array<String>** | | [optional] |

## Example

```ruby
require 'onesignal'

instance = OneSignal::CreateApiKeyRequest.new(
name: null,
ip_allowlist_mode: null,
ip_allowlist: null
)
```

20 changes: 20 additions & 0 deletions docs/CreateApiKeyResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# OneSignal::CreateApiKeyResponse

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **token_id** | **String** | | [optional] |
| **formatted_token** | **String** | | [optional] |

## Example

```ruby
require 'onesignal'

instance = OneSignal::CreateApiKeyResponse.new(
token_id: null,
formatted_token: null
)
```

32 changes: 32 additions & 0 deletions docs/CreateTemplateRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# OneSignal::CreateTemplateRequest

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **app_id** | **String** | Your OneSignal App ID in UUID v4 format. | |
| **name** | **String** | Name of the template. | |
| **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | |
| **is_email** | **Boolean** | Set true for an Email template. | [optional] |
| **email_subject** | **String** | Subject of the email. | [optional] |
| **email_body** | **String** | Body of the email (HTML supported). | [optional] |
| **is_sms** | **Boolean** | Set true for an SMS template. | [optional] |
| **dynamic_content** | **String** | JSON string for dynamic content personalization. | [optional] |

## Example

```ruby
require 'onesignal'

instance = OneSignal::CreateTemplateRequest.new(
app_id: null,
name: null,
contents: null,
is_email: null,
email_subject: null,
email_body: null,
is_sms: null,
dynamic_content: null
)
```

26 changes: 26 additions & 0 deletions docs/CustomEvent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# OneSignal::CustomEvent

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **name** | **String** | The identifier or name of the event. Maximum 128 characters. | |
| **external_id** | **String** | The external ID of the user targeted for the event. Either the user's External ID or OneSignal ID is required. | [optional] |
| **onesignal_id** | **String** | The OneSignal ID of the user targeted for the event. Either the user's External ID or OneSignal ID is required. | [optional] |
| **timestamp** | **Time** | Time the event occurred as an ISO8601 formatted string. Defaults to now if not included or past date provided. | [optional] |
| **payload** | **Hash<String, Object>** | Properties or data related to the event, like {\"geography\": \"USA\"} | [optional] |

## Example

```ruby
require 'onesignal'

instance = OneSignal::CustomEvent.new(
name: null,
external_id: null,
onesignal_id: null,
timestamp: null,
payload: null
)
```

18 changes: 18 additions & 0 deletions docs/CustomEventsRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# OneSignal::CustomEventsRequest

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **events** | [**Array<CustomEvent>**](CustomEvent.md) | | |

## Example

```ruby
require 'onesignal'

instance = OneSignal::CustomEventsRequest.new(
events: null
)
```

Loading