From 4b018efebb3646d481930a5367854416a7c58369 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Tue, 18 Apr 2023 17:20:39 +0000 Subject: [PATCH] Update .NET API --- .github/workflows/Zapier.yml | 4 +- README.md | 39 +- docs/BasicNotification.md | 2 + docs/CreateNotificationSuccessResponse.md | 4 +- docs/CreateSubscriptionRequestBody.md | 11 + docs/CreateUserConflictResponse.md | 10 + docs/CreateUserConflictResponseErrorsInner.md | 12 + ...eateUserConflictResponseErrorsItemsMeta.md | 10 + docs/DefaultApi.md | 1496 ++++- docs/IdentifyUserConflictResponse.md | 10 + ...IdentifyUserConflictResponseErrorsInner.md | 11 + docs/InlineResponse200.md | 10 + docs/InlineResponse2003.md | 10 + docs/InlineResponse201.md | 10 + docs/InlineResponse202.md | 10 + docs/Notification.md | 2 + docs/NotificationTarget.md | 2 + docs/NotificationWithMeta.md | 2 + docs/PlayerNotificationTarget.md | 2 + .../PlayerNotificationTargetIncludeAliases.md | 10 + docs/PropertiesDeltas.md | 12 + docs/PropertiesObject.md | 20 + docs/Purchase.md | 3 +- docs/SubscriptionObject.md | 26 + docs/TransferSubscriptionRequestBody.md | 10 + docs/UpdateSubscriptionRequestBody.md | 10 + docs/UpdateUserRequest.md | 12 + docs/User.md | 13 + docs/UserIdentityRequestBody.md | 10 + docs/UserIdentityResponse.md | 10 + docs/UserSubscriptionOptions.md | 10 + src/OneSignalApi/Api/DefaultApi.cs | 5082 ++++++++++++++--- src/OneSignalApi/Client/ApiClient.cs | 4 +- src/OneSignalApi/Client/ApiException.cs | 2 +- src/OneSignalApi/Client/ApiResponse.cs | 2 +- src/OneSignalApi/Client/ClientUtils.cs | 2 +- src/OneSignalApi/Client/Configuration.cs | 10 +- src/OneSignalApi/Client/ExceptionFactory.cs | 2 +- .../Client/GlobalConfiguration.cs | 2 +- src/OneSignalApi/Client/HttpMethod.cs | 2 +- src/OneSignalApi/Client/IApiAccessor.cs | 2 +- .../Client/IAsynchronousClient.cs | 2 +- .../Client/IReadableConfiguration.cs | 2 +- src/OneSignalApi/Client/ISynchronousClient.cs | 2 +- src/OneSignalApi/Client/Multimap.cs | 2 +- .../Client/OpenAPIDateConverter.cs | 2 +- src/OneSignalApi/Client/RequestOptions.cs | 2 +- src/OneSignalApi/Client/RetryConfiguration.cs | 2 +- .../Model/AbstractOpenAPISchema.cs | 2 +- src/OneSignalApi/Model/App.cs | 12 +- src/OneSignalApi/Model/BadRequestError.cs | 2 +- src/OneSignalApi/Model/BasicNotification.cs | 66 +- .../Model/BasicNotificationAllOf.cs | 4 +- ...otificationAllOfAndroidBackgroundLayout.cs | 2 +- .../Model/BeginLiveActivityRequest.cs | 2 +- src/OneSignalApi/Model/Button.cs | 2 +- .../CancelNotificationSuccessResponse.cs | 2 +- .../CreateNotificationSuccessResponse.cs | 20 +- .../Model/CreatePlayerSuccessResponse.cs | 2 +- .../Model/CreateSegmentConflictResponse.cs | 2 +- .../Model/CreateSegmentSuccessResponse.cs | 2 +- .../Model/CreateSubscriptionRequestBody.cs | 143 + .../Model/CreateUserConflictResponse.cs | 130 + .../CreateUserConflictResponseErrorsInner.cs | 165 + ...eateUserConflictResponseErrorsItemsMeta.cs | 129 + .../Model/DeletePlayerNotFoundResponse.cs | 2 +- .../Model/DeletePlayerSuccessResponse.cs | 2 +- .../Model/DeleteSegmentNotFoundResponse.cs | 2 +- .../Model/DeleteSegmentSuccessResponse.cs | 2 +- src/OneSignalApi/Model/DeliveryData.cs | 2 +- .../Model/ExportPlayersRequestBody.cs | 2 +- .../Model/ExportPlayersSuccessResponse.cs | 2 +- src/OneSignalApi/Model/Filter.cs | 2 +- src/OneSignalApi/Model/FilterExpressions.cs | 2 +- .../Model/GetNotificationRequestBody.cs | 2 +- .../Model/IdentifyUserConflictResponse.cs | 130 + ...IdentifyUserConflictResponseErrorsInner.cs | 147 + src/OneSignalApi/Model/InlineResponse200.cs | 130 + src/OneSignalApi/Model/InlineResponse2003.cs | 130 + src/OneSignalApi/Model/InlineResponse201.cs | 129 + src/OneSignalApi/Model/InlineResponse202.cs | 129 + .../Model/InvalidIdentifierError.cs | 2 +- src/OneSignalApi/Model/Notification.cs | 66 +- .../Model/Notification200Errors.cs | 2 +- src/OneSignalApi/Model/NotificationAllOf.cs | 2 +- .../NotificationHistorySuccessResponse.cs | 2 +- src/OneSignalApi/Model/NotificationSlice.cs | 2 +- src/OneSignalApi/Model/NotificationTarget.cs | 2 +- .../Model/NotificationWithMeta.cs | 66 +- .../Model/NotificationWithMetaAllOf.cs | 2 +- src/OneSignalApi/Model/Operator.cs | 2 +- src/OneSignalApi/Model/OutcomeData.cs | 2 +- src/OneSignalApi/Model/OutcomesData.cs | 2 +- .../Model/PlatformDeliveryData.cs | 2 +- .../Model/PlatformDeliveryDataEmailAllOf.cs | 2 +- .../Model/PlatformDeliveryDataSmsAllOf.cs | 2 +- src/OneSignalApi/Model/Player.cs | 2 +- .../Model/PlayerNotificationTarget.cs | 64 +- .../PlayerNotificationTargetIncludeAliases.cs | 130 + src/OneSignalApi/Model/PlayerSlice.cs | 2 +- src/OneSignalApi/Model/PropertiesDeltas.cs | 158 + src/OneSignalApi/Model/PropertiesObject.cs | 291 + src/OneSignalApi/Model/Purchase.cs | 33 +- src/OneSignalApi/Model/Segment.cs | 2 +- .../Model/SegmentNotificationTarget.cs | 2 +- src/OneSignalApi/Model/StringMap.cs | 2 +- src/OneSignalApi/Model/SubscriptionObject.cs | 471 ++ .../Model/TransferSubscriptionRequestBody.cs | 130 + .../Model/UpdateLiveActivityRequest.cs | 2 +- .../UpdateLiveActivitySuccessResponse.cs | 2 +- .../Model/UpdatePlayerSuccessResponse.cs | 2 +- .../Model/UpdatePlayerTagsRequestBody.cs | 2 +- .../Model/UpdatePlayerTagsSuccessResponse.cs | 2 +- .../Model/UpdateSubscriptionRequestBody.cs | 129 + src/OneSignalApi/Model/UpdateUserRequest.cs | 161 + src/OneSignalApi/Model/User.cs | 185 + .../Model/UserIdentityRequestBody.cs | 130 + .../Model/UserIdentityResponse.cs | 130 + .../Model/UserSubscriptionOptions.cs | 125 + src/OneSignalApi/OneSignalApi.csproj | 2 +- 120 files changed, 9623 insertions(+), 1123 deletions(-) create mode 100644 docs/CreateSubscriptionRequestBody.md create mode 100644 docs/CreateUserConflictResponse.md create mode 100644 docs/CreateUserConflictResponseErrorsInner.md create mode 100644 docs/CreateUserConflictResponseErrorsItemsMeta.md create mode 100644 docs/IdentifyUserConflictResponse.md create mode 100644 docs/IdentifyUserConflictResponseErrorsInner.md create mode 100644 docs/InlineResponse200.md create mode 100644 docs/InlineResponse2003.md create mode 100644 docs/InlineResponse201.md create mode 100644 docs/InlineResponse202.md create mode 100644 docs/PlayerNotificationTargetIncludeAliases.md create mode 100644 docs/PropertiesDeltas.md create mode 100644 docs/PropertiesObject.md create mode 100644 docs/SubscriptionObject.md create mode 100644 docs/TransferSubscriptionRequestBody.md create mode 100644 docs/UpdateSubscriptionRequestBody.md create mode 100644 docs/UpdateUserRequest.md create mode 100644 docs/User.md create mode 100644 docs/UserIdentityRequestBody.md create mode 100644 docs/UserIdentityResponse.md create mode 100644 docs/UserSubscriptionOptions.md create mode 100644 src/OneSignalApi/Model/CreateSubscriptionRequestBody.cs create mode 100644 src/OneSignalApi/Model/CreateUserConflictResponse.cs create mode 100644 src/OneSignalApi/Model/CreateUserConflictResponseErrorsInner.cs create mode 100644 src/OneSignalApi/Model/CreateUserConflictResponseErrorsItemsMeta.cs create mode 100644 src/OneSignalApi/Model/IdentifyUserConflictResponse.cs create mode 100644 src/OneSignalApi/Model/IdentifyUserConflictResponseErrorsInner.cs create mode 100644 src/OneSignalApi/Model/InlineResponse200.cs create mode 100644 src/OneSignalApi/Model/InlineResponse2003.cs create mode 100644 src/OneSignalApi/Model/InlineResponse201.cs create mode 100644 src/OneSignalApi/Model/InlineResponse202.cs create mode 100644 src/OneSignalApi/Model/PlayerNotificationTargetIncludeAliases.cs create mode 100644 src/OneSignalApi/Model/PropertiesDeltas.cs create mode 100644 src/OneSignalApi/Model/PropertiesObject.cs create mode 100644 src/OneSignalApi/Model/SubscriptionObject.cs create mode 100644 src/OneSignalApi/Model/TransferSubscriptionRequestBody.cs create mode 100644 src/OneSignalApi/Model/UpdateSubscriptionRequestBody.cs create mode 100644 src/OneSignalApi/Model/UpdateUserRequest.cs create mode 100644 src/OneSignalApi/Model/User.cs create mode 100644 src/OneSignalApi/Model/UserIdentityRequestBody.cs create mode 100644 src/OneSignalApi/Model/UserIdentityResponse.cs create mode 100644 src/OneSignalApi/Model/UserSubscriptionOptions.cs diff --git a/.github/workflows/Zapier.yml b/.github/workflows/Zapier.yml index 3665dd5..074f7c1 100644 --- a/.github/workflows/Zapier.yml +++ b/.github/workflows/Zapier.yml @@ -7,7 +7,7 @@ on: # Triggers the workflow on push or pull request events but only for the "main" branch issues: types: [closed] - + permissions: issues: read @@ -31,4 +31,4 @@ jobs: --header 'Accept: application/json' \ --data-raw '{ "task_name" : "$ISSUE_TITLE" - }' + }' \ No newline at end of file diff --git a/README.md b/README.md index 35a6ef6..c25d35c 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -- API version: 1.0.2 -- SDK version: 1.0.4 +- API version: 1.2.1 +- SDK version: 2.0.0 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit [https://onesignal.com](https://onesignal.com) @@ -132,22 +132,36 @@ Class | Method | HTTP request | Description *DefaultApi* | [**CreateNotification**](docs/DefaultApi.md#createnotification) | **POST** /notifications | Create notification *DefaultApi* | [**CreatePlayer**](docs/DefaultApi.md#createplayer) | **POST** /players | Add a device *DefaultApi* | [**CreateSegments**](docs/DefaultApi.md#createsegments) | **POST** /apps/{app_id}/segments | Create Segments +*DefaultApi* | [**CreateSubscription**](docs/DefaultApi.md#createsubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | +*DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **POST** /apps/{app_id}/users | +*DefaultApi* | [**DeleteAlias**](docs/DefaultApi.md#deletealias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | *DefaultApi* | [**DeletePlayer**](docs/DefaultApi.md#deleteplayer) | **DELETE** /players/{player_id} | Delete a user record *DefaultApi* | [**DeleteSegments**](docs/DefaultApi.md#deletesegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments +*DefaultApi* | [**DeleteSubscription**](docs/DefaultApi.md#deletesubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | +*DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | *DefaultApi* | [**EndLiveActivity**](docs/DefaultApi.md#endliveactivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity *DefaultApi* | [**ExportPlayers**](docs/DefaultApi.md#exportplayers) | **POST** /players/csv_export?app_id={app_id} | CSV export +*DefaultApi* | [**FetchAliases**](docs/DefaultApi.md#fetchaliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | +*DefaultApi* | [**FetchUser**](docs/DefaultApi.md#fetchuser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | +*DefaultApi* | [**FetchUserIdentity**](docs/DefaultApi.md#fetchuseridentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | *DefaultApi* | [**GetApp**](docs/DefaultApi.md#getapp) | **GET** /apps/{app_id} | View an app *DefaultApi* | [**GetApps**](docs/DefaultApi.md#getapps) | **GET** /apps | View apps +*DefaultApi* | [**GetEligibleIams**](docs/DefaultApi.md#geteligibleiams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams | *DefaultApi* | [**GetNotification**](docs/DefaultApi.md#getnotification) | **GET** /notifications/{notification_id} | View notification *DefaultApi* | [**GetNotificationHistory**](docs/DefaultApi.md#getnotificationhistory) | **POST** /notifications/{notification_id}/history | Notification History *DefaultApi* | [**GetNotifications**](docs/DefaultApi.md#getnotifications) | **GET** /notifications | View notifications *DefaultApi* | [**GetOutcomes**](docs/DefaultApi.md#getoutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes *DefaultApi* | [**GetPlayer**](docs/DefaultApi.md#getplayer) | **GET** /players/{player_id} | View device *DefaultApi* | [**GetPlayers**](docs/DefaultApi.md#getplayers) | **GET** /players | View devices +*DefaultApi* | [**IdentifyUserByAlias**](docs/DefaultApi.md#identifyuserbyalias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +*DefaultApi* | [**IdentifyUserBySubscriptionId**](docs/DefaultApi.md#identifyuserbysubscriptionid) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | +*DefaultApi* | [**TransferSubscription**](docs/DefaultApi.md#transfersubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner | *DefaultApi* | [**UpdateApp**](docs/DefaultApi.md#updateapp) | **PUT** /apps/{app_id} | Update an app *DefaultApi* | [**UpdateLiveActivity**](docs/DefaultApi.md#updateliveactivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push *DefaultApi* | [**UpdatePlayer**](docs/DefaultApi.md#updateplayer) | **PUT** /players/{player_id} | Edit device *DefaultApi* | [**UpdatePlayerTags**](docs/DefaultApi.md#updateplayertags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id +*DefaultApi* | [**UpdateSubscription**](docs/DefaultApi.md#updatesubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | +*DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} | @@ -165,6 +179,10 @@ Class | Method | HTTP request | Description - [Model.CreatePlayerSuccessResponse](docs/CreatePlayerSuccessResponse.md) - [Model.CreateSegmentConflictResponse](docs/CreateSegmentConflictResponse.md) - [Model.CreateSegmentSuccessResponse](docs/CreateSegmentSuccessResponse.md) + - [Model.CreateSubscriptionRequestBody](docs/CreateSubscriptionRequestBody.md) + - [Model.CreateUserConflictResponse](docs/CreateUserConflictResponse.md) + - [Model.CreateUserConflictResponseErrorsInner](docs/CreateUserConflictResponseErrorsInner.md) + - [Model.CreateUserConflictResponseErrorsItemsMeta](docs/CreateUserConflictResponseErrorsItemsMeta.md) - [Model.DeletePlayerNotFoundResponse](docs/DeletePlayerNotFoundResponse.md) - [Model.DeletePlayerSuccessResponse](docs/DeletePlayerSuccessResponse.md) - [Model.DeleteSegmentNotFoundResponse](docs/DeleteSegmentNotFoundResponse.md) @@ -175,6 +193,12 @@ Class | Method | HTTP request | Description - [Model.Filter](docs/Filter.md) - [Model.FilterExpressions](docs/FilterExpressions.md) - [Model.GetNotificationRequestBody](docs/GetNotificationRequestBody.md) + - [Model.IdentifyUserConflictResponse](docs/IdentifyUserConflictResponse.md) + - [Model.IdentifyUserConflictResponseErrorsInner](docs/IdentifyUserConflictResponseErrorsInner.md) + - [Model.InlineResponse200](docs/InlineResponse200.md) + - [Model.InlineResponse2003](docs/InlineResponse2003.md) + - [Model.InlineResponse201](docs/InlineResponse201.md) + - [Model.InlineResponse202](docs/InlineResponse202.md) - [Model.InvalidIdentifierError](docs/InvalidIdentifierError.md) - [Model.Notification](docs/Notification.md) - [Model.Notification200Errors](docs/Notification200Errors.md) @@ -192,16 +216,27 @@ Class | Method | HTTP request | Description - [Model.PlatformDeliveryDataSmsAllOf](docs/PlatformDeliveryDataSmsAllOf.md) - [Model.Player](docs/Player.md) - [Model.PlayerNotificationTarget](docs/PlayerNotificationTarget.md) + - [Model.PlayerNotificationTargetIncludeAliases](docs/PlayerNotificationTargetIncludeAliases.md) - [Model.PlayerSlice](docs/PlayerSlice.md) + - [Model.PropertiesDeltas](docs/PropertiesDeltas.md) + - [Model.PropertiesObject](docs/PropertiesObject.md) - [Model.Purchase](docs/Purchase.md) - [Model.Segment](docs/Segment.md) - [Model.SegmentNotificationTarget](docs/SegmentNotificationTarget.md) - [Model.StringMap](docs/StringMap.md) + - [Model.SubscriptionObject](docs/SubscriptionObject.md) + - [Model.TransferSubscriptionRequestBody](docs/TransferSubscriptionRequestBody.md) - [Model.UpdateLiveActivityRequest](docs/UpdateLiveActivityRequest.md) - [Model.UpdateLiveActivitySuccessResponse](docs/UpdateLiveActivitySuccessResponse.md) - [Model.UpdatePlayerSuccessResponse](docs/UpdatePlayerSuccessResponse.md) - [Model.UpdatePlayerTagsRequestBody](docs/UpdatePlayerTagsRequestBody.md) - [Model.UpdatePlayerTagsSuccessResponse](docs/UpdatePlayerTagsSuccessResponse.md) + - [Model.UpdateSubscriptionRequestBody](docs/UpdateSubscriptionRequestBody.md) + - [Model.UpdateUserRequest](docs/UpdateUserRequest.md) + - [Model.User](docs/User.md) + - [Model.UserIdentityRequestBody](docs/UserIdentityRequestBody.md) + - [Model.UserIdentityResponse](docs/UserIdentityResponse.md) + - [Model.UserSubscriptionOptions](docs/UserSubscriptionOptions.md) diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 945c640..882090d 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**TargetChannel** | **string** | | [optional] **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] **Name** | **string** | Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. | [optional] diff --git a/docs/CreateNotificationSuccessResponse.md b/docs/CreateNotificationSuccessResponse.md index 92c8a83..f9710ca 100644 --- a/docs/CreateNotificationSuccessResponse.md +++ b/docs/CreateNotificationSuccessResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | -**Recipients** | **int** | Estimated number of subscribers targetted by notification. | +**Id** | **string** | | [optional] +**Recipients** | **int** | Estimated number of subscribers targetted by notification. | [optional] **ExternalId** | **string** | | [optional] **Errors** | [**Notification200Errors**](Notification200Errors.md) | | [optional] diff --git a/docs/CreateSubscriptionRequestBody.md b/docs/CreateSubscriptionRequestBody.md new file mode 100644 index 0000000..b28aed6 --- /dev/null +++ b/docs/CreateSubscriptionRequestBody.md @@ -0,0 +1,11 @@ +# OneSignalApi.Model.CreateSubscriptionRequestBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | [optional] +**RetainPreviousOwner** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateUserConflictResponse.md b/docs/CreateUserConflictResponse.md new file mode 100644 index 0000000..cb75987 --- /dev/null +++ b/docs/CreateUserConflictResponse.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.CreateUserConflictResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<CreateUserConflictResponseErrorsInner>**](CreateUserConflictResponseErrorsInner.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateUserConflictResponseErrorsInner.md b/docs/CreateUserConflictResponseErrorsInner.md new file mode 100644 index 0000000..1104d43 --- /dev/null +++ b/docs/CreateUserConflictResponseErrorsInner.md @@ -0,0 +1,12 @@ +# OneSignalApi.Model.CreateUserConflictResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | | [optional] +**Title** | **string** | | [optional] +**Meta** | [**CreateUserConflictResponseErrorsItemsMeta**](CreateUserConflictResponseErrorsItemsMeta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateUserConflictResponseErrorsItemsMeta.md b/docs/CreateUserConflictResponseErrorsItemsMeta.md new file mode 100644 index 0000000..1bb8466 --- /dev/null +++ b/docs/CreateUserConflictResponseErrorsItemsMeta.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.CreateUserConflictResponseErrorsItemsMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConflictingAliases** | **Object** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index cdcdcad..d3de0a1 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -10,22 +10,36 @@ Method | HTTP request | Description [**CreateNotification**](DefaultApi.md#createnotification) | **POST** /notifications | Create notification [**CreatePlayer**](DefaultApi.md#createplayer) | **POST** /players | Add a device [**CreateSegments**](DefaultApi.md#createsegments) | **POST** /apps/{app_id}/segments | Create Segments +[**CreateSubscription**](DefaultApi.md#createsubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | +[**CreateUser**](DefaultApi.md#createuser) | **POST** /apps/{app_id}/users | +[**DeleteAlias**](DefaultApi.md#deletealias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | [**DeletePlayer**](DefaultApi.md#deleteplayer) | **DELETE** /players/{player_id} | Delete a user record [**DeleteSegments**](DefaultApi.md#deletesegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments +[**DeleteSubscription**](DefaultApi.md#deletesubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | +[**DeleteUser**](DefaultApi.md#deleteuser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | [**EndLiveActivity**](DefaultApi.md#endliveactivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity [**ExportPlayers**](DefaultApi.md#exportplayers) | **POST** /players/csv_export?app_id={app_id} | CSV export +[**FetchAliases**](DefaultApi.md#fetchaliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | +[**FetchUser**](DefaultApi.md#fetchuser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | +[**FetchUserIdentity**](DefaultApi.md#fetchuseridentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | [**GetApp**](DefaultApi.md#getapp) | **GET** /apps/{app_id} | View an app [**GetApps**](DefaultApi.md#getapps) | **GET** /apps | View apps +[**GetEligibleIams**](DefaultApi.md#geteligibleiams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams | [**GetNotification**](DefaultApi.md#getnotification) | **GET** /notifications/{notification_id} | View notification [**GetNotificationHistory**](DefaultApi.md#getnotificationhistory) | **POST** /notifications/{notification_id}/history | Notification History [**GetNotifications**](DefaultApi.md#getnotifications) | **GET** /notifications | View notifications [**GetOutcomes**](DefaultApi.md#getoutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes [**GetPlayer**](DefaultApi.md#getplayer) | **GET** /players/{player_id} | View device [**GetPlayers**](DefaultApi.md#getplayers) | **GET** /players | View devices +[**IdentifyUserByAlias**](DefaultApi.md#identifyuserbyalias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +[**IdentifyUserBySubscriptionId**](DefaultApi.md#identifyuserbysubscriptionid) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | +[**TransferSubscription**](DefaultApi.md#transfersubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner | [**UpdateApp**](DefaultApi.md#updateapp) | **PUT** /apps/{app_id} | Update an app [**UpdateLiveActivity**](DefaultApi.md#updateliveactivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push [**UpdatePlayer**](DefaultApi.md#updateplayer) | **PUT** /players/{player_id} | Edit device [**UpdatePlayerTags**](DefaultApi.md#updateplayertags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id +[**UpdateSubscription**](DefaultApi.md#updatesubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | +[**UpdateUser**](DefaultApi.md#updateuser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} | @@ -486,13 +500,936 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CreateSubscription** +> InlineResponse201 CreateSubscription (string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody) + + + +Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class CreateSubscriptionExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | + var createSubscriptionRequestBody = new CreateSubscriptionRequestBody(); // CreateSubscriptionRequestBody | + + try + { + InlineResponse201 result = apiInstance.CreateSubscription(appId, aliasLabel, aliasId, createSubscriptionRequestBody); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.CreateSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | + **createSubscriptionRequestBody** | [**CreateSubscriptionRequestBody**](CreateSubscriptionRequestBody.md)| | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | CREATED | - | +| **202** | ACCEPTED | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateUser** +> User CreateUser (string appId, User user) + + + +Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class CreateUserExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var user = new User(); // User | + + try + { + User result = apiInstance.CreateUser(appId, user); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.CreateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **user** | [**User**](User.md)| | + +### Return type + +[**User**](User.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | CREATED | - | +| **202** | ACCEPTED | - | +| **409** | Multiple User Identity Conflict | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteAlias** +> InlineResponse200 DeleteAlias (string appId, string aliasLabel, string aliasId, string aliasLabelToDelete) + + + +Deletes an alias by alias label + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class DeleteAliasExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | + var aliasLabelToDelete = "aliasLabelToDelete_example"; // string | + + try + { + InlineResponse200 result = apiInstance.DeleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.DeleteAlias: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | + **aliasLabelToDelete** | **string**| | + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **DeletePlayer** > DeletePlayerSuccessResponse DeletePlayer (string appId, string playerId) -Delete a user record +Delete a user record + +Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class DeletePlayerExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. + var playerId = "playerId_example"; // string | The OneSignal player_id + + try + { + // Delete a user record + DeletePlayerSuccessResponse result = apiInstance.DeletePlayer(appId, playerId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.DeletePlayer: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | + **playerId** | **string**| The OneSignal player_id | + +### Return type + +[**DeletePlayerSuccessResponse**](DeletePlayerSuccessResponse.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteSegments** +> DeleteSegmentSuccessResponse DeleteSegments (string appId, string segmentId) + +Delete Segments + +Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class DeleteSegmentsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. + var segmentId = "segmentId_example"; // string | The segment_id can be found in the URL of the segment when viewing it in the dashboard. + + try + { + // Delete Segments + DeleteSegmentSuccessResponse result = apiInstance.DeleteSegments(appId, segmentId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.DeleteSegments: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | + **segmentId** | **string**| The segment_id can be found in the URL of the segment when viewing it in the dashboard. | + +### Return type + +[**DeleteSegmentSuccessResponse**](DeleteSegmentSuccessResponse.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteSubscription** +> void DeleteSubscription (string appId, string subscriptionId) + + + +Deletes the Subscription. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class DeleteSubscriptionExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var subscriptionId = "subscriptionId_example"; // string | + + try + { + apiInstance.DeleteSubscription(appId, subscriptionId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.DeleteSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **subscriptionId** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | ACCEPTED | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteUser** +> void DeleteUser (string appId, string aliasLabel, string aliasId) + + + +Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class DeleteUserExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | + + try + { + apiInstance.DeleteUser(appId, aliasLabel, aliasId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.DeleteUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **EndLiveActivity** +> void EndLiveActivity (string appId, string activityId, string subscriptionId) + +Stop Live Activity + +Stops a Live Activity + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class EndLiveActivityExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. + var activityId = "activityId_example"; // string | Live Activity record ID + var subscriptionId = "subscriptionId_example"; // string | Subscription ID + + try + { + // Stop Live Activity + apiInstance.EndLiveActivity(appId, activityId, subscriptionId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.EndLiveActivity: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | + **activityId** | **string**| Live Activity record ID | + **subscriptionId** | **string**| Subscription ID | + +### Return type + +void (empty response body) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | OK | - | +| **400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **ExportPlayers** +> ExportPlayersSuccessResponse ExportPlayers (string appId, ExportPlayersRequestBody exportPlayersRequestBody = null) + +CSV export + +Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class ExportPlayersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | The app ID that you want to export devices from + var exportPlayersRequestBody = new ExportPlayersRequestBody(); // ExportPlayersRequestBody | (optional) + + try + { + // CSV export + ExportPlayersSuccessResponse result = apiInstance.ExportPlayers(appId, exportPlayersRequestBody); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.ExportPlayers: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| The app ID that you want to export devices from | + **exportPlayersRequestBody** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md)| | [optional] + +### Return type + +[**ExportPlayersSuccessResponse**](ExportPlayersSuccessResponse.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FetchAliases** +> UserIdentityResponse FetchAliases (string appId, string subscriptionId) + + + +Lists all Aliases for the User identified by :subscription_id. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class FetchAliasesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var subscriptionId = "subscriptionId_example"; // string | + + try + { + UserIdentityResponse result = apiInstance.FetchAliases(appId, subscriptionId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.FetchAliases: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **subscriptionId** | **string**| | + +### Return type + +[**UserIdentityResponse**](UserIdentityResponse.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FetchUser** +> User FetchUser (string appId, string aliasLabel, string aliasId) + + + +Returns the User’s properties, Aliases, and Subscriptions. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class FetchUserExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | + + try + { + User result = apiInstance.FetchUser(appId, aliasLabel, aliasId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.FetchUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | + +### Return type + +[**User**](User.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **FetchUserIdentity** +> InlineResponse200 FetchUserIdentity (string appId, string aliasLabel, string aliasId) + + + +Lists all Aliases for the User identified by (:alias_label, :alias_id). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class FetchUserIdentityExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | + + try + { + InlineResponse200 result = apiInstance.FetchUserIdentity(appId, aliasLabel, aliasId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.FetchUserIdentity: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | -Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetApp** +> App GetApp (string appId) + +View an app + +View the details of a single OneSignal app ### Example ```csharp @@ -504,28 +1441,27 @@ using OneSignalApi.Model; namespace Example { - public class DeletePlayerExample + public class GetAppExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://onesignal.com/api/v1"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: user_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. - var playerId = "playerId_example"; // string | The OneSignal player_id + var appId = "appId_example"; // string | An app id try { - // Delete a user record - DeletePlayerSuccessResponse result = apiInstance.DeletePlayer(appId, playerId); + // View an app + App result = apiInstance.GetApp(appId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DeletePlayer: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetApp: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -538,16 +1474,15 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | - **playerId** | **string**| The OneSignal player_id | + **appId** | **string**| An app id | ### Return type -[**DeletePlayerSuccessResponse**](DeletePlayerSuccessResponse.md) +[**App**](App.md) ### Authorization -[app_key](../README.md#app_key) +[user_key](../README.md#user_key) ### HTTP request headers @@ -560,17 +1495,16 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | -| **404** | Not Found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteSegments** -> DeleteSegmentSuccessResponse DeleteSegments (string appId, string segmentId) + +# **GetApps** +> List<App> GetApps () -Delete Segments +View apps -Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. +View the details of all of your current OneSignal apps ### Example ```csharp @@ -582,28 +1516,26 @@ using OneSignalApi.Model; namespace Example { - public class DeleteSegmentsExample + public class GetAppsExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://onesignal.com/api/v1"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: user_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. - var segmentId = "segmentId_example"; // string | The segment_id can be found in the URL of the segment when viewing it in the dashboard. try { - // Delete Segments - DeleteSegmentSuccessResponse result = apiInstance.DeleteSegments(appId, segmentId); + // View apps + List result = apiInstance.GetApps(); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DeleteSegments: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetApps: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -613,19 +1545,15 @@ namespace Example ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | - **segmentId** | **string**| The segment_id can be found in the URL of the segment when viewing it in the dashboard. | +This endpoint does not need any parameter. ### Return type -[**DeleteSegmentSuccessResponse**](DeleteSegmentSuccessResponse.md) +[**List<App>**](App.md) ### Authorization -[app_key](../README.md#app_key) +[user_key](../README.md#user_key) ### HTTP request headers @@ -638,17 +1566,16 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | -| **404** | Not Found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **EndLiveActivity** -> void EndLiveActivity (string appId, string activityId, string subscriptionId) + +# **GetEligibleIams** +> InlineResponse2003 GetEligibleIams (string appId, string subscriptionId) -Stop Live Activity -Stops a Live Activity + +Manifest of In-App Messages the Subscription is eligible to display by the SDK. ### Example ```csharp @@ -660,7 +1587,7 @@ using OneSignalApi.Model; namespace Example { - public class EndLiveActivityExample + public class GetEligibleIamsExample { public static void Main() { @@ -670,18 +1597,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. - var activityId = "activityId_example"; // string | Live Activity record ID - var subscriptionId = "subscriptionId_example"; // string | Subscription ID + var appId = "appId_example"; // string | + var subscriptionId = "subscriptionId_example"; // string | try { - // Stop Live Activity - apiInstance.EndLiveActivity(appId, activityId, subscriptionId); + InlineResponse2003 result = apiInstance.GetEligibleIams(appId, subscriptionId); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.EndLiveActivity: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetEligibleIams: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -694,13 +1620,12 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | - **activityId** | **string**| Live Activity record ID | - **subscriptionId** | **string**| Subscription ID | + **appId** | **string**| | + **subscriptionId** | **string**| | ### Return type -void (empty response body) +[**InlineResponse2003**](InlineResponse2003.md) ### Authorization @@ -715,18 +1640,17 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | OK | - | -| **400** | Bad Request | - | +| **200** | OK | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ExportPlayers** -> ExportPlayersSuccessResponse ExportPlayers (string appId, ExportPlayersRequestBody exportPlayersRequestBody = null) + +# **GetNotification** +> NotificationWithMeta GetNotification (string appId, string notificationId) -CSV export +View notification -Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | +View the details of a single notification and outcomes associated with it ### Example ```csharp @@ -738,7 +1662,7 @@ using OneSignalApi.Model; namespace Example { - public class ExportPlayersExample + public class GetNotificationExample { public static void Main() { @@ -748,18 +1672,18 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The app ID that you want to export devices from - var exportPlayersRequestBody = new ExportPlayersRequestBody(); // ExportPlayersRequestBody | (optional) + var appId = "appId_example"; // string | + var notificationId = "notificationId_example"; // string | try { - // CSV export - ExportPlayersSuccessResponse result = apiInstance.ExportPlayers(appId, exportPlayersRequestBody); + // View notification + NotificationWithMeta result = apiInstance.GetNotification(appId, notificationId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ExportPlayers: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetNotification: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -772,12 +1696,12 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The app ID that you want to export devices from | - **exportPlayersRequestBody** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md)| | [optional] + **appId** | **string**| | + **notificationId** | **string**| | ### Return type -[**ExportPlayersSuccessResponse**](ExportPlayersSuccessResponse.md) +[**NotificationWithMeta**](NotificationWithMeta.md) ### Authorization @@ -785,7 +1709,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -797,13 +1721,13 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetApp** -> App GetApp (string appId) + +# **GetNotificationHistory** +> NotificationHistorySuccessResponse GetNotificationHistory (string notificationId, GetNotificationRequestBody getNotificationRequestBody) -View an app +Notification History -View the details of a single OneSignal app +-> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. 🚧 Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. ### Example ```csharp @@ -815,27 +1739,28 @@ using OneSignalApi.Model; namespace Example { - public class GetAppExample + public class GetNotificationHistoryExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://onesignal.com/api/v1"; - // Configure Bearer token for authorization: user_key + // Configure Bearer token for authorization: app_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | An app id + var notificationId = "notificationId_example"; // string | The \"id\" of the message found in the Notification object + var getNotificationRequestBody = new GetNotificationRequestBody(); // GetNotificationRequestBody | try { - // View an app - App result = apiInstance.GetApp(appId); + // Notification History + NotificationHistorySuccessResponse result = apiInstance.GetNotificationHistory(notificationId, getNotificationRequestBody); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetApp: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetNotificationHistory: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -848,19 +1773,20 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| An app id | + **notificationId** | **string**| The \"id\" of the message found in the Notification object | + **getNotificationRequestBody** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md)| | ### Return type -[**App**](App.md) +[**NotificationHistorySuccessResponse**](NotificationHistorySuccessResponse.md) ### Authorization -[user_key](../README.md#user_key) +[app_key](../README.md#app_key) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -872,13 +1798,13 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetApps** -> List<App> GetApps () + +# **GetNotifications** +> NotificationSlice GetNotifications (string appId, int? limit = null, int? offset = null, int? kind = null) -View apps +View notifications -View the details of all of your current OneSignal apps +View the details of multiple notifications ### Example ```csharp @@ -890,26 +1816,30 @@ using OneSignalApi.Model; namespace Example { - public class GetAppsExample + public class GetNotificationsExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://onesignal.com/api/v1"; - // Configure Bearer token for authorization: user_key + // Configure Bearer token for authorization: app_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | The app ID that you want to view notifications from + var limit = 56; // int? | How many notifications to return. Max is 50. Default is 50. (optional) + var offset = 56; // int? | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) + var kind = 0; // int? | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) try { - // View apps - List result = apiInstance.GetApps(); + // View notifications + NotificationSlice result = apiInstance.GetNotifications(appId, limit, offset, kind); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetApps: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetNotifications: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -919,15 +1849,21 @@ namespace Example ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| The app ID that you want to view notifications from | + **limit** | **int?**| How many notifications to return. Max is 50. Default is 50. | [optional] + **offset** | **int?**| Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | [optional] + **kind** | **int?**| Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | [optional] ### Return type -[**List<App>**](App.md) +[**NotificationSlice**](NotificationSlice.md) ### Authorization -[user_key](../README.md#user_key) +[app_key](../README.md#app_key) ### HTTP request headers @@ -943,13 +1879,13 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetNotification** -> NotificationWithMeta GetNotification (string appId, string notificationId) + +# **GetOutcomes** +> OutcomesData GetOutcomes (string appId, string outcomeNames, string outcomeNames2 = null, string outcomeTimeRange = null, string outcomePlatforms = null, string outcomeAttribution = null) -View notification +View Outcomes -View the details of a single notification and outcomes associated with it +View the details of all the outcomes associated with your app 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. ### Example ```csharp @@ -961,7 +1897,7 @@ using OneSignalApi.Model; namespace Example { - public class GetNotificationExample + public class GetOutcomesExample { public static void Main() { @@ -971,18 +1907,22 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | - var notificationId = "notificationId_example"; // string | + var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. + var outcomeNames = "outcomeNames_example"; // string | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + var outcomeNames2 = "outcomeNames_example"; // string | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + var outcomeTimeRange = "outcomeTimeRange_example"; // string | Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + var outcomePlatforms = "outcomePlatforms_example"; // string | Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + var outcomeAttribution = "outcomeAttribution_example"; // string | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) try { - // View notification - NotificationWithMeta result = apiInstance.GetNotification(appId, notificationId); + // View Outcomes + OutcomesData result = apiInstance.GetOutcomes(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetNotification: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetOutcomes: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -995,12 +1935,16 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| | - **notificationId** | **string**| | + **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | + **outcomeNames** | **string**| Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum | + **outcomeNames2** | **string**| Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. | [optional] + **outcomeTimeRange** | **string**| Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. | [optional] + **outcomePlatforms** | **string**| Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. | [optional] + **outcomeAttribution** | **string**| Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. | [optional] ### Return type -[**NotificationWithMeta**](NotificationWithMeta.md) +[**OutcomesData**](OutcomesData.md) ### Authorization @@ -1020,13 +1964,13 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetNotificationHistory** -> NotificationHistorySuccessResponse GetNotificationHistory (string notificationId, GetNotificationRequestBody getNotificationRequestBody) + +# **GetPlayer** +> Player GetPlayer (string appId, string playerId, string emailAuthHash = null) -Notification History +View device --> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. 🚧 Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. +View the details of an existing device in one of your OneSignal apps ### Example ```csharp @@ -1038,7 +1982,7 @@ using OneSignalApi.Model; namespace Example { - public class GetNotificationHistoryExample + public class GetPlayerExample { public static void Main() { @@ -1048,18 +1992,19 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var notificationId = "notificationId_example"; // string | The \"id\" of the message found in the Notification object - var getNotificationRequestBody = new GetNotificationRequestBody(); // GetNotificationRequestBody | + var appId = "appId_example"; // string | Your app_id for this device + var playerId = "playerId_example"; // string | Player's OneSignal ID + var emailAuthHash = "emailAuthHash_example"; // string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) try { - // Notification History - NotificationHistorySuccessResponse result = apiInstance.GetNotificationHistory(notificationId, getNotificationRequestBody); + // View device + Player result = apiInstance.GetPlayer(appId, playerId, emailAuthHash); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetNotificationHistory: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetPlayer: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1072,12 +2017,13 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **notificationId** | **string**| The \"id\" of the message found in the Notification object | - **getNotificationRequestBody** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md)| | + **appId** | **string**| Your app_id for this device | + **playerId** | **string**| Player's OneSignal ID | + **emailAuthHash** | **string**| Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] ### Return type -[**NotificationHistorySuccessResponse**](NotificationHistorySuccessResponse.md) +[**Player**](Player.md) ### Authorization @@ -1085,7 +2031,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -1097,13 +2043,13 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetNotifications** -> NotificationSlice GetNotifications (string appId, int? limit = null, int? offset = null, int? kind = null) + +# **GetPlayers** +> PlayerSlice GetPlayers (string appId, int? limit = null, int? offset = null) -View notifications +View devices -View the details of multiple notifications +View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. ### Example ```csharp @@ -1115,7 +2061,7 @@ using OneSignalApi.Model; namespace Example { - public class GetNotificationsExample + public class GetPlayersExample { public static void Main() { @@ -1125,20 +2071,19 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The app ID that you want to view notifications from - var limit = 56; // int? | How many notifications to return. Max is 50. Default is 50. (optional) - var offset = 56; // int? | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) - var kind = 0; // int? | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + var appId = "appId_example"; // string | The app ID that you want to view players from + var limit = 56; // int? | How many devices to return. Max is 300. Default is 300 (optional) + var offset = 56; // int? | Result offset. Default is 0. Results are sorted by id; (optional) try { - // View notifications - NotificationSlice result = apiInstance.GetNotifications(appId, limit, offset, kind); + // View devices + PlayerSlice result = apiInstance.GetPlayers(appId, limit, offset); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetNotifications: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetPlayers: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1151,14 +2096,13 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The app ID that you want to view notifications from | - **limit** | **int?**| How many notifications to return. Max is 50. Default is 50. | [optional] - **offset** | **int?**| Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | [optional] - **kind** | **int?**| Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | [optional] + **appId** | **string**| The app ID that you want to view players from | + **limit** | **int?**| How many devices to return. Max is 300. Default is 300 | [optional] + **offset** | **int?**| Result offset. Default is 0. Results are sorted by id; | [optional] ### Return type -[**NotificationSlice**](NotificationSlice.md) +[**PlayerSlice**](PlayerSlice.md) ### Authorization @@ -1178,13 +2122,13 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetOutcomes** -> OutcomesData GetOutcomes (string appId, string outcomeNames, string outcomeNames2 = null, string outcomeTimeRange = null, string outcomePlatforms = null, string outcomeAttribution = null) + +# **IdentifyUserByAlias** +> InlineResponse200 IdentifyUserByAlias (string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody) -View Outcomes -View the details of all the outcomes associated with your app 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + +Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). ### Example ```csharp @@ -1196,7 +2140,7 @@ using OneSignalApi.Model; namespace Example { - public class GetOutcomesExample + public class IdentifyUserByAliasExample { public static void Main() { @@ -1206,22 +2150,19 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. - var outcomeNames = "outcomeNames_example"; // string | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - var outcomeNames2 = "outcomeNames_example"; // string | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - var outcomeTimeRange = "outcomeTimeRange_example"; // string | Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - var outcomePlatforms = "outcomePlatforms_example"; // string | Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - var outcomeAttribution = "outcomeAttribution_example"; // string | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + var appId = "appId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | + var userIdentityRequestBody = new UserIdentityRequestBody(); // UserIdentityRequestBody | try { - // View Outcomes - OutcomesData result = apiInstance.GetOutcomes(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution); + InlineResponse200 result = apiInstance.IdentifyUserByAlias(appId, aliasLabel, aliasId, userIdentityRequestBody); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetOutcomes: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.IdentifyUserByAlias: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1234,16 +2175,14 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | - **outcomeNames** | **string**| Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum | - **outcomeNames2** | **string**| Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. | [optional] - **outcomeTimeRange** | **string**| Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. | [optional] - **outcomePlatforms** | **string**| Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. | [optional] - **outcomeAttribution** | **string**| Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. | [optional] + **appId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | + **userIdentityRequestBody** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md)| | ### Return type -[**OutcomesData**](OutcomesData.md) +[**InlineResponse200**](InlineResponse200.md) ### Authorization @@ -1251,7 +2190,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -1259,17 +2198,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | -| **400** | Bad Request | - | +| **409** | Conflict | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetPlayer** -> Player GetPlayer (string appId, string playerId, string emailAuthHash = null) + +# **IdentifyUserBySubscriptionId** +> UserIdentityResponse IdentifyUserBySubscriptionId (string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody) -View device -View the details of an existing device in one of your OneSignal apps + +Upserts one or more Aliases for the User identified by :subscription_id. ### Example ```csharp @@ -1281,7 +2220,7 @@ using OneSignalApi.Model; namespace Example { - public class GetPlayerExample + public class IdentifyUserBySubscriptionIdExample { public static void Main() { @@ -1291,19 +2230,18 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | Your app_id for this device - var playerId = "playerId_example"; // string | Player's OneSignal ID - var emailAuthHash = "emailAuthHash_example"; // string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + var appId = "appId_example"; // string | + var subscriptionId = "subscriptionId_example"; // string | + var userIdentityRequestBody = new UserIdentityRequestBody(); // UserIdentityRequestBody | try { - // View device - Player result = apiInstance.GetPlayer(appId, playerId, emailAuthHash); + UserIdentityResponse result = apiInstance.IdentifyUserBySubscriptionId(appId, subscriptionId, userIdentityRequestBody); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetPlayer: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.IdentifyUserBySubscriptionId: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1316,13 +2254,13 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| Your app_id for this device | - **playerId** | **string**| Player's OneSignal ID | - **emailAuthHash** | **string**| Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] + **appId** | **string**| | + **subscriptionId** | **string**| | + **userIdentityRequestBody** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md)| | ### Return type -[**Player**](Player.md) +[**UserIdentityResponse**](UserIdentityResponse.md) ### Authorization @@ -1330,7 +2268,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -1338,17 +2276,17 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | -| **400** | Bad Request | - | +| **409** | Conflict | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetPlayers** -> PlayerSlice GetPlayers (string appId, int? limit = null, int? offset = null) + +# **TransferSubscription** +> UserIdentityResponse TransferSubscription (string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody) -View devices -View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + +Transfers this Subscription to the User identified by the identity in the payload. ### Example ```csharp @@ -1360,7 +2298,7 @@ using OneSignalApi.Model; namespace Example { - public class GetPlayersExample + public class TransferSubscriptionExample { public static void Main() { @@ -1370,19 +2308,18 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The app ID that you want to view players from - var limit = 56; // int? | How many devices to return. Max is 300. Default is 300 (optional) - var offset = 56; // int? | Result offset. Default is 0. Results are sorted by id; (optional) + var appId = "appId_example"; // string | + var subscriptionId = "subscriptionId_example"; // string | + var transferSubscriptionRequestBody = new TransferSubscriptionRequestBody(); // TransferSubscriptionRequestBody | try { - // View devices - PlayerSlice result = apiInstance.GetPlayers(appId, limit, offset); + UserIdentityResponse result = apiInstance.TransferSubscription(appId, subscriptionId, transferSubscriptionRequestBody); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetPlayers: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.TransferSubscription: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1395,13 +2332,13 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The app ID that you want to view players from | - **limit** | **int?**| How many devices to return. Max is 300. Default is 300 | [optional] - **offset** | **int?**| Result offset. Default is 0. Results are sorted by id; | [optional] + **appId** | **string**| | + **subscriptionId** | **string**| | + **transferSubscriptionRequestBody** | [**TransferSubscriptionRequestBody**](TransferSubscriptionRequestBody.md)| | ### Return type -[**PlayerSlice**](PlayerSlice.md) +[**UserIdentityResponse**](UserIdentityResponse.md) ### Authorization @@ -1409,7 +2346,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -1417,7 +2354,6 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | -| **400** | Bad Request | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1729,7 +2665,161 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | -| **400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateSubscription** +> void UpdateSubscription (string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody) + + + +Updates an existing Subscription’s properties. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class UpdateSubscriptionExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var subscriptionId = "subscriptionId_example"; // string | + var updateSubscriptionRequestBody = new UpdateSubscriptionRequestBody(); // UpdateSubscriptionRequestBody | + + try + { + apiInstance.UpdateSubscription(appId, subscriptionId, updateSubscriptionRequestBody); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.UpdateSubscription: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **subscriptionId** | **string**| | + **updateSubscriptionRequestBody** | [**UpdateSubscriptionRequestBody**](UpdateSubscriptionRequestBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | ACCEPTED | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateUser** +> InlineResponse202 UpdateUser (string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest) + + + +Updates an existing User’s properties. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class UpdateUserExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var appId = "appId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | + var updateUserRequest = new UpdateUserRequest(); // UpdateUserRequest | + + try + { + InlineResponse202 result = apiInstance.UpdateUser(appId, aliasLabel, aliasId, updateUserRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.UpdateUser: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | + **updateUserRequest** | [**UpdateUserRequest**](UpdateUserRequest.md)| | + +### Return type + +[**InlineResponse202**](InlineResponse202.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | ACCEPTED | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/IdentifyUserConflictResponse.md b/docs/IdentifyUserConflictResponse.md new file mode 100644 index 0000000..7bddc69 --- /dev/null +++ b/docs/IdentifyUserConflictResponse.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.IdentifyUserConflictResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<IdentifyUserConflictResponseErrorsInner>**](IdentifyUserConflictResponseErrorsInner.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/IdentifyUserConflictResponseErrorsInner.md b/docs/IdentifyUserConflictResponseErrorsInner.md new file mode 100644 index 0000000..e19b69a --- /dev/null +++ b/docs/IdentifyUserConflictResponseErrorsInner.md @@ -0,0 +1,11 @@ +# OneSignalApi.Model.IdentifyUserConflictResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | | [optional] +**Title** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..4182276 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.InlineResponse200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **Dictionary<string, Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/InlineResponse2003.md b/docs/InlineResponse2003.md new file mode 100644 index 0000000..27919ec --- /dev/null +++ b/docs/InlineResponse2003.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.InlineResponse2003 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InAppMessages** | **List<Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md new file mode 100644 index 0000000..03b96ff --- /dev/null +++ b/docs/InlineResponse201.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.InlineResponse201 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/InlineResponse202.md b/docs/InlineResponse202.md new file mode 100644 index 0000000..d571f53 --- /dev/null +++ b/docs/InlineResponse202.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.InlineResponse202 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Properties** | [**PropertiesObject**](PropertiesObject.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/Notification.md b/docs/Notification.md index 495b534..7dfc880 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**TargetChannel** | **string** | | [optional] **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] **Name** | **string** | Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. | [optional] diff --git a/docs/NotificationTarget.md b/docs/NotificationTarget.md index 5ce7444..2ee6451 100644 --- a/docs/NotificationTarget.md +++ b/docs/NotificationTarget.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**TargetChannel** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 924398f..0f8a879 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**TargetChannel** | **string** | | [optional] **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] **Name** | **string** | Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. | [optional] diff --git a/docs/PlayerNotificationTarget.md b/docs/PlayerNotificationTarget.md index 7a5cd01..a8725fb 100644 --- a/docs/PlayerNotificationTarget.md +++ b/docs/PlayerNotificationTarget.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] **IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**TargetChannel** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlayerNotificationTargetIncludeAliases.md b/docs/PlayerNotificationTargetIncludeAliases.md new file mode 100644 index 0000000..4dc5562 --- /dev/null +++ b/docs/PlayerNotificationTargetIncludeAliases.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.PlayerNotificationTargetIncludeAliases + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AliasLabel** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PropertiesDeltas.md b/docs/PropertiesDeltas.md new file mode 100644 index 0000000..4787e45 --- /dev/null +++ b/docs/PropertiesDeltas.md @@ -0,0 +1,12 @@ +# OneSignalApi.Model.PropertiesDeltas + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SessionTime** | **decimal** | | [optional] +**SessionCount** | **decimal** | | [optional] +**Purchases** | [**List<Purchase>**](Purchase.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PropertiesObject.md b/docs/PropertiesObject.md new file mode 100644 index 0000000..3270b93 --- /dev/null +++ b/docs/PropertiesObject.md @@ -0,0 +1,20 @@ +# OneSignalApi.Model.PropertiesObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tags** | **Dictionary<string, Object>** | | [optional] +**Language** | **string** | | [optional] +**TimezoneId** | **string** | | [optional] +**Lat** | **decimal** | | [optional] +**Long** | **decimal** | | [optional] +**Country** | **string** | | [optional] +**FirstActive** | **decimal** | | [optional] +**LastActive** | **decimal** | | [optional] +**AmountSpent** | **decimal** | | [optional] +**Purchases** | [**List<Purchase>**](Purchase.md) | | [optional] +**Ip** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/Purchase.md b/docs/Purchase.md index 8180ac7..d378a5b 100644 --- a/docs/Purchase.md +++ b/docs/Purchase.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Sku** | **string** | The unique identifier of the purchased item. | -**Amount** | **decimal** | The amount, in USD, spent purchasing the item. | +**Amount** | **string** | The amount, in USD, spent purchasing the item. | **Iso** | **string** | The 3-letter ISO 4217 currency code. Required for correct storage and conversion of amount. | +**Count** | **decimal** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubscriptionObject.md b/docs/SubscriptionObject.md new file mode 100644 index 0000000..96ff478 --- /dev/null +++ b/docs/SubscriptionObject.md @@ -0,0 +1,26 @@ +# OneSignalApi.Model.SubscriptionObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**Type** | **string** | | [optional] +**Token** | **string** | | [optional] +**Enabled** | **bool** | | [optional] +**NotificationTypes** | **decimal** | | [optional] +**SessionTime** | **decimal** | | [optional] +**SessionCount** | **decimal** | | [optional] +**Sdk** | **string** | | [optional] +**DeviceModel** | **string** | | [optional] +**DeviceOs** | **string** | | [optional] +**Rooted** | **bool** | | [optional] +**TestType** | **decimal** | | [optional] +**AppVersion** | **string** | | [optional] +**NetType** | **decimal** | | [optional] +**Carrier** | **string** | | [optional] +**WebAuth** | **string** | | [optional] +**WebP256** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/TransferSubscriptionRequestBody.md b/docs/TransferSubscriptionRequestBody.md new file mode 100644 index 0000000..0f225bb --- /dev/null +++ b/docs/TransferSubscriptionRequestBody.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.TransferSubscriptionRequestBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **Dictionary<string, Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSubscriptionRequestBody.md b/docs/UpdateSubscriptionRequestBody.md new file mode 100644 index 0000000..dd8cb9b --- /dev/null +++ b/docs/UpdateSubscriptionRequestBody.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.UpdateSubscriptionRequestBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateUserRequest.md b/docs/UpdateUserRequest.md new file mode 100644 index 0000000..2d8b95a --- /dev/null +++ b/docs/UpdateUserRequest.md @@ -0,0 +1,12 @@ +# OneSignalApi.Model.UpdateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Properties** | [**PropertiesObject**](PropertiesObject.md) | | [optional] +**RefreshDeviceMetadata** | **bool** | | [optional] [default to false] +**Deltas** | [**PropertiesDeltas**](PropertiesDeltas.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/User.md b/docs/User.md new file mode 100644 index 0000000..926913f --- /dev/null +++ b/docs/User.md @@ -0,0 +1,13 @@ +# OneSignalApi.Model.User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Properties** | [**PropertiesObject**](PropertiesObject.md) | | [optional] +**Identity** | **Dictionary<string, Object>** | | [optional] +**Subscriptions** | [**List<SubscriptionObject>**](SubscriptionObject.md) | | [optional] +**SubscriptionOptions** | [**UserSubscriptionOptions**](UserSubscriptionOptions.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UserIdentityRequestBody.md b/docs/UserIdentityRequestBody.md new file mode 100644 index 0000000..c43ae81 --- /dev/null +++ b/docs/UserIdentityRequestBody.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.UserIdentityRequestBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **Dictionary<string, Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UserIdentityResponse.md b/docs/UserIdentityResponse.md new file mode 100644 index 0000000..05a665d --- /dev/null +++ b/docs/UserIdentityResponse.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.UserIdentityResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **Dictionary<string, Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UserSubscriptionOptions.md b/docs/UserSubscriptionOptions.md new file mode 100644 index 0000000..cdefd17 --- /dev/null +++ b/docs/UserSubscriptionOptions.md @@ -0,0 +1,10 @@ +# OneSignalApi.Model.UserSubscriptionOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RetainPreviousOwner** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/src/OneSignalApi/Api/DefaultApi.cs b/src/OneSignalApi/Api/DefaultApi.cs index c4dff58..bddc775 100644 --- a/src/OneSignalApi/Api/DefaultApi.cs +++ b/src/OneSignalApi/Api/DefaultApi.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -174,6 +174,89 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of CreateSegmentSuccessResponse ApiResponse CreateSegmentsWithHttpInfo(string appId, Segment segment = default(Segment), int operationIndex = 0); /// + /// + /// + /// + /// Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// InlineResponse201 + InlineResponse201 CreateSubscription(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0); + + /// + /// + /// + /// + /// Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of InlineResponse201 + ApiResponse CreateSubscriptionWithHttpInfo(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0); + /// + /// + /// + /// + /// Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// User + User CreateUser(string appId, User user, int operationIndex = 0); + + /// + /// + /// + /// + /// Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of User + ApiResponse CreateUserWithHttpInfo(string appId, User user, int operationIndex = 0); + /// + /// + /// + /// + /// Deletes an alias by alias label + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// InlineResponse200 + InlineResponse200 DeleteAlias(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0); + + /// + /// + /// + /// + /// Deletes an alias by alias label + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of InlineResponse200 + ApiResponse DeleteAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0); + /// /// Delete a user record /// /// @@ -224,6 +307,58 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of DeleteSegmentSuccessResponse ApiResponse DeleteSegmentsWithHttpInfo(string appId, string segmentId, int operationIndex = 0); /// + /// + /// + /// + /// Deletes the Subscription. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// + void DeleteSubscription(string appId, string subscriptionId, int operationIndex = 0); + + /// + /// + /// + /// + /// Deletes the Subscription. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteSubscriptionWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0); + /// + /// + /// + /// + /// Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// + void DeleteUser(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + + /// + /// + /// + /// + /// Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + /// /// Stop Live Activity /// /// @@ -276,6 +411,85 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of ExportPlayersSuccessResponse ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0); /// + /// + /// + /// + /// Lists all Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// UserIdentityResponse + UserIdentityResponse FetchAliases(string appId, string subscriptionId, int operationIndex = 0); + + /// + /// + /// + /// + /// Lists all Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of UserIdentityResponse + ApiResponse FetchAliasesWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0); + /// + /// + /// + /// + /// Returns the User’s properties, Aliases, and Subscriptions. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// User + User FetchUser(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + + /// + /// + /// + /// + /// Returns the User’s properties, Aliases, and Subscriptions. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of User + ApiResponse FetchUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + /// + /// + /// + /// + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// InlineResponse200 + InlineResponse200 FetchUserIdentity(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + + /// + /// + /// + /// + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of InlineResponse200 + ApiResponse FetchUserIdentityWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + /// /// View an app /// /// @@ -320,6 +534,31 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of List<App> ApiResponse> GetAppsWithHttpInfo(int operationIndex = 0); /// + /// + /// + /// + /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// InlineResponse2003 + InlineResponse2003 GetEligibleIams(string appId, string subscriptionId, int operationIndex = 0); + + /// + /// + /// + /// + /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of InlineResponse2003 + ApiResponse GetEligibleIamsWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0); + /// /// View notification /// /// @@ -486,6 +725,89 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of PlayerSlice ApiResponse GetPlayersWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0); /// + /// + /// + /// + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// InlineResponse200 + InlineResponse200 IdentifyUserByAlias(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0); + + /// + /// + /// + /// + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of InlineResponse200 + ApiResponse IdentifyUserByAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0); + /// + /// + /// + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// UserIdentityResponse + UserIdentityResponse IdentifyUserBySubscriptionId(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0); + + /// + /// + /// + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of UserIdentityResponse + ApiResponse IdentifyUserBySubscriptionIdWithHttpInfo(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0); + /// + /// + /// + /// + /// Transfers this Subscription to the User identified by the identity in the payload. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// UserIdentityResponse + UserIdentityResponse TransferSubscription(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0); + + /// + /// + /// + /// + /// Transfers this Subscription to the User identified by the identity in the payload. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of UserIdentityResponse + ApiResponse TransferSubscriptionWithHttpInfo(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0); + /// /// Update an app /// /// @@ -589,6 +911,62 @@ public interface IDefaultApiSync : IApiAccessor /// Index associated with the operation. /// ApiResponse of UpdatePlayerTagsSuccessResponse ApiResponse UpdatePlayerTagsWithHttpInfo(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0); + /// + /// + /// + /// + /// Updates an existing Subscription’s properties. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// + void UpdateSubscription(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0); + + /// + /// + /// + /// + /// Updates an existing Subscription’s properties. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse UpdateSubscriptionWithHttpInfo(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0); + /// + /// + /// + /// + /// Updates an existing User’s properties. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// InlineResponse202 + InlineResponse202 UpdateUser(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0); + + /// + /// + /// + /// + /// Updates an existing User’s properties. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of InlineResponse202 + ApiResponse UpdateUserWithHttpInfo(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0); #endregion Synchronous Operations } @@ -757,83 +1135,228 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse (CreateSegmentSuccessResponse) System.Threading.Tasks.Task> CreateSegmentsWithHttpInfoAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete a user record + /// /// /// - /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of DeletePlayerSuccessResponse - System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of InlineResponse201 + System.Threading.Tasks.Task CreateSubscriptionAsync(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete a user record + /// /// /// - /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (DeletePlayerSuccessResponse) - System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (InlineResponse201) + System.Threading.Tasks.Task> CreateSubscriptionWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete Segments + /// /// /// - /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of DeleteSegmentSuccessResponse - System.Threading.Tasks.Task DeleteSegmentsAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of User + System.Threading.Tasks.Task CreateUserAsync(string appId, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete Segments + /// /// /// - /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (DeleteSegmentSuccessResponse) - System.Threading.Tasks.Task> DeleteSegmentsWithHttpInfoAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (User) + System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(string appId, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Stop Live Activity + /// /// /// - /// Stops a Live Activity + /// Deletes an alias by alias label /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task EndLiveActivityAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of InlineResponse200 + System.Threading.Tasks.Task DeleteAliasAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Stop Live Activity + /// /// /// - /// Stops a Live Activity + /// Deletes an alias by alias label /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID + /// + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponse200) + System.Threading.Tasks.Task> DeleteAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete a user record + /// + /// + /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The OneSignal player_id + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DeletePlayerSuccessResponse + System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete a user record + /// + /// + /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The OneSignal player_id + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeletePlayerSuccessResponse) + System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete Segments + /// + /// + /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of DeleteSegmentSuccessResponse + System.Threading.Tasks.Task DeleteSegmentsAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete Segments + /// + /// + /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeleteSegmentSuccessResponse) + System.Threading.Tasks.Task> DeleteSegmentsWithHttpInfoAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Deletes the Subscription. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteSubscriptionAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Deletes the Subscription. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteUserAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Stop Live Activity + /// + /// + /// Stops a Live Activity + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// Subscription ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task EndLiveActivityAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Stop Live Activity + /// + /// + /// Stops a Live Activity + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID /// Subscription ID /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -867,6 +1390,91 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse (ExportPlayersSuccessResponse) System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// + /// + /// + /// + /// Lists all Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UserIdentityResponse + System.Threading.Tasks.Task FetchAliasesAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Lists all Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UserIdentityResponse) + System.Threading.Tasks.Task> FetchAliasesWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Returns the User’s properties, Aliases, and Subscriptions. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of User + System.Threading.Tasks.Task FetchUserAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Returns the User’s properties, Aliases, and Subscriptions. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (User) + System.Threading.Tasks.Task> FetchUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InlineResponse200 + System.Threading.Tasks.Task FetchUserIdentityAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponse200) + System.Threading.Tasks.Task> FetchUserIdentityWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// View an app /// /// @@ -915,6 +1523,33 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse (List<App>) System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// + /// + /// + /// + /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InlineResponse2003 + System.Threading.Tasks.Task GetEligibleIamsAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponse2003) + System.Threading.Tasks.Task> GetEligibleIamsWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// View notification /// /// @@ -1093,6 +1728,95 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse (PlayerSlice) System.Threading.Tasks.Task> GetPlayersWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// + /// + /// + /// + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InlineResponse200 + System.Threading.Tasks.Task IdentifyUserByAliasAsync(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponse200) + System.Threading.Tasks.Task> IdentifyUserByAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UserIdentityResponse + System.Threading.Tasks.Task IdentifyUserBySubscriptionIdAsync(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UserIdentityResponse) + System.Threading.Tasks.Task> IdentifyUserBySubscriptionIdWithHttpInfoAsync(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Transfers this Subscription to the User identified by the identity in the payload. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UserIdentityResponse + System.Threading.Tasks.Task TransferSubscriptionAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Transfers this Subscription to the User identified by the identity in the payload. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UserIdentityResponse) + System.Threading.Tasks.Task> TransferSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Update an app /// /// @@ -1204,24 +1928,84 @@ public interface IDefaultApiAsync : IApiAccessor /// Cancellation Token to cancel the request. /// Task of ApiResponse (UpdatePlayerTagsSuccessResponse) System.Threading.Tasks.Task> UpdatePlayerTagsWithHttpInfoAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IDefaultApi : IDefaultApiSync, IDefaultApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class DefaultApi : IDefaultApi - { - private OneSignalApi.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - + /// + /// + /// + /// + /// Updates an existing Subscription’s properties. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task UpdateSubscriptionAsync(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Updates an existing Subscription’s properties. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Updates an existing User’s properties. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InlineResponse202 + System.Threading.Tasks.Task UpdateUserAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Updates an existing User’s properties. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponse202) + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDefaultApi : IDefaultApiSync, IDefaultApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class DefaultApi : IDefaultApi + { + private OneSignalApi.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + /// /// Initializes a new instance of the class. /// @@ -2329,44 +3113,61 @@ public OneSignalApi.Client.ApiResponse CreatePlayer } /// - /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// + /// + /// + /// /// Index associated with the operation. - /// DeletePlayerSuccessResponse - public DeletePlayerSuccessResponse DeletePlayer(string appId, string playerId, int operationIndex = 0) + /// InlineResponse201 + public InlineResponse201 CreateSubscription(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = DeletePlayerWithHttpInfo(appId, playerId); + OneSignalApi.Client.ApiResponse localVarResponse = CreateSubscriptionWithHttpInfo(appId, aliasLabel, aliasId, createSubscriptionRequestBody); return localVarResponse.Data; } /// - /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of DeletePlayerSuccessResponse - public OneSignalApi.Client.ApiResponse DeletePlayerWithHttpInfo(string appId, string playerId, int operationIndex = 0) + /// ApiResponse of InlineResponse201 + public OneSignalApi.Client.ApiResponse CreateSubscriptionWithHttpInfo(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeletePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateSubscription"); } - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->DeletePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->CreateSubscription"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->CreateSubscription"); + } + + // verify the required parameter 'createSubscriptionRequestBody' is set + if (createSubscriptionRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'createSubscriptionRequestBody' when calling DefaultApi->CreateSubscription"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -2386,10 +3187,12 @@ public OneSignalApi.Client.ApiResponse DeletePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = createSubscriptionRequestBody; - localVarRequestOptions.Operation = "DefaultApi.DeletePlayer"; + localVarRequestOptions.Operation = "DefaultApi.CreateSubscription"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -2400,10 +3203,10 @@ public OneSignalApi.Client.ApiResponse DeletePlayer } // make the HTTP request - var localVarResponse = this.Client.Delete("/players/{player_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("DeletePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateSubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -2414,47 +3217,64 @@ public OneSignalApi.Client.ApiResponse DeletePlayer } /// - /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of DeletePlayerSuccessResponse - public async System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of InlineResponse201 + public async System.Threading.Tasks.Task CreateSubscriptionAsync(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await DeletePlayerWithHttpInfoAsync(appId, playerId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CreateSubscriptionWithHttpInfoAsync(appId, aliasLabel, aliasId, createSubscriptionRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (DeletePlayerSuccessResponse) - public async System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (InlineResponse201) + public async System.Threading.Tasks.Task> CreateSubscriptionWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeletePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateSubscription"); } - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->DeletePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->CreateSubscription"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->CreateSubscription"); + } + + // verify the required parameter 'createSubscriptionRequestBody' is set + if (createSubscriptionRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'createSubscriptionRequestBody' when calling DefaultApi->CreateSubscription"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -2474,10 +3294,12 @@ public OneSignalApi.Client.ApiResponse DeletePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = createSubscriptionRequestBody; - localVarRequestOptions.Operation = "DefaultApi.DeletePlayer"; + localVarRequestOptions.Operation = "DefaultApi.CreateSubscription"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -2488,11 +3310,11 @@ public OneSignalApi.Client.ApiResponse DeletePlayer } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("DeletePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateSubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -2503,44 +3325,45 @@ public OneSignalApi.Client.ApiResponse DeletePlayer } /// - /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// + /// /// Index associated with the operation. - /// DeleteSegmentSuccessResponse - public DeleteSegmentSuccessResponse DeleteSegments(string appId, string segmentId, int operationIndex = 0) + /// User + public User CreateUser(string appId, User user, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = DeleteSegmentsWithHttpInfo(appId, segmentId); + OneSignalApi.Client.ApiResponse localVarResponse = CreateUserWithHttpInfo(appId, user); return localVarResponse.Data; } /// - /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// + /// /// Index associated with the operation. - /// ApiResponse of DeleteSegmentSuccessResponse - public OneSignalApi.Client.ApiResponse DeleteSegmentsWithHttpInfo(string appId, string segmentId, int operationIndex = 0) + /// ApiResponse of User + public OneSignalApi.Client.ApiResponse CreateUserWithHttpInfo(string appId, User user, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSegments"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateUser"); } - // verify the required parameter 'segmentId' is set - if (segmentId == null) + // verify the required parameter 'user' is set + if (user == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'segmentId' when calling DefaultApi->DeleteSegments"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'user' when calling DefaultApi->CreateUser"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -2561,9 +3384,9 @@ public OneSignalApi.Client.ApiResponse DeleteSegme } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("segment_id", OneSignalApi.Client.ClientUtils.ParameterToString(segmentId)); // path parameter + localVarRequestOptions.Data = user; - localVarRequestOptions.Operation = "DefaultApi.DeleteSegments"; + localVarRequestOptions.Operation = "DefaultApi.CreateUser"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -2574,10 +3397,10 @@ public OneSignalApi.Client.ApiResponse DeleteSegme } // make the HTTP request - var localVarResponse = this.Client.Delete("/apps/{app_id}/segments/{segment_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/apps/{app_id}/users", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("DeleteSegments", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); if (_exception != null) { throw _exception; @@ -2588,47 +3411,48 @@ public OneSignalApi.Client.ApiResponse DeleteSegme } /// - /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of DeleteSegmentSuccessResponse - public async System.Threading.Tasks.Task DeleteSegmentsAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of User + public async System.Threading.Tasks.Task CreateUserAsync(string appId, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await DeleteSegmentsWithHttpInfoAsync(appId, segmentId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CreateUserWithHttpInfoAsync(appId, user, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (DeleteSegmentSuccessResponse) - public async System.Threading.Tasks.Task> DeleteSegmentsWithHttpInfoAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (User) + public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(string appId, User user, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSegments"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateUser"); } - // verify the required parameter 'segmentId' is set - if (segmentId == null) + // verify the required parameter 'user' is set + if (user == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'segmentId' when calling DefaultApi->DeleteSegments"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'user' when calling DefaultApi->CreateUser"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -2649,9 +3473,9 @@ public OneSignalApi.Client.ApiResponse DeleteSegme } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("segment_id", OneSignalApi.Client.ClientUtils.ParameterToString(segmentId)); // path parameter + localVarRequestOptions.Data = user; - localVarRequestOptions.Operation = "DefaultApi.DeleteSegments"; + localVarRequestOptions.Operation = "DefaultApi.CreateUser"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -2662,11 +3486,11 @@ public OneSignalApi.Client.ApiResponse DeleteSegme } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/segments/{segment_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/users", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("DeleteSegments", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); if (_exception != null) { throw _exception; @@ -2677,46 +3501,55 @@ public OneSignalApi.Client.ApiResponse DeleteSegme } /// - /// Stop Live Activity Stops a Live Activity + /// Deletes an alias by alias label /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// + /// + /// + /// /// Index associated with the operation. - /// - public void EndLiveActivity(string appId, string activityId, string subscriptionId, int operationIndex = 0) + /// InlineResponse200 + public InlineResponse200 DeleteAlias(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0) { - EndLiveActivityWithHttpInfo(appId, activityId, subscriptionId); + OneSignalApi.Client.ApiResponse localVarResponse = DeleteAliasWithHttpInfo(appId, aliasLabel, aliasId, aliasLabelToDelete); + return localVarResponse.Data; } /// - /// Stop Live Activity Stops a Live Activity + /// Deletes an alias by alias label /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of Object(void) - public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(string appId, string activityId, string subscriptionId, int operationIndex = 0) + /// ApiResponse of InlineResponse200 + public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteAlias"); } - // verify the required parameter 'activityId' is set - if (activityId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->DeleteAlias"); } - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) + // verify the required parameter 'aliasId' is set + if (aliasId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->DeleteAlias"); + } + + // verify the required parameter 'aliasLabelToDelete' is set + if (aliasLabelToDelete == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabelToDelete' when calling DefaultApi->DeleteAlias"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -2742,10 +3575,11 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label_to_delete", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabelToDelete)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.EndLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.DeleteAlias"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -2756,10 +3590,10 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } // make the HTTP request - var localVarResponse = this.Client.Delete("/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("EndLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteAlias", localVarResponse); if (_exception != null) { throw _exception; @@ -2770,48 +3604,57 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// Stop Live Activity Stops a Live Activity + /// Deletes an alias by alias label /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task EndLiveActivityAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of InlineResponse200 + public async System.Threading.Tasks.Task DeleteAliasAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await EndLiveActivityWithHttpInfoAsync(appId, activityId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await DeleteAliasWithHttpInfoAsync(appId, aliasLabel, aliasId, aliasLabelToDelete, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// - /// Stop Live Activity Stops a Live Activity + /// Deletes an alias by alias label /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> EndLiveActivityWithHttpInfoAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (InlineResponse200) + public async System.Threading.Tasks.Task> DeleteAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteAlias"); } - // verify the required parameter 'activityId' is set - if (activityId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->DeleteAlias"); } - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) + // verify the required parameter 'aliasId' is set + if (aliasId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->DeleteAlias"); + } + + // verify the required parameter 'aliasLabelToDelete' is set + if (aliasLabelToDelete == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabelToDelete' when calling DefaultApi->DeleteAlias"); } @@ -2838,10 +3681,11 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label_to_delete", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabelToDelete)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.EndLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.DeleteAlias"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -2852,11 +3696,11 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("EndLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteAlias", localVarResponse); if (_exception != null) { throw _exception; @@ -2867,39 +3711,44 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. /// /// Thrown when fails to make API call - /// The app ID that you want to export devices from - /// (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The OneSignal player_id /// Index associated with the operation. - /// ExportPlayersSuccessResponse - public ExportPlayersSuccessResponse ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) + /// DeletePlayerSuccessResponse + public DeletePlayerSuccessResponse DeletePlayer(string appId, string playerId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = ExportPlayersWithHttpInfo(appId, exportPlayersRequestBody); + OneSignalApi.Client.ApiResponse localVarResponse = DeletePlayerWithHttpInfo(appId, playerId); return localVarResponse.Data; } /// - /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. /// /// Thrown when fails to make API call - /// The app ID that you want to export devices from - /// (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The OneSignal player_id /// Index associated with the operation. - /// ApiResponse of ExportPlayersSuccessResponse - public OneSignalApi.Client.ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) + /// ApiResponse of DeletePlayerSuccessResponse + public OneSignalApi.Client.ApiResponse DeletePlayerWithHttpInfo(string appId, string playerId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportPlayers"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeletePlayer"); + } + + // verify the required parameter 'playerId' is set + if (playerId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->DeletePlayer"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -2919,10 +3768,10 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = exportPlayersRequestBody; + localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - localVarRequestOptions.Operation = "DefaultApi.ExportPlayers"; + localVarRequestOptions.Operation = "DefaultApi.DeletePlayer"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -2933,10 +3782,10 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } // make the HTTP request - var localVarResponse = this.Client.Post("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/players/{player_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ExportPlayers", localVarResponse); + Exception _exception = this.ExceptionFactory("DeletePlayer", localVarResponse); if (_exception != null) { throw _exception; @@ -2947,42 +3796,47 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. /// /// Thrown when fails to make API call - /// The app ID that you want to export devices from - /// (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The OneSignal player_id /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ExportPlayersSuccessResponse - public async System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of DeletePlayerSuccessResponse + public async System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await ExportPlayersWithHttpInfoAsync(appId, exportPlayersRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await DeletePlayerWithHttpInfoAsync(appId, playerId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. /// /// Thrown when fails to make API call - /// The app ID that you want to export devices from - /// (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The OneSignal player_id /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ExportPlayersSuccessResponse) - public async System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (DeletePlayerSuccessResponse) + public async System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportPlayers"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeletePlayer"); + } + + // verify the required parameter 'playerId' is set + if (playerId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->DeletePlayer"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -3002,10 +3856,10 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = exportPlayersRequestBody; + localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - localVarRequestOptions.Operation = "DefaultApi.ExportPlayers"; + localVarRequestOptions.Operation = "DefaultApi.DeletePlayer"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -3016,11 +3870,11 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ExportPlayers", localVarResponse); + Exception _exception = this.ExceptionFactory("DeletePlayer", localVarResponse); if (_exception != null) { throw _exception; @@ -3031,31 +3885,39 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// View an app View the details of a single OneSignal app + /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call - /// An app id + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. - /// App - public App GetApp(string appId, int operationIndex = 0) + /// DeleteSegmentSuccessResponse + public DeleteSegmentSuccessResponse DeleteSegments(string appId, string segmentId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetAppWithHttpInfo(appId); + OneSignalApi.Client.ApiResponse localVarResponse = DeleteSegmentsWithHttpInfo(appId, segmentId); return localVarResponse.Data; } /// - /// View an app View the details of a single OneSignal app + /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call - /// An app id + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. - /// ApiResponse of App - public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int operationIndex = 0) + /// ApiResponse of DeleteSegmentSuccessResponse + public OneSignalApi.Client.ApiResponse DeleteSegmentsWithHttpInfo(string appId, string segmentId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSegments"); + } + + // verify the required parameter 'segmentId' is set + if (segmentId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'segmentId' when calling DefaultApi->DeleteSegments"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -3081,11 +3943,12 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("segment_id", OneSignalApi.Client.ClientUtils.ParameterToString(segmentId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetApp"; + localVarRequestOptions.Operation = "DefaultApi.DeleteSegments"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (app_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3093,10 +3956,10 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int } // make the HTTP request - var localVarResponse = this.Client.Get("/apps/{app_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/apps/{app_id}/segments/{segment_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetApp", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteSegments", localVarResponse); if (_exception != null) { throw _exception; @@ -3107,33 +3970,41 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int } /// - /// View an app View the details of a single OneSignal app + /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call - /// An app id + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of App - public async System.Threading.Tasks.Task GetAppAsync(string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of DeleteSegmentSuccessResponse + public async System.Threading.Tasks.Task DeleteSegmentsAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetAppWithHttpInfoAsync(appId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await DeleteSegmentsWithHttpInfoAsync(appId, segmentId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// View an app View the details of a single OneSignal app + /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call - /// An app id + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (App) - public async System.Threading.Tasks.Task> GetAppWithHttpInfoAsync(string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (DeleteSegmentSuccessResponse) + public async System.Threading.Tasks.Task> DeleteSegmentsWithHttpInfoAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSegments"); + } + + // verify the required parameter 'segmentId' is set + if (segmentId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'segmentId' when calling DefaultApi->DeleteSegments"); } @@ -3160,11 +4031,12 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("segment_id", OneSignalApi.Client.ClientUtils.ParameterToString(segmentId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetApp"; + localVarRequestOptions.Operation = "DefaultApi.DeleteSegments"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (app_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3172,11 +4044,11 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/segments/{segment_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetApp", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteSegments", localVarResponse); if (_exception != null) { throw _exception; @@ -3187,25 +4059,40 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int } /// - /// View apps View the details of all of your current OneSignal apps + /// Deletes the Subscription. /// /// Thrown when fails to make API call + /// + /// /// Index associated with the operation. - /// List<App> - public List GetApps(int operationIndex = 0) + /// + public void DeleteSubscription(string appId, string subscriptionId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse> localVarResponse = GetAppsWithHttpInfo(); - return localVarResponse.Data; + DeleteSubscriptionWithHttpInfo(appId, subscriptionId); } /// - /// View apps View the details of all of your current OneSignal apps + /// Deletes the Subscription. /// /// Thrown when fails to make API call + /// + /// /// Index associated with the operation. - /// ApiResponse of List<App> - public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operationIndex = 0) + /// ApiResponse of Object(void) + public OneSignalApi.Client.ApiResponse DeleteSubscriptionWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0) { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSubscription"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->DeleteSubscription"); + } + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -3213,7 +4100,6 @@ public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operat // to determine the Accept header string[] _accepts = new string[] { - "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -3228,11 +4114,13 @@ public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operat localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetApps"; + localVarRequestOptions.Operation = "DefaultApi.DeleteSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (app_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3240,10 +4128,10 @@ public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operat } // make the HTTP request - var localVarResponse = this.Client.Get>("/apps", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/apps/{app_id}/subscriptions/{subscription_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetApps", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteSubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -3254,27 +4142,42 @@ public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operat } /// - /// View apps View the details of all of your current OneSignal apps + /// Deletes the Subscription. /// /// Thrown when fails to make API call + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of List<App> - public async System.Threading.Tasks.Task> GetAppsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of void + public async System.Threading.Tasks.Task DeleteSubscriptionAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse> localVarResponse = await GetAppsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + await DeleteSubscriptionWithHttpInfoAsync(appId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); } /// - /// View apps View the details of all of your current OneSignal apps + /// Deletes the Subscription. /// /// Thrown when fails to make API call + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<App>) - public async System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSubscription"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->DeleteSubscription"); + } + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -3283,7 +4186,6 @@ public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operat // to determine the Accept header string[] _accepts = new string[] { - "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -3298,11 +4200,13 @@ public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operat localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetApps"; + localVarRequestOptions.Operation = "DefaultApi.DeleteSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (app_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3310,11 +4214,11 @@ public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operat } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/apps", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/subscriptions/{subscription_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetApps", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteSubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -3325,39 +4229,46 @@ public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operat } /// - /// View notification View the details of a single notification and outcomes associated with it + /// Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases /// /// Thrown when fails to make API call /// - /// + /// + /// /// Index associated with the operation. - /// NotificationWithMeta - public NotificationWithMeta GetNotification(string appId, string notificationId, int operationIndex = 0) + /// + public void DeleteUser(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationWithHttpInfo(appId, notificationId); - return localVarResponse.Data; + DeleteUserWithHttpInfo(appId, aliasLabel, aliasId); } /// - /// View notification View the details of a single notification and outcomes associated with it + /// Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases /// /// Thrown when fails to make API call /// - /// + /// + /// /// Index associated with the operation. - /// ApiResponse of NotificationWithMeta - public OneSignalApi.Client.ApiResponse GetNotificationWithHttpInfo(string appId, string notificationId, int operationIndex = 0) + /// ApiResponse of Object(void) + public OneSignalApi.Client.ApiResponse DeleteUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteUser"); } - // verify the required parameter 'notificationId' is set - if (notificationId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->DeleteUser"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->DeleteUser"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -3367,7 +4278,6 @@ public OneSignalApi.Client.ApiResponse GetNotificationWith // to determine the Accept header string[] _accepts = new string[] { - "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -3382,24 +4292,19 @@ public OneSignalApi.Client.ApiResponse GetNotificationWith localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetNotification"; + localVarRequestOptions.Operation = "DefaultApi.DeleteUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } // make the HTTP request - var localVarResponse = this.Client.Get("/notifications/{notification_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetNotification", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteUser", localVarResponse); if (_exception != null) { throw _exception; @@ -3410,41 +4315,48 @@ public OneSignalApi.Client.ApiResponse GetNotificationWith } /// - /// View notification View the details of a single notification and outcomes associated with it + /// Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases /// /// Thrown when fails to make API call /// - /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of NotificationWithMeta - public async System.Threading.Tasks.Task GetNotificationAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of void + public async System.Threading.Tasks.Task DeleteUserAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationWithHttpInfoAsync(appId, notificationId, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + await DeleteUserWithHttpInfoAsync(appId, aliasLabel, aliasId, operationIndex, cancellationToken).ConfigureAwait(false); } /// - /// View notification View the details of a single notification and outcomes associated with it + /// Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases /// /// Thrown when fails to make API call /// - /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (NotificationWithMeta) - public async System.Threading.Tasks.Task> GetNotificationWithHttpInfoAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteUser"); } - // verify the required parameter 'notificationId' is set - if (notificationId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->DeleteUser"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->DeleteUser"); } @@ -3455,7 +4367,6 @@ public OneSignalApi.Client.ApiResponse GetNotificationWith // to determine the Accept header string[] _accepts = new string[] { - "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -3470,25 +4381,20 @@ public OneSignalApi.Client.ApiResponse GetNotificationWith localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetNotification"; + localVarRequestOptions.Operation = "DefaultApi.DeleteUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications/{notification_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetNotification", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteUser", localVarResponse); if (_exception != null) { throw _exception; @@ -3499,45 +4405,51 @@ public OneSignalApi.Client.ApiResponse GetNotificationWith } /// - /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. + /// Stop Live Activity Stops a Live Activity /// /// Thrown when fails to make API call - /// The \"id\" of the message found in the Notification object - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// Subscription ID /// Index associated with the operation. - /// NotificationHistorySuccessResponse - public NotificationHistorySuccessResponse GetNotificationHistory(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0) + /// + public void EndLiveActivity(string appId, string activityId, string subscriptionId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationHistoryWithHttpInfo(notificationId, getNotificationRequestBody); - return localVarResponse.Data; + EndLiveActivityWithHttpInfo(appId, activityId, subscriptionId); } /// - /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. + /// Stop Live Activity Stops a Live Activity /// /// Thrown when fails to make API call - /// The \"id\" of the message found in the Notification object - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// Subscription ID /// Index associated with the operation. - /// ApiResponse of NotificationHistorySuccessResponse - public OneSignalApi.Client.ApiResponse GetNotificationHistoryWithHttpInfo(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0) + /// ApiResponse of Object(void) + public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(string appId, string activityId, string subscriptionId, int operationIndex = 0) { - // verify the required parameter 'notificationId' is set - if (notificationId == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotificationHistory"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->EndLiveActivity"); } - // verify the required parameter 'getNotificationRequestBody' is set - if (getNotificationRequestBody == null) + // verify the required parameter 'activityId' is set + if (activityId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'getNotificationRequestBody' when calling DefaultApi->GetNotificationHistory"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->EndLiveActivity"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->EndLiveActivity"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -3557,10 +4469,11 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Data = getNotificationRequestBody; + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetNotificationHistory"; + localVarRequestOptions.Operation = "DefaultApi.EndLiveActivity"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -3571,10 +4484,10 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = this.Client.Post("/notifications/{notification_id}/history", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetNotificationHistory", localVarResponse); + Exception _exception = this.ExceptionFactory("EndLiveActivity", localVarResponse); if (_exception != null) { throw _exception; @@ -3585,48 +4498,54 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. + /// Stop Live Activity Stops a Live Activity /// /// Thrown when fails to make API call - /// The \"id\" of the message found in the Notification object - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// Subscription ID /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of NotificationHistorySuccessResponse - public async System.Threading.Tasks.Task GetNotificationHistoryAsync(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of void + public async System.Threading.Tasks.Task EndLiveActivityAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationHistoryWithHttpInfoAsync(notificationId, getNotificationRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + await EndLiveActivityWithHttpInfoAsync(appId, activityId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); } /// - /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. + /// Stop Live Activity Stops a Live Activity /// /// Thrown when fails to make API call - /// The \"id\" of the message found in the Notification object - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// Subscription ID /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (NotificationHistorySuccessResponse) - public async System.Threading.Tasks.Task> GetNotificationHistoryWithHttpInfoAsync(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> EndLiveActivityWithHttpInfoAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'notificationId' is set - if (notificationId == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotificationHistory"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->EndLiveActivity"); } - // verify the required parameter 'getNotificationRequestBody' is set - if (getNotificationRequestBody == null) + // verify the required parameter 'activityId' is set + if (activityId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'getNotificationRequestBody' when calling DefaultApi->GetNotificationHistory"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->EndLiveActivity"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->EndLiveActivity"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -3646,10 +4565,11 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Data = getNotificationRequestBody; + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetNotificationHistory"; + localVarRequestOptions.Operation = "DefaultApi.EndLiveActivity"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -3660,11 +4580,11 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications/{notification_id}/history", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetNotificationHistory", localVarResponse); + Exception _exception = this.ExceptionFactory("EndLiveActivity", localVarResponse); if (_exception != null) { throw _exception; @@ -3675,42 +4595,39 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View notifications View the details of multiple notifications + /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call - /// The app ID that you want to view notifications from - /// How many notifications to return. Max is 50. Default is 50. (optional) - /// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) - /// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + /// The app ID that you want to export devices from + /// (optional) /// Index associated with the operation. - /// NotificationSlice - public NotificationSlice GetNotifications(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0) + /// ExportPlayersSuccessResponse + public ExportPlayersSuccessResponse ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationsWithHttpInfo(appId, limit, offset, kind); + OneSignalApi.Client.ApiResponse localVarResponse = ExportPlayersWithHttpInfo(appId, exportPlayersRequestBody); return localVarResponse.Data; } /// - /// View notifications View the details of multiple notifications + /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call - /// The app ID that you want to view notifications from - /// How many notifications to return. Max is 50. Default is 50. (optional) - /// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) - /// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + /// The app ID that you want to export devices from + /// (optional) /// Index associated with the operation. - /// ApiResponse of NotificationSlice - public OneSignalApi.Client.ApiResponse GetNotificationsWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0) + /// ApiResponse of ExportPlayersSuccessResponse + public OneSignalApi.Client.ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotifications"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportPlayers"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -3730,21 +4647,10 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } - if (kind != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "kind", kind)); - } + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = exportPlayersRequestBody; - localVarRequestOptions.Operation = "DefaultApi.GetNotifications"; + localVarRequestOptions.Operation = "DefaultApi.ExportPlayers"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -3755,10 +4661,10 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = this.Client.Get("/notifications", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); + Exception _exception = this.ExceptionFactory("ExportPlayers", localVarResponse); if (_exception != null) { throw _exception; @@ -3769,45 +4675,42 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View notifications View the details of multiple notifications + /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call - /// The app ID that you want to view notifications from - /// How many notifications to return. Max is 50. Default is 50. (optional) - /// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) - /// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + /// The app ID that you want to export devices from + /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of NotificationSlice - public async System.Threading.Tasks.Task GetNotificationsAsync(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ExportPlayersSuccessResponse + public async System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationsWithHttpInfoAsync(appId, limit, offset, kind, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await ExportPlayersWithHttpInfoAsync(appId, exportPlayersRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// View notifications View the details of multiple notifications + /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call - /// The app ID that you want to view notifications from - /// How many notifications to return. Max is 50. Default is 50. (optional) - /// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) - /// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + /// The app ID that you want to export devices from + /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (NotificationSlice) - public async System.Threading.Tasks.Task> GetNotificationsWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (ExportPlayersSuccessResponse) + public async System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotifications"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportPlayers"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -3827,21 +4730,10 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } - if (kind != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "kind", kind)); - } + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = exportPlayersRequestBody; - localVarRequestOptions.Operation = "DefaultApi.GetNotifications"; + localVarRequestOptions.Operation = "DefaultApi.ExportPlayers"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -3852,11 +4744,11 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); + Exception _exception = this.ExceptionFactory("ExportPlayers", localVarResponse); if (_exception != null) { throw _exception; @@ -3867,47 +4759,39 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// Lists all Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// + /// /// Index associated with the operation. - /// OutcomesData - public OutcomesData GetOutcomes(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0) + /// UserIdentityResponse + public UserIdentityResponse FetchAliases(string appId, string subscriptionId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetOutcomesWithHttpInfo(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution); + OneSignalApi.Client.ApiResponse localVarResponse = FetchAliasesWithHttpInfo(appId, subscriptionId); return localVarResponse.Data; } /// - /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// Lists all Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// + /// /// Index associated with the operation. - /// ApiResponse of OutcomesData - public OneSignalApi.Client.ApiResponse GetOutcomesWithHttpInfo(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0) + /// ApiResponse of UserIdentityResponse + public OneSignalApi.Client.ApiResponse FetchAliasesWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetOutcomes"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchAliases"); } - // verify the required parameter 'outcomeNames' is set - if (outcomeNames == null) + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'outcomeNames' when calling DefaultApi->GetOutcomes"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->FetchAliases"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -3933,25 +4817,9 @@ public OneSignalApi.Client.ApiResponse GetNo } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names", outcomeNames)); - if (outcomeNames2 != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names[]", outcomeNames2)); - } - if (outcomeTimeRange != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_time_range", outcomeTimeRange)); - } - if (outcomePlatforms != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_platforms", outcomePlatforms)); - } - if (outcomeAttribution != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_attribution", outcomeAttribution)); - } + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetOutcomes"; + localVarRequestOptions.Operation = "DefaultApi.FetchAliases"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -3962,10 +4830,10 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = this.Client.Get("/apps/{app_id}/outcomes", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetOutcomes", localVarResponse); + Exception _exception = this.ExceptionFactory("FetchAliases", localVarResponse); if (_exception != null) { throw _exception; @@ -3976,49 +4844,41 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// Lists all Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of OutcomesData - public async System.Threading.Tasks.Task GetOutcomesAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UserIdentityResponse + public async System.Threading.Tasks.Task FetchAliasesAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetOutcomesWithHttpInfoAsync(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await FetchAliasesWithHttpInfoAsync(appId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// Lists all Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (OutcomesData) - public async System.Threading.Tasks.Task> GetOutcomesWithHttpInfoAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UserIdentityResponse) + public async System.Threading.Tasks.Task> FetchAliasesWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetOutcomes"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchAliases"); } - // verify the required parameter 'outcomeNames' is set - if (outcomeNames == null) + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'outcomeNames' when calling DefaultApi->GetOutcomes"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->FetchAliases"); } @@ -4045,25 +4905,9 @@ public OneSignalApi.Client.ApiResponse GetNo } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names", outcomeNames)); - if (outcomeNames2 != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names[]", outcomeNames2)); - } - if (outcomeTimeRange != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_time_range", outcomeTimeRange)); - } - if (outcomePlatforms != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_platforms", outcomePlatforms)); - } - if (outcomeAttribution != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_attribution", outcomeAttribution)); - } + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetOutcomes"; + localVarRequestOptions.Operation = "DefaultApi.FetchAliases"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4074,11 +4918,11 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/outcomes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetOutcomes", localVarResponse); + Exception _exception = this.ExceptionFactory("FetchAliases", localVarResponse); if (_exception != null) { throw _exception; @@ -4089,41 +4933,47 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View device View the details of an existing device in one of your OneSignal apps + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// + /// + /// /// Index associated with the operation. - /// Player - public Player GetPlayer(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0) + /// User + public User FetchUser(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetPlayerWithHttpInfo(appId, playerId, emailAuthHash); + OneSignalApi.Client.ApiResponse localVarResponse = FetchUserWithHttpInfo(appId, aliasLabel, aliasId); return localVarResponse.Data; } /// - /// View device View the details of an existing device in one of your OneSignal apps + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of Player - public OneSignalApi.Client.ApiResponse GetPlayerWithHttpInfo(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0) + /// ApiResponse of User + public OneSignalApi.Client.ApiResponse FetchUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchUser"); } - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->GetPlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->FetchUser"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->FetchUser"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -4148,14 +4998,11 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (emailAuthHash != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "email_auth_hash", emailAuthHash)); - } + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetPlayer"; + localVarRequestOptions.Operation = "DefaultApi.FetchUser"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4166,10 +5013,10 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = this.Client.Get("/players/{player_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("FetchUser", localVarResponse); if (_exception != null) { throw _exception; @@ -4180,43 +5027,49 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View device View the details of an existing device in one of your OneSignal apps + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of Player - public async System.Threading.Tasks.Task GetPlayerAsync(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of User + public async System.Threading.Tasks.Task FetchUserAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetPlayerWithHttpInfoAsync(appId, playerId, emailAuthHash, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await FetchUserWithHttpInfoAsync(appId, aliasLabel, aliasId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// View device View the details of an existing device in one of your OneSignal apps + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Player) - public async System.Threading.Tasks.Task> GetPlayerWithHttpInfoAsync(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (User) + public async System.Threading.Tasks.Task> FetchUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchUser"); } - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->GetPlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->FetchUser"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->FetchUser"); } @@ -4242,14 +5095,11 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (emailAuthHash != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "email_auth_hash", emailAuthHash)); - } + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetPlayer"; + localVarRequestOptions.Operation = "DefaultApi.FetchUser"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4260,11 +5110,11 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("FetchUser", localVarResponse); if (_exception != null) { throw _exception; @@ -4275,35 +5125,47 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// + /// + /// /// Index associated with the operation. - /// PlayerSlice - public PlayerSlice GetPlayers(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0) + /// InlineResponse200 + public InlineResponse200 FetchUserIdentity(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetPlayersWithHttpInfo(appId, limit, offset); + OneSignalApi.Client.ApiResponse localVarResponse = FetchUserIdentityWithHttpInfo(appId, aliasLabel, aliasId); return localVarResponse.Data; } /// - /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of PlayerSlice - public OneSignalApi.Client.ApiResponse GetPlayersWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0) + /// ApiResponse of InlineResponse200 + public OneSignalApi.Client.ApiResponse FetchUserIdentityWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayers"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchUserIdentity"); + } + + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->FetchUserIdentity"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->FetchUserIdentity"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -4328,17 +5190,11 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetPlayers"; + localVarRequestOptions.Operation = "DefaultApi.FetchUserIdentity"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4349,10 +5205,10 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = this.Client.Get("/players", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPlayers", localVarResponse); + Exception _exception = this.ExceptionFactory("FetchUserIdentity", localVarResponse); if (_exception != null) { throw _exception; @@ -4363,37 +5219,49 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of PlayerSlice - public async System.Threading.Tasks.Task GetPlayersAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of InlineResponse200 + public async System.Threading.Tasks.Task FetchUserIdentityAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetPlayersWithHttpInfoAsync(appId, limit, offset, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await FetchUserIdentityWithHttpInfoAsync(appId, aliasLabel, aliasId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (PlayerSlice) - public async System.Threading.Tasks.Task> GetPlayersWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (InlineResponse200) + public async System.Threading.Tasks.Task> FetchUserIdentityWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayers"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchUserIdentity"); + } + + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->FetchUserIdentity"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->FetchUserIdentity"); } @@ -4419,17 +5287,11 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.GetPlayers"; + localVarRequestOptions.Operation = "DefaultApi.FetchUserIdentity"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4440,11 +5302,11 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/players", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPlayers", localVarResponse); + Exception _exception = this.ExceptionFactory("FetchUserIdentity", localVarResponse); if (_exception != null) { throw _exception; @@ -4455,45 +5317,36 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// View an app View the details of a single OneSignal app /// /// Thrown when fails to make API call /// An app id - /// /// Index associated with the operation. /// App - public App UpdateApp(string appId, App app, int operationIndex = 0) + public App GetApp(string appId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdateAppWithHttpInfo(appId, app); + OneSignalApi.Client.ApiResponse localVarResponse = GetAppWithHttpInfo(appId); return localVarResponse.Data; } /// - /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// View an app View the details of a single OneSignal app /// /// Thrown when fails to make API call /// An app id - /// /// Index associated with the operation. /// ApiResponse of App - public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, App app, int operationIndex = 0) + public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateApp"); - } - - // verify the required parameter 'app' is set - if (app == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->UpdateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetApp"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -4514,9 +5367,8 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = app; - localVarRequestOptions.Operation = "DefaultApi.UpdateApp"; + localVarRequestOptions.Operation = "DefaultApi.GetApp"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (user_key) required @@ -4527,10 +5379,10 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } // make the HTTP request - var localVarResponse = this.Client.Put("/apps/{app_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateApp", localVarResponse); + Exception _exception = this.ExceptionFactory("GetApp", localVarResponse); if (_exception != null) { throw _exception; @@ -4541,41 +5393,2619 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } /// - /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// View an app View the details of a single OneSignal app /// /// Thrown when fails to make API call /// An app id - /// /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of App - public async System.Threading.Tasks.Task UpdateAppAsync(string appId, App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetAppAsync(string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdateAppWithHttpInfoAsync(appId, app, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetAppWithHttpInfoAsync(appId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// View an app View the details of a single OneSignal app /// /// Thrown when fails to make API call /// An app id - /// /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (App) - public async System.Threading.Tasks.Task> UpdateAppWithHttpInfoAsync(string appId, App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetAppWithHttpInfoAsync(string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetApp"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetApp"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (user_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetApp", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View apps View the details of all of your current OneSignal apps + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// List<App> + public List GetApps(int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse> localVarResponse = GetAppsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// View apps View the details of all of your current OneSignal apps + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of List<App> + public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operationIndex = 0) + { + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "DefaultApi.GetApps"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (user_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/apps", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetApps", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View apps View the details of all of your current OneSignal apps + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<App> + public async System.Threading.Tasks.Task> GetAppsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse> localVarResponse = await GetAppsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// View apps View the details of all of your current OneSignal apps + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<App>) + public async System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "DefaultApi.GetApps"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (user_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/apps", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetApps", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// InlineResponse2003 + public InlineResponse2003 GetEligibleIams(string appId, string subscriptionId, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = GetEligibleIamsWithHttpInfo(appId, subscriptionId); + return localVarResponse.Data; + } + + /// + /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of InlineResponse2003 + public OneSignalApi.Client.ApiResponse GetEligibleIamsWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetEligibleIams"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->GetEligibleIams"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetEligibleIams"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/apps/{app_id}/subscriptions/{subscription_id}/iams", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEligibleIams", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InlineResponse2003 + public async System.Threading.Tasks.Task GetEligibleIamsAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await GetEligibleIamsWithHttpInfoAsync(appId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponse2003) + public async System.Threading.Tasks.Task> GetEligibleIamsWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetEligibleIams"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->GetEligibleIams"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetEligibleIams"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/subscriptions/{subscription_id}/iams", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetEligibleIams", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View notification View the details of a single notification and outcomes associated with it + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// NotificationWithMeta + public NotificationWithMeta GetNotification(string appId, string notificationId, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationWithHttpInfo(appId, notificationId); + return localVarResponse.Data; + } + + /// + /// View notification View the details of a single notification and outcomes associated with it + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// ApiResponse of NotificationWithMeta + public OneSignalApi.Client.ApiResponse GetNotificationWithHttpInfo(string appId, string notificationId, int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotification"); + } + + // verify the required parameter 'notificationId' is set + if (notificationId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotification"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + + localVarRequestOptions.Operation = "DefaultApi.GetNotification"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/notifications/{notification_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetNotification", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View notification View the details of a single notification and outcomes associated with it + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of NotificationWithMeta + public async System.Threading.Tasks.Task GetNotificationAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationWithHttpInfoAsync(appId, notificationId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// View notification View the details of a single notification and outcomes associated with it + /// + /// Thrown when fails to make API call + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (NotificationWithMeta) + public async System.Threading.Tasks.Task> GetNotificationWithHttpInfoAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotification"); + } + + // verify the required parameter 'notificationId' is set + if (notificationId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotification"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + + localVarRequestOptions.Operation = "DefaultApi.GetNotification"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications/{notification_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetNotification", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. + /// + /// Thrown when fails to make API call + /// The \"id\" of the message found in the Notification object + /// + /// Index associated with the operation. + /// NotificationHistorySuccessResponse + public NotificationHistorySuccessResponse GetNotificationHistory(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationHistoryWithHttpInfo(notificationId, getNotificationRequestBody); + return localVarResponse.Data; + } + + /// + /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. + /// + /// Thrown when fails to make API call + /// The \"id\" of the message found in the Notification object + /// + /// Index associated with the operation. + /// ApiResponse of NotificationHistorySuccessResponse + public OneSignalApi.Client.ApiResponse GetNotificationHistoryWithHttpInfo(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0) + { + // verify the required parameter 'notificationId' is set + if (notificationId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotificationHistory"); + } + + // verify the required parameter 'getNotificationRequestBody' is set + if (getNotificationRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'getNotificationRequestBody' when calling DefaultApi->GetNotificationHistory"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.Data = getNotificationRequestBody; + + localVarRequestOptions.Operation = "DefaultApi.GetNotificationHistory"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/notifications/{notification_id}/history", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetNotificationHistory", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. + /// + /// Thrown when fails to make API call + /// The \"id\" of the message found in the Notification object + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of NotificationHistorySuccessResponse + public async System.Threading.Tasks.Task GetNotificationHistoryAsync(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationHistoryWithHttpInfoAsync(notificationId, getNotificationRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. + /// + /// Thrown when fails to make API call + /// The \"id\" of the message found in the Notification object + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (NotificationHistorySuccessResponse) + public async System.Threading.Tasks.Task> GetNotificationHistoryWithHttpInfoAsync(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'notificationId' is set + if (notificationId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotificationHistory"); + } + + // verify the required parameter 'getNotificationRequestBody' is set + if (getNotificationRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'getNotificationRequestBody' when calling DefaultApi->GetNotificationHistory"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.Data = getNotificationRequestBody; + + localVarRequestOptions.Operation = "DefaultApi.GetNotificationHistory"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications/{notification_id}/history", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetNotificationHistory", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View notifications View the details of multiple notifications + /// + /// Thrown when fails to make API call + /// The app ID that you want to view notifications from + /// How many notifications to return. Max is 50. Default is 50. (optional) + /// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) + /// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + /// Index associated with the operation. + /// NotificationSlice + public NotificationSlice GetNotifications(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationsWithHttpInfo(appId, limit, offset, kind); + return localVarResponse.Data; + } + + /// + /// View notifications View the details of multiple notifications + /// + /// Thrown when fails to make API call + /// The app ID that you want to view notifications from + /// How many notifications to return. Max is 50. Default is 50. (optional) + /// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) + /// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + /// Index associated with the operation. + /// ApiResponse of NotificationSlice + public OneSignalApi.Client.ApiResponse GetNotificationsWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotifications"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + if (kind != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "kind", kind)); + } + + localVarRequestOptions.Operation = "DefaultApi.GetNotifications"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/notifications", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View notifications View the details of multiple notifications + /// + /// Thrown when fails to make API call + /// The app ID that you want to view notifications from + /// How many notifications to return. Max is 50. Default is 50. (optional) + /// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) + /// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of NotificationSlice + public async System.Threading.Tasks.Task GetNotificationsAsync(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationsWithHttpInfoAsync(appId, limit, offset, kind, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// View notifications View the details of multiple notifications + /// + /// Thrown when fails to make API call + /// The app ID that you want to view notifications from + /// How many notifications to return. Max is 50. Default is 50. (optional) + /// Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional) + /// Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (NotificationSlice) + public async System.Threading.Tasks.Task> GetNotificationsWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotifications"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + if (kind != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "kind", kind)); + } + + localVarRequestOptions.Operation = "DefaultApi.GetNotifications"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// Index associated with the operation. + /// OutcomesData + public OutcomesData GetOutcomes(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = GetOutcomesWithHttpInfo(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution); + return localVarResponse.Data; + } + + /// + /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// Index associated with the operation. + /// ApiResponse of OutcomesData + public OneSignalApi.Client.ApiResponse GetOutcomesWithHttpInfo(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetOutcomes"); + } + + // verify the required parameter 'outcomeNames' is set + if (outcomeNames == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'outcomeNames' when calling DefaultApi->GetOutcomes"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names", outcomeNames)); + if (outcomeNames2 != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names[]", outcomeNames2)); + } + if (outcomeTimeRange != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_time_range", outcomeTimeRange)); + } + if (outcomePlatforms != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_platforms", outcomePlatforms)); + } + if (outcomeAttribution != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_attribution", outcomeAttribution)); + } + + localVarRequestOptions.Operation = "DefaultApi.GetOutcomes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/apps/{app_id}/outcomes", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOutcomes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of OutcomesData + public async System.Threading.Tasks.Task GetOutcomesAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await GetOutcomesWithHttpInfoAsync(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OutcomesData) + public async System.Threading.Tasks.Task> GetOutcomesWithHttpInfoAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetOutcomes"); + } + + // verify the required parameter 'outcomeNames' is set + if (outcomeNames == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'outcomeNames' when calling DefaultApi->GetOutcomes"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names", outcomeNames)); + if (outcomeNames2 != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names[]", outcomeNames2)); + } + if (outcomeTimeRange != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_time_range", outcomeTimeRange)); + } + if (outcomePlatforms != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_platforms", outcomePlatforms)); + } + if (outcomeAttribution != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_attribution", outcomeAttribution)); + } + + localVarRequestOptions.Operation = "DefaultApi.GetOutcomes"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/outcomes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOutcomes", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View device View the details of an existing device in one of your OneSignal apps + /// + /// Thrown when fails to make API call + /// Your app_id for this device + /// Player's OneSignal ID + /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// Index associated with the operation. + /// Player + public Player GetPlayer(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = GetPlayerWithHttpInfo(appId, playerId, emailAuthHash); + return localVarResponse.Data; + } + + /// + /// View device View the details of an existing device in one of your OneSignal apps + /// + /// Thrown when fails to make API call + /// Your app_id for this device + /// Player's OneSignal ID + /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// Index associated with the operation. + /// ApiResponse of Player + public OneSignalApi.Client.ApiResponse GetPlayerWithHttpInfo(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayer"); + } + + // verify the required parameter 'playerId' is set + if (playerId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->GetPlayer"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + if (emailAuthHash != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "email_auth_hash", emailAuthHash)); + } + + localVarRequestOptions.Operation = "DefaultApi.GetPlayer"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/players/{player_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPlayer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View device View the details of an existing device in one of your OneSignal apps + /// + /// Thrown when fails to make API call + /// Your app_id for this device + /// Player's OneSignal ID + /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of Player + public async System.Threading.Tasks.Task GetPlayerAsync(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await GetPlayerWithHttpInfoAsync(appId, playerId, emailAuthHash, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// View device View the details of an existing device in one of your OneSignal apps + /// + /// Thrown when fails to make API call + /// Your app_id for this device + /// Player's OneSignal ID + /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Player) + public async System.Threading.Tasks.Task> GetPlayerWithHttpInfoAsync(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayer"); + } + + // verify the required parameter 'playerId' is set + if (playerId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->GetPlayer"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + if (emailAuthHash != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "email_auth_hash", emailAuthHash)); + } + + localVarRequestOptions.Operation = "DefaultApi.GetPlayer"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPlayer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// + /// Thrown when fails to make API call + /// The app ID that you want to view players from + /// How many devices to return. Max is 300. Default is 300 (optional) + /// Result offset. Default is 0. Results are sorted by id; (optional) + /// Index associated with the operation. + /// PlayerSlice + public PlayerSlice GetPlayers(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = GetPlayersWithHttpInfo(appId, limit, offset); + return localVarResponse.Data; + } + + /// + /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// + /// Thrown when fails to make API call + /// The app ID that you want to view players from + /// How many devices to return. Max is 300. Default is 300 (optional) + /// Result offset. Default is 0. Results are sorted by id; (optional) + /// Index associated with the operation. + /// ApiResponse of PlayerSlice + public OneSignalApi.Client.ApiResponse GetPlayersWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayers"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + + localVarRequestOptions.Operation = "DefaultApi.GetPlayers"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/players", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPlayers", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// + /// Thrown when fails to make API call + /// The app ID that you want to view players from + /// How many devices to return. Max is 300. Default is 300 (optional) + /// Result offset. Default is 0. Results are sorted by id; (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PlayerSlice + public async System.Threading.Tasks.Task GetPlayersAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await GetPlayersWithHttpInfoAsync(appId, limit, offset, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// + /// Thrown when fails to make API call + /// The app ID that you want to view players from + /// How many devices to return. Max is 300. Default is 300 (optional) + /// Result offset. Default is 0. Results are sorted by id; (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PlayerSlice) + public async System.Threading.Tasks.Task> GetPlayersWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayers"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + + localVarRequestOptions.Operation = "DefaultApi.GetPlayers"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/players", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPlayers", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// InlineResponse200 + public InlineResponse200 IdentifyUserByAlias(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = IdentifyUserByAliasWithHttpInfo(appId, aliasLabel, aliasId, userIdentityRequestBody); + return localVarResponse.Data; + } + + /// + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of InlineResponse200 + public OneSignalApi.Client.ApiResponse IdentifyUserByAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->IdentifyUserByAlias"); + } + + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->IdentifyUserByAlias"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->IdentifyUserByAlias"); + } + + // verify the required parameter 'userIdentityRequestBody' is set + if (userIdentityRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->IdentifyUserByAlias"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = userIdentityRequestBody; + + localVarRequestOptions.Operation = "DefaultApi.IdentifyUserByAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Patch("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IdentifyUserByAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of InlineResponse200 + public async System.Threading.Tasks.Task IdentifyUserByAliasAsync(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await IdentifyUserByAliasWithHttpInfoAsync(appId, aliasLabel, aliasId, userIdentityRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (InlineResponse200) + public async System.Threading.Tasks.Task> IdentifyUserByAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->IdentifyUserByAlias"); + } + + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->IdentifyUserByAlias"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->IdentifyUserByAlias"); + } + + // verify the required parameter 'userIdentityRequestBody' is set + if (userIdentityRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->IdentifyUserByAlias"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = userIdentityRequestBody; + + localVarRequestOptions.Operation = "DefaultApi.IdentifyUserByAlias"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IdentifyUserByAlias", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// UserIdentityResponse + public UserIdentityResponse IdentifyUserBySubscriptionId(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = IdentifyUserBySubscriptionIdWithHttpInfo(appId, subscriptionId, userIdentityRequestBody); + return localVarResponse.Data; + } + + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of UserIdentityResponse + public OneSignalApi.Client.ApiResponse IdentifyUserBySubscriptionIdWithHttpInfo(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->IdentifyUserBySubscriptionId"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->IdentifyUserBySubscriptionId"); + } + + // verify the required parameter 'userIdentityRequestBody' is set + if (userIdentityRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->IdentifyUserBySubscriptionId"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = userIdentityRequestBody; + + localVarRequestOptions.Operation = "DefaultApi.IdentifyUserBySubscriptionId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Patch("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IdentifyUserBySubscriptionId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UserIdentityResponse + public async System.Threading.Tasks.Task IdentifyUserBySubscriptionIdAsync(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await IdentifyUserBySubscriptionIdWithHttpInfoAsync(appId, subscriptionId, userIdentityRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UserIdentityResponse) + public async System.Threading.Tasks.Task> IdentifyUserBySubscriptionIdWithHttpInfoAsync(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->IdentifyUserBySubscriptionId"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->IdentifyUserBySubscriptionId"); + } + + // verify the required parameter 'userIdentityRequestBody' is set + if (userIdentityRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->IdentifyUserBySubscriptionId"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = userIdentityRequestBody; + + localVarRequestOptions.Operation = "DefaultApi.IdentifyUserBySubscriptionId"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IdentifyUserBySubscriptionId", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Transfers this Subscription to the User identified by the identity in the payload. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// UserIdentityResponse + public UserIdentityResponse TransferSubscription(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = TransferSubscriptionWithHttpInfo(appId, subscriptionId, transferSubscriptionRequestBody); + return localVarResponse.Data; + } + + /// + /// Transfers this Subscription to the User identified by the identity in the payload. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of UserIdentityResponse + public OneSignalApi.Client.ApiResponse TransferSubscriptionWithHttpInfo(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->TransferSubscription"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->TransferSubscription"); + } + + // verify the required parameter 'transferSubscriptionRequestBody' is set + if (transferSubscriptionRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'transferSubscriptionRequestBody' when calling DefaultApi->TransferSubscription"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = transferSubscriptionRequestBody; + + localVarRequestOptions.Operation = "DefaultApi.TransferSubscription"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Patch("/apps/{app_id}/subscriptions/{subscription_id}/owner", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TransferSubscription", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Transfers this Subscription to the User identified by the identity in the payload. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UserIdentityResponse + public async System.Threading.Tasks.Task TransferSubscriptionAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await TransferSubscriptionWithHttpInfoAsync(appId, subscriptionId, transferSubscriptionRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Transfers this Subscription to the User identified by the identity in the payload. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UserIdentityResponse) + public async System.Threading.Tasks.Task> TransferSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->TransferSubscription"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->TransferSubscription"); + } + + // verify the required parameter 'transferSubscriptionRequestBody' is set + if (transferSubscriptionRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'transferSubscriptionRequestBody' when calling DefaultApi->TransferSubscription"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = transferSubscriptionRequestBody; + + localVarRequestOptions.Operation = "DefaultApi.TransferSubscription"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/subscriptions/{subscription_id}/owner", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TransferSubscription", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// + /// Thrown when fails to make API call + /// An app id + /// + /// Index associated with the operation. + /// App + public App UpdateApp(string appId, App app, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = UpdateAppWithHttpInfo(appId, app); + return localVarResponse.Data; + } + + /// + /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// + /// Thrown when fails to make API call + /// An app id + /// + /// Index associated with the operation. + /// ApiResponse of App + public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, App app, int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateApp"); + } + + // verify the required parameter 'app' is set + if (app == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->UpdateApp"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = app; + + localVarRequestOptions.Operation = "DefaultApi.UpdateApp"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (user_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/apps/{app_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateApp", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// + /// Thrown when fails to make API call + /// An app id + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of App + public async System.Threading.Tasks.Task UpdateAppAsync(string appId, App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await UpdateAppWithHttpInfoAsync(appId, app, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// + /// Thrown when fails to make API call + /// An app id + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (App) + public async System.Threading.Tasks.Task> UpdateAppWithHttpInfoAsync(string appId, App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateApp"); + } + + // verify the required parameter 'app' is set + if (app == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->UpdateApp"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = app; + + localVarRequestOptions.Operation = "DefaultApi.UpdateApp"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (user_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/apps/{app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateApp", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update a Live Activity via Push Updates a specified live activity. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// + /// Index associated with the operation. + /// UpdateLiveActivitySuccessResponse + public UpdateLiveActivitySuccessResponse UpdateLiveActivity(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = UpdateLiveActivityWithHttpInfo(appId, activityId, updateLiveActivityRequest); + return localVarResponse.Data; + } + + /// + /// Update a Live Activity via Push Updates a specified live activity. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// + /// Index associated with the operation. + /// ApiResponse of UpdateLiveActivitySuccessResponse + public OneSignalApi.Client.ApiResponse UpdateLiveActivityWithHttpInfo(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateLiveActivity"); + } + + // verify the required parameter 'activityId' is set + if (activityId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->UpdateLiveActivity"); + } + + // verify the required parameter 'updateLiveActivityRequest' is set + if (updateLiveActivityRequest == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->UpdateLiveActivity"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter + localVarRequestOptions.Data = updateLiveActivityRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateLiveActivity"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/apps/{app_id}/live_activities/{activity_id}/notifications", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateLiveActivity", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update a Live Activity via Push Updates a specified live activity. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UpdateLiveActivitySuccessResponse + public async System.Threading.Tasks.Task UpdateLiveActivityAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await UpdateLiveActivityWithHttpInfoAsync(appId, activityId, updateLiveActivityRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update a Live Activity via Push Updates a specified live activity. + /// + /// Thrown when fails to make API call + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UpdateLiveActivitySuccessResponse) + public async System.Threading.Tasks.Task> UpdateLiveActivityWithHttpInfoAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateLiveActivity"); + } + + // verify the required parameter 'activityId' is set + if (activityId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->UpdateLiveActivity"); + } + + // verify the required parameter 'updateLiveActivityRequest' is set + if (updateLiveActivityRequest == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->UpdateLiveActivity"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter + localVarRequestOptions.Data = updateLiveActivityRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateLiveActivity"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/live_activities/{activity_id}/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateLiveActivity", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit device Update an existing device in one of your OneSignal apps + /// + /// Thrown when fails to make API call + /// Player's OneSignal ID + /// + /// Index associated with the operation. + /// UpdatePlayerSuccessResponse + public UpdatePlayerSuccessResponse UpdatePlayer(string playerId, Player player, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = UpdatePlayerWithHttpInfo(playerId, player); + return localVarResponse.Data; + } + + /// + /// Edit device Update an existing device in one of your OneSignal apps + /// + /// Thrown when fails to make API call + /// Player's OneSignal ID + /// + /// Index associated with the operation. + /// ApiResponse of UpdatePlayerSuccessResponse + public OneSignalApi.Client.ApiResponse UpdatePlayerWithHttpInfo(string playerId, Player player, int operationIndex = 0) + { + // verify the required parameter 'playerId' is set + if (playerId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->UpdatePlayer"); + } + + // verify the required parameter 'player' is set + if (player == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'player' when calling DefaultApi->UpdatePlayer"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter + localVarRequestOptions.Data = player; + + localVarRequestOptions.Operation = "DefaultApi.UpdatePlayer"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/players/{player_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdatePlayer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Edit device Update an existing device in one of your OneSignal apps + /// + /// Thrown when fails to make API call + /// Player's OneSignal ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of UpdatePlayerSuccessResponse + public async System.Threading.Tasks.Task UpdatePlayerAsync(string playerId, Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await UpdatePlayerWithHttpInfoAsync(playerId, player, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Edit device Update an existing device in one of your OneSignal apps + /// + /// Thrown when fails to make API call + /// Player's OneSignal ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (UpdatePlayerSuccessResponse) + public async System.Threading.Tasks.Task> UpdatePlayerWithHttpInfoAsync(string playerId, Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'playerId' is set + if (playerId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->UpdatePlayer"); } - // verify the required parameter 'app' is set - if (app == null) + // verify the required parameter 'player' is set + if (player == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->UpdateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'player' when calling DefaultApi->UpdatePlayer"); } @@ -4602,13 +8032,13 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = app; + localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter + localVarRequestOptions.Data = player; - localVarRequestOptions.Operation = "DefaultApi.UpdateApp"; + localVarRequestOptions.Operation = "DefaultApi.UpdatePlayer"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (app_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4616,11 +8046,11 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/apps/{app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PutAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateApp", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdatePlayer", localVarResponse); if (_exception != null) { throw _exception; @@ -4631,47 +8061,41 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } /// - /// Update a Live Activity via Push Updates a specified live activity. + /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// The OneSignal App ID the user record is found under. + /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. + /// (optional) /// Index associated with the operation. - /// UpdateLiveActivitySuccessResponse - public UpdateLiveActivitySuccessResponse UpdateLiveActivity(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0) + /// UpdatePlayerTagsSuccessResponse + public UpdatePlayerTagsSuccessResponse UpdatePlayerTags(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdateLiveActivityWithHttpInfo(appId, activityId, updateLiveActivityRequest); + OneSignalApi.Client.ApiResponse localVarResponse = UpdatePlayerTagsWithHttpInfo(appId, externalUserId, updatePlayerTagsRequestBody); return localVarResponse.Data; } /// - /// Update a Live Activity via Push Updates a specified live activity. + /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// The OneSignal App ID the user record is found under. + /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. + /// (optional) /// Index associated with the operation. - /// ApiResponse of UpdateLiveActivitySuccessResponse - public OneSignalApi.Client.ApiResponse UpdateLiveActivityWithHttpInfo(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0) + /// ApiResponse of UpdatePlayerTagsSuccessResponse + public OneSignalApi.Client.ApiResponse UpdatePlayerTagsWithHttpInfo(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateLiveActivity"); - } - - // verify the required parameter 'activityId' is set - if (activityId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdatePlayerTags"); } - // verify the required parameter 'updateLiveActivityRequest' is set - if (updateLiveActivityRequest == null) + // verify the required parameter 'externalUserId' is set + if (externalUserId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'externalUserId' when calling DefaultApi->UpdatePlayerTags"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -4698,10 +8122,10 @@ public OneSignalApi.Client.ApiResponse Update } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.Data = updateLiveActivityRequest; + localVarRequestOptions.PathParameters.Add("external_user_id", OneSignalApi.Client.ClientUtils.ParameterToString(externalUserId)); // path parameter + localVarRequestOptions.Data = updatePlayerTagsRequestBody; - localVarRequestOptions.Operation = "DefaultApi.UpdateLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.UpdatePlayerTags"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4712,10 +8136,10 @@ public OneSignalApi.Client.ApiResponse Update } // make the HTTP request - var localVarResponse = this.Client.Post("/apps/{app_id}/live_activities/{activity_id}/notifications", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/apps/{app_id}/users/{external_user_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdatePlayerTags", localVarResponse); if (_exception != null) { throw _exception; @@ -4726,49 +8150,43 @@ public OneSignalApi.Client.ApiResponse Update } /// - /// Update a Live Activity via Push Updates a specified live activity. + /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// The OneSignal App ID the user record is found under. + /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. + /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UpdateLiveActivitySuccessResponse - public async System.Threading.Tasks.Task UpdateLiveActivityAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UpdatePlayerTagsSuccessResponse + public async System.Threading.Tasks.Task UpdatePlayerTagsAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdateLiveActivityWithHttpInfoAsync(appId, activityId, updateLiveActivityRequest, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await UpdatePlayerTagsWithHttpInfoAsync(appId, externalUserId, updatePlayerTagsRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Update a Live Activity via Push Updates a specified live activity. + /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// The OneSignal App ID the user record is found under. + /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. + /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UpdateLiveActivitySuccessResponse) - public async System.Threading.Tasks.Task> UpdateLiveActivityWithHttpInfoAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UpdatePlayerTagsSuccessResponse) + public async System.Threading.Tasks.Task> UpdatePlayerTagsWithHttpInfoAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateLiveActivity"); - } - - // verify the required parameter 'activityId' is set - if (activityId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdatePlayerTags"); } - // verify the required parameter 'updateLiveActivityRequest' is set - if (updateLiveActivityRequest == null) + // verify the required parameter 'externalUserId' is set + if (externalUserId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'externalUserId' when calling DefaultApi->UpdatePlayerTags"); } @@ -4796,10 +8214,10 @@ public OneSignalApi.Client.ApiResponse Update } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.Data = updateLiveActivityRequest; + localVarRequestOptions.PathParameters.Add("external_user_id", OneSignalApi.Client.ClientUtils.ParameterToString(externalUserId)); // path parameter + localVarRequestOptions.Data = updatePlayerTagsRequestBody; - localVarRequestOptions.Operation = "DefaultApi.UpdateLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.UpdatePlayerTags"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4810,11 +8228,11 @@ public OneSignalApi.Client.ApiResponse Update } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/live_activities/{activity_id}/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PutAsync("/apps/{app_id}/users/{external_user_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdatePlayerTags", localVarResponse); if (_exception != null) { throw _exception; @@ -4825,39 +8243,46 @@ public OneSignalApi.Client.ApiResponse Update } /// - /// Edit device Update an existing device in one of your OneSignal apps + /// Updates an existing Subscription’s properties. /// /// Thrown when fails to make API call - /// Player's OneSignal ID - /// + /// + /// + /// /// Index associated with the operation. - /// UpdatePlayerSuccessResponse - public UpdatePlayerSuccessResponse UpdatePlayer(string playerId, Player player, int operationIndex = 0) + /// + public void UpdateSubscription(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdatePlayerWithHttpInfo(playerId, player); - return localVarResponse.Data; + UpdateSubscriptionWithHttpInfo(appId, subscriptionId, updateSubscriptionRequestBody); } /// - /// Edit device Update an existing device in one of your OneSignal apps + /// Updates an existing Subscription’s properties. /// /// Thrown when fails to make API call - /// Player's OneSignal ID - /// + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of UpdatePlayerSuccessResponse - public OneSignalApi.Client.ApiResponse UpdatePlayerWithHttpInfo(string playerId, Player player, int operationIndex = 0) + /// ApiResponse of Object(void) + public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0) { - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->UpdatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateSubscription"); } - // verify the required parameter 'player' is set - if (player == null) + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'player' when calling DefaultApi->UpdatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->UpdateSubscription"); + } + + // verify the required parameter 'updateSubscriptionRequestBody' is set + if (updateSubscriptionRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateSubscriptionRequestBody' when calling DefaultApi->UpdateSubscription"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -4868,7 +8293,6 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer // to determine the Accept header string[] _accepts = new string[] { - "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -4883,10 +8307,11 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.Data = player; + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = updateSubscriptionRequestBody; - localVarRequestOptions.Operation = "DefaultApi.UpdatePlayer"; + localVarRequestOptions.Operation = "DefaultApi.UpdateSubscription"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4897,10 +8322,10 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } // make the HTTP request - var localVarResponse = this.Client.Put("/players/{player_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Patch("/apps/{app_id}/subscriptions/{subscription_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdatePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateSubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -4911,41 +8336,48 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } /// - /// Edit device Update an existing device in one of your OneSignal apps + /// Updates an existing Subscription’s properties. /// /// Thrown when fails to make API call - /// Player's OneSignal ID - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UpdatePlayerSuccessResponse - public async System.Threading.Tasks.Task UpdatePlayerAsync(string playerId, Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of void + public async System.Threading.Tasks.Task UpdateSubscriptionAsync(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdatePlayerWithHttpInfoAsync(playerId, player, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + await UpdateSubscriptionWithHttpInfoAsync(appId, subscriptionId, updateSubscriptionRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); } /// - /// Edit device Update an existing device in one of your OneSignal apps + /// Updates an existing Subscription’s properties. /// /// Thrown when fails to make API call - /// Player's OneSignal ID - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UpdatePlayerSuccessResponse) - public async System.Threading.Tasks.Task> UpdatePlayerWithHttpInfoAsync(string playerId, Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->UpdatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateSubscription"); } - // verify the required parameter 'player' is set - if (player == null) + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'player' when calling DefaultApi->UpdatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->UpdateSubscription"); + } + + // verify the required parameter 'updateSubscriptionRequestBody' is set + if (updateSubscriptionRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateSubscriptionRequestBody' when calling DefaultApi->UpdateSubscription"); } @@ -4957,7 +8389,6 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer // to determine the Accept header string[] _accepts = new string[] { - "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -4972,10 +8403,11 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.Data = player; + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = updateSubscriptionRequestBody; - localVarRequestOptions.Operation = "DefaultApi.UpdatePlayer"; + localVarRequestOptions.Operation = "DefaultApi.UpdateSubscription"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -4986,11 +8418,11 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/subscriptions/{subscription_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdatePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateSubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -5001,41 +8433,55 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } /// - /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } + /// Updates an existing User’s properties. /// /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) + /// + /// + /// + /// /// Index associated with the operation. - /// UpdatePlayerTagsSuccessResponse - public UpdatePlayerTagsSuccessResponse UpdatePlayerTags(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0) + /// InlineResponse202 + public InlineResponse202 UpdateUser(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdatePlayerTagsWithHttpInfo(appId, externalUserId, updatePlayerTagsRequestBody); + OneSignalApi.Client.ApiResponse localVarResponse = UpdateUserWithHttpInfo(appId, aliasLabel, aliasId, updateUserRequest); return localVarResponse.Data; } /// - /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } + /// Updates an existing User’s properties. /// /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) + /// + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of UpdatePlayerTagsSuccessResponse - public OneSignalApi.Client.ApiResponse UpdatePlayerTagsWithHttpInfo(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0) + /// ApiResponse of InlineResponse202 + public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdatePlayerTags"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateUser"); } - // verify the required parameter 'externalUserId' is set - if (externalUserId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'externalUserId' when calling DefaultApi->UpdatePlayerTags"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->UpdateUser"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->UpdateUser"); + } + + // verify the required parameter 'updateUserRequest' is set + if (updateUserRequest == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateUserRequest' when calling DefaultApi->UpdateUser"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -5062,10 +8508,11 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("external_user_id", OneSignalApi.Client.ClientUtils.ParameterToString(externalUserId)); // path parameter - localVarRequestOptions.Data = updatePlayerTagsRequestBody; + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = updateUserRequest; - localVarRequestOptions.Operation = "DefaultApi.UpdatePlayerTags"; + localVarRequestOptions.Operation = "DefaultApi.UpdateUser"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -5076,10 +8523,10 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } // make the HTTP request - var localVarResponse = this.Client.Put("/apps/{app_id}/users/{external_user_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Patch("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdatePlayerTags", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); if (_exception != null) { throw _exception; @@ -5090,43 +8537,57 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } /// - /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } + /// Updates an existing User’s properties. /// /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UpdatePlayerTagsSuccessResponse - public async System.Threading.Tasks.Task UpdatePlayerTagsAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of InlineResponse202 + public async System.Threading.Tasks.Task UpdateUserAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdatePlayerTagsWithHttpInfoAsync(appId, externalUserId, updatePlayerTagsRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await UpdateUserWithHttpInfoAsync(appId, aliasLabel, aliasId, updateUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } + /// Updates an existing User’s properties. /// /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) + /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UpdatePlayerTagsSuccessResponse) - public async System.Threading.Tasks.Task> UpdatePlayerTagsWithHttpInfoAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (InlineResponse202) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdatePlayerTags"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateUser"); } - // verify the required parameter 'externalUserId' is set - if (externalUserId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'externalUserId' when calling DefaultApi->UpdatePlayerTags"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->UpdateUser"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->UpdateUser"); + } + + // verify the required parameter 'updateUserRequest' is set + if (updateUserRequest == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateUserRequest' when calling DefaultApi->UpdateUser"); } @@ -5154,10 +8615,11 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("external_user_id", OneSignalApi.Client.ClientUtils.ParameterToString(externalUserId)); // path parameter - localVarRequestOptions.Data = updatePlayerTagsRequestBody; + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = updateUserRequest; - localVarRequestOptions.Operation = "DefaultApi.UpdatePlayerTags"; + localVarRequestOptions.Operation = "DefaultApi.UpdateUser"; localVarRequestOptions.OperationIndex = operationIndex; // authentication (app_key) required @@ -5168,11 +8630,11 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/apps/{app_id}/users/{external_user_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdatePlayerTags", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); if (_exception != null) { throw _exception; diff --git a/src/OneSignalApi/Client/ApiClient.cs b/src/OneSignalApi/Client/ApiClient.cs index 137766f..95a2509 100644 --- a/src/OneSignalApi/Client/ApiClient.cs +++ b/src/OneSignalApi/Client/ApiClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -304,7 +304,7 @@ private RestRequest NewRequest( } // Always add the One Signal telemetry to the request. - request.AddHeader("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-dotnet, version=1.0.2"); + request.AddHeader("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-dotnet, version=1.2.1"); if (configuration.DefaultHeaders != null) { diff --git a/src/OneSignalApi/Client/ApiException.cs b/src/OneSignalApi/Client/ApiException.cs index 5bc752b..1a8723a 100644 --- a/src/OneSignalApi/Client/ApiException.cs +++ b/src/OneSignalApi/Client/ApiException.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ApiResponse.cs b/src/OneSignalApi/Client/ApiResponse.cs index 0b8e592..3bebe58 100644 --- a/src/OneSignalApi/Client/ApiResponse.cs +++ b/src/OneSignalApi/Client/ApiResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ClientUtils.cs b/src/OneSignalApi/Client/ClientUtils.cs index 575cf3f..8efaf81 100644 --- a/src/OneSignalApi/Client/ClientUtils.cs +++ b/src/OneSignalApi/Client/ClientUtils.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/Configuration.cs b/src/OneSignalApi/Client/Configuration.cs index be71384..a37481e 100644 --- a/src/OneSignalApi/Client/Configuration.cs +++ b/src/OneSignalApi/Client/Configuration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -32,7 +32,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "1.0.4"; + public const string Version = "2.0.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -109,7 +109,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "OpenAPI-Generator/1.0.4/csharp"; + UserAgent = "OpenAPI-Generator/2.0.0/csharp"; BasePath = "https://onesignal.com/api/v1"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -516,8 +516,8 @@ public static string ToDebugReport() string report = "C# SDK (OneSignalApi) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.2\n"; - report += " SDK Package Version: 1.0.4\n"; + report += " Version of the API: 1.2.1\n"; + report += " SDK Package Version: 2.0.0\n"; return report; } diff --git a/src/OneSignalApi/Client/ExceptionFactory.cs b/src/OneSignalApi/Client/ExceptionFactory.cs index 1c5ad6a..49b318c 100644 --- a/src/OneSignalApi/Client/ExceptionFactory.cs +++ b/src/OneSignalApi/Client/ExceptionFactory.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/GlobalConfiguration.cs b/src/OneSignalApi/Client/GlobalConfiguration.cs index 82d3862..05069ea 100644 --- a/src/OneSignalApi/Client/GlobalConfiguration.cs +++ b/src/OneSignalApi/Client/GlobalConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/HttpMethod.cs b/src/OneSignalApi/Client/HttpMethod.cs index 01f9466..22b54ee 100644 --- a/src/OneSignalApi/Client/HttpMethod.cs +++ b/src/OneSignalApi/Client/HttpMethod.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IApiAccessor.cs b/src/OneSignalApi/Client/IApiAccessor.cs index 1d8844b..095c894 100644 --- a/src/OneSignalApi/Client/IApiAccessor.cs +++ b/src/OneSignalApi/Client/IApiAccessor.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IAsynchronousClient.cs b/src/OneSignalApi/Client/IAsynchronousClient.cs index 967718b..d7b63a0 100644 --- a/src/OneSignalApi/Client/IAsynchronousClient.cs +++ b/src/OneSignalApi/Client/IAsynchronousClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IReadableConfiguration.cs b/src/OneSignalApi/Client/IReadableConfiguration.cs index 2bf644c..020d104 100644 --- a/src/OneSignalApi/Client/IReadableConfiguration.cs +++ b/src/OneSignalApi/Client/IReadableConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ISynchronousClient.cs b/src/OneSignalApi/Client/ISynchronousClient.cs index 0f33a59..512eb1e 100644 --- a/src/OneSignalApi/Client/ISynchronousClient.cs +++ b/src/OneSignalApi/Client/ISynchronousClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/Multimap.cs b/src/OneSignalApi/Client/Multimap.cs index 09cf256..fb84d24 100644 --- a/src/OneSignalApi/Client/Multimap.cs +++ b/src/OneSignalApi/Client/Multimap.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/OpenAPIDateConverter.cs b/src/OneSignalApi/Client/OpenAPIDateConverter.cs index 082b3c7..878ba58 100644 --- a/src/OneSignalApi/Client/OpenAPIDateConverter.cs +++ b/src/OneSignalApi/Client/OpenAPIDateConverter.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/RequestOptions.cs b/src/OneSignalApi/Client/RequestOptions.cs index 6e7685e..0b77bcf 100644 --- a/src/OneSignalApi/Client/RequestOptions.cs +++ b/src/OneSignalApi/Client/RequestOptions.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/RetryConfiguration.cs b/src/OneSignalApi/Client/RetryConfiguration.cs index a365c39..b60399e 100644 --- a/src/OneSignalApi/Client/RetryConfiguration.cs +++ b/src/OneSignalApi/Client/RetryConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/AbstractOpenAPISchema.cs b/src/OneSignalApi/Model/AbstractOpenAPISchema.cs index f100710..2c76e08 100644 --- a/src/OneSignalApi/Model/AbstractOpenAPISchema.cs +++ b/src/OneSignalApi/Model/AbstractOpenAPISchema.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/App.cs b/src/OneSignalApi/Model/App.cs index a554f9c..6a88fc6 100644 --- a/src/OneSignalApi/Model/App.cs +++ b/src/OneSignalApi/Model/App.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -288,28 +288,28 @@ public bool ShouldSerializeSafariApnsCertificates() /// iOS: Required if using p8. Unique identifier for the p8 authentication key. /// /// iOS: Required if using p8. Unique identifier for the p8 authentication key. - [DataMember(Name = "apns_key_id", EmitDefaultValue = false)] + [DataMember(Name = "apns_key_id", EmitDefaultValue = true)] public string ApnsKeyId { get; set; } /// /// iOS: Required if using p8. Team ID generated by Apple for your developer account. /// /// iOS: Required if using p8. Team ID generated by Apple for your developer account. - [DataMember(Name = "apns_team_id", EmitDefaultValue = false)] + [DataMember(Name = "apns_team_id", EmitDefaultValue = true)] public string ApnsTeamId { get; set; } /// /// iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem. /// /// iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem. - [DataMember(Name = "apns_bundle_id", EmitDefaultValue = false)] + [DataMember(Name = "apns_bundle_id", EmitDefaultValue = true)] public string ApnsBundleId { get; set; } /// /// iOS: Required if using p8. Base64 encoded p8 key /// /// iOS: Required if using p8. Base64 encoded p8 key - [DataMember(Name = "apns_p8", EmitDefaultValue = false)] + [DataMember(Name = "apns_p8", EmitDefaultValue = true)] public string ApnsP8 { get; set; } /// @@ -406,7 +406,7 @@ public bool ShouldSerializeSafariIcon128128() /// /// Gets or Sets BasicAuthKey /// - [DataMember(Name = "basic_auth_key", EmitDefaultValue = false)] + [DataMember(Name = "basic_auth_key", EmitDefaultValue = true)] public string BasicAuthKey { get; private set; } /// diff --git a/src/OneSignalApi/Model/BadRequestError.cs b/src/OneSignalApi/Model/BadRequestError.cs index f1cefa9..3e2037a 100644 --- a/src/OneSignalApi/Model/BadRequestError.cs +++ b/src/OneSignalApi/Model/BadRequestError.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/BasicNotification.cs b/src/OneSignalApi/Model/BasicNotification.cs index 35f1cf6..bccafd0 100644 --- a/src/OneSignalApi/Model/BasicNotification.cs +++ b/src/OneSignalApi/Model/BasicNotification.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -32,6 +32,38 @@ namespace OneSignalApi.Model [DataContract(Name = "BasicNotification")] public partial class BasicNotification : IEquatable, IValidatableObject { + /// + /// Defines TargetChannel + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TargetChannelEnum + { + /// + /// Enum Push for value: push + /// + [EnumMember(Value = "push")] + Push = 1, + + /// + /// Enum Email for value: email + /// + [EnumMember(Value = "email")] + Email = 2, + + /// + /// Enum Sms for value: sms + /// + [EnumMember(Value = "sms")] + Sms = 3 + + } + + + /// + /// Gets or Sets TargetChannel + /// + [DataMember(Name = "target_channel", EmitDefaultValue = false)] + public TargetChannelEnum? TargetChannel { get; set; } /// /// Defines Aggregation /// @@ -87,6 +119,8 @@ protected BasicNotification() { } /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . + /// includeAliases. + /// targetChannel. /// id. /// Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user.. /// Indicates whether to send to all devices registered under your app's Apple iOS platform.. @@ -174,7 +208,7 @@ protected BasicNotification() { } /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . /// Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . /// filters. - public BasicNotification(List includedSegments = default(List), List excludedSegments = default(List), List includePlayerIds = default(List), List includeExternalUserIds = default(List), List includeEmailTokens = default(List), List includePhoneNumbers = default(List), List includeIosTokens = default(List), List includeWpWnsUris = default(List), List includeAmazonRegIds = default(List), List includeChromeRegIds = default(List), List includeChromeWebRegIds = default(List), List includeAndroidRegIds = default(List), string id = default(string), string name = default(string), bool? isIos = default(bool?), bool? isAndroid = default(bool?), bool? isHuawei = default(bool?), bool? isAnyWeb = default(bool?), bool? isChromeWeb = default(bool?), bool? isFirefox = default(bool?), bool? isSafari = default(bool?), bool? isWPWNS = default(bool?), bool? isAdm = default(bool?), bool? isChrome = default(bool?), string channelForExternalUserIds = default(string), string appId = default(string), string externalId = default(string), StringMap contents = default(StringMap), StringMap headings = default(StringMap), StringMap subtitle = default(StringMap), Object data = default(Object), string huaweiMsgType = default(string), string url = default(string), string webUrl = default(string), string appUrl = default(string), Object iosAttachments = default(Object), string templateId = default(string), bool? contentAvailable = default(bool?), bool mutableContent = default(bool), string targetContentIdentifier = default(string), string bigPicture = default(string), string huaweiBigPicture = default(string), string admBigPicture = default(string), string chromeBigPicture = default(string), string chromeWebImage = default(string), List /// Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call [DataMember(Name = "include_player_ids", EmitDefaultValue = true)] + [Obsolete] public List IncludePlayerIds { get; set; } /// @@ -308,6 +345,7 @@ protected BasicNotification() { } /// /// Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. [DataMember(Name = "include_external_user_ids", EmitDefaultValue = true)] + [Obsolete] public List IncludeExternalUserIds { get; set; } /// @@ -366,6 +404,12 @@ protected BasicNotification() { } [DataMember(Name = "include_android_reg_ids", EmitDefaultValue = false)] public List IncludeAndroidRegIds { get; set; } + /// + /// Gets or Sets IncludeAliases + /// + [DataMember(Name = "include_aliases", EmitDefaultValue = true)] + public PlayerNotificationTargetIncludeAliases IncludeAliases { get; set; } + /// /// Gets or Sets Id /// @@ -481,7 +525,7 @@ public bool ShouldSerializeValue() /// Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true /// /// Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true - [DataMember(Name = "external_id", EmitDefaultValue = false)] + [DataMember(Name = "external_id", EmitDefaultValue = true)] public string ExternalId { get; set; } /// @@ -1003,6 +1047,8 @@ public override string ToString() sb.Append(" IncludeChromeRegIds: ").Append(IncludeChromeRegIds).Append("\n"); sb.Append(" IncludeChromeWebRegIds: ").Append(IncludeChromeWebRegIds).Append("\n"); sb.Append(" IncludeAndroidRegIds: ").Append(IncludeAndroidRegIds).Append("\n"); + sb.Append(" IncludeAliases: ").Append(IncludeAliases).Append("\n"); + sb.Append(" TargetChannel: ").Append(TargetChannel).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); @@ -1199,6 +1245,15 @@ public bool Equals(BasicNotification input) input.IncludeAndroidRegIds != null && this.IncludeAndroidRegIds.SequenceEqual(input.IncludeAndroidRegIds) ) && + ( + this.IncludeAliases == input.IncludeAliases || + (this.IncludeAliases != null && + this.IncludeAliases.Equals(input.IncludeAliases)) + ) && + ( + this.TargetChannel == input.TargetChannel || + this.TargetChannel.Equals(input.TargetChannel) + ) && ( this.Id == input.Id || (this.Id != null && @@ -1703,6 +1758,11 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.IncludeAndroidRegIds.GetHashCode(); } + if (this.IncludeAliases != null) + { + hashCode = (hashCode * 59) + this.IncludeAliases.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TargetChannel.GetHashCode(); if (this.Id != null) { hashCode = (hashCode * 59) + this.Id.GetHashCode(); diff --git a/src/OneSignalApi/Model/BasicNotificationAllOf.cs b/src/OneSignalApi/Model/BasicNotificationAllOf.cs index 94b19af..a50fe72 100644 --- a/src/OneSignalApi/Model/BasicNotificationAllOf.cs +++ b/src/OneSignalApi/Model/BasicNotificationAllOf.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -363,7 +363,7 @@ public bool ShouldSerializeValue() /// Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true /// /// Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true - [DataMember(Name = "external_id", EmitDefaultValue = false)] + [DataMember(Name = "external_id", EmitDefaultValue = true)] public string ExternalId { get; set; } /// diff --git a/src/OneSignalApi/Model/BasicNotificationAllOfAndroidBackgroundLayout.cs b/src/OneSignalApi/Model/BasicNotificationAllOfAndroidBackgroundLayout.cs index 32327d2..d94b9cb 100644 --- a/src/OneSignalApi/Model/BasicNotificationAllOfAndroidBackgroundLayout.cs +++ b/src/OneSignalApi/Model/BasicNotificationAllOfAndroidBackgroundLayout.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/BeginLiveActivityRequest.cs b/src/OneSignalApi/Model/BeginLiveActivityRequest.cs index ef58e94..524896d 100644 --- a/src/OneSignalApi/Model/BeginLiveActivityRequest.cs +++ b/src/OneSignalApi/Model/BeginLiveActivityRequest.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/Button.cs b/src/OneSignalApi/Model/Button.cs index c473677..2686dd2 100644 --- a/src/OneSignalApi/Model/Button.cs +++ b/src/OneSignalApi/Model/Button.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/CancelNotificationSuccessResponse.cs b/src/OneSignalApi/Model/CancelNotificationSuccessResponse.cs index 40d4579..03f373d 100644 --- a/src/OneSignalApi/Model/CancelNotificationSuccessResponse.cs +++ b/src/OneSignalApi/Model/CancelNotificationSuccessResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/CreateNotificationSuccessResponse.cs b/src/OneSignalApi/Model/CreateNotificationSuccessResponse.cs index 44881c9..e8c3cc5 100644 --- a/src/OneSignalApi/Model/CreateNotificationSuccessResponse.cs +++ b/src/OneSignalApi/Model/CreateNotificationSuccessResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -35,22 +35,12 @@ public partial class CreateNotificationSuccessResponse : IEquatable /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected CreateNotificationSuccessResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// Estimated number of subscribers targetted by notification. (required). + /// id. + /// Estimated number of subscribers targetted by notification.. /// externalId. /// errors. public CreateNotificationSuccessResponse(string id = default(string), int recipients = default(int), string externalId = default(string), Notification200Errors errors = default(Notification200Errors)) { - // to ensure "id" is required (not null) - if (id == null) - { - throw new ArgumentNullException("id is a required property for CreateNotificationSuccessResponse and cannot be null"); - } this.Id = id; this.Recipients = recipients; this.ExternalId = externalId; @@ -60,14 +50,14 @@ protected CreateNotificationSuccessResponse() { } /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", EmitDefaultValue = false)] public string Id { get; set; } /// /// Estimated number of subscribers targetted by notification. /// /// Estimated number of subscribers targetted by notification. - [DataMember(Name = "recipients", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "recipients", EmitDefaultValue = false)] public int Recipients { get; set; } /// diff --git a/src/OneSignalApi/Model/CreatePlayerSuccessResponse.cs b/src/OneSignalApi/Model/CreatePlayerSuccessResponse.cs index 859ccbc..291b81a 100644 --- a/src/OneSignalApi/Model/CreatePlayerSuccessResponse.cs +++ b/src/OneSignalApi/Model/CreatePlayerSuccessResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/CreateSegmentConflictResponse.cs b/src/OneSignalApi/Model/CreateSegmentConflictResponse.cs index f37a5de..acdb909 100644 --- a/src/OneSignalApi/Model/CreateSegmentConflictResponse.cs +++ b/src/OneSignalApi/Model/CreateSegmentConflictResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/CreateSegmentSuccessResponse.cs b/src/OneSignalApi/Model/CreateSegmentSuccessResponse.cs index 6a72c05..57b554b 100644 --- a/src/OneSignalApi/Model/CreateSegmentSuccessResponse.cs +++ b/src/OneSignalApi/Model/CreateSegmentSuccessResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/CreateSubscriptionRequestBody.cs b/src/OneSignalApi/Model/CreateSubscriptionRequestBody.cs new file mode 100644 index 0000000..95317ef --- /dev/null +++ b/src/OneSignalApi/Model/CreateSubscriptionRequestBody.cs @@ -0,0 +1,143 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// CreateSubscriptionRequestBody + /// + [DataContract(Name = "CreateSubscriptionRequestBody")] + public partial class CreateSubscriptionRequestBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// subscription. + /// retainPreviousOwner. + public CreateSubscriptionRequestBody(SubscriptionObject subscription = default(SubscriptionObject), bool retainPreviousOwner = default(bool)) + { + this.Subscription = subscription; + this.RetainPreviousOwner = retainPreviousOwner; + } + + /// + /// Gets or Sets Subscription + /// + [DataMember(Name = "subscription", EmitDefaultValue = false)] + public SubscriptionObject Subscription { get; set; } + + /// + /// Gets or Sets RetainPreviousOwner + /// + [DataMember(Name = "retain_previous_owner", EmitDefaultValue = true)] + public bool RetainPreviousOwner { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateSubscriptionRequestBody {\n"); + sb.Append(" Subscription: ").Append(Subscription).Append("\n"); + sb.Append(" RetainPreviousOwner: ").Append(RetainPreviousOwner).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSubscriptionRequestBody); + } + + /// + /// Returns true if CreateSubscriptionRequestBody instances are equal + /// + /// Instance of CreateSubscriptionRequestBody to be compared + /// Boolean + public bool Equals(CreateSubscriptionRequestBody input) + { + if (input == null) + { + return false; + } + return + ( + this.Subscription == input.Subscription || + (this.Subscription != null && + this.Subscription.Equals(input.Subscription)) + ) && + ( + this.RetainPreviousOwner == input.RetainPreviousOwner || + this.RetainPreviousOwner.Equals(input.RetainPreviousOwner) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Subscription != null) + { + hashCode = (hashCode * 59) + this.Subscription.GetHashCode(); + } + hashCode = (hashCode * 59) + this.RetainPreviousOwner.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/CreateUserConflictResponse.cs b/src/OneSignalApi/Model/CreateUserConflictResponse.cs new file mode 100644 index 0000000..cba9a99 --- /dev/null +++ b/src/OneSignalApi/Model/CreateUserConflictResponse.cs @@ -0,0 +1,130 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// CreateUserConflictResponse + /// + [DataContract(Name = "CreateUserConflictResponse")] + public partial class CreateUserConflictResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// errors. + public CreateUserConflictResponse(List errors = default(List)) + { + this.Errors = errors; + } + + /// + /// Gets or Sets Errors + /// + [DataMember(Name = "errors", EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateUserConflictResponse {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateUserConflictResponse); + } + + /// + /// Returns true if CreateUserConflictResponse instances are equal + /// + /// Instance of CreateUserConflictResponse to be compared + /// Boolean + public bool Equals(CreateUserConflictResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Errors == input.Errors || + this.Errors != null && + input.Errors != null && + this.Errors.SequenceEqual(input.Errors) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Errors != null) + { + hashCode = (hashCode * 59) + this.Errors.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/CreateUserConflictResponseErrorsInner.cs b/src/OneSignalApi/Model/CreateUserConflictResponseErrorsInner.cs new file mode 100644 index 0000000..1bdf636 --- /dev/null +++ b/src/OneSignalApi/Model/CreateUserConflictResponseErrorsInner.cs @@ -0,0 +1,165 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// CreateUserConflictResponseErrorsInner + /// + [DataContract(Name = "CreateUserConflictResponse_errors_inner")] + public partial class CreateUserConflictResponseErrorsInner : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// title. + /// meta. + public CreateUserConflictResponseErrorsInner(string code = default(string), string title = default(string), CreateUserConflictResponseErrorsItemsMeta meta = default(CreateUserConflictResponseErrorsItemsMeta)) + { + this.Code = code; + this.Title = title; + this.Meta = meta; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name = "code", EmitDefaultValue = false)] + public string Code { get; set; } + + /// + /// Gets or Sets Title + /// + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + /// + /// Gets or Sets Meta + /// + [DataMember(Name = "meta", EmitDefaultValue = false)] + public CreateUserConflictResponseErrorsItemsMeta Meta { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateUserConflictResponseErrorsInner {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Meta: ").Append(Meta).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateUserConflictResponseErrorsInner); + } + + /// + /// Returns true if CreateUserConflictResponseErrorsInner instances are equal + /// + /// Instance of CreateUserConflictResponseErrorsInner to be compared + /// Boolean + public bool Equals(CreateUserConflictResponseErrorsInner input) + { + if (input == null) + { + return false; + } + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Meta == input.Meta || + (this.Meta != null && + this.Meta.Equals(input.Meta)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + { + hashCode = (hashCode * 59) + this.Code.GetHashCode(); + } + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + if (this.Meta != null) + { + hashCode = (hashCode * 59) + this.Meta.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/CreateUserConflictResponseErrorsItemsMeta.cs b/src/OneSignalApi/Model/CreateUserConflictResponseErrorsItemsMeta.cs new file mode 100644 index 0000000..27c6217 --- /dev/null +++ b/src/OneSignalApi/Model/CreateUserConflictResponseErrorsItemsMeta.cs @@ -0,0 +1,129 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// CreateUserConflictResponseErrorsItemsMeta + /// + [DataContract(Name = "CreateUserConflictResponse_errorsItems_meta")] + public partial class CreateUserConflictResponseErrorsItemsMeta : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// conflictingAliases. + public CreateUserConflictResponseErrorsItemsMeta(Object conflictingAliases = default(Object)) + { + this.ConflictingAliases = conflictingAliases; + } + + /// + /// Gets or Sets ConflictingAliases + /// + [DataMember(Name = "conflicting_aliases", EmitDefaultValue = false)] + public Object ConflictingAliases { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateUserConflictResponseErrorsItemsMeta {\n"); + sb.Append(" ConflictingAliases: ").Append(ConflictingAliases).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateUserConflictResponseErrorsItemsMeta); + } + + /// + /// Returns true if CreateUserConflictResponseErrorsItemsMeta instances are equal + /// + /// Instance of CreateUserConflictResponseErrorsItemsMeta to be compared + /// Boolean + public bool Equals(CreateUserConflictResponseErrorsItemsMeta input) + { + if (input == null) + { + return false; + } + return + ( + this.ConflictingAliases == input.ConflictingAliases || + (this.ConflictingAliases != null && + this.ConflictingAliases.Equals(input.ConflictingAliases)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ConflictingAliases != null) + { + hashCode = (hashCode * 59) + this.ConflictingAliases.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/DeletePlayerNotFoundResponse.cs b/src/OneSignalApi/Model/DeletePlayerNotFoundResponse.cs index 3075cbf..4f049cf 100644 --- a/src/OneSignalApi/Model/DeletePlayerNotFoundResponse.cs +++ b/src/OneSignalApi/Model/DeletePlayerNotFoundResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/DeletePlayerSuccessResponse.cs b/src/OneSignalApi/Model/DeletePlayerSuccessResponse.cs index a0398f2..bb67c8a 100644 --- a/src/OneSignalApi/Model/DeletePlayerSuccessResponse.cs +++ b/src/OneSignalApi/Model/DeletePlayerSuccessResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/DeleteSegmentNotFoundResponse.cs b/src/OneSignalApi/Model/DeleteSegmentNotFoundResponse.cs index fc9af9b..1b25650 100644 --- a/src/OneSignalApi/Model/DeleteSegmentNotFoundResponse.cs +++ b/src/OneSignalApi/Model/DeleteSegmentNotFoundResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/DeleteSegmentSuccessResponse.cs b/src/OneSignalApi/Model/DeleteSegmentSuccessResponse.cs index c4a22be..8eab9ec 100644 --- a/src/OneSignalApi/Model/DeleteSegmentSuccessResponse.cs +++ b/src/OneSignalApi/Model/DeleteSegmentSuccessResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/DeliveryData.cs b/src/OneSignalApi/Model/DeliveryData.cs index c201823..9167dca 100644 --- a/src/OneSignalApi/Model/DeliveryData.cs +++ b/src/OneSignalApi/Model/DeliveryData.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/ExportPlayersRequestBody.cs b/src/OneSignalApi/Model/ExportPlayersRequestBody.cs index 9fca04b..fbb0003 100644 --- a/src/OneSignalApi/Model/ExportPlayersRequestBody.cs +++ b/src/OneSignalApi/Model/ExportPlayersRequestBody.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/ExportPlayersSuccessResponse.cs b/src/OneSignalApi/Model/ExportPlayersSuccessResponse.cs index 7b41e13..83ba71f 100644 --- a/src/OneSignalApi/Model/ExportPlayersSuccessResponse.cs +++ b/src/OneSignalApi/Model/ExportPlayersSuccessResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/Filter.cs b/src/OneSignalApi/Model/Filter.cs index b28f7c5..1937b32 100644 --- a/src/OneSignalApi/Model/Filter.cs +++ b/src/OneSignalApi/Model/Filter.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/FilterExpressions.cs b/src/OneSignalApi/Model/FilterExpressions.cs index 9275a09..f1d3882 100644 --- a/src/OneSignalApi/Model/FilterExpressions.cs +++ b/src/OneSignalApi/Model/FilterExpressions.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/GetNotificationRequestBody.cs b/src/OneSignalApi/Model/GetNotificationRequestBody.cs index 6e9f94e..bd7266d 100644 --- a/src/OneSignalApi/Model/GetNotificationRequestBody.cs +++ b/src/OneSignalApi/Model/GetNotificationRequestBody.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/IdentifyUserConflictResponse.cs b/src/OneSignalApi/Model/IdentifyUserConflictResponse.cs new file mode 100644 index 0000000..ee48be6 --- /dev/null +++ b/src/OneSignalApi/Model/IdentifyUserConflictResponse.cs @@ -0,0 +1,130 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// IdentifyUserConflictResponse + /// + [DataContract(Name = "IdentifyUserConflictResponse")] + public partial class IdentifyUserConflictResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// errors. + public IdentifyUserConflictResponse(List errors = default(List)) + { + this.Errors = errors; + } + + /// + /// Gets or Sets Errors + /// + [DataMember(Name = "errors", EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IdentifyUserConflictResponse {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as IdentifyUserConflictResponse); + } + + /// + /// Returns true if IdentifyUserConflictResponse instances are equal + /// + /// Instance of IdentifyUserConflictResponse to be compared + /// Boolean + public bool Equals(IdentifyUserConflictResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Errors == input.Errors || + this.Errors != null && + input.Errors != null && + this.Errors.SequenceEqual(input.Errors) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Errors != null) + { + hashCode = (hashCode * 59) + this.Errors.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/IdentifyUserConflictResponseErrorsInner.cs b/src/OneSignalApi/Model/IdentifyUserConflictResponseErrorsInner.cs new file mode 100644 index 0000000..6c8bf15 --- /dev/null +++ b/src/OneSignalApi/Model/IdentifyUserConflictResponseErrorsInner.cs @@ -0,0 +1,147 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// IdentifyUserConflictResponseErrorsInner + /// + [DataContract(Name = "IdentifyUserConflictResponse_errors_inner")] + public partial class IdentifyUserConflictResponseErrorsInner : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// title. + public IdentifyUserConflictResponseErrorsInner(string code = default(string), string title = default(string)) + { + this.Code = code; + this.Title = title; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name = "code", EmitDefaultValue = false)] + public string Code { get; set; } + + /// + /// Gets or Sets Title + /// + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IdentifyUserConflictResponseErrorsInner {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as IdentifyUserConflictResponseErrorsInner); + } + + /// + /// Returns true if IdentifyUserConflictResponseErrorsInner instances are equal + /// + /// Instance of IdentifyUserConflictResponseErrorsInner to be compared + /// Boolean + public bool Equals(IdentifyUserConflictResponseErrorsInner input) + { + if (input == null) + { + return false; + } + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + { + hashCode = (hashCode * 59) + this.Code.GetHashCode(); + } + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/InlineResponse200.cs b/src/OneSignalApi/Model/InlineResponse200.cs new file mode 100644 index 0000000..a0c5b3f --- /dev/null +++ b/src/OneSignalApi/Model/InlineResponse200.cs @@ -0,0 +1,130 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// InlineResponse200 + /// + [DataContract(Name = "inline_response_200")] + public partial class InlineResponse200 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// identity. + public InlineResponse200(Dictionary identity = default(Dictionary)) + { + this.Identity = identity; + } + + /// + /// Gets or Sets Identity + /// + [DataMember(Name = "identity", EmitDefaultValue = false)] + public Dictionary Identity { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InlineResponse200 {\n"); + sb.Append(" Identity: ").Append(Identity).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InlineResponse200); + } + + /// + /// Returns true if InlineResponse200 instances are equal + /// + /// Instance of InlineResponse200 to be compared + /// Boolean + public bool Equals(InlineResponse200 input) + { + if (input == null) + { + return false; + } + return + ( + this.Identity == input.Identity || + this.Identity != null && + input.Identity != null && + this.Identity.SequenceEqual(input.Identity) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Identity != null) + { + hashCode = (hashCode * 59) + this.Identity.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/InlineResponse2003.cs b/src/OneSignalApi/Model/InlineResponse2003.cs new file mode 100644 index 0000000..90ca18f --- /dev/null +++ b/src/OneSignalApi/Model/InlineResponse2003.cs @@ -0,0 +1,130 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// InlineResponse2003 + /// + [DataContract(Name = "inline_response_200_3")] + public partial class InlineResponse2003 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// inAppMessages. + public InlineResponse2003(List inAppMessages = default(List)) + { + this.InAppMessages = inAppMessages; + } + + /// + /// Gets or Sets InAppMessages + /// + [DataMember(Name = "in_app_messages", EmitDefaultValue = false)] + public List InAppMessages { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InlineResponse2003 {\n"); + sb.Append(" InAppMessages: ").Append(InAppMessages).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InlineResponse2003); + } + + /// + /// Returns true if InlineResponse2003 instances are equal + /// + /// Instance of InlineResponse2003 to be compared + /// Boolean + public bool Equals(InlineResponse2003 input) + { + if (input == null) + { + return false; + } + return + ( + this.InAppMessages == input.InAppMessages || + this.InAppMessages != null && + input.InAppMessages != null && + this.InAppMessages.SequenceEqual(input.InAppMessages) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InAppMessages != null) + { + hashCode = (hashCode * 59) + this.InAppMessages.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/InlineResponse201.cs b/src/OneSignalApi/Model/InlineResponse201.cs new file mode 100644 index 0000000..4e01d67 --- /dev/null +++ b/src/OneSignalApi/Model/InlineResponse201.cs @@ -0,0 +1,129 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// InlineResponse201 + /// + [DataContract(Name = "inline_response_201")] + public partial class InlineResponse201 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// subscription. + public InlineResponse201(SubscriptionObject subscription = default(SubscriptionObject)) + { + this.Subscription = subscription; + } + + /// + /// Gets or Sets Subscription + /// + [DataMember(Name = "subscription", EmitDefaultValue = false)] + public SubscriptionObject Subscription { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InlineResponse201 {\n"); + sb.Append(" Subscription: ").Append(Subscription).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InlineResponse201); + } + + /// + /// Returns true if InlineResponse201 instances are equal + /// + /// Instance of InlineResponse201 to be compared + /// Boolean + public bool Equals(InlineResponse201 input) + { + if (input == null) + { + return false; + } + return + ( + this.Subscription == input.Subscription || + (this.Subscription != null && + this.Subscription.Equals(input.Subscription)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Subscription != null) + { + hashCode = (hashCode * 59) + this.Subscription.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/InlineResponse202.cs b/src/OneSignalApi/Model/InlineResponse202.cs new file mode 100644 index 0000000..916492d --- /dev/null +++ b/src/OneSignalApi/Model/InlineResponse202.cs @@ -0,0 +1,129 @@ +/* + * OneSignal + * + * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com + * + * The version of the OpenAPI document: 1.2.1 + * Contact: devrel@onesignal.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = OneSignalApi.Client.OpenAPIDateConverter; + +namespace OneSignalApi.Model +{ + /// + /// InlineResponse202 + /// + [DataContract(Name = "inline_response_202")] + public partial class InlineResponse202 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// properties. + public InlineResponse202(PropertiesObject properties = default(PropertiesObject)) + { + this.Properties = properties; + } + + /// + /// Gets or Sets Properties + /// + [DataMember(Name = "properties", EmitDefaultValue = false)] + public PropertiesObject Properties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InlineResponse202 {\n"); + sb.Append(" Properties: ").Append(Properties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InlineResponse202); + } + + /// + /// Returns true if InlineResponse202 instances are equal + /// + /// Instance of InlineResponse202 to be compared + /// Boolean + public bool Equals(InlineResponse202 input) + { + if (input == null) + { + return false; + } + return + ( + this.Properties == input.Properties || + (this.Properties != null && + this.Properties.Equals(input.Properties)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Properties != null) + { + hashCode = (hashCode * 59) + this.Properties.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/OneSignalApi/Model/InvalidIdentifierError.cs b/src/OneSignalApi/Model/InvalidIdentifierError.cs index f2ae885..e9076c2 100644 --- a/src/OneSignalApi/Model/InvalidIdentifierError.cs +++ b/src/OneSignalApi/Model/InvalidIdentifierError.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/Notification.cs b/src/OneSignalApi/Model/Notification.cs index 7e5d1c7..a52a357 100644 --- a/src/OneSignalApi/Model/Notification.cs +++ b/src/OneSignalApi/Model/Notification.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.0.2 + * The version of the OpenAPI document: 1.2.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -32,6 +32,38 @@ namespace OneSignalApi.Model [DataContract(Name = "Notification")] public partial class Notification : IEquatable, IValidatableObject { + /// + /// Defines TargetChannel + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TargetChannelEnum + { + /// + /// Enum Push for value: push + /// + [EnumMember(Value = "push")] + Push = 1, + + /// + /// Enum Email for value: email + /// + [EnumMember(Value = "email")] + Email = 2, + + /// + /// Enum Sms for value: sms + /// + [EnumMember(Value = "sms")] + Sms = 3 + + } + + + /// + /// Gets or Sets TargetChannel + /// + [DataMember(Name = "target_channel", EmitDefaultValue = false)] + public TargetChannelEnum? TargetChannel { get; set; } /// /// Defines Aggregation /// @@ -87,6 +119,8 @@ protected Notification() { } /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . + /// includeAliases. + /// targetChannel. /// id. /// Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user.. /// Indicates whether to send to all devices registered under your app's Apple iOS platform.. @@ -175,7 +209,7 @@ protected Notification() { } /// Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . /// filters. /// Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. . - public Notification(List includedSegments = default(List), List excludedSegments = default(List), List includePlayerIds = default(List), List includeExternalUserIds = default(List), List includeEmailTokens = default(List), List includePhoneNumbers = default(List), List includeIosTokens = default(List), List includeWpWnsUris = default(List), List includeAmazonRegIds = default(List), List includeChromeRegIds = default(List), List includeChromeWebRegIds = default(List), List includeAndroidRegIds = default(List), string id = default(string), string name = default(string), bool? isIos = default(bool?), bool? isAndroid = default(bool?), bool? isHuawei = default(bool?), bool? isAnyWeb = default(bool?), bool? isChromeWeb = default(bool?), bool? isFirefox = default(bool?), bool? isSafari = default(bool?), bool? isWPWNS = default(bool?), bool? isAdm = default(bool?), bool? isChrome = default(bool?), string channelForExternalUserIds = default(string), string appId = default(string), string externalId = default(string), StringMap contents = default(StringMap), StringMap headings = default(StringMap), StringMap subtitle = default(StringMap), Object data = default(Object), string huaweiMsgType = default(string), string url = default(string), string webUrl = default(string), string appUrl = default(string), Object iosAttachments = default(Object), string templateId = default(string), bool? contentAvailable = default(bool?), bool mutableContent = default(bool), string targetContentIdentifier = default(string), string bigPicture = default(string), string huaweiBigPicture = default(string), string admBigPicture = default(string), string chromeBigPicture = default(string), string chromeWebImage = default(string), List