diff --git a/README.md b/README.md index c2e64de..6c8bdec 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,15 @@ OneSignal - the Ruby gem for OneSignal A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -- API version: 5.10.0 -- Package version: 5.10.0 +- API version: 5.11.0 +- Package version: 5.11.0 ## Installation Add to your `Gemfile`: ```ruby -gem 'onesignal', '~> 5.10.0' +gem 'onesignal', '~> 5.11.0' ``` Then run `bundle install`. diff --git a/docs/AuditLogActor.md b/docs/AuditLogActor.md new file mode 100644 index 0000000..3e97006 --- /dev/null +++ b/docs/AuditLogActor.md @@ -0,0 +1,26 @@ +# OneSignal::AuditLogActor + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **email** | **String** | Email address of the actor. Absent if unavailable. | [optional] | +| **id** | **String** | UUID of the actor. | [optional] | +| **metadata** | **Object** | Additional actor-specific data. | [optional] | +| **name** | **String** | Display name of the actor. Absent if unavailable. | [optional] | +| **type** | **String** | Actor type (e.g. member, api_key, system). | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::AuditLogActor.new( + email: nil, + id: nil, + metadata: nil, + name: nil, + type: nil +) +``` + diff --git a/docs/AuditLogContext.md b/docs/AuditLogContext.md new file mode 100644 index 0000000..e36c38e --- /dev/null +++ b/docs/AuditLogContext.md @@ -0,0 +1,24 @@ +# OneSignal::AuditLogContext + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **country** | **String** | Country code derived from the request IP. | [optional] | +| **ip** | **String** | IP address the request originated from. | [optional] | +| **metadata** | **Object** | Additional context-specific data. | [optional] | +| **user_agent** | **String** | User agent of the client that made the request. | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::AuditLogContext.new( + country: nil, + ip: nil, + metadata: nil, + user_agent: nil +) +``` + diff --git a/docs/AuditLogEvent.md b/docs/AuditLogEvent.md new file mode 100644 index 0000000..3a49d65 --- /dev/null +++ b/docs/AuditLogEvent.md @@ -0,0 +1,36 @@ +# OneSignal::AuditLogEvent + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action** | **String** | The action that was performed (e.g. notification.sent, segment.created, member.invited). | [optional] | +| **actor** | [**AuditLogActor**](AuditLogActor.md) | | [optional] | +| **app_id** | **String** | UUID of the app the event is associated with. Absent for org-level events. | [optional] | +| **context** | [**AuditLogContext**](AuditLogContext.md) | | [optional] | +| **id** | **String** | UUID of the audit log event. | [optional] | +| **metadata** | **Object** | Additional event-specific data that does not fit into the standard fields. | [optional] | +| **occurred_at** | **String** | RFC 3339 timestamp of when the event occurred (e.g. 2026-02-18T12:34:56Z). | [optional] | +| **organization_id** | **String** | UUID of the organization the event belongs to. | [optional] | +| **targets** | [**Array<AuditLogTarget>**](AuditLogTarget.md) | The resources the action was performed on. May be empty for org-level events. | [optional] | +| **version** | **Integer** | Schema version of the event payload. | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::AuditLogEvent.new( + action: nil, + actor: nil, + app_id: nil, + context: nil, + id: nil, + metadata: nil, + occurred_at: nil, + organization_id: nil, + targets: nil, + version: nil +) +``` + diff --git a/docs/AuditLogTarget.md b/docs/AuditLogTarget.md new file mode 100644 index 0000000..dcff1db --- /dev/null +++ b/docs/AuditLogTarget.md @@ -0,0 +1,24 @@ +# OneSignal::AuditLogTarget + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | UUID of the resource. | [optional] | +| **metadata** | **Object** | Additional resource-specific data. | [optional] | +| **name** | **String** | Display name of the resource. Absent if unavailable. | [optional] | +| **type** | **String** | Resource type (e.g. notification, segment, journey, app). | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::AuditLogTarget.new( + id: nil, + metadata: nil, + name: nil, + type: nil +) +``` + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 41b9026..7db5fbb 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -32,8 +32,10 @@ All URIs are relative to *https://api.onesignal.com* | [**get_notification_history**](DefaultApi.md#get_notification_history) | **POST** /notifications/{notification_id}/history | Notification History | | [**get_notifications**](DefaultApi.md#get_notifications) | **GET** /notifications | View notifications | | [**get_outcomes**](DefaultApi.md#get_outcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes | +| [**get_segment**](DefaultApi.md#get_segment) | **GET** /apps/{app_id}/segments/{segment_id} | View Segment | | [**get_segments**](DefaultApi.md#get_segments) | **GET** /apps/{app_id}/segments | Get Segments | | [**get_user**](DefaultApi.md#get_user) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | | +| [**list_audit_logs**](DefaultApi.md#list_audit_logs) | **GET** /organizations/{organization_id}/audit_logs | List audit logs | | [**rotate_api_key**](DefaultApi.md#rotate_api_key) | **POST** /apps/{app_id}/auth/tokens/{token_id}/rotate | Rotate API key | | [**start_live_activity**](DefaultApi.md#start_live_activity) | **POST** /apps/{app_id}/activities/activity/{activity_type} | Start Live Activity | | [**transfer_subscription**](DefaultApi.md#transfer_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner | | @@ -41,6 +43,7 @@ All URIs are relative to *https://api.onesignal.com* | [**update_api_key**](DefaultApi.md#update_api_key) | **PATCH** /apps/{app_id}/auth/tokens/{token_id} | Update API key | | [**update_app**](DefaultApi.md#update_app) | **PUT** /apps/{app_id} | Update an app | | [**update_live_activity**](DefaultApi.md#update_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push | +| [**update_segment**](DefaultApi.md#update_segment) | **PATCH** /apps/{app_id}/segments/{segment_id} | Update Segment | | [**update_subscription**](DefaultApi.md#update_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | | | [**update_subscription_by_token**](DefaultApi.md#update_subscription_by_token) | **PATCH** /apps/{app_id}/subscriptions_by_token/{token_type}/{token} | Update subscription by token | | [**update_template**](DefaultApi.md#update_template) | **PATCH** /templates/{template_id} | Update template | @@ -2366,6 +2369,88 @@ end - **Accept**: application/json +## get_segment + +> get_segment(app_id, segment_id, opts) + +View Segment + +Retrieve details for a single segment by its ID, including subscriber count and optionally segment metadata and filters. + +### Examples + +```ruby +require 'onesignal' +# setup authorization +OneSignal.configure do |config| + # Configure Bearer authorization: rest_api_key + config.rest_api_key = 'YOUR_REST_API_KEY' + +end + +api_instance = OneSignal::DefaultApi.new +app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs. +segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. +opts = { + include_segment_detail: true # Boolean | Set to true to include segment metadata and filters in the response. +} + +begin + # View Segment + result = api_instance.get_segment(app_id, segment_id, opts) + p result +rescue OneSignal::ApiError => e + puts "Error when calling DefaultApi->get_segment: #{e}" + puts "Status Code: #{e.code}" + # `e.error_messages` flattens any error-envelope shape to an Array; + # the raw body remains on `e.response_body`. + puts "Error Messages: #{e.error_messages}" + puts "Response Body: #{e.response_body}" +end +``` + +#### Using the get_segment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_segment_with_http_info(app_id, segment_id, opts) + +```ruby +begin + # View Segment + data, status_code, headers = api_instance.get_segment_with_http_info(app_id, segment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OneSignal::ApiError => e + puts "Error when calling DefaultApi->get_segment_with_http_info: #{e}" + puts "Status Code: #{e.code}" + puts "Response Body: #{e.response_body}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_id** | **String** | The OneSignal App ID for your app. Available in Keys & IDs. | | +| **segment_id** | **String** | The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. | | +| **include_segment_detail** | **Boolean** | Set to true to include segment metadata and filters in the response. | [optional] | + +### Return type + +[**GetSegmentSuccessResponse**](GetSegmentSuccessResponse.md) + +### Authorization + +[rest_api_key](https://github.com/OneSignal/onesignal-ruby-api#configuration) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_segments > get_segments(app_id, opts) @@ -2528,6 +2613,106 @@ end - **Accept**: application/json +## list_audit_logs + +> list_audit_logs(organization_id, opts) + +List audit logs + +Retrieve a paginated, time-scoped list of audit log events for an organization. Requires an Enterprise plan with the audit logs entitlement enabled. + +### Examples + +```ruby +require 'onesignal' +# setup authorization +OneSignal.configure do |config| + # Configure Bearer authorization: organization_api_key + config.organization_api_key = 'YOUR_ORGANIZATION_API_KEY' + +end + +api_instance = OneSignal::DefaultApi.new +organization_id = 'YOUR_ORG_ID' # String | The UUID of the organization to retrieve audit logs for. Must match the authenticated Organization API Key. +opts = { + start_time: 'start_time_example', # String | Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z). Required unless cursor is provided. Must be within the last 90 days. + end_time: 'end_time_example', # String | End of the time range in ISO 8601 format. Defaults to the current time. Must be after start_time. + cursor: 'cursor_example', # String | Pagination cursor returned in a previous response as next_cursor. When provided, start_time and end_time are ignored. + limit: 56, # Integer | Maximum number of events to return per page. Minimum 1, maximum 100. Values outside this range are clamped automatically by the server. + app_ids: ['inner_example'], # Array | Filter events by app UUID. Accepts up to 10 values. Org-level events are always included. + actions: ['inner_example'], # Array | Filter by action type (e.g. notification.sent, segment.created). Accepts up to 20 values. + actor_ids: ['inner_example'], # Array | Filter by actor UUID (the user or service that performed the action). Accepts up to 10 values. + actor_emails: ['inner_example'], # Array | Filter by actor email address. Accepts up to 10 values. + target_types: ['inner_example'], # Array | Filter by the type of resource the action was performed on (e.g. notification, segment, journey). Accepts up to 10 values. + target_ids: ['inner_example'], # Array | Filter by the UUID of the resource the action was performed on. Accepts up to 10 values. + ip_addresses: ['inner_example'] # Array | Filter by the IP address the action originated from. Accepts up to 10 values. +} + +begin + # List audit logs + result = api_instance.list_audit_logs(organization_id, opts) + p result +rescue OneSignal::ApiError => e + puts "Error when calling DefaultApi->list_audit_logs: #{e}" + puts "Status Code: #{e.code}" + # `e.error_messages` flattens any error-envelope shape to an Array; + # the raw body remains on `e.response_body`. + puts "Error Messages: #{e.error_messages}" + puts "Response Body: #{e.response_body}" +end +``` + +#### Using the list_audit_logs_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_audit_logs_with_http_info(organization_id, opts) + +```ruby +begin + # List audit logs + data, status_code, headers = api_instance.list_audit_logs_with_http_info(organization_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OneSignal::ApiError => e + puts "Error when calling DefaultApi->list_audit_logs_with_http_info: #{e}" + puts "Status Code: #{e.code}" + puts "Response Body: #{e.response_body}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **organization_id** | **String** | The UUID of the organization to retrieve audit logs for. Must match the authenticated Organization API Key. | | +| **start_time** | **String** | Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z). Required unless cursor is provided. Must be within the last 90 days. | [optional] | +| **end_time** | **String** | End of the time range in ISO 8601 format. Defaults to the current time. Must be after start_time. | [optional] | +| **cursor** | **String** | Pagination cursor returned in a previous response as next_cursor. When provided, start_time and end_time are ignored. | [optional] | +| **limit** | **Integer** | Maximum number of events to return per page. Minimum 1, maximum 100. Values outside this range are clamped automatically by the server. | [optional] | +| **app_ids** | [**Array<String>**](String.md) | Filter events by app UUID. Accepts up to 10 values. Org-level events are always included. | [optional] | +| **actions** | [**Array<String>**](String.md) | Filter by action type (e.g. notification.sent, segment.created). Accepts up to 20 values. | [optional] | +| **actor_ids** | [**Array<String>**](String.md) | Filter by actor UUID (the user or service that performed the action). Accepts up to 10 values. | [optional] | +| **actor_emails** | [**Array<String>**](String.md) | Filter by actor email address. Accepts up to 10 values. | [optional] | +| **target_types** | [**Array<String>**](String.md) | Filter by the type of resource the action was performed on (e.g. notification, segment, journey). Accepts up to 10 values. | [optional] | +| **target_ids** | [**Array<String>**](String.md) | Filter by the UUID of the resource the action was performed on. Accepts up to 10 values. | [optional] | +| **ip_addresses** | [**Array<String>**](String.md) | Filter by the IP address the action originated from. Accepts up to 10 values. | [optional] | + +### Return type + +[**ListAuditLogsSuccessResponse**](ListAuditLogsSuccessResponse.md) + +### Authorization + +[organization_api_key](https://github.com/OneSignal/onesignal-ruby-api#configuration) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## rotate_api_key > rotate_api_key(app_id, token_id) @@ -3084,6 +3269,88 @@ end - **Accept**: application/json +## update_segment + +> update_segment(app_id, segment_id, opts) + +Update Segment + +Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones. + +### Examples + +```ruby +require 'onesignal' +# setup authorization +OneSignal.configure do |config| + # Configure Bearer authorization: rest_api_key + config.rest_api_key = 'YOUR_REST_API_KEY' + +end + +api_instance = OneSignal::DefaultApi.new +app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs. +segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. +opts = { + update_segment_request: OneSignal::UpdateSegmentRequest.new({name: 'name_example'}) # UpdateSegmentRequest | +} + +begin + # Update Segment + result = api_instance.update_segment(app_id, segment_id, opts) + p result +rescue OneSignal::ApiError => e + puts "Error when calling DefaultApi->update_segment: #{e}" + puts "Status Code: #{e.code}" + # `e.error_messages` flattens any error-envelope shape to an Array; + # the raw body remains on `e.response_body`. + puts "Error Messages: #{e.error_messages}" + puts "Response Body: #{e.response_body}" +end +``` + +#### Using the update_segment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_segment_with_http_info(app_id, segment_id, opts) + +```ruby +begin + # Update Segment + data, status_code, headers = api_instance.update_segment_with_http_info(app_id, segment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OneSignal::ApiError => e + puts "Error when calling DefaultApi->update_segment_with_http_info: #{e}" + puts "Status Code: #{e.code}" + puts "Response Body: #{e.response_body}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_id** | **String** | The OneSignal App ID for your app. Available in Keys & IDs. | | +| **segment_id** | **String** | The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. | | +| **update_segment_request** | [**UpdateSegmentRequest**](UpdateSegmentRequest.md) | | [optional] | + +### Return type + +[**UpdateSegmentSuccessResponse**](UpdateSegmentSuccessResponse.md) + +### Authorization + +[rest_api_key](https://github.com/OneSignal/onesignal-ruby-api#configuration) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## update_subscription > update_subscription(app_id, subscription_id, subscription_body) diff --git a/docs/GetSegmentSuccessResponse.md b/docs/GetSegmentSuccessResponse.md new file mode 100644 index 0000000..b467430 --- /dev/null +++ b/docs/GetSegmentSuccessResponse.md @@ -0,0 +1,20 @@ +# OneSignal::GetSegmentSuccessResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **subscriber_count** | **Integer** | The number of subscribers matching this segment. | [optional] | +| **payload** | [**SegmentDetails**](SegmentDetails.md) | | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::GetSegmentSuccessResponse.new( + subscriber_count: nil, + payload: nil +) +``` + diff --git a/docs/ListAuditLogsSuccessResponse.md b/docs/ListAuditLogsSuccessResponse.md new file mode 100644 index 0000000..e439b17 --- /dev/null +++ b/docs/ListAuditLogsSuccessResponse.md @@ -0,0 +1,22 @@ +# OneSignal::ListAuditLogsSuccessResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **audit_logs** | [**Array<AuditLogEvent>**](AuditLogEvent.md) | Array of audit log events, ordered by occurred_at ascending. | [optional] | +| **has_more** | **Boolean** | True if additional events exist beyond this page. Use next_cursor to fetch the next page. | [optional] | +| **next_cursor** | **String** | Opaque cursor to pass as cursor in the next request. Only present when has_more is true. | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::ListAuditLogsSuccessResponse.new( + audit_logs: nil, + has_more: nil, + next_cursor: nil +) +``` + diff --git a/docs/SegmentDetails.md b/docs/SegmentDetails.md new file mode 100644 index 0000000..c401656 --- /dev/null +++ b/docs/SegmentDetails.md @@ -0,0 +1,28 @@ +# OneSignal::SegmentDetails + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The unique identifier for the segment (UUID v4). | [optional] | +| **name** | **String** | The segment name. | [optional] | +| **description** | **String** | Human-readable description for the segment. `null` when unset. Maximum 255 characters. | [optional] | +| **created_at** | **Integer** | Unix timestamp when the segment was created. | [optional] | +| **source** | **String** | The source of the segment. | [optional] | +| **filters** | [**Array<FilterExpression>**](FilterExpression.md) | Array of filter and operator objects defining the segment criteria. Uses the same format as the Create Segment API, so filters can be directly used to recreate or update the segment. | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::SegmentDetails.new( + id: nil, + name: nil, + description: nil, + created_at: nil, + source: nil, + filters: nil +) +``` + diff --git a/docs/UpdateSegmentRequest.md b/docs/UpdateSegmentRequest.md new file mode 100644 index 0000000..19dae56 --- /dev/null +++ b/docs/UpdateSegmentRequest.md @@ -0,0 +1,22 @@ +# OneSignal::UpdateSegmentRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | Required. The segment name. Maximum 128 characters. | | +| **description** | **String** | Optional human-readable description for the segment. Maximum 255 characters. Pass an empty string to clear; omit to leave unchanged. | [optional] | +| **filters** | [**Array<FilterExpression>**](FilterExpression.md) | Optional. When provided, replaces all existing filters. Filters define the segment based on user properties like tags, activity, or location using flexible AND/OR logic. Limited to 200 total entries, including fields and OR operators. | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::UpdateSegmentRequest.new( + name: nil, + description: nil, + filters: nil +) +``` + diff --git a/docs/UpdateSegmentSuccessResponse.md b/docs/UpdateSegmentSuccessResponse.md new file mode 100644 index 0000000..c7a6f84 --- /dev/null +++ b/docs/UpdateSegmentSuccessResponse.md @@ -0,0 +1,20 @@ +# OneSignal::UpdateSegmentSuccessResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **success** | **Boolean** | true if the segment was updated successfully, false otherwise. | [optional] | +| **id** | **String** | UUID of the updated segment. | [optional] | + +## Example + +```ruby +require 'onesignal' + +instance = OneSignal::UpdateSegmentSuccessResponse.new( + success: nil, + id: nil +) +``` + diff --git a/lib/onesignal.rb b/lib/onesignal.rb index 51864ef..890d484 100644 --- a/lib/onesignal.rb +++ b/lib/onesignal.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT @@ -21,6 +21,10 @@ require 'onesignal/models/api_key_token' require 'onesignal/models/api_key_tokens_list_response' require 'onesignal/models/app' +require 'onesignal/models/audit_log_actor' +require 'onesignal/models/audit_log_context' +require 'onesignal/models/audit_log_event' +require 'onesignal/models/audit_log_target' require 'onesignal/models/basic_notification' require 'onesignal/models/basic_notification_all_of' require 'onesignal/models/basic_notification_all_of_android_background_layout' @@ -46,8 +50,10 @@ require 'onesignal/models/generic_error' require 'onesignal/models/generic_success_bool_response' require 'onesignal/models/get_notification_history_request_body' +require 'onesignal/models/get_segment_success_response' require 'onesignal/models/get_segments_success_response' require 'onesignal/models/language_string_map' +require 'onesignal/models/list_audit_logs_success_response' require 'onesignal/models/notification' require 'onesignal/models/notification_all_of' require 'onesignal/models/notification_history_success_response' @@ -68,6 +74,7 @@ require 'onesignal/models/rate_limit_error' require 'onesignal/models/segment' require 'onesignal/models/segment_data' +require 'onesignal/models/segment_details' require 'onesignal/models/segment_notification_target' require 'onesignal/models/start_live_activity_request' require 'onesignal/models/start_live_activity_success_response' @@ -80,6 +87,8 @@ require 'onesignal/models/update_api_key_request' require 'onesignal/models/update_live_activity_request' require 'onesignal/models/update_live_activity_success_response' +require 'onesignal/models/update_segment_request' +require 'onesignal/models/update_segment_success_response' require 'onesignal/models/update_template_request' require 'onesignal/models/update_user_request' require 'onesignal/models/user' diff --git a/lib/onesignal/api/default_api.rb b/lib/onesignal/api/default_api.rb index e602e88..dc790f2 100644 --- a/lib/onesignal/api/default_api.rb +++ b/lib/onesignal/api/default_api.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT @@ -2043,6 +2043,78 @@ def get_outcomes_with_http_info(app_id, outcome_names, opts = {}) return data, status_code, headers end + # View Segment + # Retrieve details for a single segment by its ID, including subscriber count and optionally segment metadata and filters. + # @param app_id [String] The OneSignal App ID for your app. Available in Keys & IDs. + # @param segment_id [String] The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_segment_detail Set to true to include segment metadata and filters in the response. + # @return [GetSegmentSuccessResponse] + def get_segment(app_id, segment_id, opts = {}) + data, _status_code, _headers = get_segment_with_http_info(app_id, segment_id, opts) + data + end + + # View Segment + # Retrieve details for a single segment by its ID, including subscriber count and optionally segment metadata and filters. + # @param app_id [String] The OneSignal App ID for your app. Available in Keys & IDs. + # @param segment_id [String] The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_segment_detail Set to true to include segment metadata and filters in the response. + # @return [Array<(GetSegmentSuccessResponse, Integer, Hash)>] GetSegmentSuccessResponse data, response status code and response headers + def get_segment_with_http_info(app_id, segment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.get_segment ...' + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.get_segment" + end + # verify the required parameter 'segment_id' is set + if @api_client.config.client_side_validation && segment_id.nil? + fail ArgumentError, "Missing the required parameter 'segment_id' when calling DefaultApi.get_segment" + end + # resource path + local_var_path = '/apps/{app_id}/segments/{segment_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'segment_id' + '}', CGI.escape(segment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include-segment-detail'] = opts[:'include_segment_detail'] if !opts[:'include_segment_detail'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetSegmentSuccessResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['rest_api_key'] + + new_options = opts.merge( + :operation => :"DefaultApi.get_segment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#get_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get Segments # Returns an array of segments from an app. # @param app_id [String] The OneSignal App ID for your app. Available in Keys & IDs. @@ -2185,6 +2257,130 @@ def get_user_with_http_info(app_id, alias_label, alias_id, opts = {}) return data, status_code, headers end + # List audit logs + # Retrieve a paginated, time-scoped list of audit log events for an organization. Requires an Enterprise plan with the audit logs entitlement enabled. + # @param organization_id [String] The UUID of the organization to retrieve audit logs for. Must match the authenticated Organization API Key. + # @param [Hash] opts the optional parameters + # @option opts [String] :start_time Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z). Required unless cursor is provided. Must be within the last 90 days. + # @option opts [String] :end_time End of the time range in ISO 8601 format. Defaults to the current time. Must be after start_time. + # @option opts [String] :cursor Pagination cursor returned in a previous response as next_cursor. When provided, start_time and end_time are ignored. + # @option opts [Integer] :limit Maximum number of events to return per page. Minimum 1, maximum 100. Values outside this range are clamped automatically by the server. + # @option opts [Array] :app_ids Filter events by app UUID. Accepts up to 10 values. Org-level events are always included. + # @option opts [Array] :actions Filter by action type (e.g. notification.sent, segment.created). Accepts up to 20 values. + # @option opts [Array] :actor_ids Filter by actor UUID (the user or service that performed the action). Accepts up to 10 values. + # @option opts [Array] :actor_emails Filter by actor email address. Accepts up to 10 values. + # @option opts [Array] :target_types Filter by the type of resource the action was performed on (e.g. notification, segment, journey). Accepts up to 10 values. + # @option opts [Array] :target_ids Filter by the UUID of the resource the action was performed on. Accepts up to 10 values. + # @option opts [Array] :ip_addresses Filter by the IP address the action originated from. Accepts up to 10 values. + # @return [ListAuditLogsSuccessResponse] + def list_audit_logs(organization_id, opts = {}) + data, _status_code, _headers = list_audit_logs_with_http_info(organization_id, opts) + data + end + + # List audit logs + # Retrieve a paginated, time-scoped list of audit log events for an organization. Requires an Enterprise plan with the audit logs entitlement enabled. + # @param organization_id [String] The UUID of the organization to retrieve audit logs for. Must match the authenticated Organization API Key. + # @param [Hash] opts the optional parameters + # @option opts [String] :start_time Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z). Required unless cursor is provided. Must be within the last 90 days. + # @option opts [String] :end_time End of the time range in ISO 8601 format. Defaults to the current time. Must be after start_time. + # @option opts [String] :cursor Pagination cursor returned in a previous response as next_cursor. When provided, start_time and end_time are ignored. + # @option opts [Integer] :limit Maximum number of events to return per page. Minimum 1, maximum 100. Values outside this range are clamped automatically by the server. + # @option opts [Array] :app_ids Filter events by app UUID. Accepts up to 10 values. Org-level events are always included. + # @option opts [Array] :actions Filter by action type (e.g. notification.sent, segment.created). Accepts up to 20 values. + # @option opts [Array] :actor_ids Filter by actor UUID (the user or service that performed the action). Accepts up to 10 values. + # @option opts [Array] :actor_emails Filter by actor email address. Accepts up to 10 values. + # @option opts [Array] :target_types Filter by the type of resource the action was performed on (e.g. notification, segment, journey). Accepts up to 10 values. + # @option opts [Array] :target_ids Filter by the UUID of the resource the action was performed on. Accepts up to 10 values. + # @option opts [Array] :ip_addresses Filter by the IP address the action originated from. Accepts up to 10 values. + # @return [Array<(ListAuditLogsSuccessResponse, Integer, Hash)>] ListAuditLogsSuccessResponse data, response status code and response headers + def list_audit_logs_with_http_info(organization_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.list_audit_logs ...' + end + # verify the required parameter 'organization_id' is set + if @api_client.config.client_side_validation && organization_id.nil? + fail ArgumentError, "Missing the required parameter 'organization_id' when calling DefaultApi.list_audit_logs" + end + if @api_client.config.client_side_validation && !opts[:'app_ids'].nil? && opts[:'app_ids'].length > 10 + fail ArgumentError, 'invalid value for "opts[:"app_ids"]" when calling DefaultApi.list_audit_logs, number of items must be less than or equal to 10.' + end + + if @api_client.config.client_side_validation && !opts[:'actions'].nil? && opts[:'actions'].length > 20 + fail ArgumentError, 'invalid value for "opts[:"actions"]" when calling DefaultApi.list_audit_logs, number of items must be less than or equal to 20.' + end + + if @api_client.config.client_side_validation && !opts[:'actor_ids'].nil? && opts[:'actor_ids'].length > 10 + fail ArgumentError, 'invalid value for "opts[:"actor_ids"]" when calling DefaultApi.list_audit_logs, number of items must be less than or equal to 10.' + end + + if @api_client.config.client_side_validation && !opts[:'actor_emails'].nil? && opts[:'actor_emails'].length > 10 + fail ArgumentError, 'invalid value for "opts[:"actor_emails"]" when calling DefaultApi.list_audit_logs, number of items must be less than or equal to 10.' + end + + if @api_client.config.client_side_validation && !opts[:'target_types'].nil? && opts[:'target_types'].length > 10 + fail ArgumentError, 'invalid value for "opts[:"target_types"]" when calling DefaultApi.list_audit_logs, number of items must be less than or equal to 10.' + end + + if @api_client.config.client_side_validation && !opts[:'target_ids'].nil? && opts[:'target_ids'].length > 10 + fail ArgumentError, 'invalid value for "opts[:"target_ids"]" when calling DefaultApi.list_audit_logs, number of items must be less than or equal to 10.' + end + + if @api_client.config.client_side_validation && !opts[:'ip_addresses'].nil? && opts[:'ip_addresses'].length > 10 + fail ArgumentError, 'invalid value for "opts[:"ip_addresses"]" when calling DefaultApi.list_audit_logs, number of items must be less than or equal to 10.' + end + + # resource path + local_var_path = '/organizations/{organization_id}/audit_logs'.sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil? + query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'app_ids'] = @api_client.build_collection_param(opts[:'app_ids'], :multi) if !opts[:'app_ids'].nil? + query_params[:'actions'] = @api_client.build_collection_param(opts[:'actions'], :multi) if !opts[:'actions'].nil? + query_params[:'actor_ids'] = @api_client.build_collection_param(opts[:'actor_ids'], :multi) if !opts[:'actor_ids'].nil? + query_params[:'actor_emails'] = @api_client.build_collection_param(opts[:'actor_emails'], :multi) if !opts[:'actor_emails'].nil? + query_params[:'target_types'] = @api_client.build_collection_param(opts[:'target_types'], :multi) if !opts[:'target_types'].nil? + query_params[:'target_ids'] = @api_client.build_collection_param(opts[:'target_ids'], :multi) if !opts[:'target_ids'].nil? + query_params[:'ip_addresses'] = @api_client.build_collection_param(opts[:'ip_addresses'], :multi) if !opts[:'ip_addresses'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListAuditLogsSuccessResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['organization_api_key'] + + new_options = opts.merge( + :operation => :"DefaultApi.list_audit_logs", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#list_audit_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Rotate API key # Rotate a Rich Authentication Token (App API Key) for a OneSignal app. Rotating a key revokes the current token and generates a new one under the same configuration—ideal when a token is lost or compromised but you don’t want to recreate and reconfigure it from scratch. # @param app_id [String] @@ -2722,6 +2918,82 @@ def update_live_activity_with_http_info(app_id, activity_id, update_live_activit return data, status_code, headers end + # Update Segment + # Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones. + # @param app_id [String] The OneSignal App ID for your app. Available in Keys & IDs. + # @param segment_id [String] The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + # @param [Hash] opts the optional parameters + # @option opts [UpdateSegmentRequest] :update_segment_request + # @return [UpdateSegmentSuccessResponse] + def update_segment(app_id, segment_id, opts = {}) + data, _status_code, _headers = update_segment_with_http_info(app_id, segment_id, opts) + data + end + + # Update Segment + # Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones. + # @param app_id [String] The OneSignal App ID for your app. Available in Keys & IDs. + # @param segment_id [String] The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + # @param [Hash] opts the optional parameters + # @option opts [UpdateSegmentRequest] :update_segment_request + # @return [Array<(UpdateSegmentSuccessResponse, Integer, Hash)>] UpdateSegmentSuccessResponse data, response status code and response headers + def update_segment_with_http_info(app_id, segment_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_segment ...' + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.update_segment" + end + # verify the required parameter 'segment_id' is set + if @api_client.config.client_side_validation && segment_id.nil? + fail ArgumentError, "Missing the required parameter 'segment_id' when calling DefaultApi.update_segment" + end + # resource path + local_var_path = '/apps/{app_id}/segments/{segment_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'segment_id' + '}', CGI.escape(segment_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_segment_request']) + + # return_type + return_type = opts[:debug_return_type] || 'UpdateSegmentSuccessResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['rest_api_key'] + + new_options = opts.merge( + :operation => :"DefaultApi.update_segment", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Updates an existing Subscription’s properties. # @param app_id [String] # @param subscription_id [String] diff --git a/lib/onesignal/api_client.rb b/lib/onesignal/api_client.rb index 84b1ef1..d9d2e18 100644 --- a/lib/onesignal/api_client.rb +++ b/lib/onesignal/api_client.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT @@ -90,7 +90,7 @@ def build_request(http_method, path, opts = {}) url = build_request_url(path, opts) http_method = http_method.to_sym.downcase - opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.10.0' + opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.11.0' header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} diff --git a/lib/onesignal/api_error.rb b/lib/onesignal/api_error.rb index 563c589..eee7b28 100644 --- a/lib/onesignal/api_error.rb +++ b/lib/onesignal/api_error.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/configuration.rb b/lib/onesignal/configuration.rb index 8610b2d..fe70ca3 100644 --- a/lib/onesignal/configuration.rb +++ b/lib/onesignal/configuration.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/api_key_token.rb b/lib/onesignal/models/api_key_token.rb index b051a68..4d7b447 100644 --- a/lib/onesignal/models/api_key_token.rb +++ b/lib/onesignal/models/api_key_token.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/api_key_tokens_list_response.rb b/lib/onesignal/models/api_key_tokens_list_response.rb index e417d3e..517f36b 100644 --- a/lib/onesignal/models/api_key_tokens_list_response.rb +++ b/lib/onesignal/models/api_key_tokens_list_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/app.rb b/lib/onesignal/models/app.rb index e3d022f..801295c 100644 --- a/lib/onesignal/models/app.rb +++ b/lib/onesignal/models/app.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/audit_log_actor.rb b/lib/onesignal/models/audit_log_actor.rb new file mode 100644 index 0000000..2e0b0a5 --- /dev/null +++ b/lib/onesignal/models/audit_log_actor.rb @@ -0,0 +1,261 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + # The user or service that performed the action. Absent if the actor is unknown. + class AuditLogActor + # Email address of the actor. Absent if unavailable. + attr_accessor :email + + # UUID of the actor. + attr_accessor :id + + # Additional actor-specific data. + attr_accessor :metadata + + # Display name of the actor. Absent if unavailable. + attr_accessor :name + + # Actor type (e.g. member, api_key, system). + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'id' => :'id', + :'metadata' => :'metadata', + :'name' => :'name', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'String', + :'id' => :'String', + :'metadata' => :'Object', + :'name' => :'String', + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::AuditLogActor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::AuditLogActor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + id == o.id && + metadata == o.metadata && + name == o.name && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, id, metadata, name, type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/audit_log_context.rb b/lib/onesignal/models/audit_log_context.rb new file mode 100644 index 0000000..4155ac8 --- /dev/null +++ b/lib/onesignal/models/audit_log_context.rb @@ -0,0 +1,251 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + # Request context at the time of the event. Absent if context was not captured. + class AuditLogContext + # Country code derived from the request IP. + attr_accessor :country + + # IP address the request originated from. + attr_accessor :ip + + # Additional context-specific data. + attr_accessor :metadata + + # User agent of the client that made the request. + attr_accessor :user_agent + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'country' => :'country', + :'ip' => :'ip', + :'metadata' => :'metadata', + :'user_agent' => :'user_agent' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'country' => :'String', + :'ip' => :'String', + :'metadata' => :'Object', + :'user_agent' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::AuditLogContext` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::AuditLogContext`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'ip') + self.ip = attributes[:'ip'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'user_agent') + self.user_agent = attributes[:'user_agent'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + country == o.country && + ip == o.ip && + metadata == o.metadata && + user_agent == o.user_agent + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [country, ip, metadata, user_agent].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/audit_log_event.rb b/lib/onesignal/models/audit_log_event.rb new file mode 100644 index 0000000..d2dcdbf --- /dev/null +++ b/lib/onesignal/models/audit_log_event.rb @@ -0,0 +1,310 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + class AuditLogEvent + # The action that was performed (e.g. notification.sent, segment.created, member.invited). + attr_accessor :action + + attr_accessor :actor + + # UUID of the app the event is associated with. Absent for org-level events. + attr_accessor :app_id + + attr_accessor :context + + # UUID of the audit log event. + attr_accessor :id + + # Additional event-specific data that does not fit into the standard fields. + attr_accessor :metadata + + # RFC 3339 timestamp of when the event occurred (e.g. 2026-02-18T12:34:56Z). + attr_accessor :occurred_at + + # UUID of the organization the event belongs to. + attr_accessor :organization_id + + # The resources the action was performed on. May be empty for org-level events. + attr_accessor :targets + + # Schema version of the event payload. + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'action' => :'action', + :'actor' => :'actor', + :'app_id' => :'app_id', + :'context' => :'context', + :'id' => :'id', + :'metadata' => :'metadata', + :'occurred_at' => :'occurred_at', + :'organization_id' => :'organization_id', + :'targets' => :'targets', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'action' => :'String', + :'actor' => :'AuditLogActor', + :'app_id' => :'String', + :'context' => :'AuditLogContext', + :'id' => :'String', + :'metadata' => :'Object', + :'occurred_at' => :'String', + :'organization_id' => :'String', + :'targets' => :'Array', + :'version' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::AuditLogEvent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::AuditLogEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'action') + self.action = attributes[:'action'] + end + + if attributes.key?(:'actor') + self.actor = attributes[:'actor'] + end + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'context') + self.context = attributes[:'context'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'occurred_at') + self.occurred_at = attributes[:'occurred_at'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'targets') + if (value = attributes[:'targets']).is_a?(Array) + self.targets = value + end + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + action == o.action && + actor == o.actor && + app_id == o.app_id && + context == o.context && + id == o.id && + metadata == o.metadata && + occurred_at == o.occurred_at && + organization_id == o.organization_id && + targets == o.targets && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [action, actor, app_id, context, id, metadata, occurred_at, organization_id, targets, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/audit_log_target.rb b/lib/onesignal/models/audit_log_target.rb new file mode 100644 index 0000000..0ffe786 --- /dev/null +++ b/lib/onesignal/models/audit_log_target.rb @@ -0,0 +1,251 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + # A resource the action was performed on. + class AuditLogTarget + # UUID of the resource. + attr_accessor :id + + # Additional resource-specific data. + attr_accessor :metadata + + # Display name of the resource. Absent if unavailable. + attr_accessor :name + + # Resource type (e.g. notification, segment, journey, app). + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'metadata' => :'metadata', + :'name' => :'name', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'metadata' => :'Object', + :'name' => :'String', + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::AuditLogTarget` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::AuditLogTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + metadata == o.metadata && + name == o.name && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, metadata, name, type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/basic_notification.rb b/lib/onesignal/models/basic_notification.rb index f2c8976..319e63d 100644 --- a/lib/onesignal/models/basic_notification.rb +++ b/lib/onesignal/models/basic_notification.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/basic_notification_all_of.rb b/lib/onesignal/models/basic_notification_all_of.rb index 58dc129..06dc619 100644 --- a/lib/onesignal/models/basic_notification_all_of.rb +++ b/lib/onesignal/models/basic_notification_all_of.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb b/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb index 35057e8..a1b2513 100644 --- a/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +++ b/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/button.rb b/lib/onesignal/models/button.rb index c610c7e..30aaff4 100644 --- a/lib/onesignal/models/button.rb +++ b/lib/onesignal/models/button.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/copy_template_request.rb b/lib/onesignal/models/copy_template_request.rb index b3df858..509c9af 100644 --- a/lib/onesignal/models/copy_template_request.rb +++ b/lib/onesignal/models/copy_template_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_api_key_request.rb b/lib/onesignal/models/create_api_key_request.rb index 4edbab3..50b00b8 100644 --- a/lib/onesignal/models/create_api_key_request.rb +++ b/lib/onesignal/models/create_api_key_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_api_key_response.rb b/lib/onesignal/models/create_api_key_response.rb index 6e98e0a..7dd7a8e 100644 --- a/lib/onesignal/models/create_api_key_response.rb +++ b/lib/onesignal/models/create_api_key_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_notification_success_response.rb b/lib/onesignal/models/create_notification_success_response.rb index 4ac9305..793a833 100644 --- a/lib/onesignal/models/create_notification_success_response.rb +++ b/lib/onesignal/models/create_notification_success_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_segment_conflict_response.rb b/lib/onesignal/models/create_segment_conflict_response.rb index 91b870f..3bbbcf9 100644 --- a/lib/onesignal/models/create_segment_conflict_response.rb +++ b/lib/onesignal/models/create_segment_conflict_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_segment_success_response.rb b/lib/onesignal/models/create_segment_success_response.rb index e3a9ef7..6e8c4ee 100644 --- a/lib/onesignal/models/create_segment_success_response.rb +++ b/lib/onesignal/models/create_segment_success_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_template_request.rb b/lib/onesignal/models/create_template_request.rb index 7982ca5..d1b20e6 100644 --- a/lib/onesignal/models/create_template_request.rb +++ b/lib/onesignal/models/create_template_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_user_conflict_response.rb b/lib/onesignal/models/create_user_conflict_response.rb index 7d8e6d0..b40c641 100644 --- a/lib/onesignal/models/create_user_conflict_response.rb +++ b/lib/onesignal/models/create_user_conflict_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_user_conflict_response_errors_inner.rb b/lib/onesignal/models/create_user_conflict_response_errors_inner.rb index 1a6fc42..2c7d074 100644 --- a/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +++ b/lib/onesignal/models/create_user_conflict_response_errors_inner.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb b/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb index 49d8dce..95a5059 100644 --- a/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +++ b/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/custom_event.rb b/lib/onesignal/models/custom_event.rb index a985568..5df4b90 100644 --- a/lib/onesignal/models/custom_event.rb +++ b/lib/onesignal/models/custom_event.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/custom_events_request.rb b/lib/onesignal/models/custom_events_request.rb index fdafa88..a0c18b6 100644 --- a/lib/onesignal/models/custom_events_request.rb +++ b/lib/onesignal/models/custom_events_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/delivery_data.rb b/lib/onesignal/models/delivery_data.rb index 26393d9..780f63d 100644 --- a/lib/onesignal/models/delivery_data.rb +++ b/lib/onesignal/models/delivery_data.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/export_events_success_response.rb b/lib/onesignal/models/export_events_success_response.rb index 8e30b94..dd5ccba 100644 --- a/lib/onesignal/models/export_events_success_response.rb +++ b/lib/onesignal/models/export_events_success_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/export_subscriptions_request_body.rb b/lib/onesignal/models/export_subscriptions_request_body.rb index fe9d8c5..3a0d837 100644 --- a/lib/onesignal/models/export_subscriptions_request_body.rb +++ b/lib/onesignal/models/export_subscriptions_request_body.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/export_subscriptions_success_response.rb b/lib/onesignal/models/export_subscriptions_success_response.rb index 83fb51f..4f16de0 100644 --- a/lib/onesignal/models/export_subscriptions_success_response.rb +++ b/lib/onesignal/models/export_subscriptions_success_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/filter.rb b/lib/onesignal/models/filter.rb index 7db02ca..a4348ad 100644 --- a/lib/onesignal/models/filter.rb +++ b/lib/onesignal/models/filter.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/filter_expression.rb b/lib/onesignal/models/filter_expression.rb index d153367..920d34a 100644 --- a/lib/onesignal/models/filter_expression.rb +++ b/lib/onesignal/models/filter_expression.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/generic_error.rb b/lib/onesignal/models/generic_error.rb index 024a74b..c33b8f4 100644 --- a/lib/onesignal/models/generic_error.rb +++ b/lib/onesignal/models/generic_error.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/generic_success_bool_response.rb b/lib/onesignal/models/generic_success_bool_response.rb index cf3e71a..92bb547 100644 --- a/lib/onesignal/models/generic_success_bool_response.rb +++ b/lib/onesignal/models/generic_success_bool_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/get_notification_history_request_body.rb b/lib/onesignal/models/get_notification_history_request_body.rb index 584c82c..1fb15b2 100644 --- a/lib/onesignal/models/get_notification_history_request_body.rb +++ b/lib/onesignal/models/get_notification_history_request_body.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/get_segment_success_response.rb b/lib/onesignal/models/get_segment_success_response.rb new file mode 100644 index 0000000..7d19b89 --- /dev/null +++ b/lib/onesignal/models/get_segment_success_response.rb @@ -0,0 +1,229 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + class GetSegmentSuccessResponse + # The number of subscribers matching this segment. + attr_accessor :subscriber_count + + attr_accessor :payload + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'subscriber_count' => :'subscriber_count', + :'payload' => :'payload' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'subscriber_count' => :'Integer', + :'payload' => :'SegmentDetails' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::GetSegmentSuccessResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::GetSegmentSuccessResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'subscriber_count') + self.subscriber_count = attributes[:'subscriber_count'] + end + + if attributes.key?(:'payload') + self.payload = attributes[:'payload'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + subscriber_count == o.subscriber_count && + payload == o.payload + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [subscriber_count, payload].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/get_segments_success_response.rb b/lib/onesignal/models/get_segments_success_response.rb index e72ae9d..33a4e81 100644 --- a/lib/onesignal/models/get_segments_success_response.rb +++ b/lib/onesignal/models/get_segments_success_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/language_string_map.rb b/lib/onesignal/models/language_string_map.rb index 29dde11..a83a871 100644 --- a/lib/onesignal/models/language_string_map.rb +++ b/lib/onesignal/models/language_string_map.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/list_audit_logs_success_response.rb b/lib/onesignal/models/list_audit_logs_success_response.rb new file mode 100644 index 0000000..3d23874 --- /dev/null +++ b/lib/onesignal/models/list_audit_logs_success_response.rb @@ -0,0 +1,242 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + class ListAuditLogsSuccessResponse + # Array of audit log events, ordered by occurred_at ascending. + attr_accessor :audit_logs + + # True if additional events exist beyond this page. Use next_cursor to fetch the next page. + attr_accessor :has_more + + # Opaque cursor to pass as cursor in the next request. Only present when has_more is true. + attr_accessor :next_cursor + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'audit_logs' => :'audit_logs', + :'has_more' => :'has_more', + :'next_cursor' => :'next_cursor' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'audit_logs' => :'Array', + :'has_more' => :'Boolean', + :'next_cursor' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::ListAuditLogsSuccessResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::ListAuditLogsSuccessResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'audit_logs') + if (value = attributes[:'audit_logs']).is_a?(Array) + self.audit_logs = value + end + end + + if attributes.key?(:'has_more') + self.has_more = attributes[:'has_more'] + end + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + audit_logs == o.audit_logs && + has_more == o.has_more && + next_cursor == o.next_cursor + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [audit_logs, has_more, next_cursor].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/notification.rb b/lib/onesignal/models/notification.rb index 3a9c9a1..96c78e2 100644 --- a/lib/onesignal/models/notification.rb +++ b/lib/onesignal/models/notification.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/notification_all_of.rb b/lib/onesignal/models/notification_all_of.rb index 42b5a56..4be713b 100644 --- a/lib/onesignal/models/notification_all_of.rb +++ b/lib/onesignal/models/notification_all_of.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/notification_history_success_response.rb b/lib/onesignal/models/notification_history_success_response.rb index 89ab9f4..a7d2622 100644 --- a/lib/onesignal/models/notification_history_success_response.rb +++ b/lib/onesignal/models/notification_history_success_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/notification_slice.rb b/lib/onesignal/models/notification_slice.rb index 90b96b2..3857860 100644 --- a/lib/onesignal/models/notification_slice.rb +++ b/lib/onesignal/models/notification_slice.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/notification_target.rb b/lib/onesignal/models/notification_target.rb index e4a7335..25b780b 100644 --- a/lib/onesignal/models/notification_target.rb +++ b/lib/onesignal/models/notification_target.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/notification_with_meta.rb b/lib/onesignal/models/notification_with_meta.rb index 699a7e4..c5152bc 100644 --- a/lib/onesignal/models/notification_with_meta.rb +++ b/lib/onesignal/models/notification_with_meta.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/notification_with_meta_all_of.rb b/lib/onesignal/models/notification_with_meta_all_of.rb index eb34e36..61bd115 100644 --- a/lib/onesignal/models/notification_with_meta_all_of.rb +++ b/lib/onesignal/models/notification_with_meta_all_of.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/operator.rb b/lib/onesignal/models/operator.rb index 8e88d4b..bf09d08 100644 --- a/lib/onesignal/models/operator.rb +++ b/lib/onesignal/models/operator.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/outcome_data.rb b/lib/onesignal/models/outcome_data.rb index 74144ae..a98a6ad 100644 --- a/lib/onesignal/models/outcome_data.rb +++ b/lib/onesignal/models/outcome_data.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/outcomes_data.rb b/lib/onesignal/models/outcomes_data.rb index b7036ff..a53e516 100644 --- a/lib/onesignal/models/outcomes_data.rb +++ b/lib/onesignal/models/outcomes_data.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/platform_delivery_data.rb b/lib/onesignal/models/platform_delivery_data.rb index b54327e..b1be9b0 100644 --- a/lib/onesignal/models/platform_delivery_data.rb +++ b/lib/onesignal/models/platform_delivery_data.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/platform_delivery_data_email_all_of.rb b/lib/onesignal/models/platform_delivery_data_email_all_of.rb index 77ecd16..d0a9434 100644 --- a/lib/onesignal/models/platform_delivery_data_email_all_of.rb +++ b/lib/onesignal/models/platform_delivery_data_email_all_of.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/platform_delivery_data_sms_all_of.rb b/lib/onesignal/models/platform_delivery_data_sms_all_of.rb index 3207536..77c5936 100644 --- a/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +++ b/lib/onesignal/models/platform_delivery_data_sms_all_of.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/properties_body.rb b/lib/onesignal/models/properties_body.rb index 06af970..fe4e884 100644 --- a/lib/onesignal/models/properties_body.rb +++ b/lib/onesignal/models/properties_body.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/properties_deltas.rb b/lib/onesignal/models/properties_deltas.rb index 66ea410..bec12ff 100644 --- a/lib/onesignal/models/properties_deltas.rb +++ b/lib/onesignal/models/properties_deltas.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/properties_object.rb b/lib/onesignal/models/properties_object.rb index 58a25a5..88e151a 100644 --- a/lib/onesignal/models/properties_object.rb +++ b/lib/onesignal/models/properties_object.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/purchase.rb b/lib/onesignal/models/purchase.rb index 0a0db32..1f367f0 100644 --- a/lib/onesignal/models/purchase.rb +++ b/lib/onesignal/models/purchase.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/rate_limit_error.rb b/lib/onesignal/models/rate_limit_error.rb index 3fe3b92..2be330e 100644 --- a/lib/onesignal/models/rate_limit_error.rb +++ b/lib/onesignal/models/rate_limit_error.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/segment.rb b/lib/onesignal/models/segment.rb index 47d7c8b..f34c094 100644 --- a/lib/onesignal/models/segment.rb +++ b/lib/onesignal/models/segment.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/segment_data.rb b/lib/onesignal/models/segment_data.rb index 3626124..e2ff149 100644 --- a/lib/onesignal/models/segment_data.rb +++ b/lib/onesignal/models/segment_data.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/segment_details.rb b/lib/onesignal/models/segment_details.rb new file mode 100644 index 0000000..3954c03 --- /dev/null +++ b/lib/onesignal/models/segment_details.rb @@ -0,0 +1,308 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + # Segment details. Only included when the include-segment-detail query parameter is set to true. + class SegmentDetails + # The unique identifier for the segment (UUID v4). + attr_accessor :id + + # The segment name. + attr_accessor :name + + # Human-readable description for the segment. `null` when unset. Maximum 255 characters. + attr_accessor :description + + # Unix timestamp when the segment was created. + attr_accessor :created_at + + # The source of the segment. + attr_accessor :source + + # Array of filter and operator objects defining the segment criteria. Uses the same format as the Create Segment API, so filters can be directly used to recreate or update the segment. + attr_accessor :filters + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'description' => :'description', + :'created_at' => :'created_at', + :'source' => :'source', + :'filters' => :'filters' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'description' => :'String', + :'created_at' => :'Integer', + :'source' => :'String', + :'filters' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'description', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::SegmentDetails` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::SegmentDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'filters') + if (value = attributes[:'filters']).is_a?(Array) + self.filters = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + source_validator = EnumAttributeValidator.new('String', ["default", "custom", "quickstart"]) + return false unless source_validator.valid?(@source) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] source Object to be assigned + def source=(source) + validator = EnumAttributeValidator.new('String', ["default", "custom", "quickstart"]) + unless validator.valid?(source) + fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}." + end + @source = source + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + description == o.description && + created_at == o.created_at && + source == o.source && + filters == o.filters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, description, created_at, source, filters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/segment_notification_target.rb b/lib/onesignal/models/segment_notification_target.rb index fde1696..9e54493 100644 --- a/lib/onesignal/models/segment_notification_target.rb +++ b/lib/onesignal/models/segment_notification_target.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/start_live_activity_request.rb b/lib/onesignal/models/start_live_activity_request.rb index 681b59b..968e399 100644 --- a/lib/onesignal/models/start_live_activity_request.rb +++ b/lib/onesignal/models/start_live_activity_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/start_live_activity_success_response.rb b/lib/onesignal/models/start_live_activity_success_response.rb index 404c5a4..9d8f2d8 100644 --- a/lib/onesignal/models/start_live_activity_success_response.rb +++ b/lib/onesignal/models/start_live_activity_success_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/subscription.rb b/lib/onesignal/models/subscription.rb index f561a23..76ec026 100644 --- a/lib/onesignal/models/subscription.rb +++ b/lib/onesignal/models/subscription.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/subscription_body.rb b/lib/onesignal/models/subscription_body.rb index d11ee3f..ba68954 100644 --- a/lib/onesignal/models/subscription_body.rb +++ b/lib/onesignal/models/subscription_body.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/subscription_notification_target.rb b/lib/onesignal/models/subscription_notification_target.rb index 56818da..bff676e 100644 --- a/lib/onesignal/models/subscription_notification_target.rb +++ b/lib/onesignal/models/subscription_notification_target.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/template_resource.rb b/lib/onesignal/models/template_resource.rb index a308976..d623911 100644 --- a/lib/onesignal/models/template_resource.rb +++ b/lib/onesignal/models/template_resource.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/templates_list_response.rb b/lib/onesignal/models/templates_list_response.rb index 75b7e51..6d0c492 100644 --- a/lib/onesignal/models/templates_list_response.rb +++ b/lib/onesignal/models/templates_list_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/transfer_subscription_request_body.rb b/lib/onesignal/models/transfer_subscription_request_body.rb index 6847c98..f61a5ee 100644 --- a/lib/onesignal/models/transfer_subscription_request_body.rb +++ b/lib/onesignal/models/transfer_subscription_request_body.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/update_api_key_request.rb b/lib/onesignal/models/update_api_key_request.rb index 41770aa..64b7ced 100644 --- a/lib/onesignal/models/update_api_key_request.rb +++ b/lib/onesignal/models/update_api_key_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/update_live_activity_request.rb b/lib/onesignal/models/update_live_activity_request.rb index 4182788..c37819e 100644 --- a/lib/onesignal/models/update_live_activity_request.rb +++ b/lib/onesignal/models/update_live_activity_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/update_live_activity_success_response.rb b/lib/onesignal/models/update_live_activity_success_response.rb index 05b3d33..45463cb 100644 --- a/lib/onesignal/models/update_live_activity_success_response.rb +++ b/lib/onesignal/models/update_live_activity_success_response.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/update_segment_request.rb b/lib/onesignal/models/update_segment_request.rb new file mode 100644 index 0000000..298841b --- /dev/null +++ b/lib/onesignal/models/update_segment_request.rb @@ -0,0 +1,281 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + class UpdateSegmentRequest + # Required. The segment name. Maximum 128 characters. + attr_accessor :name + + # Optional human-readable description for the segment. Maximum 255 characters. Pass an empty string to clear; omit to leave unchanged. + attr_accessor :description + + # Optional. When provided, replaces all existing filters. Filters define the segment based on user properties like tags, activity, or location using flexible AND/OR logic. Limited to 200 total entries, including fields and OR operators. + attr_accessor :filters + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'description' => :'description', + :'filters' => :'filters' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'description' => :'String', + :'filters' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::UpdateSegmentRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::UpdateSegmentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'filters') + if (value = attributes[:'filters']).is_a?(Array) + self.filters = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @name.to_s.length > 128 + invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 128.') + end + + if !@description.nil? && @description.to_s.length > 255 + invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 255.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @name.to_s.length > 128 + return false if !@description.nil? && @description.to_s.length > 255 + true + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + fail ArgumentError, 'name cannot be nil' + end + + if name.to_s.length > 128 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.' + end + + @name = name + end + + # Custom attribute writer method with validation + # @param [Object] description Value to be assigned + def description=(description) + if !description.nil? && description.to_s.length > 255 + fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 255.' + end + + @description = description + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + description == o.description && + filters == o.filters + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, description, filters].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/update_segment_success_response.rb b/lib/onesignal/models/update_segment_success_response.rb new file mode 100644 index 0000000..9e2ac8b --- /dev/null +++ b/lib/onesignal/models/update_segment_success_response.rb @@ -0,0 +1,230 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OneSignal + class UpdateSegmentSuccessResponse + # true if the segment was updated successfully, false otherwise. + attr_accessor :success + + # UUID of the updated segment. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'success' => :'success', + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'success' => :'Boolean', + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::UpdateSegmentSuccessResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::UpdateSegmentSuccessResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'success') + self.success = attributes[:'success'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + success == o.success && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [success, id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = OneSignal.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/onesignal/models/update_template_request.rb b/lib/onesignal/models/update_template_request.rb index b3ba4c8..add83b0 100644 --- a/lib/onesignal/models/update_template_request.rb +++ b/lib/onesignal/models/update_template_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/update_user_request.rb b/lib/onesignal/models/update_user_request.rb index a306b27..625fb62 100644 --- a/lib/onesignal/models/update_user_request.rb +++ b/lib/onesignal/models/update_user_request.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/user.rb b/lib/onesignal/models/user.rb index 4c0f3b1..5ff45d9 100644 --- a/lib/onesignal/models/user.rb +++ b/lib/onesignal/models/user.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/user_identity_body.rb b/lib/onesignal/models/user_identity_body.rb index 62b6f1b..89b86fc 100644 --- a/lib/onesignal/models/user_identity_body.rb +++ b/lib/onesignal/models/user_identity_body.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/models/web_button.rb b/lib/onesignal/models/web_button.rb index afb120c..70563c1 100644 --- a/lib/onesignal/models/web_button.rb +++ b/lib/onesignal/models/web_button.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/lib/onesignal/version.rb b/lib/onesignal/version.rb index 2b23854..a376344 100644 --- a/lib/onesignal/version.rb +++ b/lib/onesignal/version.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT @@ -11,5 +11,5 @@ =end module OneSignal - VERSION = '5.10.0' + VERSION = '5.11.0' end diff --git a/onesignal.gemspec b/onesignal.gemspec index 09f2e8e..7ca6854 100644 --- a/onesignal.gemspec +++ b/onesignal.gemspec @@ -5,7 +5,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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/api/default_api_spec.rb b/spec/api/default_api_spec.rb index e32794d..c74e5c1 100644 --- a/spec/api/default_api_spec.rb +++ b/spec/api/default_api_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT @@ -398,6 +398,20 @@ end end + # unit tests for get_segment + # View Segment + # Retrieve details for a single segment by its ID, including subscriber count and optionally segment metadata and filters. + # @param app_id The OneSignal App ID for your app. Available in Keys & IDs. + # @param segment_id The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_segment_detail Set to true to include segment metadata and filters in the response. + # @return [GetSegmentSuccessResponse] + describe 'get_segment test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for get_segments # Get Segments # Returns an array of segments from an app. @@ -425,6 +439,29 @@ end end + # unit tests for list_audit_logs + # List audit logs + # Retrieve a paginated, time-scoped list of audit log events for an organization. Requires an Enterprise plan with the audit logs entitlement enabled. + # @param organization_id The UUID of the organization to retrieve audit logs for. Must match the authenticated Organization API Key. + # @param [Hash] opts the optional parameters + # @option opts [String] :start_time Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z). Required unless cursor is provided. Must be within the last 90 days. + # @option opts [String] :end_time End of the time range in ISO 8601 format. Defaults to the current time. Must be after start_time. + # @option opts [String] :cursor Pagination cursor returned in a previous response as next_cursor. When provided, start_time and end_time are ignored. + # @option opts [Integer] :limit Maximum number of events to return per page. Minimum 1, maximum 100. Values outside this range are clamped automatically by the server. + # @option opts [Array] :app_ids Filter events by app UUID. Accepts up to 10 values. Org-level events are always included. + # @option opts [Array] :actions Filter by action type (e.g. notification.sent, segment.created). Accepts up to 20 values. + # @option opts [Array] :actor_ids Filter by actor UUID (the user or service that performed the action). Accepts up to 10 values. + # @option opts [Array] :actor_emails Filter by actor email address. Accepts up to 10 values. + # @option opts [Array] :target_types Filter by the type of resource the action was performed on (e.g. notification, segment, journey). Accepts up to 10 values. + # @option opts [Array] :target_ids Filter by the UUID of the resource the action was performed on. Accepts up to 10 values. + # @option opts [Array] :ip_addresses Filter by the IP address the action originated from. Accepts up to 10 values. + # @return [ListAuditLogsSuccessResponse] + describe 'list_audit_logs test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for rotate_api_key # Rotate API key # Rotate a Rich Authentication Token (App API Key) for a OneSignal app. Rotating a key revokes the current token and generates a new one under the same configuration—ideal when a token is lost or compromised but you don’t want to recreate and reconfigure it from scratch. @@ -520,6 +557,20 @@ end end + # unit tests for update_segment + # Update Segment + # Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones. + # @param app_id The OneSignal App ID for your app. Available in Keys & IDs. + # @param segment_id The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. + # @param [Hash] opts the optional parameters + # @option opts [UpdateSegmentRequest] :update_segment_request + # @return [UpdateSegmentSuccessResponse] + describe 'update_segment test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + # unit tests for update_subscription # Updates an existing Subscription’s properties. # @param app_id diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb index 0d69e68..98e40f7 100644 --- a/spec/api_client_spec.rb +++ b/spec/api_client_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index d704f13..651501c 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/api_key_token_spec.rb b/spec/models/api_key_token_spec.rb index 79c75d4..89ab171 100644 --- a/spec/models/api_key_token_spec.rb +++ b/spec/models/api_key_token_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/api_key_tokens_list_response_spec.rb b/spec/models/api_key_tokens_list_response_spec.rb index 2675b7d..a5e0659 100644 --- a/spec/models/api_key_tokens_list_response_spec.rb +++ b/spec/models/api_key_tokens_list_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/app_spec.rb b/spec/models/app_spec.rb index ed30086..8928b4b 100644 --- a/spec/models/app_spec.rb +++ b/spec/models/app_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/audit_log_actor_spec.rb b/spec/models/audit_log_actor_spec.rb new file mode 100644 index 0000000..7411edd --- /dev/null +++ b/spec/models/audit_log_actor_spec.rb @@ -0,0 +1,58 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::AuditLogActor +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::AuditLogActor do + let(:instance) { OneSignal::AuditLogActor.new } + + describe 'test an instance of AuditLogActor' do + it 'should create an instance of AuditLogActor' do + expect(instance).to be_instance_of(OneSignal::AuditLogActor) + end + end + describe 'test attribute "email"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/audit_log_context_spec.rb b/spec/models/audit_log_context_spec.rb new file mode 100644 index 0000000..82773b0 --- /dev/null +++ b/spec/models/audit_log_context_spec.rb @@ -0,0 +1,52 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::AuditLogContext +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::AuditLogContext do + let(:instance) { OneSignal::AuditLogContext.new } + + describe 'test an instance of AuditLogContext' do + it 'should create an instance of AuditLogContext' do + expect(instance).to be_instance_of(OneSignal::AuditLogContext) + end + end + describe 'test attribute "country"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ip"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "user_agent"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/audit_log_event_spec.rb b/spec/models/audit_log_event_spec.rb new file mode 100644 index 0000000..219f835 --- /dev/null +++ b/spec/models/audit_log_event_spec.rb @@ -0,0 +1,88 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::AuditLogEvent +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::AuditLogEvent do + let(:instance) { OneSignal::AuditLogEvent.new } + + describe 'test an instance of AuditLogEvent' do + it 'should create an instance of AuditLogEvent' do + expect(instance).to be_instance_of(OneSignal::AuditLogEvent) + end + end + describe 'test attribute "action"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "actor"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "app_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "context"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "occurred_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "organization_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "targets"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/audit_log_target_spec.rb b/spec/models/audit_log_target_spec.rb new file mode 100644 index 0000000..cdc8a21 --- /dev/null +++ b/spec/models/audit_log_target_spec.rb @@ -0,0 +1,52 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::AuditLogTarget +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::AuditLogTarget do + let(:instance) { OneSignal::AuditLogTarget.new } + + describe 'test an instance of AuditLogTarget' do + it 'should create an instance of AuditLogTarget' do + expect(instance).to be_instance_of(OneSignal::AuditLogTarget) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/basic_notification_all_of_android_background_layout_spec.rb b/spec/models/basic_notification_all_of_android_background_layout_spec.rb index f6910f2..06d53d4 100644 --- a/spec/models/basic_notification_all_of_android_background_layout_spec.rb +++ b/spec/models/basic_notification_all_of_android_background_layout_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/basic_notification_all_of_spec.rb b/spec/models/basic_notification_all_of_spec.rb index 29b25e6..f1cba05 100644 --- a/spec/models/basic_notification_all_of_spec.rb +++ b/spec/models/basic_notification_all_of_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/basic_notification_spec.rb b/spec/models/basic_notification_spec.rb index 8c19d10..b95f93e 100644 --- a/spec/models/basic_notification_spec.rb +++ b/spec/models/basic_notification_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/button_spec.rb b/spec/models/button_spec.rb index 2c2c0b3..dc914bc 100644 --- a/spec/models/button_spec.rb +++ b/spec/models/button_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/copy_template_request_spec.rb b/spec/models/copy_template_request_spec.rb index 97e3f13..606d9d6 100644 --- a/spec/models/copy_template_request_spec.rb +++ b/spec/models/copy_template_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_api_key_request_spec.rb b/spec/models/create_api_key_request_spec.rb index 41de823..cd835f6 100644 --- a/spec/models/create_api_key_request_spec.rb +++ b/spec/models/create_api_key_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_api_key_response_spec.rb b/spec/models/create_api_key_response_spec.rb index d9fe285..b4a70a5 100644 --- a/spec/models/create_api_key_response_spec.rb +++ b/spec/models/create_api_key_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_notification_success_response_spec.rb b/spec/models/create_notification_success_response_spec.rb index 71bd914..4c18cf3 100644 --- a/spec/models/create_notification_success_response_spec.rb +++ b/spec/models/create_notification_success_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_segment_conflict_response_spec.rb b/spec/models/create_segment_conflict_response_spec.rb index 4e71d11..648b559 100644 --- a/spec/models/create_segment_conflict_response_spec.rb +++ b/spec/models/create_segment_conflict_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_segment_success_response_spec.rb b/spec/models/create_segment_success_response_spec.rb index 09b0872..33e7c6f 100644 --- a/spec/models/create_segment_success_response_spec.rb +++ b/spec/models/create_segment_success_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_template_request_spec.rb b/spec/models/create_template_request_spec.rb index a7ffad1..5649b44 100644 --- a/spec/models/create_template_request_spec.rb +++ b/spec/models/create_template_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_user_conflict_response_errors_inner_spec.rb b/spec/models/create_user_conflict_response_errors_inner_spec.rb index 20abb2f..7f13efa 100644 --- a/spec/models/create_user_conflict_response_errors_inner_spec.rb +++ b/spec/models/create_user_conflict_response_errors_inner_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_user_conflict_response_errors_items_meta_spec.rb b/spec/models/create_user_conflict_response_errors_items_meta_spec.rb index e5dac44..0abf191 100644 --- a/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +++ b/spec/models/create_user_conflict_response_errors_items_meta_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/create_user_conflict_response_spec.rb b/spec/models/create_user_conflict_response_spec.rb index a0a846f..a51c471 100644 --- a/spec/models/create_user_conflict_response_spec.rb +++ b/spec/models/create_user_conflict_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/custom_event_spec.rb b/spec/models/custom_event_spec.rb index d9843ae..4ba41cd 100644 --- a/spec/models/custom_event_spec.rb +++ b/spec/models/custom_event_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/custom_events_request_spec.rb b/spec/models/custom_events_request_spec.rb index 2ee218a..43f39b8 100644 --- a/spec/models/custom_events_request_spec.rb +++ b/spec/models/custom_events_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/delivery_data_spec.rb b/spec/models/delivery_data_spec.rb index 603147d..190f4eb 100644 --- a/spec/models/delivery_data_spec.rb +++ b/spec/models/delivery_data_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/export_events_success_response_spec.rb b/spec/models/export_events_success_response_spec.rb index e3f1f59..1020f7f 100644 --- a/spec/models/export_events_success_response_spec.rb +++ b/spec/models/export_events_success_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/export_subscriptions_request_body_spec.rb b/spec/models/export_subscriptions_request_body_spec.rb index 013ade0..cf7fd7e 100644 --- a/spec/models/export_subscriptions_request_body_spec.rb +++ b/spec/models/export_subscriptions_request_body_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/export_subscriptions_success_response_spec.rb b/spec/models/export_subscriptions_success_response_spec.rb index 8c98db1..3f290c8 100644 --- a/spec/models/export_subscriptions_success_response_spec.rb +++ b/spec/models/export_subscriptions_success_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/filter_expression_spec.rb b/spec/models/filter_expression_spec.rb index 027944f..1d2cdc1 100644 --- a/spec/models/filter_expression_spec.rb +++ b/spec/models/filter_expression_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/filter_spec.rb b/spec/models/filter_spec.rb index 38dc2b8..f9590f5 100644 --- a/spec/models/filter_spec.rb +++ b/spec/models/filter_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/generic_error_spec.rb b/spec/models/generic_error_spec.rb index e6e11a4..d1a325f 100644 --- a/spec/models/generic_error_spec.rb +++ b/spec/models/generic_error_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/generic_success_bool_response_spec.rb b/spec/models/generic_success_bool_response_spec.rb index e8a5a87..3ce6075 100644 --- a/spec/models/generic_success_bool_response_spec.rb +++ b/spec/models/generic_success_bool_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/get_notification_history_request_body_spec.rb b/spec/models/get_notification_history_request_body_spec.rb index 03c03f6..434d178 100644 --- a/spec/models/get_notification_history_request_body_spec.rb +++ b/spec/models/get_notification_history_request_body_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/get_segment_success_response_spec.rb b/spec/models/get_segment_success_response_spec.rb new file mode 100644 index 0000000..318fedb --- /dev/null +++ b/spec/models/get_segment_success_response_spec.rb @@ -0,0 +1,40 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::GetSegmentSuccessResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::GetSegmentSuccessResponse do + let(:instance) { OneSignal::GetSegmentSuccessResponse.new } + + describe 'test an instance of GetSegmentSuccessResponse' do + it 'should create an instance of GetSegmentSuccessResponse' do + expect(instance).to be_instance_of(OneSignal::GetSegmentSuccessResponse) + end + end + describe 'test attribute "subscriber_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "payload"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/get_segments_success_response_spec.rb b/spec/models/get_segments_success_response_spec.rb index 49d013a..5e7dde3 100644 --- a/spec/models/get_segments_success_response_spec.rb +++ b/spec/models/get_segments_success_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/language_string_map_spec.rb b/spec/models/language_string_map_spec.rb index 32c9d4e..5481e77 100644 --- a/spec/models/language_string_map_spec.rb +++ b/spec/models/language_string_map_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/list_audit_logs_success_response_spec.rb b/spec/models/list_audit_logs_success_response_spec.rb new file mode 100644 index 0000000..b07b229 --- /dev/null +++ b/spec/models/list_audit_logs_success_response_spec.rb @@ -0,0 +1,46 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::ListAuditLogsSuccessResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::ListAuditLogsSuccessResponse do + let(:instance) { OneSignal::ListAuditLogsSuccessResponse.new } + + describe 'test an instance of ListAuditLogsSuccessResponse' do + it 'should create an instance of ListAuditLogsSuccessResponse' do + expect(instance).to be_instance_of(OneSignal::ListAuditLogsSuccessResponse) + end + end + describe 'test attribute "audit_logs"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "has_more"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "next_cursor"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/notification_all_of_spec.rb b/spec/models/notification_all_of_spec.rb index a8bf7c9..73dc70f 100644 --- a/spec/models/notification_all_of_spec.rb +++ b/spec/models/notification_all_of_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/notification_history_success_response_spec.rb b/spec/models/notification_history_success_response_spec.rb index b19d362..b3c776d 100644 --- a/spec/models/notification_history_success_response_spec.rb +++ b/spec/models/notification_history_success_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/notification_slice_spec.rb b/spec/models/notification_slice_spec.rb index 840562c..427a081 100644 --- a/spec/models/notification_slice_spec.rb +++ b/spec/models/notification_slice_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb index aea7be9..20fb967 100644 --- a/spec/models/notification_spec.rb +++ b/spec/models/notification_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/notification_target_spec.rb b/spec/models/notification_target_spec.rb index f38413b..d7d191b 100644 --- a/spec/models/notification_target_spec.rb +++ b/spec/models/notification_target_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/notification_with_meta_all_of_spec.rb b/spec/models/notification_with_meta_all_of_spec.rb index 2780e6b..a4303d7 100644 --- a/spec/models/notification_with_meta_all_of_spec.rb +++ b/spec/models/notification_with_meta_all_of_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/notification_with_meta_spec.rb b/spec/models/notification_with_meta_spec.rb index a40a268..49ea1b7 100644 --- a/spec/models/notification_with_meta_spec.rb +++ b/spec/models/notification_with_meta_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/operator_spec.rb b/spec/models/operator_spec.rb index 076ff6d..56ce28f 100644 --- a/spec/models/operator_spec.rb +++ b/spec/models/operator_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/outcome_data_spec.rb b/spec/models/outcome_data_spec.rb index 559705f..539d36f 100644 --- a/spec/models/outcome_data_spec.rb +++ b/spec/models/outcome_data_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/outcomes_data_spec.rb b/spec/models/outcomes_data_spec.rb index 8bedbbb..5e5504b 100644 --- a/spec/models/outcomes_data_spec.rb +++ b/spec/models/outcomes_data_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/platform_delivery_data_email_all_of_spec.rb b/spec/models/platform_delivery_data_email_all_of_spec.rb index 778e89e..2a64c77 100644 --- a/spec/models/platform_delivery_data_email_all_of_spec.rb +++ b/spec/models/platform_delivery_data_email_all_of_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/platform_delivery_data_sms_all_of_spec.rb b/spec/models/platform_delivery_data_sms_all_of_spec.rb index 3f9382e..b512785 100644 --- a/spec/models/platform_delivery_data_sms_all_of_spec.rb +++ b/spec/models/platform_delivery_data_sms_all_of_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/platform_delivery_data_spec.rb b/spec/models/platform_delivery_data_spec.rb index 2a5a798..64f70a7 100644 --- a/spec/models/platform_delivery_data_spec.rb +++ b/spec/models/platform_delivery_data_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/properties_body_spec.rb b/spec/models/properties_body_spec.rb index d68cb51..2972ec6 100644 --- a/spec/models/properties_body_spec.rb +++ b/spec/models/properties_body_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/properties_deltas_spec.rb b/spec/models/properties_deltas_spec.rb index 274b4ed..644dc41 100644 --- a/spec/models/properties_deltas_spec.rb +++ b/spec/models/properties_deltas_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/properties_object_spec.rb b/spec/models/properties_object_spec.rb index 0e367b9..2f1ad81 100644 --- a/spec/models/properties_object_spec.rb +++ b/spec/models/properties_object_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/purchase_spec.rb b/spec/models/purchase_spec.rb index 14fd416..9c8f85e 100644 --- a/spec/models/purchase_spec.rb +++ b/spec/models/purchase_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/rate_limit_error_spec.rb b/spec/models/rate_limit_error_spec.rb index a48479c..1accdd2 100644 --- a/spec/models/rate_limit_error_spec.rb +++ b/spec/models/rate_limit_error_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/segment_data_spec.rb b/spec/models/segment_data_spec.rb index 19d11b3..aa96d2e 100644 --- a/spec/models/segment_data_spec.rb +++ b/spec/models/segment_data_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/segment_details_spec.rb b/spec/models/segment_details_spec.rb new file mode 100644 index 0000000..fd5d817 --- /dev/null +++ b/spec/models/segment_details_spec.rb @@ -0,0 +1,68 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::SegmentDetails +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::SegmentDetails do + let(:instance) { OneSignal::SegmentDetails.new } + + describe 'test an instance of SegmentDetails' do + it 'should create an instance of SegmentDetails' do + expect(instance).to be_instance_of(OneSignal::SegmentDetails) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["default", "custom", "quickstart"]) + # validator.allowable_values.each do |value| + # expect { instance.source = value }.not_to raise_error + # end + end + end + + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/segment_notification_target_spec.rb b/spec/models/segment_notification_target_spec.rb index f74e58f..de96c76 100644 --- a/spec/models/segment_notification_target_spec.rb +++ b/spec/models/segment_notification_target_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/segment_spec.rb b/spec/models/segment_spec.rb index 001567e..70a70ee 100644 --- a/spec/models/segment_spec.rb +++ b/spec/models/segment_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/start_live_activity_request_spec.rb b/spec/models/start_live_activity_request_spec.rb index 373f304..588d102 100644 --- a/spec/models/start_live_activity_request_spec.rb +++ b/spec/models/start_live_activity_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/start_live_activity_success_response_spec.rb b/spec/models/start_live_activity_success_response_spec.rb index dcedf35..8ad8056 100644 --- a/spec/models/start_live_activity_success_response_spec.rb +++ b/spec/models/start_live_activity_success_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/subscription_body_spec.rb b/spec/models/subscription_body_spec.rb index 3a88648..37964fc 100644 --- a/spec/models/subscription_body_spec.rb +++ b/spec/models/subscription_body_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/subscription_notification_target_spec.rb b/spec/models/subscription_notification_target_spec.rb index ecb8b7a..01f16a6 100644 --- a/spec/models/subscription_notification_target_spec.rb +++ b/spec/models/subscription_notification_target_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/subscription_spec.rb b/spec/models/subscription_spec.rb index bb5daf7..56f2cab 100644 --- a/spec/models/subscription_spec.rb +++ b/spec/models/subscription_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/template_resource_spec.rb b/spec/models/template_resource_spec.rb index 64d1b2c..957973d 100644 --- a/spec/models/template_resource_spec.rb +++ b/spec/models/template_resource_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/templates_list_response_spec.rb b/spec/models/templates_list_response_spec.rb index ae3b7cf..8ddbbc3 100644 --- a/spec/models/templates_list_response_spec.rb +++ b/spec/models/templates_list_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/transfer_subscription_request_body_spec.rb b/spec/models/transfer_subscription_request_body_spec.rb index 24b81c2..9546c4c 100644 --- a/spec/models/transfer_subscription_request_body_spec.rb +++ b/spec/models/transfer_subscription_request_body_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/update_api_key_request_spec.rb b/spec/models/update_api_key_request_spec.rb index 0fc3c9f..87d71d6 100644 --- a/spec/models/update_api_key_request_spec.rb +++ b/spec/models/update_api_key_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/update_live_activity_request_spec.rb b/spec/models/update_live_activity_request_spec.rb index a0b925d..1a339c4 100644 --- a/spec/models/update_live_activity_request_spec.rb +++ b/spec/models/update_live_activity_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/update_live_activity_success_response_spec.rb b/spec/models/update_live_activity_success_response_spec.rb index 53b799e..abb59f2 100644 --- a/spec/models/update_live_activity_success_response_spec.rb +++ b/spec/models/update_live_activity_success_response_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/update_segment_request_spec.rb b/spec/models/update_segment_request_spec.rb new file mode 100644 index 0000000..cad144b --- /dev/null +++ b/spec/models/update_segment_request_spec.rb @@ -0,0 +1,46 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::UpdateSegmentRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::UpdateSegmentRequest do + let(:instance) { OneSignal::UpdateSegmentRequest.new } + + describe 'test an instance of UpdateSegmentRequest' do + it 'should create an instance of UpdateSegmentRequest' do + expect(instance).to be_instance_of(OneSignal::UpdateSegmentRequest) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/update_segment_success_response_spec.rb b/spec/models/update_segment_success_response_spec.rb new file mode 100644 index 0000000..0ae4d84 --- /dev/null +++ b/spec/models/update_segment_success_response_spec.rb @@ -0,0 +1,40 @@ +=begin +#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: 5.11.0 +Contact: devrel@onesignal.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OneSignal::UpdateSegmentSuccessResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OneSignal::UpdateSegmentSuccessResponse do + let(:instance) { OneSignal::UpdateSegmentSuccessResponse.new } + + describe 'test an instance of UpdateSegmentSuccessResponse' do + it 'should create an instance of UpdateSegmentSuccessResponse' do + expect(instance).to be_instance_of(OneSignal::UpdateSegmentSuccessResponse) + end + end + describe 'test attribute "success"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/update_template_request_spec.rb b/spec/models/update_template_request_spec.rb index cd38367..247349d 100644 --- a/spec/models/update_template_request_spec.rb +++ b/spec/models/update_template_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/update_user_request_spec.rb b/spec/models/update_user_request_spec.rb index 3f5f827..25be596 100644 --- a/spec/models/update_user_request_spec.rb +++ b/spec/models/update_user_request_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/user_identity_body_spec.rb b/spec/models/user_identity_body_spec.rb index 40f43c7..e24e4c0 100644 --- a/spec/models/user_identity_body_spec.rb +++ b/spec/models/user_identity_body_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index de32645..435cbfb 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/models/web_button_spec.rb b/spec/models/web_button_spec.rb index fc7eca9..4dfde2c 100644 --- a/spec/models/web_button_spec.rb +++ b/spec/models/web_button_spec.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9e3c92b..fbf41f3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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: 5.10.0 +The version of the OpenAPI document: 5.11.0 Contact: devrel@onesignal.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.0-SNAPSHOT