├── .github ├── ISSUE_TEMPLATE │ ├── ask-question.yml │ ├── bug-report.yml │ └── general-feedback.yml ├── pull_request_template.md └── workflows │ ├── asana-add-comment.yml │ ├── asana-create-task.yml │ ├── asana-update-issue.yml │ └── project.yml ├── .gitignore ├── .php-cs-fixer.dist.php ├── LICENSE ├── README.md ├── composer.json ├── docs ├── Api │ └── DefaultApi.md └── Model │ ├── ApiKeyToken.md │ ├── ApiKeyTokensListResponse.md │ ├── App.md │ ├── BasicNotification.md │ ├── BasicNotificationAllOf.md │ ├── BasicNotificationAllOfAndroidBackgroundLayout.md │ ├── Button.md │ ├── CopyTemplateRequest.md │ ├── CreateApiKeyRequest.md │ ├── CreateApiKeyResponse.md │ ├── CreateNotificationSuccessResponse.md │ ├── CreateSegmentConflictResponse.md │ ├── CreateSegmentSuccessResponse.md │ ├── CreateTemplateRequest.md │ ├── CreateUserConflictResponse.md │ ├── CreateUserConflictResponseErrorsInner.md │ ├── CreateUserConflictResponseErrorsItemsMeta.md │ ├── CustomEvent.md │ ├── CustomEventsRequest.md │ ├── DeliveryData.md │ ├── ExportEventsSuccessResponse.md │ ├── ExportSubscriptionsRequestBody.md │ ├── ExportSubscriptionsSuccessResponse.md │ ├── Filter.md │ ├── FilterExpression.md │ ├── GenericError.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 │ ├── Segment.md │ ├── SegmentData.md │ ├── SegmentNotificationTarget.md │ ├── StartLiveActivityRequest.md │ ├── StartLiveActivitySuccessResponse.md │ ├── Subscription.md │ ├── SubscriptionBody.md │ ├── SubscriptionNotificationTarget.md │ ├── TemplateResource.md │ ├── TemplatesListResponse.md │ ├── TransferSubscriptionRequestBody.md │ ├── UpdateApiKeyRequest.md │ ├── UpdateLiveActivityRequest.md │ ├── UpdateLiveActivitySuccessResponse.md │ ├── UpdateTemplateRequest.md │ ├── UpdateUserRequest.md │ ├── User.md │ ├── UserIdentityBody.md │ └── WebButton.md └── lib ├── ApiException.php ├── Configuration.php ├── HeaderSelector.php ├── ObjectSerializer.php ├── api └── DefaultApi.php └── model ├── ApiKeyToken.php ├── ApiKeyTokensListResponse.php ├── App.php ├── BasicNotification.php ├── BasicNotificationAllOf.php ├── BasicNotificationAllOfAndroidBackgroundLayout.php ├── Button.php ├── CopyTemplateRequest.php ├── CreateApiKeyRequest.php ├── CreateApiKeyResponse.php ├── CreateNotificationSuccessResponse.php ├── CreateSegmentConflictResponse.php ├── CreateSegmentSuccessResponse.php ├── CreateTemplateRequest.php ├── CreateUserConflictResponse.php ├── CreateUserConflictResponseErrorsInner.php ├── CreateUserConflictResponseErrorsItemsMeta.php ├── CustomEvent.php ├── CustomEventsRequest.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 ├── StartLiveActivityRequest.php ├── StartLiveActivitySuccessResponse.php ├── Subscription.php ├── SubscriptionBody.php ├── SubscriptionNotificationTarget.php ├── TemplateResource.php ├── TemplatesListResponse.php ├── TransferSubscriptionRequestBody.php ├── UpdateApiKeyRequest.php ├── UpdateLiveActivityRequest.php ├── UpdateLiveActivitySuccessResponse.php ├── UpdateTemplateRequest.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/asana-add-comment.yml: -------------------------------------------------------------------------------- 1 | name: Github --> Asana Add Comment Workflow 2 | 3 | on: 4 | issue_comment: 5 | types: [created] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: read 13 | steps: 14 | - name: Get Asana Task Corresponding to Issue 15 | env: 16 | ISSUE_ID: ${{ github.event.issue.id }} 17 | REPO_FULL_NAME: ${{ github.event.repository.full_name }} 18 | WORKSPACE_ID: "780103692902078" 19 | run: | 20 | REPO_SCOPED_ISSUE_ID="$REPO_FULL_NAME#$ISSUE_ID" 21 | 22 | curl --request GET \ 23 | --url "https://app.asana.com/api/1.0/workspaces/$WORKSPACE_ID/tasks/search?opt_fields=notes&text=$REPO_SCOPED_ISSUE_ID&sort_by=modified_at&sort_ascending=false" \ 24 | --header 'accept: application/json' \ 25 | --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \ 26 | --output response.json 27 | TASK_GID=$(jq -r '.data[0].gid' response.json) 28 | echo "TASK_GID=$TASK_GID" >> $GITHUB_ENV 29 | - name: Comment on Asana Task 30 | env: 31 | ISSUE_COMMENT: ${{ github.event.comment.body }} 32 | COMMENTER_NAME: ${{ github.event.comment.user.login }} 33 | run: | 34 | BODY_DATA=$(jq -n \ 35 | --arg text "$ISSUE_COMMENT" \ 36 | --arg commenter_name "$COMMENTER_NAME" \ 37 | '{ 38 | "data": { 39 | "text": "\($commenter_name) left a comment:\n\n\($text)", 40 | } 41 | }') 42 | curl --request POST \ 43 | --url https://app.asana.com/api/1.0/tasks/$TASK_GID/stories \ 44 | --header 'accept: application/json' \ 45 | --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \ 46 | --header 'content-type: application/json' \ 47 | --data "$BODY_DATA" -------------------------------------------------------------------------------- /.github/workflows/asana-create-task.yml: -------------------------------------------------------------------------------- 1 | name: Github --> Asana Create Task Workflow 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: read 13 | steps: 14 | - name: Create Asana task 15 | env: 16 | ISSUE_TITLE: ${{ github.event.issue.title }} 17 | ISSUE_BODY: ${{ github.event.issue.body }} 18 | ISSUE_HTML_URL: ${{ github.event.issue.html_url }} 19 | ISSUE_ID: ${{ github.event.issue.id }} 20 | ISSUE_NUMBER: ${{ github.event.issue.number }} 21 | REPO_FULL_NAME: ${{ github.event.repository.full_name }} 22 | SDK_PLATFORM_GROUP: "1208961704779581" 23 | SDK_PLATFORM_GROUP_SERVER: "1208961704779585" 24 | SDK_PLATFORM: "1208961704779592" 25 | SDK_PLATFORM_PHP: "1208961704779617" 26 | DSA_PRIORITY: "1208779519954980" 27 | DSA_PRIORITY_NO_PRIORITY: "1208779521616959" 28 | DSA_STATUS: "1210103546117753" 29 | DSA_STATUS_TRIAGE: "1210103546117756" 30 | DSA_REPO_TICKET_URL: "1210347857768758" 31 | WORKSPACE_ID: "780103692902078" 32 | PROJECT_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES: "1208970714650308" 33 | PROJECT_ID_SDK_BACKLOG: "1208777198342772" 34 | run: | 35 | DATA_BODY=$(jq -n \ 36 | --arg title "$ISSUE_TITLE" \ 37 | --arg body "$ISSUE_BODY" \ 38 | --arg url "$ISSUE_HTML_URL" \ 39 | --arg id "$ISSUE_ID" \ 40 | --arg number "$ISSUE_NUMBER" \ 41 | --arg repo_full_name "$REPO_FULL_NAME" \ 42 | --arg sdk_platform_group "$SDK_PLATFORM_GROUP" \ 43 | --arg sdk_platform_group_server "$SDK_PLATFORM_GROUP_SERVER" \ 44 | --arg sdk_platform "$SDK_PLATFORM" \ 45 | --arg sdk_platform_php "$SDK_PLATFORM_PHP" \ 46 | --arg dsa_priority "$DSA_PRIORITY" \ 47 | --arg dsa_priority_no_priority "$DSA_PRIORITY_NO_PRIORITY" \ 48 | --arg dsa_status "$DSA_STATUS" \ 49 | --arg dsa_status_triage "$DSA_STATUS_TRIAGE" \ 50 | --arg dsa_repo_ticket_url "$DSA_REPO_TICKET_URL" \ 51 | --arg workspace_id "$WORKSPACE_ID" \ 52 | --arg project_id_github_and_important_sdk_issues "$PROJECT_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES" \ 53 | --arg project_id_sdk_backlog "$PROJECT_ID_SDK_BACKLOG" \ 54 | '{ 55 | "data": { 56 | "custom_fields": { 57 | $sdk_platform_group: $sdk_platform_group_server, 58 | $sdk_platform: $sdk_platform_php, 59 | $dsa_priority: $dsa_priority_no_priority, 60 | $dsa_status: $dsa_status_triage, 61 | $dsa_repo_ticket_url: $url 62 | }, 63 | "name": $title, 64 | "workspace": $workspace_id, 65 | "projects": [$project_id_github_and_important_sdk_issues, $project_id_sdk_backlog], 66 | "notes": "Issue ID: \($repo_full_name)#\($id)\nIssue number: \($number)\nCreated via GitHub Actions\n----\n\n\($body)" 67 | } 68 | }') 69 | 70 | curl --request POST \ 71 | --url https://app.asana.com/api/1.0/tasks?opt_pretty=true \ 72 | --header 'accept: application/json' \ 73 | --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \ 74 | --header 'content-type: application/json' \ 75 | --data "$DATA_BODY" \ 76 | --output response.json 77 | 78 | TASK_GID=$(jq -r '.data.gid' response.json) 79 | echo "TASK_GID=$TASK_GID" >> $GITHUB_ENV 80 | - name: Move to "0 Unclassified" section in "Github & Important SDK Issues" project 81 | env: 82 | SECTION_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES: "1208970755434051" 83 | run: | 84 | DATA_BODY=$(jq -n \ 85 | --arg task_gid "$TASK_GID" \ 86 | --arg section_id "$SECTION_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES" \ 87 | '{ 88 | "data": { 89 | "task": $task_gid, 90 | "insert_after": "null" 91 | } 92 | }') 93 | 94 | curl --request POST \ 95 | --url https://app.asana.com/api/1.0/sections/$section_id/addTask \ 96 | --header 'accept: application/json' \ 97 | --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \ 98 | --header 'content-type: application/json' \ 99 | --data "$DATA_BODY" 100 | - name: Move to "Untriaged" section in "SDK / Backlog" project 101 | env: 102 | SECTION_ID_SDK_BACKLOG: "1208899729378982" 103 | run: | 104 | DATA_BODY=$(jq -n \ 105 | --arg task_gid "$TASK_GID" \ 106 | --arg section_id "$SECTION_ID_SDK_BACKLOG" \ 107 | '{ 108 | "data": { 109 | "task": $task_gid, 110 | "insert_after": "null" 111 | } 112 | }') 113 | 114 | curl --request POST \ 115 | --url https://app.asana.com/api/1.0/sections/$section_id/addTask \ 116 | --header 'accept: application/json' \ 117 | --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \ 118 | --header 'content-type: application/json' \ 119 | --data "$DATA_BODY" -------------------------------------------------------------------------------- /.github/workflows/asana-update-issue.yml: -------------------------------------------------------------------------------- 1 | name: Github --> Asana Issue Updates Workflow 2 | 3 | on: 4 | issues: 5 | types: [edited, deleted, closed, reopened, assigned, unassigned, labeled, unlabeled, milestoned, demilestoned, pinned, unpinned, locked, unlocked, transferred] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: read 13 | steps: 14 | - name: Get Asana Task Corresponding to Issue 15 | env: 16 | ISSUE_ID: ${{ github.event.issue.id }} 17 | REPO_FULL_NAME: ${{ github.event.repository.full_name }} 18 | WORKSPACE_ID: "780103692902078" 19 | run: | 20 | REPO_SCOPED_ISSUE_ID="$REPO_FULL_NAME#$ISSUE_ID" 21 | 22 | curl --request GET \ 23 | --url "https://app.asana.com/api/1.0/workspaces/$WORKSPACE_ID/tasks/search?opt_fields=notes&text=$REPO_SCOPED_ISSUE_ID&sort_by=modified_at&sort_ascending=false" \ 24 | --header 'accept: application/json' \ 25 | --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \ 26 | --output response.json 27 | TASK_GID=$(jq -r '.data[0].gid' response.json) 28 | echo "TASK_GID=$TASK_GID" >> $GITHUB_ENV 29 | - name: Determine Action and Post to Asana 30 | env: 31 | ACTION_TYPE: ${{ github.event.action }} 32 | ACTOR_NAME: ${{ github.event.sender.login }} 33 | ISSUE_TITLE: ${{ github.event.issue.title }} 34 | ISSUE_NUMBER: ${{ github.event.issue.number }} 35 | ISSUE_STATE: ${{ github.event.issue.state }} 36 | run: | 37 | # Map GitHub action types to human-readable descriptions 38 | case "$ACTION_TYPE" in 39 | "edited") 40 | ACTION_DESC="edited the issue" 41 | ;; 42 | "deleted") 43 | ACTION_DESC="deleted the issue" 44 | ;; 45 | "closed") 46 | ACTION_DESC="closed the issue" 47 | ;; 48 | "reopened") 49 | ACTION_DESC="reopened the issue" 50 | ;; 51 | "assigned") 52 | ACTION_DESC="assigned the issue" 53 | ;; 54 | "unassigned") 55 | ACTION_DESC="unassigned the issue" 56 | ;; 57 | "labeled") 58 | ACTION_DESC="added labels to the issue" 59 | ;; 60 | "unlabeled") 61 | ACTION_DESC="removed labels from the issue" 62 | ;; 63 | "milestoned") 64 | ACTION_DESC="added the issue to a milestone" 65 | ;; 66 | "demilestoned") 67 | ACTION_DESC="removed the issue from a milestone" 68 | ;; 69 | "pinned") 70 | ACTION_DESC="pinned the issue" 71 | ;; 72 | "unpinned") 73 | ACTION_DESC="unpinned the issue" 74 | ;; 75 | "locked") 76 | ACTION_DESC="locked the issue" 77 | ;; 78 | "unlocked") 79 | ACTION_DESC="unlocked the issue" 80 | ;; 81 | "transferred") 82 | ACTION_DESC="transferred the issue" 83 | ;; 84 | *) 85 | ACTION_DESC="performed an action on the issue" 86 | ;; 87 | esac 88 | 89 | # Add additional context for specific actions based on webhook payload 90 | if [ "$ACTION_TYPE" = "assigned" ] && [ -n "${{ github.event.assignee.login }}" ]; then 91 | ACTION_DESC="assigned the issue to ${{ github.event.assignee.login }}" 92 | fi 93 | 94 | if [ "$ACTION_TYPE" = "unassigned" ] && [ -n "${{ github.event.assignee.login }}" ]; then 95 | ACTION_DESC="unassigned the issue from ${{ github.event.assignee.login }}" 96 | fi 97 | 98 | if [ "$ACTION_TYPE" = "labeled" ] && [ -n "${{ github.event.label.name }}" ]; then 99 | LABEL_COLOR="${{ github.event.label.color }}" 100 | ACTION_DESC="added label '${{ github.event.label.name }}' to the issue" 101 | if [ -n "$LABEL_COLOR" ]; then 102 | ACTION_DESC="$ACTION_DESC (color: #$LABEL_COLOR)" 103 | fi 104 | fi 105 | 106 | if [ "$ACTION_TYPE" = "unlabeled" ] && [ -n "${{ github.event.label.name }}" ]; then 107 | LABEL_COLOR="${{ github.event.label.color }}" 108 | ACTION_DESC="removed label '${{ github.event.label.name }}' from the issue" 109 | if [ -n "$LABEL_COLOR" ]; then 110 | ACTION_DESC="$ACTION_DESC (color: #$LABEL_COLOR)" 111 | fi 112 | fi 113 | 114 | if [ "$ACTION_TYPE" = "milestoned" ] && [ -n "${{ github.event.milestone.title }}" ]; then 115 | MILESTONE_DUE_DATE="${{ github.event.milestone.due_on }}" 116 | ACTION_DESC="added the issue to milestone '${{ github.event.milestone.title }}'" 117 | if [ -n "$MILESTONE_DUE_DATE" ] && [ "$MILESTONE_DUE_DATE" != "null" ]; then 118 | ACTION_DESC="$ACTION_DESC (due: $MILESTONE_DUE_DATE)" 119 | fi 120 | fi 121 | 122 | if [ "$ACTION_TYPE" = "demilestoned" ] && [ -n "${{ github.event.milestone.title }}" ]; then 123 | ACTION_DESC="removed the issue from milestone '${{ github.event.milestone.title }}'" 124 | fi 125 | 126 | if [ "$ACTION_TYPE" = "transferred" ] && [ -n "${{ github.event.changes.new_repository.full_name }}" ]; then 127 | ACTION_DESC="transferred the issue to repository ${{ github.event.changes.new_repository.full_name }}" 128 | fi 129 | 130 | if [ "$ACTION_TYPE" = "edited" ] && [ -n "${{ github.event.changes.title.from }}" ]; then 131 | OLD_TITLE="${{ github.event.changes.title.from }}" 132 | NEW_TITLE="${{ github.event.issue.title }}" 133 | ACTION_DESC="edited the issue title from '$OLD_TITLE' to '$NEW_TITLE'" 134 | fi 135 | 136 | echo "ACTION_DESC=$ACTION_DESC" >> $GITHUB_ENV 137 | 138 | # Only proceed if we found a task 139 | if [ "$TASK_GID" != "null" ] && [ -n "$TASK_GID" ]; then 140 | # Create a more detailed message with additional context 141 | MESSAGE_TEXT="$ACTOR_NAME performed an action: $ACTION_DESC" 142 | 143 | # Add issue state information for state changes 144 | if [ "$ACTION_TYPE" = "closed" ] || [ "$ACTION_TYPE" = "reopened" ]; then 145 | MESSAGE_TEXT=$(printf "%s\nIssue state: %s" "$MESSAGE_TEXT" "$ISSUE_STATE") 146 | fi 147 | 148 | # Add repository information for transferred issues 149 | if [ "$ACTION_TYPE" = "transferred" ]; then 150 | REPO_NAME="${{ github.event.repository.full_name }}" 151 | MESSAGE_TEXT=$(printf "%s\nFrom repository: %s" "$MESSAGE_TEXT" "$REPO_NAME") 152 | fi 153 | 154 | MESSAGE_TEXT=$(printf "%s\n\nIssue: #%s - %s" "$MESSAGE_TEXT" "$ISSUE_NUMBER" "$ISSUE_TITLE") 155 | 156 | BODY_DATA=$(jq -n \ 157 | --arg text "$MESSAGE_TEXT" \ 158 | '{ 159 | "data": { 160 | "text": $text 161 | } 162 | }') 163 | 164 | curl --request POST \ 165 | --url https://app.asana.com/api/1.0/tasks/$TASK_GID/stories \ 166 | --header 'accept: application/json' \ 167 | --header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \ 168 | --header 'content-type: application/json' \ 169 | --data "$BODY_DATA" 170 | else 171 | echo "No corresponding Asana task found for issue ID: $ISSUE_ID" 172 | fi -------------------------------------------------------------------------------- /.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.3.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/ApiKeyToken.md: -------------------------------------------------------------------------------- 1 | # # ApiKeyToken 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **token_id** | **string** | | [optional] 8 | **updated_at** | **string** | | [optional] 9 | **created_at** | **string** | | [optional] 10 | **name** | **string** | | [optional] 11 | **ip_allowlist_mode** | **string** | | [optional] 12 | **ip_allowlist** | **string[]** | | [optional] 13 | 14 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 15 | -------------------------------------------------------------------------------- /docs/Model/ApiKeyTokensListResponse.md: -------------------------------------------------------------------------------- 1 | # # ApiKeyTokensListResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **tokens** | [**\onesignal\client\model\ApiKeyToken[]**](ApiKeyToken.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/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/CopyTemplateRequest.md: -------------------------------------------------------------------------------- 1 | # # CopyTemplateRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **target_app_id** | **string** | Destination OneSignal App ID in UUID v4 format. | 8 | 9 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 10 | -------------------------------------------------------------------------------- /docs/Model/CreateApiKeyRequest.md: -------------------------------------------------------------------------------- 1 | # # CreateApiKeyRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **string** | | [optional] 8 | **ip_allowlist_mode** | **string** | | [optional] 9 | **ip_allowlist** | **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/CreateApiKeyResponse.md: -------------------------------------------------------------------------------- 1 | # # CreateApiKeyResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **token_id** | **string** | | [optional] 8 | **formatted_token** | **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/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/CreateTemplateRequest.md: -------------------------------------------------------------------------------- 1 | # # CreateTemplateRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **app_id** | **string** | Your OneSignal App ID in UUID v4 format. | 8 | **name** | **string** | Name of the template. | 9 | **contents** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | 10 | **is_email** | **bool** | Set true for an Email template. | [optional] 11 | **email_subject** | **string** | Subject of the email. | [optional] 12 | **email_body** | **string** | Body of the email (HTML supported). | [optional] 13 | **is_sms** | **bool** | Set true for an SMS template. | [optional] 14 | **dynamic_content** | **string** | JSON string for dynamic content personalization. | [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/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/CustomEvent.md: -------------------------------------------------------------------------------- 1 | # # CustomEvent 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **string** | The identifier or name of the event. Maximum 128 characters. | 8 | **external_id** | **string** | The external ID of the user targeted for the event. Either the user's External ID or OneSignal ID is required. | [optional] 9 | **onesignal_id** | **string** | The OneSignal ID of the user targeted for the event. Either the user's External ID or OneSignal ID is required. | [optional] 10 | **timestamp** | **\DateTime** | Time the event occurred as an ISO8601 formatted string. Defaults to now if not included or past date provided. | [optional] 11 | **payload** | **array** | Properties or data related to the event, like {\"geography\": \"USA\"} | [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/CustomEventsRequest.md: -------------------------------------------------------------------------------- 1 | # # CustomEventsRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **events** | [**\onesignal\client\model\CustomEvent[]**](CustomEvent.md) | | 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/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 | **canceled** | **bool** | Indicates whether the notification was canceled before it could be sent. | [optional] 19 | 20 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 21 | -------------------------------------------------------------------------------- /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/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/StartLiveActivityRequest.md: -------------------------------------------------------------------------------- 1 | # # StartLiveActivityRequest 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** | | [default to 'start'] 9 | **activity_id** | **string** | Set a unique activity_id to track and manage the Live Activity. | 10 | **event_attributes** | **object** | Default/static data to initialize the Live Activity upon start. | 11 | **event_updates** | **object** | Dynamic content used to update the running Live Activity at start. Must match the ContentState interface defined in your app. | 12 | **contents** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | 13 | **headings** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | 14 | **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] 15 | **priority** | **int** | Delivery priority through 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. | [optional] 16 | **ios_relevance_score** | **float** | iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. | [optional] 17 | **idempotency_key** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [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 | **include_subscription_ids** | **string[]** | Specific subscription ids to target. Not compatible with other targeting parameters. | [optional] 20 | **included_segments** | **string[]** | Segment names to include. Only compatible with excluded_segments. | [optional] 21 | **excluded_segments** | **string[]** | Segment names to exclude. Only compatible with included_segments. | [optional] 22 | **filters** | [**\onesignal\client\model\FilterExpression[]**](FilterExpression.md) | | [optional] 23 | 24 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 25 | -------------------------------------------------------------------------------- /docs/Model/StartLiveActivitySuccessResponse.md: -------------------------------------------------------------------------------- 1 | # # StartLiveActivitySuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **notification_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/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/TemplateResource.md: -------------------------------------------------------------------------------- 1 | # # TemplateResource 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **string** | | [optional] 8 | **name** | **string** | | [optional] 9 | **created_at** | **\DateTime** | | [optional] 10 | **updated_at** | **\DateTime** | | [optional] 11 | **channel** | **string** | | [optional] 12 | **content** | **array** | Rendered content and channel/platform flags for the template. | [optional] 13 | 14 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) 15 | -------------------------------------------------------------------------------- /docs/Model/TemplatesListResponse.md: -------------------------------------------------------------------------------- 1 | # # TemplatesListResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **templates** | [**\onesignal\client\model\TemplateResource[]**](TemplateResource.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/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/UpdateApiKeyRequest.md: -------------------------------------------------------------------------------- 1 | # # UpdateApiKeyRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **string** | | [optional] 8 | **ip_allowlist_mode** | **string** | | [optional] 9 | **ip_allowlist** | **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/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/UpdateTemplateRequest.md: -------------------------------------------------------------------------------- 1 | # # UpdateTemplateRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **string** | Updated name of the template. | [optional] 8 | **contents** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | [optional] 9 | **is_email** | **bool** | Set true for an Email template. | [optional] 10 | **email_subject** | **string** | Subject of the email. | [optional] 11 | **email_body** | **string** | Body of the email (HTML supported). | [optional] 12 | **is_sms** | **bool** | Set true for an SMS template. | [optional] 13 | **dynamic_content** | **string** | JSON string for dynamic content personalization. | [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/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/ApiKeyTokensListResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class ApiKeyTokensListResponse 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 = 'ApiKeyTokensListResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'tokens' => '\onesignal\client\model\ApiKeyToken[]' 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 | 'tokens' => 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 | 'tokens' => 'tokens' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'tokens' => 'setTokens' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'tokens' => 'getTokens' 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['tokens'] = $data['tokens'] ?? 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 tokens 211 | * 212 | * @return \onesignal\client\model\ApiKeyToken[]|null 213 | */ 214 | public function getTokens() 215 | { 216 | return $this->container['tokens']; 217 | } 218 | 219 | /** 220 | * Sets tokens 221 | * 222 | * @param \onesignal\client\model\ApiKeyToken[]|null $tokens tokens 223 | * 224 | * @return self 225 | */ 226 | public function setTokens($tokens) 227 | { 228 | $this->container['tokens'] = $tokens; 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/CopyTemplateRequest.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class CopyTemplateRequest 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 = 'CopyTemplateRequest'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'target_app_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 | 'target_app_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 | 'target_app_id' => 'target_app_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 | 'target_app_id' => 'setTargetAppId' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'target_app_id' => 'getTargetAppId' 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['target_app_id'] = $data['target_app_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 | if ($this->container['target_app_id'] === null) { 195 | $invalidProperties[] = "'target_app_id' can't be null"; 196 | } 197 | return $invalidProperties; 198 | } 199 | 200 | /** 201 | * Validate all the properties in the model 202 | * return true if all passed 203 | * 204 | * @return bool True if all properties are valid 205 | */ 206 | public function valid() 207 | { 208 | return count($this->listInvalidProperties()) === 0; 209 | } 210 | 211 | 212 | /** 213 | * Gets target_app_id 214 | * 215 | * @return string 216 | */ 217 | public function getTargetAppId() 218 | { 219 | return $this->container['target_app_id']; 220 | } 221 | 222 | /** 223 | * Sets target_app_id 224 | * 225 | * @param string $target_app_id Destination OneSignal App ID in UUID v4 format. 226 | * 227 | * @return self 228 | */ 229 | public function setTargetAppId($target_app_id) 230 | { 231 | $this->container['target_app_id'] = $target_app_id; 232 | 233 | return $this; 234 | } 235 | /** 236 | * Returns true if offset exists. False otherwise. 237 | * 238 | * @param integer $offset Offset 239 | * 240 | * @return boolean 241 | */ 242 | public function offsetExists($offset): bool 243 | { 244 | return isset($this->container[$offset]); 245 | } 246 | 247 | /** 248 | * Gets offset. 249 | * 250 | * @param integer $offset Offset 251 | * 252 | * @return mixed|null 253 | */ 254 | #[\ReturnTypeWillChange] 255 | public function offsetGet($offset) 256 | { 257 | return $this->container[$offset] ?? null; 258 | } 259 | 260 | /** 261 | * Sets value based on offset. 262 | * 263 | * @param int|null $offset Offset 264 | * @param mixed $value Value to be set 265 | * 266 | * @return void 267 | */ 268 | public function offsetSet($offset, $value): void 269 | { 270 | if (is_null($offset)) { 271 | $this->container[] = $value; 272 | } else { 273 | $this->container[$offset] = $value; 274 | } 275 | } 276 | 277 | /** 278 | * Unsets offset. 279 | * 280 | * @param integer $offset Offset 281 | * 282 | * @return void 283 | */ 284 | public function offsetUnset($offset): void 285 | { 286 | unset($this->container[$offset]); 287 | } 288 | 289 | /** 290 | * Serializes the object to a value that can be serialized natively by json_encode(). 291 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 292 | * 293 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 294 | * of any type other than a resource. 295 | */ 296 | #[\ReturnTypeWillChange] 297 | public function jsonSerialize() 298 | { 299 | return ObjectSerializer::sanitizeForSerialization($this); 300 | } 301 | 302 | /** 303 | * Gets the string presentation of the object 304 | * 305 | * @return string 306 | */ 307 | public function __toString() 308 | { 309 | return json_encode( 310 | ObjectSerializer::sanitizeForSerialization($this), 311 | JSON_PRETTY_PRINT 312 | ); 313 | } 314 | 315 | /** 316 | * Gets a header-safe presentation of the object 317 | * 318 | * @return string 319 | */ 320 | public function toHeaderValue() 321 | { 322 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 323 | } 324 | } 325 | 326 | 327 | -------------------------------------------------------------------------------- /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/CustomEventsRequest.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class CustomEventsRequest 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 = 'CustomEventsRequest'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'events' => '\onesignal\client\model\CustomEvent[]' 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 | 'events' => 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 | 'events' => 'events' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'events' => 'setEvents' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'events' => 'getEvents' 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['events'] = $data['events'] ?? 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 ($this->container['events'] === null) { 195 | $invalidProperties[] = "'events' can't be null"; 196 | } 197 | return $invalidProperties; 198 | } 199 | 200 | /** 201 | * Validate all the properties in the model 202 | * return true if all passed 203 | * 204 | * @return bool True if all properties are valid 205 | */ 206 | public function valid() 207 | { 208 | return count($this->listInvalidProperties()) === 0; 209 | } 210 | 211 | 212 | /** 213 | * Gets events 214 | * 215 | * @return \onesignal\client\model\CustomEvent[] 216 | */ 217 | public function getEvents() 218 | { 219 | return $this->container['events']; 220 | } 221 | 222 | /** 223 | * Sets events 224 | * 225 | * @param \onesignal\client\model\CustomEvent[] $events events 226 | * 227 | * @return self 228 | */ 229 | public function setEvents($events) 230 | { 231 | $this->container['events'] = $events; 232 | 233 | return $this; 234 | } 235 | /** 236 | * Returns true if offset exists. False otherwise. 237 | * 238 | * @param integer $offset Offset 239 | * 240 | * @return boolean 241 | */ 242 | public function offsetExists($offset): bool 243 | { 244 | return isset($this->container[$offset]); 245 | } 246 | 247 | /** 248 | * Gets offset. 249 | * 250 | * @param integer $offset Offset 251 | * 252 | * @return mixed|null 253 | */ 254 | #[\ReturnTypeWillChange] 255 | public function offsetGet($offset) 256 | { 257 | return $this->container[$offset] ?? null; 258 | } 259 | 260 | /** 261 | * Sets value based on offset. 262 | * 263 | * @param int|null $offset Offset 264 | * @param mixed $value Value to be set 265 | * 266 | * @return void 267 | */ 268 | public function offsetSet($offset, $value): void 269 | { 270 | if (is_null($offset)) { 271 | $this->container[] = $value; 272 | } else { 273 | $this->container[$offset] = $value; 274 | } 275 | } 276 | 277 | /** 278 | * Unsets offset. 279 | * 280 | * @param integer $offset Offset 281 | * 282 | * @return void 283 | */ 284 | public function offsetUnset($offset): void 285 | { 286 | unset($this->container[$offset]); 287 | } 288 | 289 | /** 290 | * Serializes the object to a value that can be serialized natively by json_encode(). 291 | * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php 292 | * 293 | * @return mixed Returns data which can be serialized by json_encode(), which is a value 294 | * of any type other than a resource. 295 | */ 296 | #[\ReturnTypeWillChange] 297 | public function jsonSerialize() 298 | { 299 | return ObjectSerializer::sanitizeForSerialization($this); 300 | } 301 | 302 | /** 303 | * Gets the string presentation of the object 304 | * 305 | * @return string 306 | */ 307 | public function __toString() 308 | { 309 | return json_encode( 310 | ObjectSerializer::sanitizeForSerialization($this), 311 | JSON_PRETTY_PRINT 312 | ); 313 | } 314 | 315 | /** 316 | * Gets a header-safe presentation of the object 317 | * 318 | * @return string 319 | */ 320 | public function toHeaderValue() 321 | { 322 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); 323 | } 324 | } 325 | 326 | 327 | -------------------------------------------------------------------------------- /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 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/StartLiveActivitySuccessResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class StartLiveActivitySuccessResponse 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 = 'StartLiveActivitySuccessResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'notification_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 | 'notification_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 | 'notification_id' => 'notification_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 | 'notification_id' => 'setNotificationId' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'notification_id' => 'getNotificationId' 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['notification_id'] = $data['notification_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 notification_id 211 | * 212 | * @return string|null 213 | */ 214 | public function getNotificationId() 215 | { 216 | return $this->container['notification_id']; 217 | } 218 | 219 | /** 220 | * Sets notification_id 221 | * 222 | * @param string|null $notification_id notification_id 223 | * 224 | * @return self 225 | */ 226 | public function setNotificationId($notification_id) 227 | { 228 | $this->container['notification_id'] = $notification_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/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/TemplatesListResponse.php: -------------------------------------------------------------------------------- 1 | 43 | * @template TKey int|null 44 | * @template TValue mixed|null 45 | */ 46 | class TemplatesListResponse 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 = 'TemplatesListResponse'; 56 | 57 | /** 58 | * Array of property to type mappings. Used for (de)serialization 59 | * 60 | * @var string[] 61 | */ 62 | protected static $openAPITypes = [ 63 | 'templates' => '\onesignal\client\model\TemplateResource[]' 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 | 'templates' => 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 | 'templates' => 'templates' 105 | ]; 106 | 107 | /** 108 | * Array of attributes to setter functions (for deserialization of responses) 109 | * 110 | * @var string[] 111 | */ 112 | protected static $setters = [ 113 | 'templates' => 'setTemplates' 114 | ]; 115 | 116 | /** 117 | * Array of attributes to getter functions (for serialization of requests) 118 | * 119 | * @var string[] 120 | */ 121 | protected static $getters = [ 122 | 'templates' => 'getTemplates' 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['templates'] = $data['templates'] ?? 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 templates 211 | * 212 | * @return \onesignal\client\model\TemplateResource[]|null 213 | */ 214 | public function getTemplates() 215 | { 216 | return $this->container['templates']; 217 | } 218 | 219 | /** 220 | * Sets templates 221 | * 222 | * @param \onesignal\client\model\TemplateResource[]|null $templates templates 223 | * 224 | * @return self 225 | */ 226 | public function setTemplates($templates) 227 | { 228 | $this->container['templates'] = $templates; 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/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 | --------------------------------------------------------------------------------