├── .github ├── ISSUE_TEMPLATE │ ├── ask-question.yml │ ├── bug-report.yml │ └── general-feedback.yml ├── pull_request_template.md └── workflows │ ├── Zapier.yml │ └── project.yml ├── .gitignore ├── .php-cs-fixer.dist.php ├── LICENSE ├── README.md ├── composer.json ├── docs ├── Api │ └── DefaultApi.md └── Model │ ├── App.md │ ├── BasicNotification.md │ ├── BasicNotificationAllOf.md │ ├── BasicNotificationAllOfAndroidBackgroundLayout.md │ ├── Button.md │ ├── CreateNotificationSuccessResponse.md │ ├── CreateSegmentConflictResponse.md │ ├── CreateSegmentSuccessResponse.md │ ├── CreateUserConflictResponse.md │ ├── CreateUserConflictResponseErrorsInner.md │ ├── CreateUserConflictResponseErrorsItemsMeta.md │ ├── DeliveryData.md │ ├── ExportEventsSuccessResponse.md │ ├── ExportSubscriptionsRequestBody.md │ ├── ExportSubscriptionsSuccessResponse.md │ ├── Filter.md │ ├── FilterExpression.md │ ├── GenericError.md │ ├── GenericErrorErrorsInner.md │ ├── GenericSuccessBoolResponse.md │ ├── GetNotificationHistoryRequestBody.md │ ├── GetSegmentsSuccessResponse.md │ ├── LanguageStringMap.md │ ├── Notification.md │ ├── NotificationAllOf.md │ ├── NotificationHistorySuccessResponse.md │ ├── NotificationSlice.md │ ├── NotificationTarget.md │ ├── NotificationWithMeta.md │ ├── NotificationWithMetaAllOf.md │ ├── Operator.md │ ├── OutcomeData.md │ ├── OutcomesData.md │ ├── PlatformDeliveryData.md │ ├── PlatformDeliveryDataEmailAllOf.md │ ├── PlatformDeliveryDataSmsAllOf.md │ ├── PropertiesBody.md │ ├── PropertiesDeltas.md │ ├── PropertiesObject.md │ ├── Purchase.md │ ├── RateLimitError.md │ ├── RateLimiterError.md │ ├── Segment.md │ ├── SegmentData.md │ ├── SegmentNotificationTarget.md │ ├── Subscription.md │ ├── SubscriptionBody.md │ ├── SubscriptionNotificationTarget.md │ ├── TransferSubscriptionRequestBody.md │ ├── UpdateLiveActivityRequest.md │ ├── UpdateLiveActivitySuccessResponse.md │ ├── UpdateUserRequest.md │ ├── User.md │ ├── UserIdentityBody.md │ └── WebButton.md └── lib ├── ApiException.php ├── Configuration.php ├── HeaderSelector.php ├── ObjectSerializer.php ├── api └── DefaultApi.php └── model ├── App.php ├── BasicNotification.php ├── BasicNotificationAllOf.php ├── BasicNotificationAllOfAndroidBackgroundLayout.php ├── Button.php ├── CreateNotificationSuccessResponse.php ├── CreateSegmentConflictResponse.php ├── CreateSegmentSuccessResponse.php ├── CreateUserConflictResponse.php ├── CreateUserConflictResponseErrorsInner.php ├── CreateUserConflictResponseErrorsItemsMeta.php ├── DeliveryData.php ├── ExportEventsSuccessResponse.php ├── ExportSubscriptionsRequestBody.php ├── ExportSubscriptionsSuccessResponse.php ├── Filter.php ├── FilterExpression.php ├── GenericError.php ├── GenericSuccessBoolResponse.php ├── GetNotificationHistoryRequestBody.php ├── GetSegmentsSuccessResponse.php ├── LanguageStringMap.php ├── ModelInterface.php ├── Notification.php ├── NotificationAllOf.php ├── NotificationHistorySuccessResponse.php ├── NotificationSlice.php ├── NotificationTarget.php ├── NotificationWithMeta.php ├── NotificationWithMetaAllOf.php ├── Operator.php ├── OutcomeData.php ├── OutcomesData.php ├── PlatformDeliveryData.php ├── PlatformDeliveryDataEmailAllOf.php ├── PlatformDeliveryDataSmsAllOf.php ├── PropertiesBody.php ├── PropertiesDeltas.php ├── PropertiesObject.php ├── Purchase.php ├── RateLimitError.php ├── Segment.php ├── SegmentData.php ├── SegmentNotificationTarget.php ├── Subscription.php ├── SubscriptionBody.php ├── SubscriptionNotificationTarget.php ├── TransferSubscriptionRequestBody.php ├── UpdateLiveActivityRequest.php ├── UpdateLiveActivitySuccessResponse.php ├── UpdateUserRequest.php ├── User.php ├── UserIdentityBody.php └── WebButton.php /.github/ISSUE_TEMPLATE/ask-question.yml: -------------------------------------------------------------------------------- 1 | name: 🙋‍♂️ Ask a question 2 | description: Tell us what's on your mind 3 | title: "[Question]: " 4 | labels: ["Question"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Having issues integrating this API library? 10 | - type: textarea 11 | id: question 12 | attributes: 13 | label: How can we help? 14 | description: Specific question regarding integrating this API library. 15 | placeholder: How do I...? 16 | validations: 17 | required: true 18 | - type: checkboxes 19 | id: terms 20 | attributes: 21 | label: Code of Conduct 22 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) 23 | options: 24 | - label: I agree to follow this project's Code of Conduct 25 | required: true 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.yml: -------------------------------------------------------------------------------- 1 | name: 🪳 Bug report 2 | description: File a bug report 3 | title: "[Bug]: " 4 | labels: ["Bug"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to fill out this bug report! 10 | - type: textarea 11 | id: what-happened 12 | attributes: 13 | label: What happened? 14 | description: Provide a thorough description of whats going on. 15 | placeholder: The latest version of the API library throws an exception when creating a notification targetting all Active Users. 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: reproduction-steps 20 | attributes: 21 | label: Steps to reproduce? 22 | description: Provide as much detail as posible to reproduce the issue. 23 | placeholder: | 24 | 1. Install vX.Y.Z of dependency 25 | 2. Run provided code snippet 26 | 3. Note that the app crashes 27 | render: Markdown 28 | validations: 29 | required: true 30 | - type: textarea 31 | id: what-are-expectations 32 | attributes: 33 | label: What did you expect to happen? 34 | description: Also tell us, what did you expect to happen? 35 | placeholder: I expected the API library to properly deserialize any response returned by OneSignal. 36 | validations: 37 | required: true 38 | - type: textarea 39 | id: logs 40 | attributes: 41 | label: Relevant log output 42 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. 43 | render: Shell 44 | - type: checkboxes 45 | id: terms 46 | attributes: 47 | label: Code of Conduct 48 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) 49 | options: 50 | - label: I agree to follow this project's Code of Conduct 51 | required: true 52 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/general-feedback.yml: -------------------------------------------------------------------------------- 1 | name: 📣 General feedback 2 | description: Tell us what's on your mind 3 | title: "[Feedback]: " 4 | labels: ["Feedback"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for sharing your valuable feedback! 10 | - type: textarea 11 | id: feedback 12 | attributes: 13 | label: What's on your mind? 14 | description: Feedback regarding this API library. 15 | placeholder: Share your feedback... 16 | validations: 17 | required: true 18 | - type: checkboxes 19 | id: terms 20 | attributes: 21 | label: Code of Conduct 22 | description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) 23 | options: 24 | - label: I agree to follow this project's Code of Conduct 25 | required: true 26 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | # READ AND DELETE THIS SECTION BEFORE SUBMITTING PR 3 | * **Fill out each _REQUIRED_ section** 4 | * **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR** 5 | * **Read and fill out each of the checklists below** 6 | * **Remove this section after reading** 7 | 8 | 9 | # Description 10 | ## One Line Summary 11 | **REQUIRED** - Very short description that summaries the changes in this PR. 12 | 13 | ## Details 14 | 15 | ### Motivation 16 | **REQUIRED -** Why is this code change being made? Or what is the goal of this PR? Examples: Fixes a specific bug, provides additional logging to debug future issues, feature to allow X. 17 | 18 | ### Scope 19 | **RECOMMEND - OPTIONAL -** What is intended to be effected. What is known not to change. Example: Notifications are grouped when parameter X is set, not enabled by default. 20 | 21 | ### OPTIONAL - Other 22 | **OPTIONAL -** Feel free to add any other sections or sub-sections that can explain your PR better. 23 | 24 | # Testing 25 | 26 | ## Manual testing 27 | **REQUIRED -** Explain what scenarios were tested and the environment. 28 | 29 | 30 | # Checklist 31 | ## Overview 32 | - [ ] I have filled out all **REQUIRED** sections above 33 | - [ ] PR does one thing 34 | - If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR 35 | - [ ] Any Public API changes are explained in the PR details and conform to existing APIs 36 | 37 | ## Testing 38 | - [ ] I have personally tested this on my device, or explained why that is not possible 39 | 40 | ## Final pass 41 | - [ ] Code is as readable as possible. 42 | - Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code. 43 | - [ ] I have reviewed this PR myself, ensuring it meets each checklist item 44 | - WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this. -------------------------------------------------------------------------------- /.github/workflows/Zapier.yml: -------------------------------------------------------------------------------- 1 | # This is an action to close asana tasks that were generated by Github issues 2 | 3 | name: Zapier web hook 4 | 5 | # Controls when the workflow will run 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the "main" branch 8 | issues: 9 | types: [closed] 10 | 11 | permissions: 12 | issues: read 13 | 14 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 15 | jobs: 16 | # This workflow contains a single job called "build" 17 | build: 18 | # The type of runner that the job will run on 19 | runs-on: ubuntu-latest 20 | 21 | # Steps represent a sequence of tasks that will be executed as part of the job 22 | steps: 23 | # Runs a set of commands using the runners shell 24 | - name: Call Zapier web hook to close Asana task 25 | if: ${{ !github.event.issue.pull_request }} 26 | env: 27 | ISSUE_TITLE: ${{ github.event.issue.title }} 28 | run: | 29 | curl --location --request POST 'https://hooks.zapier.com/hooks/catch/12728683/b7009qc/' \ 30 | --header 'Content-Type: application/json' \ 31 | --header 'Accept: application/json' \ 32 | --data-raw '{ 33 | "task_name" : "$ISSUE_TITLE" 34 | }' -------------------------------------------------------------------------------- /.github/workflows/project.yml: -------------------------------------------------------------------------------- 1 | name: Add issues to project 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | 8 | jobs: 9 | add-to-project: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Add issue to project 13 | uses: actions/add-to-project@v1.0.2 14 | with: 15 | # SDK Server Project 16 | project-url: https://github.com/orgs/OneSignal/projects/11 17 | github-token: ${{ secrets.GH_PROJECTS_TOKEN }} 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ref: https://github.com/github/gitignore/blob/master/Composer.gitignore 2 | 3 | composer.phar 4 | /vendor/ 5 | 6 | # Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control 7 | # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file 8 | # composer.lock 9 | 10 | # php-cs-fixer cache 11 | .php_cs.cache 12 | .php-cs-fixer.cache 13 | 14 | # PHPUnit cache 15 | .phpunit.result.cache 16 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | in(__DIR__) 9 | ->exclude('vendor') 10 | ->exclude('test') 11 | ->exclude('tests') 12 | ; 13 | 14 | $config = new PhpCsFixer\Config(); 15 | return $config->setRules([ 16 | '@PSR12' => true, 17 | 'phpdoc_order' => true, 18 | 'array_syntax' => [ 'syntax' => 'short' ], 19 | 'strict_comparison' => true, 20 | 'strict_param' => true, 21 | 'no_trailing_whitespace' => false, 22 | 'no_trailing_whitespace_in_comment' => false, 23 | 'braces' => false, 24 | 'single_blank_line_at_eof' => false, 25 | 'blank_line_after_namespace' => false, 26 | 'no_leading_import_slash' => false, 27 | ]) 28 | ->setFinder($finder) 29 | ; 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Modified MIT License 2 | 3 | Copyright 2022 OneSignal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | 1. The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | 2. All copies of substantial portions of the Software may only be used in connection 16 | with services provided by OneSignal. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "onesignal/onesignal-php-api", 3 | "version": "5.1.0-beta1", 4 | "description": "A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com", 5 | "keywords": [ 6 | "onesignal", 7 | "php", 8 | "sdk", 9 | "rest", 10 | "api" 11 | ], 12 | "homepage": "https://onesignal.com", 13 | "authors": [ 14 | { 15 | "name": "OneSignal developers", 16 | "homepage": "https://onesignal.com" 17 | } 18 | ], 19 | "require": { 20 | "php": "^7.3 || ^8.0", 21 | "ext-curl": "*", 22 | "ext-json": "*", 23 | "ext-mbstring": "*", 24 | "guzzlehttp/guzzle": "^7.3", 25 | "guzzlehttp/psr7": "^1.7 || ^2.0" 26 | }, 27 | "require-dev": { 28 | "friendsofphp/php-cs-fixer": "^3.5" 29 | }, 30 | "autoload": { 31 | "psr-4": { "onesignal\\client\\" : "lib/" } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /docs/Model/App.md: -------------------------------------------------------------------------------- 1 | # # App 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | | [optional] [readonly] 8 | **name** | **string** | The name of your app, as displayed on your apps list on the dashboard. This can be renamed. | [optional] 9 | **players** | **int** | | [optional] [readonly] 10 | **messageable_players** | **int** | | [optional] [readonly] 11 | **updated_at** | **\DateTime** | | [optional] [readonly] 12 | **created_at** | **\DateTime** | | [optional] [readonly] 13 | **android_gcm_sender_id** | **string** | Android: Your Google Project number. Also known as Sender ID. | [optional] 14 | **gcm_key** | **string** | Android: Your Google Push Messaging Auth Key | [optional] 15 | **chrome_web_origin** | **string** | Chrome (All Browsers except Safari) (Recommended): The URL to your website. This field is required if you wish to enable web push and specify other web push parameters. | [optional] 16 | **chrome_key** | **string** | Not for web push. Your Google Push Messaging Auth Key if you use Chrome Apps / Extensions. | [optional] 17 | **chrome_web_default_notification_icon** | **string** | Chrome (All Browsers except Safari): Your default notification icon. Should be 256x256 pixels, min 80x80. | [optional] 18 | **chrome_web_sub_domain** | **string** | Chrome (All Browsers except Safari): A subdomain of your choice in order to support Web Push on non-HTTPS websites. This field must be set in order for the chrome_web_gcm_sender_id property to be processed. | [optional] 19 | **apns_env** | **string** | iOS: Either sandbox or production | [optional] 20 | **apns_p12** | **string** | iOS: Your apple push notification p12 certificate file, converted to a string and Base64 encoded. | [optional] 21 | **apns_p12_password** | **string** | iOS: Required if using p12 certificate. Password for the apns_p12 file. | [optional] 22 | **apns_certificates** | **string** | | [optional] [readonly] 23 | **safari_apns_certificates** | **string** | | [optional] [readonly] 24 | **safari_apns_p12** | **string** | Safari: Your apple push notification p12 certificate file for Safari Push Notifications, converted to a string and Base64 encoded. | [optional] 25 | **safari_apns_p12_password** | **string** | Safari: Password for safari_apns_p12 file | [optional] 26 | **apns_key_id** | **string** | iOS: Required if using p8. Unique identifier for the p8 authentication key. | [optional] 27 | **apns_team_id** | **string** | iOS: Required if using p8. Team ID generated by Apple for your developer account. | [optional] 28 | **apns_bundle_id** | **string** | iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem. | [optional] 29 | **apns_p8** | **string** | iOS: Required if using p8. Base64 encoded p8 key | [optional] 30 | **safari_site_origin** | **string** | Safari (Recommended): The hostname to your website including http(s):// | [optional] 31 | **safari_push_id** | **string** | | [optional] [readonly] 32 | **safari_icon_16_16** | **string** | | [optional] [readonly] 33 | **safari_icon_32_32** | **string** | | [optional] [readonly] 34 | **safari_icon_64_64** | **string** | | [optional] [readonly] 35 | **safari_icon_128_128** | **string** | | [optional] [readonly] 36 | **safari_icon_256_256** | **string** | Safari: A url for a 256x256 png notification icon. This is the only Safari icon URL you need to provide. | [optional] 37 | **site_name** | **string** | All Browsers (Recommended): The Site Name. Requires both chrome_web_origin and safari_site_origin to be set to add or update it. | [optional] 38 | **basic_auth_key** | **string** | | [optional] [readonly] 39 | **organization_id** | **string** | The Id of the Organization you would like to add this app to. | [optional] 40 | **additional_data_is_root_payload** | **bool** | iOS: Notification data (additional data) values will be added to the root of the apns payload when sent to the device. Ignore if you're not using any other plugins, or not using OneSignal SDK methods to read the payload. | [optional] 41 | 42 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 43 | -------------------------------------------------------------------------------- /docs/Model/BasicNotificationAllOfAndroidBackgroundLayout.md: -------------------------------------------------------------------------------- 1 | # # BasicNotificationAllOfAndroidBackgroundLayout 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **image** | **string** | Asset file, android resource name, or URL to remote image. | [optional] 8 | **headings_color** | **string** | Title text color ARGB Hex format. Example(Blue) \"FF0000FF\". | [optional] 9 | **contents_color** | **string** | Body text color ARGB Hex format. Example(Red) \"FFFF0000\". | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/Button.md: -------------------------------------------------------------------------------- 1 | # # Button 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | | 8 | **text** | **string** | | [optional] 9 | **icon** | **string** | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/CreateNotificationSuccessResponse.md: -------------------------------------------------------------------------------- 1 | # # CreateNotificationSuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | | [optional] 8 | **external_id** | **string** | | [optional] 9 | **errors** | **mixed** | Errors include the identifiers that are invalid, or that there are no subscribers. | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/CreateSegmentConflictResponse.md: -------------------------------------------------------------------------------- 1 | # # CreateSegmentConflictResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **success** | **bool** | | [optional] 8 | **errors** | **string[]** | | [optional] 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /docs/Model/CreateSegmentSuccessResponse.md: -------------------------------------------------------------------------------- 1 | # # CreateSegmentSuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **success** | **bool** | | [optional] 8 | **id** | **string** | UUID of created segment | [optional] 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /docs/Model/CreateUserConflictResponse.md: -------------------------------------------------------------------------------- 1 | # # CreateUserConflictResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **errors** | [**\onesignal\client\model\CreateUserConflictResponseErrorsInner[]**](CreateUserConflictResponseErrorsInner.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/CreateUserConflictResponseErrorsInner.md: -------------------------------------------------------------------------------- 1 | # # CreateUserConflictResponseErrorsInner 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **string** | | [optional] 8 | **title** | **string** | | [optional] 9 | **meta** | [**\onesignal\client\model\CreateUserConflictResponseErrorsItemsMeta**](CreateUserConflictResponseErrorsItemsMeta.md) | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/CreateUserConflictResponseErrorsItemsMeta.md: -------------------------------------------------------------------------------- 1 | # # CreateUserConflictResponseErrorsItemsMeta 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **conflicting_aliases** | **object** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/DeliveryData.md: -------------------------------------------------------------------------------- 1 | # # DeliveryData 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **successful** | **int** | Number of messages delivered to push servers, mobile carriers, or email service providers. | [optional] 8 | **failed** | **int** | Number of messages sent to unsubscribed devices. | [optional] 9 | **errored** | **int** | Number of errors reported. | [optional] 10 | **converted** | **int** | Number of messages that were clicked. | [optional] 11 | **received** | **int** | Number of devices that received the message. | [optional] 12 | 13 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 14 | -------------------------------------------------------------------------------- /docs/Model/ExportEventsSuccessResponse.md: -------------------------------------------------------------------------------- 1 | # # ExportEventsSuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **csv_file_url** | **string** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/ExportSubscriptionsRequestBody.md: -------------------------------------------------------------------------------- 1 | # # ExportSubscriptionsRequestBody 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **extra_fields** | **string[]** | Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256. | [optional] 8 | **last_active_since** | **string** | Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. | [optional] 9 | **segment_name** | **string** | Export all devices belonging to the segment. | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/ExportSubscriptionsSuccessResponse.md: -------------------------------------------------------------------------------- 1 | # # ExportSubscriptionsSuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **csv_file_url** | **string** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/Filter.md: -------------------------------------------------------------------------------- 1 | # # Filter 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **field** | **string** | Required. Name of the field to use as the first operand in the filter expression. | [optional] 8 | **key** | **string** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] 9 | **value** | **string** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] 10 | **hours_ago** | **string** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] 11 | **radius** | **float** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] 12 | **lat** | **float** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] 13 | **long** | **float** | If `field` is `location`, this is *required* to specify the user's longitude. | [optional] 14 | **relation** | **string** | Required. Operator of a filter expression. | [optional] 15 | 16 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 17 | -------------------------------------------------------------------------------- /docs/Model/FilterExpression.md: -------------------------------------------------------------------------------- 1 | # # FilterExpression 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **field** | **string** | Required. Name of the field to use as the first operand in the filter expression. | [optional] 8 | **key** | **string** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] 9 | **value** | **string** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] 10 | **hours_ago** | **string** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] 11 | **radius** | **float** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] 12 | **lat** | **float** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] 13 | **long** | **float** | If `field` is `location`, this is *required* to specify the user's longitude. | [optional] 14 | **relation** | **string** | Required. Operator of a filter expression. | [optional] 15 | **operator** | **string** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] 16 | 17 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 18 | -------------------------------------------------------------------------------- /docs/Model/GenericError.md: -------------------------------------------------------------------------------- 1 | # # GenericError 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **errors** | **mixed** | | [optional] 8 | **success** | **bool** | | [optional] 9 | **reference** | **mixed** | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/GenericErrorErrorsInner.md: -------------------------------------------------------------------------------- 1 | # # GenericErrorErrorsInner 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **string** | | [optional] 8 | **title** | **string** | | [optional] 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /docs/Model/GenericSuccessBoolResponse.md: -------------------------------------------------------------------------------- 1 | # # GenericSuccessBoolResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **success** | **bool** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/GetNotificationHistoryRequestBody.md: -------------------------------------------------------------------------------- 1 | # # GetNotificationHistoryRequestBody 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **events** | **string** | -> \"sent\" - All the devices by player_id that were sent the specified notification_id. Notifications targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. \"clicked\" - All the devices by `player_id` that clicked the specified notification_id. | [optional] 8 | **email** | **string** | The email address you would like the report sent. | [optional] 9 | **app_id** | **string** | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/GetSegmentsSuccessResponse.md: -------------------------------------------------------------------------------- 1 | # # GetSegmentsSuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **total_count** | **int** | The number of Segments in the response. | [optional] 8 | **offset** | **int** | Set with the offset query parameter. Default 0. | [optional] 9 | **limit** | **int** | Maximum number of Segments returned. Default 300. | [optional] 10 | **segments** | [**\onesignal\client\model\SegmentData[]**](SegmentData.md) | An array containing the Segment information. | [optional] 11 | 12 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 13 | -------------------------------------------------------------------------------- /docs/Model/LanguageStringMap.md: -------------------------------------------------------------------------------- 1 | # # LanguageStringMap 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **en** | **string** | Text in English. Will be used as a fallback | [optional] 8 | **ar** | **string** | Text in Arabic. | [optional] 9 | **bs** | **string** | Text in Bosnian. | [optional] 10 | **bg** | **string** | Text in Bulgarian. | [optional] 11 | **ca** | **string** | Text in Catalan. | [optional] 12 | **zh_hans** | **string** | Text in Chinese (Simplified). | [optional] 13 | **zh_hant** | **string** | Text in Chinese (Traditional). | [optional] 14 | **zh** | **string** | Alias for zh-Hans. | [optional] 15 | **hr** | **string** | Text in Croatian. | [optional] 16 | **cs** | **string** | Text in Czech. | [optional] 17 | **da** | **string** | Text in Danish. | [optional] 18 | **nl** | **string** | Text in Dutch. | [optional] 19 | **et** | **string** | Text in Estonian. | [optional] 20 | **fi** | **string** | Text in Finnish. | [optional] 21 | **fr** | **string** | Text in French. | [optional] 22 | **ka** | **string** | Text in Georgian. | [optional] 23 | **de** | **string** | Text in German. | [optional] 24 | **el** | **string** | Text in Greek. | [optional] 25 | **hi** | **string** | Text in Hindi. | [optional] 26 | **he** | **string** | Text in Hebrew. | [optional] 27 | **hu** | **string** | Text in Hungarian. | [optional] 28 | **id** | **string** | Text in Indonesian. | [optional] 29 | **it** | **string** | Text in Italian. | [optional] 30 | **ja** | **string** | Text in Japanese. | [optional] 31 | **ko** | **string** | Text in Korean. | [optional] 32 | **lv** | **string** | Text in Latvian. | [optional] 33 | **lt** | **string** | Text in Lithuanian. | [optional] 34 | **ms** | **string** | Text in Malay. | [optional] 35 | **nb** | **string** | Text in Norwegian. | [optional] 36 | **pl** | **string** | Text in Polish. | [optional] 37 | **fa** | **string** | Text in Persian. | [optional] 38 | **pt** | **string** | Text in Portugese. | [optional] 39 | **pa** | **string** | Text in Punjabi. | [optional] 40 | **ro** | **string** | Text in Romanian. | [optional] 41 | **ru** | **string** | Text in Russian. | [optional] 42 | **sr** | **string** | Text in Serbian. | [optional] 43 | **sk** | **string** | Text in Slovak. | [optional] 44 | **es** | **string** | Text in Spanish. | [optional] 45 | **sv** | **string** | Text in Swedish. | [optional] 46 | **th** | **string** | Text in Thai. | [optional] 47 | **tr** | **string** | Text in Turkish. | [optional] 48 | **uk** | **string** | Text in Ukrainian. | [optional] 49 | **vi** | **string** | Text in Vietnamese. | [optional] 50 | 51 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 52 | -------------------------------------------------------------------------------- /docs/Model/NotificationAllOf.md: -------------------------------------------------------------------------------- 1 | # # NotificationAllOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **send_after** | **\DateTime** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/NotificationHistorySuccessResponse.md: -------------------------------------------------------------------------------- 1 | # # NotificationHistorySuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **success** | **bool** | | [optional] 8 | **destination_url** | **string** | | [optional] 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /docs/Model/NotificationSlice.md: -------------------------------------------------------------------------------- 1 | # # NotificationSlice 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **total_count** | **int** | | [optional] 8 | **offset** | **int** | | [optional] 9 | **limit** | **int** | | [optional] 10 | **notifications** | [**\onesignal\client\model\NotificationWithMeta[]**](NotificationWithMeta.md) | | [optional] 11 | 12 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 13 | -------------------------------------------------------------------------------- /docs/Model/NotificationTarget.md: -------------------------------------------------------------------------------- 1 | # # NotificationTarget 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **included_segments** | **string[]** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] 8 | **excluded_segments** | **string[]** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] 9 | **include_subscription_ids** | **string[]** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] 10 | **include_email_tokens** | **string[]** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] 11 | **include_phone_numbers** | **string[]** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] 12 | **include_ios_tokens** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] 13 | **include_wp_wns_uris** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] 14 | **include_amazon_reg_ids** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] 15 | **include_chrome_reg_ids** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] 16 | **include_chrome_web_reg_ids** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] 17 | **include_android_reg_ids** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] 18 | **include_aliases** | **array** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] 19 | **target_channel** | **string** | | [optional] 20 | 21 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 22 | -------------------------------------------------------------------------------- /docs/Model/NotificationWithMetaAllOf.md: -------------------------------------------------------------------------------- 1 | # # NotificationWithMetaAllOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **remaining** | **int** | Number of notifications that have not been sent out yet. This can mean either our system is still processing the notification or you have delayed options set. | [optional] 8 | **successful** | **int** | Number of notifications that were successfully delivered. | [optional] 9 | **failed** | **int** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] 10 | **errored** | **int** | Number of notifications that could not be delivered due to an error. You can find more information by viewing the notification in the dashboard. | [optional] 11 | **converted** | **int** | Number of users who have clicked / tapped on your notification. | [optional] 12 | **queued_at** | **int** | Unix timestamp indicating when the notification was created. | [optional] 13 | **send_after** | **int** | Unix timestamp indicating when notification delivery should begin. | [optional] 14 | **completed_at** | **int** | Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after. | [optional] 15 | **platform_delivery_stats** | [**\onesignal\client\model\PlatformDeliveryData**](PlatformDeliveryData.md) | | [optional] 16 | **received** | **int** | Confirmed Deliveries number of devices that received the push notification. Paid Feature Only. Free accounts will see 0. | [optional] 17 | **throttle_rate_per_minute** | **int** | number of push notifications sent per minute. Paid Feature Only. If throttling is not enabled for the app or the notification, and for free accounts, null is returned. Refer to Throttling for more details. | [optional] 18 | 19 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 20 | -------------------------------------------------------------------------------- /docs/Model/Operator.md: -------------------------------------------------------------------------------- 1 | # # Operator 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **operator** | **string** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/OutcomeData.md: -------------------------------------------------------------------------------- 1 | # # OutcomeData 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | | 8 | **value** | **int** | | 9 | **aggregation** | **string** | | 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/OutcomesData.md: -------------------------------------------------------------------------------- 1 | # # OutcomesData 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **outcomes** | [**\onesignal\client\model\OutcomeData[]**](OutcomeData.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/PlatformDeliveryData.md: -------------------------------------------------------------------------------- 1 | # # PlatformDeliveryData 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **edge_web_push** | [**\onesignal\client\model\DeliveryData**](DeliveryData.md) | | [optional] 8 | **chrome_web_push** | [**\onesignal\client\model\DeliveryData**](DeliveryData.md) | | [optional] 9 | **firefox_web_push** | [**\onesignal\client\model\DeliveryData**](DeliveryData.md) | | [optional] 10 | **safari_web_push** | [**\onesignal\client\model\DeliveryData**](DeliveryData.md) | | [optional] 11 | **android** | [**\onesignal\client\model\DeliveryData**](DeliveryData.md) | | [optional] 12 | **ios** | [**\onesignal\client\model\DeliveryData**](DeliveryData.md) | | [optional] 13 | **sms** | [**DeliveryData**](DeliveryData.md) | | [optional] 14 | **email** | [**DeliveryData**](DeliveryData.md) | | [optional] 15 | 16 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 17 | -------------------------------------------------------------------------------- /docs/Model/PlatformDeliveryDataEmailAllOf.md: -------------------------------------------------------------------------------- 1 | # # PlatformDeliveryDataEmailAllOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **opened** | **int** | Number of times an email has been opened. | [optional] 8 | **unique_opens** | **int** | Number of unique recipients who have opened your email. | [optional] 9 | **clicks** | **int** | Number of clicked links from your email. This can include the recipient clicking email links multiple times. | [optional] 10 | **unique_clicks** | **int** | Number of unique clicks that your recipients have made on links from your email. | [optional] 11 | **bounced** | **int** | Number of recipients who registered as a hard or soft bounce and didn't receive your email. | [optional] 12 | **reported_spam** | **int** | Number of recipients who reported this email as spam. | [optional] 13 | **unsubscribed** | **int** | Number of recipients who opted out of your emails using the unsubscribe link in this email. | [optional] 14 | 15 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 16 | -------------------------------------------------------------------------------- /docs/Model/PlatformDeliveryDataSmsAllOf.md: -------------------------------------------------------------------------------- 1 | # # PlatformDeliveryDataSmsAllOf 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **provider_successful** | **int** | Number of messages reported as delivered successfully by the SMS service provider. | [optional] 8 | **provider_failed** | **int** | Number of recipients who didn't receive your message as reported by the SMS service provider. | [optional] 9 | **provider_errored** | **int** | Number of errors reported by the SMS service provider. | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/PropertiesBody.md: -------------------------------------------------------------------------------- 1 | # # PropertiesBody 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **properties** | [**\onesignal\client\model\PropertiesObject**](PropertiesObject.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/PropertiesDeltas.md: -------------------------------------------------------------------------------- 1 | # # PropertiesDeltas 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **session_time** | **int** | | [optional] 8 | **session_count** | **int** | | [optional] 9 | **purchases** | [**\onesignal\client\model\Purchase[]**](Purchase.md) | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/PropertiesObject.md: -------------------------------------------------------------------------------- 1 | # # PropertiesObject 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **tags** | **array** | | [optional] 8 | **language** | **string** | | [optional] 9 | **timezone_id** | **string** | | [optional] 10 | **lat** | **float** | | [optional] 11 | **long** | **float** | | [optional] 12 | **country** | **string** | | [optional] 13 | **first_active** | **int** | | [optional] 14 | **last_active** | **int** | | [optional] 15 | **amount_spent** | **float** | | [optional] 16 | **purchases** | [**\onesignal\client\model\Purchase[]**](Purchase.md) | | [optional] 17 | **ip** | **string** | | [optional] 18 | 19 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 20 | -------------------------------------------------------------------------------- /docs/Model/Purchase.md: -------------------------------------------------------------------------------- 1 | # # Purchase 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **sku** | **string** | The unique identifier of the purchased item. | 8 | **amount** | **string** | The amount, in USD, spent purchasing the item. | 9 | **iso** | **string** | The 3-letter ISO 4217 currency code. Required for correct storage and conversion of amount. | 10 | **count** | **int** | | [optional] 11 | 12 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 13 | -------------------------------------------------------------------------------- /docs/Model/RateLimitError.md: -------------------------------------------------------------------------------- 1 | # # RateLimitError 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **errors** | **string[]** | | [optional] 8 | **limit** | **string** | | [optional] 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /docs/Model/RateLimiterError.md: -------------------------------------------------------------------------------- 1 | # # RateLimiterError 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **errors** | [**\onesignal\client\model\GenericErrorErrorsInner[]**](GenericErrorErrorsInner.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/Segment.md: -------------------------------------------------------------------------------- 1 | # # Segment 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | UUID of the segment. If left empty, it will be assigned automaticaly. | [optional] 8 | **name** | **string** | Name of the segment. You'll see this name on the Web UI. | 9 | **filters** | [**\onesignal\client\model\FilterExpression[]**](FilterExpression.md) | Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. | 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/SegmentData.md: -------------------------------------------------------------------------------- 1 | # # SegmentData 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | The segment ID | [optional] 8 | **name** | **string** | The segment name | [optional] 9 | **created_at** | **string** | Date segment created | [optional] 10 | **updated_at** | **string** | Date segment last updated | [optional] 11 | **app_id** | **string** | The app id | [optional] 12 | **read_only** | **bool** | Is the segment read only? | [optional] 13 | **is_active** | **bool** | Is the segment active? | [optional] 14 | 15 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 16 | -------------------------------------------------------------------------------- /docs/Model/SegmentNotificationTarget.md: -------------------------------------------------------------------------------- 1 | # # SegmentNotificationTarget 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **included_segments** | **string[]** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] 8 | **excluded_segments** | **string[]** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] 9 | 10 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /docs/Model/Subscription.md: -------------------------------------------------------------------------------- 1 | # # Subscription 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | | [optional] 8 | **type** | **string** | | [optional] 9 | **token** | **string** | | [optional] 10 | **enabled** | **bool** | | [optional] 11 | **notification_types** | **int** | | [optional] 12 | **session_time** | **int** | | [optional] 13 | **session_count** | **int** | | [optional] 14 | **sdk** | **string** | | [optional] 15 | **device_model** | **string** | | [optional] 16 | **device_os** | **string** | | [optional] 17 | **rooted** | **bool** | | [optional] 18 | **test_type** | **int** | | [optional] 19 | **app_version** | **string** | | [optional] 20 | **net_type** | **int** | | [optional] 21 | **carrier** | **string** | | [optional] 22 | **web_auth** | **string** | | [optional] 23 | **web_p256** | **string** | | [optional] 24 | 25 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 26 | -------------------------------------------------------------------------------- /docs/Model/SubscriptionBody.md: -------------------------------------------------------------------------------- 1 | # # SubscriptionBody 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **subscription** | [**\onesignal\client\model\Subscription**](Subscription.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/SubscriptionNotificationTarget.md: -------------------------------------------------------------------------------- 1 | # # SubscriptionNotificationTarget 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **include_subscription_ids** | **string[]** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] 8 | **include_email_tokens** | **string[]** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] 9 | **include_phone_numbers** | **string[]** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] 10 | **include_ios_tokens** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] 11 | **include_wp_wns_uris** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] 12 | **include_amazon_reg_ids** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] 13 | **include_chrome_reg_ids** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] 14 | **include_chrome_web_reg_ids** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] 15 | **include_android_reg_ids** | **string[]** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] 16 | **include_aliases** | **array** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] 17 | **target_channel** | **string** | | [optional] 18 | 19 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 20 | -------------------------------------------------------------------------------- /docs/Model/TransferSubscriptionRequestBody.md: -------------------------------------------------------------------------------- 1 | # # TransferSubscriptionRequestBody 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **identity** | **array** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/UpdateLiveActivityRequest.md: -------------------------------------------------------------------------------- 1 | # # UpdateLiveActivityRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **string** | An internal name to assist with your campaign organization. This does not get displayed in the message itself. | 8 | **event** | **string** | | 9 | **event_updates** | **object** | This must match the ContentState interface you have defined within your Live Activity in your app. | 10 | **contents** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | [optional] 11 | **headings** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | [optional] 12 | **sound** | **string** | Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. | [optional] 13 | **stale_date** | **int** | Accepts Unix timestamp in seconds. When time reaches the configured stale date, the system considers the Live Activity out of date, and the ActivityState of the Live Activity changes to ActivityState.stale. | [optional] 14 | **dismissal_date** | **int** | Accepts Unix timestamp in seconds; only allowed if event is \"end\" | [optional] 15 | **priority** | **int** | Delivery priority through the the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. | [optional] 16 | 17 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 18 | -------------------------------------------------------------------------------- /docs/Model/UpdateLiveActivitySuccessResponse.md: -------------------------------------------------------------------------------- 1 | # # UpdateLiveActivitySuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/UpdateUserRequest.md: -------------------------------------------------------------------------------- 1 | # # UpdateUserRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **properties** | [**\onesignal\client\model\PropertiesObject**](PropertiesObject.md) | | [optional] 8 | **refresh_device_metadata** | **bool** | | [optional] [default to false] 9 | **deltas** | [**\onesignal\client\model\PropertiesDeltas**](PropertiesDeltas.md) | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/User.md: -------------------------------------------------------------------------------- 1 | # # User 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **properties** | [**\onesignal\client\model\PropertiesObject**](PropertiesObject.md) | | [optional] 8 | **identity** | **array** | | [optional] 9 | **subscriptions** | [**\onesignal\client\model\Subscription[]**](Subscription.md) | | [optional] 10 | 11 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/UserIdentityBody.md: -------------------------------------------------------------------------------- 1 | # # UserIdentityBody 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **identity** | **array** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/WebButton.md: -------------------------------------------------------------------------------- 1 | # # WebButton 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | | 8 | **text** | **string** | | [optional] 9 | **icon** | **string** | | [optional] 10 | **url** | **string** | | [optional] 11 | 12 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 13 | -------------------------------------------------------------------------------- /lib/ApiException.php: -------------------------------------------------------------------------------- 1 | responseHeaders = $responseHeaders; 76 | $this->responseBody = $responseBody; 77 | } 78 | 79 | /** 80 | * Gets the HTTP response header 81 | * 82 | * @return string[]|null HTTP response header 83 | */ 84 | public function getResponseHeaders() 85 | { 86 | return $this->responseHeaders; 87 | } 88 | 89 | /** 90 | * Gets the HTTP body of the server response either as Json or string 91 | * 92 | * @return \stdClass|string|null HTTP body of the server response either as \stdClass or string 93 | */ 94 | public function getResponseBody() 95 | { 96 | return $this->responseBody; 97 | } 98 | 99 | /** 100 | * Sets the deserialized response object (during deserialization) 101 | * 102 | * @param mixed $obj Deserialized response object 103 | * 104 | * @return void 105 | */ 106 | public function setResponseObject($obj) 107 | { 108 | $this->responseObject = $obj; 109 | } 110 | 111 | /** 112 | * Gets the deserialized response object (during deserialization) 113 | * 114 | * @return mixed the deserialized response object 115 | */ 116 | public function getResponseObject() 117 | { 118 | return $this->responseObject; 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /lib/HeaderSelector.php: -------------------------------------------------------------------------------- 1 | selectAcceptHeader($accept); 53 | if ($accept !== null) { 54 | $headers['Accept'] = $accept; 55 | } 56 | 57 | $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); 58 | return $headers; 59 | } 60 | 61 | /** 62 | * @param string[] $accept 63 | * @return array 64 | */ 65 | public function selectHeadersForMultipart($accept) 66 | { 67 | $headers = $this->selectHeaders($accept, []); 68 | 69 | unset($headers['Content-Type']); 70 | return $headers; 71 | } 72 | 73 | /** 74 | * Return the header 'Accept' based on an array of Accept provided 75 | * 76 | * @param string[] $accept Array of header 77 | * 78 | * @return null|string Accept (e.g. application/json) 79 | */ 80 | private function selectAcceptHeader($accept) 81 | { 82 | if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { 83 | return null; 84 | } elseif ($jsonAccept = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept)) { 85 | return implode(',', $jsonAccept); 86 | } else { 87 | return implode(',', $accept); 88 | } 89 | } 90 | 91 | /** 92 | * Return the content type based on an array of content-type provided 93 | * 94 | * @param string[] $contentType Array fo content-type 95 | * 96 | * @return string Content-Type (e.g. application/json) 97 | */ 98 | private function selectContentTypeHeader($contentType) 99 | { 100 | if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { 101 | return 'application/json'; 102 | } elseif (preg_grep("/application\/json/i", $contentType)) { 103 | return 'application/json'; 104 | } else { 105 | return implode(',', $contentType); 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/model/Button.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class Button implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'Button'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'id' => 'string', 64 | 'text' => 'string', 65 | 'icon' => 'string' 66 | ]; 67 | 68 | /** 69 | * Array of property to format mappings. Used for (de)serialization 70 | * 71 | * @var string[] 72 | * @phpstan-var array 73 | * @psalm-var array 74 | */ 75 | protected static $openAPIFormats = [ 76 | 'id' => null, 77 | 'text' => null, 78 | 'icon' => null 79 | ]; 80 | 81 | /** 82 | * Array of property to type mappings. Used for (de)serialization 83 | * 84 | * @return array 85 | */ 86 | public static function openAPITypes() 87 | { 88 | return self::$openAPITypes; 89 | } 90 | 91 | /** 92 | * Array of property to format mappings. Used for (de)serialization 93 | * 94 | * @return array 95 | */ 96 | public static function openAPIFormats() 97 | { 98 | return self::$openAPIFormats; 99 | } 100 | 101 | /** 102 | * Array of attributes where the key is the local name, 103 | * and the value is the original name 104 | * 105 | * @var string[] 106 | */ 107 | protected static $attributeMap = [ 108 | 'id' => 'id', 109 | 'text' => 'text', 110 | 'icon' => 'icon' 111 | ]; 112 | 113 | /** 114 | * Array of attributes to setter functions (for deserialization of responses) 115 | * 116 | * @var string[] 117 | */ 118 | protected static $setters = [ 119 | 'id' => 'setId', 120 | 'text' => 'setText', 121 | 'icon' => 'setIcon' 122 | ]; 123 | 124 | /** 125 | * Array of attributes to getter functions (for serialization of requests) 126 | * 127 | * @var string[] 128 | */ 129 | protected static $getters = [ 130 | 'id' => 'getId', 131 | 'text' => 'getText', 132 | 'icon' => 'getIcon' 133 | ]; 134 | 135 | /** 136 | * Array of attributes where the key is the local name, 137 | * and the value is the original name 138 | * 139 | * @return array 140 | */ 141 | public static function attributeMap() 142 | { 143 | return self::$attributeMap; 144 | } 145 | 146 | /** 147 | * Array of attributes to setter functions (for deserialization of responses) 148 | * 149 | * @return array 150 | */ 151 | public static function setters() 152 | { 153 | return self::$setters; 154 | } 155 | 156 | /** 157 | * Array of attributes to getter functions (for serialization of requests) 158 | * 159 | * @return array 160 | */ 161 | public static function getters() 162 | { 163 | return self::$getters; 164 | } 165 | 166 | /** 167 | * The original name of the model. 168 | * 169 | * @return string 170 | */ 171 | public function getModelName() 172 | { 173 | return self::$openAPIModelName; 174 | } 175 | 176 | 177 | /** 178 | * Associative array for storing property values 179 | * 180 | * @var mixed[] 181 | */ 182 | protected $container = []; 183 | 184 | /** 185 | * Constructor 186 | * 187 | * @param mixed[] $data Associated array of property values 188 | * initializing the model 189 | */ 190 | public function __construct(array $data = null) 191 | { 192 | $this->container['id'] = $data['id'] ?? null; 193 | $this->container['text'] = $data['text'] ?? null; 194 | $this->container['icon'] = $data['icon'] ?? null; 195 | } 196 | 197 | /** 198 | * Show all the invalid properties with reasons. 199 | * 200 | * @return array invalid properties with reasons 201 | */ 202 | public function listInvalidProperties() 203 | { 204 | $invalidProperties = []; 205 | 206 | if ($this->container['id'] === null) { 207 | $invalidProperties[] = "'id' can't be null"; 208 | } 209 | return $invalidProperties; 210 | } 211 | 212 | /** 213 | * Validate all the properties in the model 214 | * return true if all passed 215 | * 216 | * @return bool True if all properties are valid 217 | */ 218 | public function valid() 219 | { 220 | return count($this->listInvalidProperties()) === 0; 221 | } 222 | 223 | 224 | /** 225 | * Gets id 226 | * 227 | * @return string 228 | */ 229 | public function getId() 230 | { 231 | return $this->container['id']; 232 | } 233 | 234 | /** 235 | * Sets id 236 | * 237 | * @param string $id id 238 | * 239 | * @return self 240 | */ 241 | public function setId($id) 242 | { 243 | $this->container['id'] = $id; 244 | 245 | return $this; 246 | } 247 | 248 | /** 249 | * Gets text 250 | * 251 | * @return string|null 252 | */ 253 | public function getText() 254 | { 255 | return $this->container['text']; 256 | } 257 | 258 | /** 259 | * Sets text 260 | * 261 | * @param string|null $text text 262 | * 263 | * @return self 264 | */ 265 | public function setText($text) 266 | { 267 | $this->container['text'] = $text; 268 | 269 | return $this; 270 | } 271 | 272 | /** 273 | * Gets icon 274 | * 275 | * @return string|null 276 | */ 277 | public function getIcon() 278 | { 279 | return $this->container['icon']; 280 | } 281 | 282 | /** 283 | * Sets icon 284 | * 285 | * @param string|null $icon icon 286 | * 287 | * @return self 288 | */ 289 | public function setIcon($icon) 290 | { 291 | $this->container['icon'] = $icon; 292 | 293 | return $this; 294 | } 295 | /** 296 | * Returns true if offset exists. False otherwise. 297 | * 298 | * @param integer $offset Offset 299 | * 300 | * @return boolean 301 | */ 302 | public function offsetExists($offset): bool 303 | { 304 | return isset($this->container[$offset]); 305 | } 306 | 307 | /** 308 | * Gets offset. 309 | * 310 | * @param integer $offset Offset 311 | * 312 | * @return mixed|null 313 | */ 314 | #[\ReturnTypeWillChange] 315 | public function offsetGet($offset) 316 | { 317 | return $this->container[$offset] ?? null; 318 | } 319 | 320 | /** 321 | * Sets value based on offset. 322 | * 323 | * @param int|null $offset Offset 324 | * @param mixed $value Value to be set 325 | * 326 | * @return void 327 | */ 328 | public function offsetSet($offset, $value): void 329 | { 330 | if (is_null($offset)) { 331 | $this->container[] = $value; 332 | } else { 333 | $this->container[$offset] = $value; 334 | } 335 | } 336 | 337 | /** 338 | * Unsets offset. 339 | * 340 | * @param integer $offset Offset 341 | * 342 | * @return void 343 | */ 344 | public function offsetUnset($offset): void 345 | { 346 | unset($this->container[$offset]); 347 | } 348 | 349 | /** 350 | * Serializes the object to a value that can be serialized natively by json_encode(). 351 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 352 | * 353 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 354 | * of any type other than a resource. 355 | */ 356 | #[\ReturnTypeWillChange] 357 | public function jsonSerialize() 358 | { 359 | return ObjectSerializer::sanitizeForSerialization($this); 360 | } 361 | 362 | /** 363 | * Gets the string presentation of the object 364 | * 365 | * @return string 366 | */ 367 | public function __toString() 368 | { 369 | return json_encode( 370 | ObjectSerializer::sanitizeForSerialization($this), 371 | JSON_PRETTY_PRINT 372 | ); 373 | } 374 | 375 | /** 376 | * Gets a header-safe presentation of the object 377 | * 378 | * @return string 379 | */ 380 | public function toHeaderValue() 381 | { 382 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 383 | } 384 | } 385 | 386 | 387 | -------------------------------------------------------------------------------- /lib/model/CreateSegmentConflictResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class CreateSegmentConflictResponse implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'CreateSegmentConflictResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'success' => 'bool', 64 | 'errors' => 'string[]' 65 | ]; 66 | 67 | /** 68 | * Array of property to format mappings. Used for (de)serialization 69 | * 70 | * @var string[] 71 | * @phpstan-var array 72 | * @psalm-var array 73 | */ 74 | protected static $openAPIFormats = [ 75 | 'success' => null, 76 | 'errors' => null 77 | ]; 78 | 79 | /** 80 | * Array of property to type mappings. Used for (de)serialization 81 | * 82 | * @return array 83 | */ 84 | public static function openAPITypes() 85 | { 86 | return self::$openAPITypes; 87 | } 88 | 89 | /** 90 | * Array of property to format mappings. Used for (de)serialization 91 | * 92 | * @return array 93 | */ 94 | public static function openAPIFormats() 95 | { 96 | return self::$openAPIFormats; 97 | } 98 | 99 | /** 100 | * Array of attributes where the key is the local name, 101 | * and the value is the original name 102 | * 103 | * @var string[] 104 | */ 105 | protected static $attributeMap = [ 106 | 'success' => 'success', 107 | 'errors' => 'errors' 108 | ]; 109 | 110 | /** 111 | * Array of attributes to setter functions (for deserialization of responses) 112 | * 113 | * @var string[] 114 | */ 115 | protected static $setters = [ 116 | 'success' => 'setSuccess', 117 | 'errors' => 'setErrors' 118 | ]; 119 | 120 | /** 121 | * Array of attributes to getter functions (for serialization of requests) 122 | * 123 | * @var string[] 124 | */ 125 | protected static $getters = [ 126 | 'success' => 'getSuccess', 127 | 'errors' => 'getErrors' 128 | ]; 129 | 130 | /** 131 | * Array of attributes where the key is the local name, 132 | * and the value is the original name 133 | * 134 | * @return array 135 | */ 136 | public static function attributeMap() 137 | { 138 | return self::$attributeMap; 139 | } 140 | 141 | /** 142 | * Array of attributes to setter functions (for deserialization of responses) 143 | * 144 | * @return array 145 | */ 146 | public static function setters() 147 | { 148 | return self::$setters; 149 | } 150 | 151 | /** 152 | * Array of attributes to getter functions (for serialization of requests) 153 | * 154 | * @return array 155 | */ 156 | public static function getters() 157 | { 158 | return self::$getters; 159 | } 160 | 161 | /** 162 | * The original name of the model. 163 | * 164 | * @return string 165 | */ 166 | public function getModelName() 167 | { 168 | return self::$openAPIModelName; 169 | } 170 | 171 | 172 | /** 173 | * Associative array for storing property values 174 | * 175 | * @var mixed[] 176 | */ 177 | protected $container = []; 178 | 179 | /** 180 | * Constructor 181 | * 182 | * @param mixed[] $data Associated array of property values 183 | * initializing the model 184 | */ 185 | public function __construct(array $data = null) 186 | { 187 | $this->container['success'] = $data['success'] ?? null; 188 | $this->container['errors'] = $data['errors'] ?? null; 189 | } 190 | 191 | /** 192 | * Show all the invalid properties with reasons. 193 | * 194 | * @return array invalid properties with reasons 195 | */ 196 | public function listInvalidProperties() 197 | { 198 | $invalidProperties = []; 199 | 200 | return $invalidProperties; 201 | } 202 | 203 | /** 204 | * Validate all the properties in the model 205 | * return true if all passed 206 | * 207 | * @return bool True if all properties are valid 208 | */ 209 | public function valid() 210 | { 211 | return count($this->listInvalidProperties()) === 0; 212 | } 213 | 214 | 215 | /** 216 | * Gets success 217 | * 218 | * @return bool|null 219 | */ 220 | public function getSuccess() 221 | { 222 | return $this->container['success']; 223 | } 224 | 225 | /** 226 | * Sets success 227 | * 228 | * @param bool|null $success success 229 | * 230 | * @return self 231 | */ 232 | public function setSuccess($success) 233 | { 234 | $this->container['success'] = $success; 235 | 236 | return $this; 237 | } 238 | 239 | /** 240 | * Gets errors 241 | * 242 | * @return string[]|null 243 | */ 244 | public function getErrors() 245 | { 246 | return $this->container['errors']; 247 | } 248 | 249 | /** 250 | * Sets errors 251 | * 252 | * @param string[]|null $errors errors 253 | * 254 | * @return self 255 | */ 256 | public function setErrors($errors) 257 | { 258 | $this->container['errors'] = $errors; 259 | 260 | return $this; 261 | } 262 | /** 263 | * Returns true if offset exists. False otherwise. 264 | * 265 | * @param integer $offset Offset 266 | * 267 | * @return boolean 268 | */ 269 | public function offsetExists($offset): bool 270 | { 271 | return isset($this->container[$offset]); 272 | } 273 | 274 | /** 275 | * Gets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return mixed|null 280 | */ 281 | #[\ReturnTypeWillChange] 282 | public function offsetGet($offset) 283 | { 284 | return $this->container[$offset] ?? null; 285 | } 286 | 287 | /** 288 | * Sets value based on offset. 289 | * 290 | * @param int|null $offset Offset 291 | * @param mixed $value Value to be set 292 | * 293 | * @return void 294 | */ 295 | public function offsetSet($offset, $value): void 296 | { 297 | if (is_null($offset)) { 298 | $this->container[] = $value; 299 | } else { 300 | $this->container[$offset] = $value; 301 | } 302 | } 303 | 304 | /** 305 | * Unsets offset. 306 | * 307 | * @param integer $offset Offset 308 | * 309 | * @return void 310 | */ 311 | public function offsetUnset($offset): void 312 | { 313 | unset($this->container[$offset]); 314 | } 315 | 316 | /** 317 | * Serializes the object to a value that can be serialized natively by json_encode(). 318 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 319 | * 320 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 321 | * of any type other than a resource. 322 | */ 323 | #[\ReturnTypeWillChange] 324 | public function jsonSerialize() 325 | { 326 | return ObjectSerializer::sanitizeForSerialization($this); 327 | } 328 | 329 | /** 330 | * Gets the string presentation of the object 331 | * 332 | * @return string 333 | */ 334 | public function __toString() 335 | { 336 | return json_encode( 337 | ObjectSerializer::sanitizeForSerialization($this), 338 | JSON_PRETTY_PRINT 339 | ); 340 | } 341 | 342 | /** 343 | * Gets a header-safe presentation of the object 344 | * 345 | * @return string 346 | */ 347 | public function toHeaderValue() 348 | { 349 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 350 | } 351 | } 352 | 353 | 354 | -------------------------------------------------------------------------------- /lib/model/CreateSegmentSuccessResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class CreateSegmentSuccessResponse implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'CreateSegmentSuccessResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'success' => 'bool', 64 | 'id' => 'string' 65 | ]; 66 | 67 | /** 68 | * Array of property to format mappings. Used for (de)serialization 69 | * 70 | * @var string[] 71 | * @phpstan-var array 72 | * @psalm-var array 73 | */ 74 | protected static $openAPIFormats = [ 75 | 'success' => null, 76 | 'id' => null 77 | ]; 78 | 79 | /** 80 | * Array of property to type mappings. Used for (de)serialization 81 | * 82 | * @return array 83 | */ 84 | public static function openAPITypes() 85 | { 86 | return self::$openAPITypes; 87 | } 88 | 89 | /** 90 | * Array of property to format mappings. Used for (de)serialization 91 | * 92 | * @return array 93 | */ 94 | public static function openAPIFormats() 95 | { 96 | return self::$openAPIFormats; 97 | } 98 | 99 | /** 100 | * Array of attributes where the key is the local name, 101 | * and the value is the original name 102 | * 103 | * @var string[] 104 | */ 105 | protected static $attributeMap = [ 106 | 'success' => 'success', 107 | 'id' => 'id' 108 | ]; 109 | 110 | /** 111 | * Array of attributes to setter functions (for deserialization of responses) 112 | * 113 | * @var string[] 114 | */ 115 | protected static $setters = [ 116 | 'success' => 'setSuccess', 117 | 'id' => 'setId' 118 | ]; 119 | 120 | /** 121 | * Array of attributes to getter functions (for serialization of requests) 122 | * 123 | * @var string[] 124 | */ 125 | protected static $getters = [ 126 | 'success' => 'getSuccess', 127 | 'id' => 'getId' 128 | ]; 129 | 130 | /** 131 | * Array of attributes where the key is the local name, 132 | * and the value is the original name 133 | * 134 | * @return array 135 | */ 136 | public static function attributeMap() 137 | { 138 | return self::$attributeMap; 139 | } 140 | 141 | /** 142 | * Array of attributes to setter functions (for deserialization of responses) 143 | * 144 | * @return array 145 | */ 146 | public static function setters() 147 | { 148 | return self::$setters; 149 | } 150 | 151 | /** 152 | * Array of attributes to getter functions (for serialization of requests) 153 | * 154 | * @return array 155 | */ 156 | public static function getters() 157 | { 158 | return self::$getters; 159 | } 160 | 161 | /** 162 | * The original name of the model. 163 | * 164 | * @return string 165 | */ 166 | public function getModelName() 167 | { 168 | return self::$openAPIModelName; 169 | } 170 | 171 | 172 | /** 173 | * Associative array for storing property values 174 | * 175 | * @var mixed[] 176 | */ 177 | protected $container = []; 178 | 179 | /** 180 | * Constructor 181 | * 182 | * @param mixed[] $data Associated array of property values 183 | * initializing the model 184 | */ 185 | public function __construct(array $data = null) 186 | { 187 | $this->container['success'] = $data['success'] ?? null; 188 | $this->container['id'] = $data['id'] ?? null; 189 | } 190 | 191 | /** 192 | * Show all the invalid properties with reasons. 193 | * 194 | * @return array invalid properties with reasons 195 | */ 196 | public function listInvalidProperties() 197 | { 198 | $invalidProperties = []; 199 | 200 | return $invalidProperties; 201 | } 202 | 203 | /** 204 | * Validate all the properties in the model 205 | * return true if all passed 206 | * 207 | * @return bool True if all properties are valid 208 | */ 209 | public function valid() 210 | { 211 | return count($this->listInvalidProperties()) === 0; 212 | } 213 | 214 | 215 | /** 216 | * Gets success 217 | * 218 | * @return bool|null 219 | */ 220 | public function getSuccess() 221 | { 222 | return $this->container['success']; 223 | } 224 | 225 | /** 226 | * Sets success 227 | * 228 | * @param bool|null $success success 229 | * 230 | * @return self 231 | */ 232 | public function setSuccess($success) 233 | { 234 | $this->container['success'] = $success; 235 | 236 | return $this; 237 | } 238 | 239 | /** 240 | * Gets id 241 | * 242 | * @return string|null 243 | */ 244 | public function getId() 245 | { 246 | return $this->container['id']; 247 | } 248 | 249 | /** 250 | * Sets id 251 | * 252 | * @param string|null $id UUID of created segment 253 | * 254 | * @return self 255 | */ 256 | public function setId($id) 257 | { 258 | $this->container['id'] = $id; 259 | 260 | return $this; 261 | } 262 | /** 263 | * Returns true if offset exists. False otherwise. 264 | * 265 | * @param integer $offset Offset 266 | * 267 | * @return boolean 268 | */ 269 | public function offsetExists($offset): bool 270 | { 271 | return isset($this->container[$offset]); 272 | } 273 | 274 | /** 275 | * Gets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return mixed|null 280 | */ 281 | #[\ReturnTypeWillChange] 282 | public function offsetGet($offset) 283 | { 284 | return $this->container[$offset] ?? null; 285 | } 286 | 287 | /** 288 | * Sets value based on offset. 289 | * 290 | * @param int|null $offset Offset 291 | * @param mixed $value Value to be set 292 | * 293 | * @return void 294 | */ 295 | public function offsetSet($offset, $value): void 296 | { 297 | if (is_null($offset)) { 298 | $this->container[] = $value; 299 | } else { 300 | $this->container[$offset] = $value; 301 | } 302 | } 303 | 304 | /** 305 | * Unsets offset. 306 | * 307 | * @param integer $offset Offset 308 | * 309 | * @return void 310 | */ 311 | public function offsetUnset($offset): void 312 | { 313 | unset($this->container[$offset]); 314 | } 315 | 316 | /** 317 | * Serializes the object to a value that can be serialized natively by json_encode(). 318 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 319 | * 320 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 321 | * of any type other than a resource. 322 | */ 323 | #[\ReturnTypeWillChange] 324 | public function jsonSerialize() 325 | { 326 | return ObjectSerializer::sanitizeForSerialization($this); 327 | } 328 | 329 | /** 330 | * Gets the string presentation of the object 331 | * 332 | * @return string 333 | */ 334 | public function __toString() 335 | { 336 | return json_encode( 337 | ObjectSerializer::sanitizeForSerialization($this), 338 | JSON_PRETTY_PRINT 339 | ); 340 | } 341 | 342 | /** 343 | * Gets a header-safe presentation of the object 344 | * 345 | * @return string 346 | */ 347 | public function toHeaderValue() 348 | { 349 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 350 | } 351 | } 352 | 353 | 354 | -------------------------------------------------------------------------------- /lib/model/CreateUserConflictResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class CreateUserConflictResponse implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'CreateUserConflictResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'errors' => '\onesignal\client\model\CreateUserConflictResponseErrorsInner[]' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'errors' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'errors' => 'errors' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'errors' => 'setErrors' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'errors' => 'getErrors' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['errors'] = $data['errors'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets errors 211 | * 212 | * @return \onesignal\client\model\CreateUserConflictResponseErrorsInner[]|null 213 | */ 214 | public function getErrors() 215 | { 216 | return $this->container['errors']; 217 | } 218 | 219 | /** 220 | * Sets errors 221 | * 222 | * @param \onesignal\client\model\CreateUserConflictResponseErrorsInner[]|null $errors errors 223 | * 224 | * @return self 225 | */ 226 | public function setErrors($errors) 227 | { 228 | $this->container['errors'] = $errors; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/CreateUserConflictResponseErrorsItemsMeta.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class CreateUserConflictResponseErrorsItemsMeta implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'CreateUserConflictResponse_errorsItems_meta'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'conflicting_aliases' => 'object' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'conflicting_aliases' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'conflicting_aliases' => 'conflicting_aliases' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'conflicting_aliases' => 'setConflictingAliases' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'conflicting_aliases' => 'getConflictingAliases' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['conflicting_aliases'] = $data['conflicting_aliases'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets conflicting_aliases 211 | * 212 | * @return object|null 213 | */ 214 | public function getConflictingAliases() 215 | { 216 | return $this->container['conflicting_aliases']; 217 | } 218 | 219 | /** 220 | * Sets conflicting_aliases 221 | * 222 | * @param object|null $conflicting_aliases conflicting_aliases 223 | * 224 | * @return self 225 | */ 226 | public function setConflictingAliases($conflicting_aliases) 227 | { 228 | $this->container['conflicting_aliases'] = $conflicting_aliases; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/ExportEventsSuccessResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class ExportEventsSuccessResponse implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'ExportEventsSuccessResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'csv_file_url' => 'string' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'csv_file_url' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'csv_file_url' => 'csv_file_url' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'csv_file_url' => 'setCsvFileUrl' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'csv_file_url' => 'getCsvFileUrl' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['csv_file_url'] = $data['csv_file_url'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets csv_file_url 211 | * 212 | * @return string|null 213 | */ 214 | public function getCsvFileUrl() 215 | { 216 | return $this->container['csv_file_url']; 217 | } 218 | 219 | /** 220 | * Sets csv_file_url 221 | * 222 | * @param string|null $csv_file_url csv_file_url 223 | * 224 | * @return self 225 | */ 226 | public function setCsvFileUrl($csv_file_url) 227 | { 228 | $this->container['csv_file_url'] = $csv_file_url; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/ExportSubscriptionsSuccessResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class ExportSubscriptionsSuccessResponse implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'ExportSubscriptionsSuccessResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'csv_file_url' => 'string' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'csv_file_url' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'csv_file_url' => 'csv_file_url' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'csv_file_url' => 'setCsvFileUrl' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'csv_file_url' => 'getCsvFileUrl' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['csv_file_url'] = $data['csv_file_url'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets csv_file_url 211 | * 212 | * @return string|null 213 | */ 214 | public function getCsvFileUrl() 215 | { 216 | return $this->container['csv_file_url']; 217 | } 218 | 219 | /** 220 | * Sets csv_file_url 221 | * 222 | * @param string|null $csv_file_url csv_file_url 223 | * 224 | * @return self 225 | */ 226 | public function setCsvFileUrl($csv_file_url) 227 | { 228 | $this->container['csv_file_url'] = $csv_file_url; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/GenericSuccessBoolResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class GenericSuccessBoolResponse implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'GenericSuccessBoolResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'success' => 'bool' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'success' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'success' => 'success' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'success' => 'setSuccess' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'success' => 'getSuccess' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['success'] = $data['success'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets success 211 | * 212 | * @return bool|null 213 | */ 214 | public function getSuccess() 215 | { 216 | return $this->container['success']; 217 | } 218 | 219 | /** 220 | * Sets success 221 | * 222 | * @param bool|null $success success 223 | * 224 | * @return self 225 | */ 226 | public function setSuccess($success) 227 | { 228 | $this->container['success'] = $success; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/ModelInterface.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class NotificationAllOf implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'Notification_allOf'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'send_after' => '\DateTime' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'send_after' => 'date-time' 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'send_after' => 'send_after' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'send_after' => 'setSendAfter' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'send_after' => 'getSendAfter' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['send_after'] = $data['send_after'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets send_after 211 | * 212 | * @return \DateTime|null 213 | */ 214 | public function getSendAfter() 215 | { 216 | return $this->container['send_after']; 217 | } 218 | 219 | /** 220 | * Sets send_after 221 | * 222 | * @param \DateTime|null $send_after Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. 223 | * 224 | * @return self 225 | */ 226 | public function setSendAfter($send_after) 227 | { 228 | $this->container['send_after'] = $send_after; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/NotificationHistorySuccessResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class NotificationHistorySuccessResponse implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'NotificationHistorySuccessResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'success' => 'bool', 64 | 'destination_url' => 'string' 65 | ]; 66 | 67 | /** 68 | * Array of property to format mappings. Used for (de)serialization 69 | * 70 | * @var string[] 71 | * @phpstan-var array 72 | * @psalm-var array 73 | */ 74 | protected static $openAPIFormats = [ 75 | 'success' => null, 76 | 'destination_url' => null 77 | ]; 78 | 79 | /** 80 | * Array of property to type mappings. Used for (de)serialization 81 | * 82 | * @return array 83 | */ 84 | public static function openAPITypes() 85 | { 86 | return self::$openAPITypes; 87 | } 88 | 89 | /** 90 | * Array of property to format mappings. Used for (de)serialization 91 | * 92 | * @return array 93 | */ 94 | public static function openAPIFormats() 95 | { 96 | return self::$openAPIFormats; 97 | } 98 | 99 | /** 100 | * Array of attributes where the key is the local name, 101 | * and the value is the original name 102 | * 103 | * @var string[] 104 | */ 105 | protected static $attributeMap = [ 106 | 'success' => 'success', 107 | 'destination_url' => 'destination_url' 108 | ]; 109 | 110 | /** 111 | * Array of attributes to setter functions (for deserialization of responses) 112 | * 113 | * @var string[] 114 | */ 115 | protected static $setters = [ 116 | 'success' => 'setSuccess', 117 | 'destination_url' => 'setDestinationUrl' 118 | ]; 119 | 120 | /** 121 | * Array of attributes to getter functions (for serialization of requests) 122 | * 123 | * @var string[] 124 | */ 125 | protected static $getters = [ 126 | 'success' => 'getSuccess', 127 | 'destination_url' => 'getDestinationUrl' 128 | ]; 129 | 130 | /** 131 | * Array of attributes where the key is the local name, 132 | * and the value is the original name 133 | * 134 | * @return array 135 | */ 136 | public static function attributeMap() 137 | { 138 | return self::$attributeMap; 139 | } 140 | 141 | /** 142 | * Array of attributes to setter functions (for deserialization of responses) 143 | * 144 | * @return array 145 | */ 146 | public static function setters() 147 | { 148 | return self::$setters; 149 | } 150 | 151 | /** 152 | * Array of attributes to getter functions (for serialization of requests) 153 | * 154 | * @return array 155 | */ 156 | public static function getters() 157 | { 158 | return self::$getters; 159 | } 160 | 161 | /** 162 | * The original name of the model. 163 | * 164 | * @return string 165 | */ 166 | public function getModelName() 167 | { 168 | return self::$openAPIModelName; 169 | } 170 | 171 | 172 | /** 173 | * Associative array for storing property values 174 | * 175 | * @var mixed[] 176 | */ 177 | protected $container = []; 178 | 179 | /** 180 | * Constructor 181 | * 182 | * @param mixed[] $data Associated array of property values 183 | * initializing the model 184 | */ 185 | public function __construct(array $data = null) 186 | { 187 | $this->container['success'] = $data['success'] ?? null; 188 | $this->container['destination_url'] = $data['destination_url'] ?? null; 189 | } 190 | 191 | /** 192 | * Show all the invalid properties with reasons. 193 | * 194 | * @return array invalid properties with reasons 195 | */ 196 | public function listInvalidProperties() 197 | { 198 | $invalidProperties = []; 199 | 200 | return $invalidProperties; 201 | } 202 | 203 | /** 204 | * Validate all the properties in the model 205 | * return true if all passed 206 | * 207 | * @return bool True if all properties are valid 208 | */ 209 | public function valid() 210 | { 211 | return count($this->listInvalidProperties()) === 0; 212 | } 213 | 214 | 215 | /** 216 | * Gets success 217 | * 218 | * @return bool|null 219 | */ 220 | public function getSuccess() 221 | { 222 | return $this->container['success']; 223 | } 224 | 225 | /** 226 | * Sets success 227 | * 228 | * @param bool|null $success success 229 | * 230 | * @return self 231 | */ 232 | public function setSuccess($success) 233 | { 234 | $this->container['success'] = $success; 235 | 236 | return $this; 237 | } 238 | 239 | /** 240 | * Gets destination_url 241 | * 242 | * @return string|null 243 | */ 244 | public function getDestinationUrl() 245 | { 246 | return $this->container['destination_url']; 247 | } 248 | 249 | /** 250 | * Sets destination_url 251 | * 252 | * @param string|null $destination_url destination_url 253 | * 254 | * @return self 255 | */ 256 | public function setDestinationUrl($destination_url) 257 | { 258 | $this->container['destination_url'] = $destination_url; 259 | 260 | return $this; 261 | } 262 | /** 263 | * Returns true if offset exists. False otherwise. 264 | * 265 | * @param integer $offset Offset 266 | * 267 | * @return boolean 268 | */ 269 | public function offsetExists($offset): bool 270 | { 271 | return isset($this->container[$offset]); 272 | } 273 | 274 | /** 275 | * Gets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return mixed|null 280 | */ 281 | #[\ReturnTypeWillChange] 282 | public function offsetGet($offset) 283 | { 284 | return $this->container[$offset] ?? null; 285 | } 286 | 287 | /** 288 | * Sets value based on offset. 289 | * 290 | * @param int|null $offset Offset 291 | * @param mixed $value Value to be set 292 | * 293 | * @return void 294 | */ 295 | public function offsetSet($offset, $value): void 296 | { 297 | if (is_null($offset)) { 298 | $this->container[] = $value; 299 | } else { 300 | $this->container[$offset] = $value; 301 | } 302 | } 303 | 304 | /** 305 | * Unsets offset. 306 | * 307 | * @param integer $offset Offset 308 | * 309 | * @return void 310 | */ 311 | public function offsetUnset($offset): void 312 | { 313 | unset($this->container[$offset]); 314 | } 315 | 316 | /** 317 | * Serializes the object to a value that can be serialized natively by json_encode(). 318 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 319 | * 320 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 321 | * of any type other than a resource. 322 | */ 323 | #[\ReturnTypeWillChange] 324 | public function jsonSerialize() 325 | { 326 | return ObjectSerializer::sanitizeForSerialization($this); 327 | } 328 | 329 | /** 330 | * Gets the string presentation of the object 331 | * 332 | * @return string 333 | */ 334 | public function __toString() 335 | { 336 | return json_encode( 337 | ObjectSerializer::sanitizeForSerialization($this), 338 | JSON_PRETTY_PRINT 339 | ); 340 | } 341 | 342 | /** 343 | * Gets a header-safe presentation of the object 344 | * 345 | * @return string 346 | */ 347 | public function toHeaderValue() 348 | { 349 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 350 | } 351 | } 352 | 353 | 354 | -------------------------------------------------------------------------------- /lib/model/OutcomesData.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class OutcomesData implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'OutcomesData'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'outcomes' => '\onesignal\client\model\OutcomeData[]' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'outcomes' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'outcomes' => 'outcomes' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'outcomes' => 'setOutcomes' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'outcomes' => 'getOutcomes' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['outcomes'] = $data['outcomes'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets outcomes 211 | * 212 | * @return \onesignal\client\model\OutcomeData[]|null 213 | */ 214 | public function getOutcomes() 215 | { 216 | return $this->container['outcomes']; 217 | } 218 | 219 | /** 220 | * Sets outcomes 221 | * 222 | * @param \onesignal\client\model\OutcomeData[]|null $outcomes outcomes 223 | * 224 | * @return self 225 | */ 226 | public function setOutcomes($outcomes) 227 | { 228 | $this->container['outcomes'] = $outcomes; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/PropertiesBody.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class PropertiesBody implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'PropertiesBody'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'properties' => '\onesignal\client\model\PropertiesObject' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'properties' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'properties' => 'properties' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'properties' => 'setProperties' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'properties' => 'getProperties' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['properties'] = $data['properties'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets properties 211 | * 212 | * @return \onesignal\client\model\PropertiesObject|null 213 | */ 214 | public function getProperties() 215 | { 216 | return $this->container['properties']; 217 | } 218 | 219 | /** 220 | * Sets properties 221 | * 222 | * @param \onesignal\client\model\PropertiesObject|null $properties properties 223 | * 224 | * @return self 225 | */ 226 | public function setProperties($properties) 227 | { 228 | $this->container['properties'] = $properties; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/RateLimitError.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class RateLimitError implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'RateLimitError'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'errors' => 'string[]', 64 | 'limit' => 'string' 65 | ]; 66 | 67 | /** 68 | * Array of property to format mappings. Used for (de)serialization 69 | * 70 | * @var string[] 71 | * @phpstan-var array 72 | * @psalm-var array 73 | */ 74 | protected static $openAPIFormats = [ 75 | 'errors' => null, 76 | 'limit' => null 77 | ]; 78 | 79 | /** 80 | * Array of property to type mappings. Used for (de)serialization 81 | * 82 | * @return array 83 | */ 84 | public static function openAPITypes() 85 | { 86 | return self::$openAPITypes; 87 | } 88 | 89 | /** 90 | * Array of property to format mappings. Used for (de)serialization 91 | * 92 | * @return array 93 | */ 94 | public static function openAPIFormats() 95 | { 96 | return self::$openAPIFormats; 97 | } 98 | 99 | /** 100 | * Array of attributes where the key is the local name, 101 | * and the value is the original name 102 | * 103 | * @var string[] 104 | */ 105 | protected static $attributeMap = [ 106 | 'errors' => 'errors', 107 | 'limit' => 'limit' 108 | ]; 109 | 110 | /** 111 | * Array of attributes to setter functions (for deserialization of responses) 112 | * 113 | * @var string[] 114 | */ 115 | protected static $setters = [ 116 | 'errors' => 'setErrors', 117 | 'limit' => 'setLimit' 118 | ]; 119 | 120 | /** 121 | * Array of attributes to getter functions (for serialization of requests) 122 | * 123 | * @var string[] 124 | */ 125 | protected static $getters = [ 126 | 'errors' => 'getErrors', 127 | 'limit' => 'getLimit' 128 | ]; 129 | 130 | /** 131 | * Array of attributes where the key is the local name, 132 | * and the value is the original name 133 | * 134 | * @return array 135 | */ 136 | public static function attributeMap() 137 | { 138 | return self::$attributeMap; 139 | } 140 | 141 | /** 142 | * Array of attributes to setter functions (for deserialization of responses) 143 | * 144 | * @return array 145 | */ 146 | public static function setters() 147 | { 148 | return self::$setters; 149 | } 150 | 151 | /** 152 | * Array of attributes to getter functions (for serialization of requests) 153 | * 154 | * @return array 155 | */ 156 | public static function getters() 157 | { 158 | return self::$getters; 159 | } 160 | 161 | /** 162 | * The original name of the model. 163 | * 164 | * @return string 165 | */ 166 | public function getModelName() 167 | { 168 | return self::$openAPIModelName; 169 | } 170 | 171 | 172 | /** 173 | * Associative array for storing property values 174 | * 175 | * @var mixed[] 176 | */ 177 | protected $container = []; 178 | 179 | /** 180 | * Constructor 181 | * 182 | * @param mixed[] $data Associated array of property values 183 | * initializing the model 184 | */ 185 | public function __construct(array $data = null) 186 | { 187 | $this->container['errors'] = $data['errors'] ?? null; 188 | $this->container['limit'] = $data['limit'] ?? null; 189 | } 190 | 191 | /** 192 | * Show all the invalid properties with reasons. 193 | * 194 | * @return array invalid properties with reasons 195 | */ 196 | public function listInvalidProperties() 197 | { 198 | $invalidProperties = []; 199 | 200 | return $invalidProperties; 201 | } 202 | 203 | /** 204 | * Validate all the properties in the model 205 | * return true if all passed 206 | * 207 | * @return bool True if all properties are valid 208 | */ 209 | public function valid() 210 | { 211 | return count($this->listInvalidProperties()) === 0; 212 | } 213 | 214 | 215 | /** 216 | * Gets errors 217 | * 218 | * @return string[]|null 219 | */ 220 | public function getErrors() 221 | { 222 | return $this->container['errors']; 223 | } 224 | 225 | /** 226 | * Sets errors 227 | * 228 | * @param string[]|null $errors errors 229 | * 230 | * @return self 231 | */ 232 | public function setErrors($errors) 233 | { 234 | $this->container['errors'] = $errors; 235 | 236 | return $this; 237 | } 238 | 239 | /** 240 | * Gets limit 241 | * 242 | * @return string|null 243 | */ 244 | public function getLimit() 245 | { 246 | return $this->container['limit']; 247 | } 248 | 249 | /** 250 | * Sets limit 251 | * 252 | * @param string|null $limit limit 253 | * 254 | * @return self 255 | */ 256 | public function setLimit($limit) 257 | { 258 | $this->container['limit'] = $limit; 259 | 260 | return $this; 261 | } 262 | /** 263 | * Returns true if offset exists. False otherwise. 264 | * 265 | * @param integer $offset Offset 266 | * 267 | * @return boolean 268 | */ 269 | public function offsetExists($offset): bool 270 | { 271 | return isset($this->container[$offset]); 272 | } 273 | 274 | /** 275 | * Gets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return mixed|null 280 | */ 281 | #[\ReturnTypeWillChange] 282 | public function offsetGet($offset) 283 | { 284 | return $this->container[$offset] ?? null; 285 | } 286 | 287 | /** 288 | * Sets value based on offset. 289 | * 290 | * @param int|null $offset Offset 291 | * @param mixed $value Value to be set 292 | * 293 | * @return void 294 | */ 295 | public function offsetSet($offset, $value): void 296 | { 297 | if (is_null($offset)) { 298 | $this->container[] = $value; 299 | } else { 300 | $this->container[$offset] = $value; 301 | } 302 | } 303 | 304 | /** 305 | * Unsets offset. 306 | * 307 | * @param integer $offset Offset 308 | * 309 | * @return void 310 | */ 311 | public function offsetUnset($offset): void 312 | { 313 | unset($this->container[$offset]); 314 | } 315 | 316 | /** 317 | * Serializes the object to a value that can be serialized natively by json_encode(). 318 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 319 | * 320 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 321 | * of any type other than a resource. 322 | */ 323 | #[\ReturnTypeWillChange] 324 | public function jsonSerialize() 325 | { 326 | return ObjectSerializer::sanitizeForSerialization($this); 327 | } 328 | 329 | /** 330 | * Gets the string presentation of the object 331 | * 332 | * @return string 333 | */ 334 | public function __toString() 335 | { 336 | return json_encode( 337 | ObjectSerializer::sanitizeForSerialization($this), 338 | JSON_PRETTY_PRINT 339 | ); 340 | } 341 | 342 | /** 343 | * Gets a header-safe presentation of the object 344 | * 345 | * @return string 346 | */ 347 | public function toHeaderValue() 348 | { 349 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 350 | } 351 | } 352 | 353 | 354 | -------------------------------------------------------------------------------- /lib/model/SubscriptionBody.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class SubscriptionBody implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'SubscriptionBody'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'subscription' => '\onesignal\client\model\Subscription' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'subscription' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'subscription' => 'subscription' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'subscription' => 'setSubscription' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'subscription' => 'getSubscription' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['subscription'] = $data['subscription'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets subscription 211 | * 212 | * @return \onesignal\client\model\Subscription|null 213 | */ 214 | public function getSubscription() 215 | { 216 | return $this->container['subscription']; 217 | } 218 | 219 | /** 220 | * Sets subscription 221 | * 222 | * @param \onesignal\client\model\Subscription|null $subscription subscription 223 | * 224 | * @return self 225 | */ 226 | public function setSubscription($subscription) 227 | { 228 | $this->container['subscription'] = $subscription; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/TransferSubscriptionRequestBody.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class TransferSubscriptionRequestBody implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'TransferSubscriptionRequestBody'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'identity' => 'array' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'identity' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'identity' => 'identity' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'identity' => 'setIdentity' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'identity' => 'getIdentity' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['identity'] = $data['identity'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | if (!is_null($this->container['identity']) && (count($this->container['identity']) > 1)) { 195 | $invalidProperties[] = "invalid value for 'identity', number of items must be less than or equal to 1."; 196 | } 197 | 198 | if (!is_null($this->container['identity']) && (count($this->container['identity']) < 1)) { 199 | $invalidProperties[] = "invalid value for 'identity', number of items must be greater than or equal to 1."; 200 | } 201 | 202 | return $invalidProperties; 203 | } 204 | 205 | /** 206 | * Validate all the properties in the model 207 | * return true if all passed 208 | * 209 | * @return bool True if all properties are valid 210 | */ 211 | public function valid() 212 | { 213 | return count($this->listInvalidProperties()) === 0; 214 | } 215 | 216 | 217 | /** 218 | * Gets identity 219 | * 220 | * @return array|null 221 | */ 222 | public function getIdentity() 223 | { 224 | return $this->container['identity']; 225 | } 226 | 227 | /** 228 | * Sets identity 229 | * 230 | * @param array|null $identity identity 231 | * 232 | * @return self 233 | */ 234 | public function setIdentity($identity) 235 | { 236 | 237 | if (!is_null($identity) && (count($identity) > 1)) { 238 | throw new \InvalidArgumentException('invalid value for $identity when calling TransferSubscriptionRequestBody., number of items must be less than or equal to 1.'); 239 | } 240 | if (!is_null($identity) && (count($identity) < 1)) { 241 | throw new \InvalidArgumentException('invalid length for $identity when calling TransferSubscriptionRequestBody., number of items must be greater than or equal to 1.'); 242 | } 243 | $this->container['identity'] = $identity; 244 | 245 | return $this; 246 | } 247 | /** 248 | * Returns true if offset exists. False otherwise. 249 | * 250 | * @param integer $offset Offset 251 | * 252 | * @return boolean 253 | */ 254 | public function offsetExists($offset): bool 255 | { 256 | return isset($this->container[$offset]); 257 | } 258 | 259 | /** 260 | * Gets offset. 261 | * 262 | * @param integer $offset Offset 263 | * 264 | * @return mixed|null 265 | */ 266 | #[\ReturnTypeWillChange] 267 | public function offsetGet($offset) 268 | { 269 | return $this->container[$offset] ?? null; 270 | } 271 | 272 | /** 273 | * Sets value based on offset. 274 | * 275 | * @param int|null $offset Offset 276 | * @param mixed $value Value to be set 277 | * 278 | * @return void 279 | */ 280 | public function offsetSet($offset, $value): void 281 | { 282 | if (is_null($offset)) { 283 | $this->container[] = $value; 284 | } else { 285 | $this->container[$offset] = $value; 286 | } 287 | } 288 | 289 | /** 290 | * Unsets offset. 291 | * 292 | * @param integer $offset Offset 293 | * 294 | * @return void 295 | */ 296 | public function offsetUnset($offset): void 297 | { 298 | unset($this->container[$offset]); 299 | } 300 | 301 | /** 302 | * Serializes the object to a value that can be serialized natively by json_encode(). 303 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 304 | * 305 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 306 | * of any type other than a resource. 307 | */ 308 | #[\ReturnTypeWillChange] 309 | public function jsonSerialize() 310 | { 311 | return ObjectSerializer::sanitizeForSerialization($this); 312 | } 313 | 314 | /** 315 | * Gets the string presentation of the object 316 | * 317 | * @return string 318 | */ 319 | public function __toString() 320 | { 321 | return json_encode( 322 | ObjectSerializer::sanitizeForSerialization($this), 323 | JSON_PRETTY_PRINT 324 | ); 325 | } 326 | 327 | /** 328 | * Gets a header-safe presentation of the object 329 | * 330 | * @return string 331 | */ 332 | public function toHeaderValue() 333 | { 334 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 335 | } 336 | } 337 | 338 | 339 | -------------------------------------------------------------------------------- /lib/model/UpdateLiveActivitySuccessResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class UpdateLiveActivitySuccessResponse implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'UpdateLiveActivitySuccessResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'id' => 'string' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'id' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'id' => 'id' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'id' => 'setId' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'id' => 'getId' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['id'] = $data['id'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets id 211 | * 212 | * @return string|null 213 | */ 214 | public function getId() 215 | { 216 | return $this->container['id']; 217 | } 218 | 219 | /** 220 | * Sets id 221 | * 222 | * @param string|null $id id 223 | * 224 | * @return self 225 | */ 226 | public function setId($id) 227 | { 228 | $this->container['id'] = $id; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | -------------------------------------------------------------------------------- /lib/model/UserIdentityBody.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class UserIdentityBody implements ModelInterface, ArrayAccess, \JsonSerializable 47 | { 48 | public const DISCRIMINATOR = null; 49 | 50 | /** 51 | * The original name of the model. 52 | * 53 | * @var string 54 | */ 55 | protected static $openAPIModelName = 'UserIdentityBody'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'identity' => 'array' 64 | ]; 65 | 66 | /** 67 | * Array of property to format mappings. Used for (de)serialization 68 | * 69 | * @var string[] 70 | * @phpstan-var array 71 | * @psalm-var array 72 | */ 73 | protected static $openAPIFormats = [ 74 | 'identity' => null 75 | ]; 76 | 77 | /** 78 | * Array of property to type mappings. Used for (de)serialization 79 | * 80 | * @return array 81 | */ 82 | public static function openAPITypes() 83 | { 84 | return self::$openAPITypes; 85 | } 86 | 87 | /** 88 | * Array of property to format mappings. Used for (de)serialization 89 | * 90 | * @return array 91 | */ 92 | public static function openAPIFormats() 93 | { 94 | return self::$openAPIFormats; 95 | } 96 | 97 | /** 98 | * Array of attributes where the key is the local name, 99 | * and the value is the original name 100 | * 101 | * @var string[] 102 | */ 103 | protected static $attributeMap = [ 104 | 'identity' => 'identity' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'identity' => 'setIdentity' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'identity' => 'getIdentity' 123 | ]; 124 | 125 | /** 126 | * Array of attributes where the key is the local name, 127 | * and the value is the original name 128 | * 129 | * @return array 130 | */ 131 | public static function attributeMap() 132 | { 133 | return self::$attributeMap; 134 | } 135 | 136 | /** 137 | * Array of attributes to setter functions (for deserialization of responses) 138 | * 139 | * @return array 140 | */ 141 | public static function setters() 142 | { 143 | return self::$setters; 144 | } 145 | 146 | /** 147 | * Array of attributes to getter functions (for serialization of requests) 148 | * 149 | * @return array 150 | */ 151 | public static function getters() 152 | { 153 | return self::$getters; 154 | } 155 | 156 | /** 157 | * The original name of the model. 158 | * 159 | * @return string 160 | */ 161 | public function getModelName() 162 | { 163 | return self::$openAPIModelName; 164 | } 165 | 166 | 167 | /** 168 | * Associative array for storing property values 169 | * 170 | * @var mixed[] 171 | */ 172 | protected $container = []; 173 | 174 | /** 175 | * Constructor 176 | * 177 | * @param mixed[] $data Associated array of property values 178 | * initializing the model 179 | */ 180 | public function __construct(array $data = null) 181 | { 182 | $this->container['identity'] = $data['identity'] ?? null; 183 | } 184 | 185 | /** 186 | * Show all the invalid properties with reasons. 187 | * 188 | * @return array invalid properties with reasons 189 | */ 190 | public function listInvalidProperties() 191 | { 192 | $invalidProperties = []; 193 | 194 | return $invalidProperties; 195 | } 196 | 197 | /** 198 | * Validate all the properties in the model 199 | * return true if all passed 200 | * 201 | * @return bool True if all properties are valid 202 | */ 203 | public function valid() 204 | { 205 | return count($this->listInvalidProperties()) === 0; 206 | } 207 | 208 | 209 | /** 210 | * Gets identity 211 | * 212 | * @return array|null 213 | */ 214 | public function getIdentity() 215 | { 216 | return $this->container['identity']; 217 | } 218 | 219 | /** 220 | * Sets identity 221 | * 222 | * @param array|null $identity identity 223 | * 224 | * @return self 225 | */ 226 | public function setIdentity($identity) 227 | { 228 | $this->container['identity'] = $identity; 229 | 230 | return $this; 231 | } 232 | /** 233 | * Returns true if offset exists. False otherwise. 234 | * 235 | * @param integer $offset Offset 236 | * 237 | * @return boolean 238 | */ 239 | public function offsetExists($offset): bool 240 | { 241 | return isset($this->container[$offset]); 242 | } 243 | 244 | /** 245 | * Gets offset. 246 | * 247 | * @param integer $offset Offset 248 | * 249 | * @return mixed|null 250 | */ 251 | #[\ReturnTypeWillChange] 252 | public function offsetGet($offset) 253 | { 254 | return $this->container[$offset] ?? null; 255 | } 256 | 257 | /** 258 | * Sets value based on offset. 259 | * 260 | * @param int|null $offset Offset 261 | * @param mixed $value Value to be set 262 | * 263 | * @return void 264 | */ 265 | public function offsetSet($offset, $value): void 266 | { 267 | if (is_null($offset)) { 268 | $this->container[] = $value; 269 | } else { 270 | $this->container[$offset] = $value; 271 | } 272 | } 273 | 274 | /** 275 | * Unsets offset. 276 | * 277 | * @param integer $offset Offset 278 | * 279 | * @return void 280 | */ 281 | public function offsetUnset($offset): void 282 | { 283 | unset($this->container[$offset]); 284 | } 285 | 286 | /** 287 | * Serializes the object to a value that can be serialized natively by json_encode(). 288 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 289 | * 290 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 291 | * of any type other than a resource. 292 | */ 293 | #[\ReturnTypeWillChange] 294 | public function jsonSerialize() 295 | { 296 | return ObjectSerializer::sanitizeForSerialization($this); 297 | } 298 | 299 | /** 300 | * Gets the string presentation of the object 301 | * 302 | * @return string 303 | */ 304 | public function __toString() 305 | { 306 | return json_encode( 307 | ObjectSerializer::sanitizeForSerialization($this), 308 | JSON_PRETTY_PRINT 309 | ); 310 | } 311 | 312 | /** 313 | * Gets a header-safe presentation of the object 314 | * 315 | * @return string 316 | */ 317 | public function toHeaderValue() 318 | { 319 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 320 | } 321 | } 322 | 323 | 324 | --------------------------------------------------------------------------------