From 43469af59582664090c78e039cc807eb0bde3d0a Mon Sep 17 00:00:00 2001 From: Joshua Parker Date: Sat, 29 Jul 2017 00:26:28 -0400 Subject: [PATCH 01/21] Twilio library updated. --- app/src/vendor/twilio/sdk/.travis.yml | 17 +- app/src/vendor/twilio/sdk/CHANGES.md | 26 + app/src/vendor/twilio/sdk/CONTRIBUTING.md | 159 ++++++ app/src/vendor/twilio/sdk/ISSUE_TEMPLATE.md | 12 +- app/src/vendor/twilio/sdk/LICENSE.md | 2 +- app/src/vendor/twilio/sdk/Makefile | 2 +- .../V2010/Account/Call/RecordingInstance.php | 2 - .../AssignedAddOnExtensionContext.php | 80 +++ .../AssignedAddOnExtensionInstance.php | 129 +++++ .../AssignedAddOnExtensionList.php | 156 ++++++ .../AssignedAddOnExtensionPage.php | 43 ++ .../AssignedAddOnContext.php | 144 ++++++ .../AssignedAddOnInstance.php | 150 ++++++ .../IncomingPhoneNumber/AssignedAddOnList.php | 176 +++++++ .../IncomingPhoneNumber/AssignedAddOnPage.php | 42 ++ .../Account/IncomingPhoneNumberContext.php | 58 +++ .../Account/IncomingPhoneNumberInstance.php | 11 + .../Rest/Api/V2010/Account/MessageList.php | 5 + .../Rest/Api/V2010/Account/MessageOptions.php | 76 ++- .../Api/V2010/Account/RecordingInstance.php | 2 - .../vendor/twilio/sdk/Twilio/Rest/Client.php | 84 +++ app/src/vendor/twilio/sdk/Twilio/Rest/Fax.php | 103 ++++ .../vendor/twilio/sdk/Twilio/Rest/Fax/V1.php | 86 ++++ .../Rest/Fax/V1/Fax/FaxMediaContext.php | 83 +++ .../Rest/Fax/V1/Fax/FaxMediaInstance.php | 128 +++++ .../Twilio/Rest/Fax/V1/Fax/FaxMediaList.php | 146 ++++++ .../Twilio/Rest/Fax/V1/Fax/FaxMediaPage.php | 41 ++ .../sdk/Twilio/Rest/Fax/V1/FaxContext.php | 164 ++++++ .../sdk/Twilio/Rest/Fax/V1/FaxInstance.php | 170 +++++++ .../twilio/sdk/Twilio/Rest/Fax/V1/FaxList.php | 187 +++++++ .../sdk/Twilio/Rest/Fax/V1/FaxOptions.php | 262 ++++++++++ .../twilio/sdk/Twilio/Rest/Fax/V1/FaxPage.php | 40 ++ .../twilio/sdk/Twilio/Rest/Messaging.php | 103 ++++ .../twilio/sdk/Twilio/Rest/Messaging/V1.php | 86 ++++ .../V1/Service/AlphaSenderContext.php | 83 +++ .../V1/Service/AlphaSenderInstance.php | 131 +++++ .../Messaging/V1/Service/AlphaSenderList.php | 171 +++++++ .../Messaging/V1/Service/AlphaSenderPage.php | 41 ++ .../V1/Service/PhoneNumberContext.php | 83 +++ .../V1/Service/PhoneNumberInstance.php | 133 +++++ .../Messaging/V1/Service/PhoneNumberList.php | 171 +++++++ .../Messaging/V1/Service/PhoneNumberPage.php | 41 ++ .../Messaging/V1/Service/ShortCodeContext.php | 83 +++ .../V1/Service/ShortCodeInstance.php | 132 +++++ .../Messaging/V1/Service/ShortCodeList.php | 171 +++++++ .../Messaging/V1/Service/ShortCodePage.php | 41 ++ .../Rest/Messaging/V1/ServiceContext.php | 218 ++++++++ .../Rest/Messaging/V1/ServiceInstance.php | 195 +++++++ .../Twilio/Rest/Messaging/V1/ServiceList.php | 184 +++++++ .../Rest/Messaging/V1/ServiceOptions.php | 454 +++++++++++++++++ .../Twilio/Rest/Messaging/V1/ServicePage.php | 40 ++ .../vendor/twilio/sdk/Twilio/Rest/Notify.php | 120 +++++ .../twilio/sdk/Twilio/Rest/Notify/V1.php | 100 ++++ .../Rest/Notify/V1/CredentialContext.php | 114 +++++ .../Rest/Notify/V1/CredentialInstance.php | 140 +++++ .../Twilio/Rest/Notify/V1/CredentialList.php | 177 +++++++ .../Rest/Notify/V1/CredentialOptions.php | 244 +++++++++ .../Twilio/Rest/Notify/V1/CredentialPage.php | 40 ++ .../Rest/Notify/V1/Service/BindingContext.php | 83 +++ .../Notify/V1/Service/BindingInstance.php | 142 ++++++ .../Rest/Notify/V1/Service/BindingList.php | 192 +++++++ .../Rest/Notify/V1/Service/BindingOptions.php | 188 +++++++ .../Rest/Notify/V1/Service/BindingPage.php | 41 ++ .../V1/Service/NotificationInstance.php | 111 ++++ .../Notify/V1/Service/NotificationList.php | 91 ++++ .../Notify/V1/Service/NotificationOptions.php | 285 +++++++++++ .../Notify/V1/Service/NotificationPage.php | 41 ++ .../Notify/V1/Service/SegmentInstance.php | 83 +++ .../Rest/Notify/V1/Service/SegmentList.php | 132 +++++ .../Rest/Notify/V1/Service/SegmentPage.php | 41 ++ .../Service/User/SegmentMembershipContext.php | 86 ++++ .../User/SegmentMembershipInstance.php | 128 +++++ .../V1/Service/User/SegmentMembershipList.php | 89 ++++ .../V1/Service/User/SegmentMembershipPage.php | 42 ++ .../V1/Service/User/UserBindingContext.php | 86 ++++ .../V1/Service/User/UserBindingInstance.php | 146 ++++++ .../V1/Service/User/UserBindingList.php | 193 +++++++ .../V1/Service/User/UserBindingOptions.php | 174 +++++++ .../V1/Service/User/UserBindingPage.php | 42 ++ .../Rest/Notify/V1/Service/UserContext.php | 161 ++++++ .../Rest/Notify/V1/Service/UserInstance.php | 153 ++++++ .../Rest/Notify/V1/Service/UserList.php | 182 +++++++ .../Rest/Notify/V1/Service/UserOptions.php | 118 +++++ .../Rest/Notify/V1/Service/UserPage.php | 41 ++ .../Twilio/Rest/Notify/V1/ServiceContext.php | 234 +++++++++ .../Twilio/Rest/Notify/V1/ServiceInstance.php | 201 ++++++++ .../sdk/Twilio/Rest/Notify/V1/ServiceList.php | 186 +++++++ .../Twilio/Rest/Notify/V1/ServiceOptions.php | 479 ++++++++++++++++++ .../sdk/Twilio/Rest/Notify/V1/ServicePage.php | 40 ++ .../vendor/twilio/sdk/Twilio/Rest/Preview.php | 304 +++++++++++ .../sdk/Twilio/Rest/Preview/BulkExports.php | 100 ++++ .../BulkExports/Export/DayInstance.php | 78 +++ .../Preview/BulkExports/Export/DayList.php | 132 +++++ .../Preview/BulkExports/Export/DayPage.php | 41 ++ .../ExportConfigurationContext.php | 103 ++++ .../ExportConfigurationInstance.php | 127 +++++ .../BulkExports/ExportConfigurationList.php | 53 ++ .../ExportConfigurationOptions.php | 103 ++++ .../BulkExports/ExportConfigurationPage.php | 40 ++ .../Preview/BulkExports/ExportContext.php | 126 +++++ .../Preview/BulkExports/ExportInstance.php | 118 +++++ .../Rest/Preview/BulkExports/ExportList.php | 53 ++ .../Rest/Preview/BulkExports/ExportPage.php | 40 ++ .../sdk/Twilio/Rest/Preview/HostedNumbers.php | 86 ++++ .../HostedNumberOrderContext.php | 113 +++++ .../HostedNumberOrderInstance.php | 157 ++++++ .../HostedNumbers/HostedNumberOrderList.php | 199 ++++++++ .../HostedNumberOrderOptions.php | 422 +++++++++++++++ .../HostedNumbers/HostedNumberOrderPage.php | 40 ++ .../sdk/Twilio/Rest/Preview/Marketplace.php | 100 ++++ .../AvailableAddOnExtensionContext.php | 75 +++ .../AvailableAddOnExtensionInstance.php | 117 +++++ .../AvailableAddOnExtensionList.php | 149 ++++++ .../AvailableAddOnExtensionPage.php | 41 ++ .../Marketplace/AvailableAddOnContext.php | 127 +++++ .../Marketplace/AvailableAddOnInstance.php | 127 +++++ .../Marketplace/AvailableAddOnList.php | 142 ++++++ .../Marketplace/AvailableAddOnPage.php | 40 ++ .../InstalledAddOnExtensionContext.php | 103 ++++ .../InstalledAddOnExtensionInstance.php | 132 +++++ .../InstalledAddOnExtensionList.php | 149 ++++++ .../InstalledAddOnExtensionPage.php | 41 ++ .../Marketplace/InstalledAddOnContext.php | 166 ++++++ .../Marketplace/InstalledAddOnInstance.php | 156 ++++++ .../Marketplace/InstalledAddOnList.php | 177 +++++++ .../Marketplace/InstalledAddOnOptions.php | 138 +++++ .../Marketplace/InstalledAddOnPage.php | 40 ++ .../twilio/sdk/Twilio/Rest/Preview/Proxy.php | 86 ++++ .../Proxy/Service/PhoneNumberContext.php | 83 +++ .../Proxy/Service/PhoneNumberInstance.php | 133 +++++ .../Preview/Proxy/Service/PhoneNumberList.php | 171 +++++++ .../Preview/Proxy/Service/PhoneNumberPage.php | 41 ++ .../Service/Session/InteractionContext.php | 77 +++ .../Service/Session/InteractionInstance.php | 145 ++++++ .../Proxy/Service/Session/InteractionList.php | 156 ++++++ .../Service/Session/InteractionOptions.php | 81 +++ .../Proxy/Service/Session/InteractionPage.php | 42 ++ .../Participant/MessageInteractionContext.php | 80 +++ .../MessageInteractionInstance.php | 151 ++++++ .../Participant/MessageInteractionList.php | 184 +++++++ .../Participant/MessageInteractionOptions.php | 75 +++ .../Participant/MessageInteractionPage.php | 43 ++ .../Service/Session/ParticipantContext.php | 176 +++++++ .../Service/Session/ParticipantInstance.php | 164 ++++++ .../Proxy/Service/Session/ParticipantList.php | 188 +++++++ .../Service/Session/ParticipantOptions.php | 209 ++++++++ .../Proxy/Service/Session/ParticipantPage.php | 42 ++ .../Preview/Proxy/Service/SessionContext.php | 193 +++++++ .../Preview/Proxy/Service/SessionInstance.php | 172 +++++++ .../Preview/Proxy/Service/SessionList.php | 183 +++++++ .../Preview/Proxy/Service/SessionOptions.php | 245 +++++++++ .../Preview/Proxy/Service/SessionPage.php | 41 ++ .../Proxy/Service/ShortCodeContext.php | 83 +++ .../Proxy/Service/ShortCodeInstance.php | 132 +++++ .../Preview/Proxy/Service/ShortCodeList.php | 171 +++++++ .../Preview/Proxy/Service/ShortCodePage.php | 41 ++ .../Rest/Preview/Proxy/ServiceContext.php | 207 ++++++++ .../Rest/Preview/Proxy/ServiceInstance.php | 173 +++++++ .../Twilio/Rest/Preview/Proxy/ServiceList.php | 172 +++++++ .../Rest/Preview/Proxy/ServiceOptions.php | 166 ++++++ .../Twilio/Rest/Preview/Proxy/ServicePage.php | 40 ++ .../twilio/sdk/Twilio/Rest/Preview/Sync.php | 86 ++++ .../Document/DocumentPermissionContext.php | 119 +++++ .../Document/DocumentPermissionInstance.php | 148 ++++++ .../Document/DocumentPermissionList.php | 151 ++++++ .../Document/DocumentPermissionPage.php | 42 ++ .../Preview/Sync/Service/DocumentContext.php | 167 ++++++ .../Preview/Sync/Service/DocumentInstance.php | 159 ++++++ .../Preview/Sync/Service/DocumentList.php | 176 +++++++ .../Preview/Sync/Service/DocumentOptions.php | 75 +++ .../Preview/Sync/Service/DocumentPage.php | 41 ++ .../Service/SyncList/SyncListItemContext.php | 114 +++++ .../Service/SyncList/SyncListItemInstance.php | 148 ++++++ .../Service/SyncList/SyncListItemList.php | 184 +++++++ .../Service/SyncList/SyncListItemOptions.php | 89 ++++ .../Service/SyncList/SyncListItemPage.php | 42 ++ .../SyncList/SyncListPermissionContext.php | 119 +++++ .../SyncList/SyncListPermissionInstance.php | 148 ++++++ .../SyncList/SyncListPermissionList.php | 151 ++++++ .../SyncList/SyncListPermissionPage.php | 42 ++ .../Preview/Sync/Service/SyncListContext.php | 161 ++++++ .../Preview/Sync/Service/SyncListInstance.php | 155 ++++++ .../Preview/Sync/Service/SyncListList.php | 174 +++++++ .../Preview/Sync/Service/SyncListOptions.php | 61 +++ .../Preview/Sync/Service/SyncListPage.php | 41 ++ .../Service/SyncMap/SyncMapItemContext.php | 114 +++++ .../Service/SyncMap/SyncMapItemInstance.php | 151 ++++++ .../Sync/Service/SyncMap/SyncMapItemList.php | 186 +++++++ .../Service/SyncMap/SyncMapItemOptions.php | 89 ++++ .../Sync/Service/SyncMap/SyncMapItemPage.php | 42 ++ .../SyncMap/SyncMapPermissionContext.php | 119 +++++ .../SyncMap/SyncMapPermissionInstance.php | 148 ++++++ .../Service/SyncMap/SyncMapPermissionList.php | 150 ++++++ .../Service/SyncMap/SyncMapPermissionPage.php | 42 ++ .../Preview/Sync/Service/SyncMapContext.php | 161 ++++++ .../Preview/Sync/Service/SyncMapInstance.php | 155 ++++++ .../Rest/Preview/Sync/Service/SyncMapList.php | 174 +++++++ .../Preview/Sync/Service/SyncMapOptions.php | 61 +++ .../Rest/Preview/Sync/Service/SyncMapPage.php | 41 ++ .../Rest/Preview/Sync/ServiceContext.php | 208 ++++++++ .../Rest/Preview/Sync/ServiceInstance.php | 175 +++++++ .../Twilio/Rest/Preview/Sync/ServiceList.php | 173 +++++++ .../Rest/Preview/Sync/ServiceOptions.php | 188 +++++++ .../Twilio/Rest/Preview/Sync/ServicePage.php | 40 ++ .../sdk/Twilio/Rest/Preview/Wireless.php | 114 +++++ .../Rest/Preview/Wireless/CommandContext.php | 71 +++ .../Rest/Preview/Wireless/CommandInstance.php | 124 +++++ .../Rest/Preview/Wireless/CommandList.php | 184 +++++++ .../Rest/Preview/Wireless/CommandOptions.php | 216 ++++++++ .../Rest/Preview/Wireless/CommandPage.php | 40 ++ .../Rest/Preview/Wireless/RatePlanContext.php | 109 ++++ .../Preview/Wireless/RatePlanInstance.php | 152 ++++++ .../Rest/Preview/Wireless/RatePlanList.php | 179 +++++++ .../Rest/Preview/Wireless/RatePlanOptions.php | 244 +++++++++ .../Rest/Preview/Wireless/RatePlanPage.php | 40 ++ .../Preview/Wireless/Sim/UsageContext.php | 78 +++ .../Preview/Wireless/Sim/UsageInstance.php | 123 +++++ .../Rest/Preview/Wireless/Sim/UsageList.php | 55 ++ .../Preview/Wireless/Sim/UsageOptions.php | 75 +++ .../Rest/Preview/Wireless/Sim/UsagePage.php | 41 ++ .../Rest/Preview/Wireless/SimContext.php | 170 +++++++ .../Rest/Preview/Wireless/SimInstance.php | 169 ++++++ .../Twilio/Rest/Preview/Wireless/SimList.php | 152 ++++++ .../Rest/Preview/Wireless/SimOptions.php | 370 ++++++++++++++ .../Twilio/Rest/Preview/Wireless/SimPage.php | 40 ++ .../vendor/twilio/sdk/Twilio/Rest/Sync.php | 103 ++++ .../vendor/twilio/sdk/Twilio/Rest/Sync/V1.php | 86 ++++ .../Document/DocumentPermissionContext.php | 119 +++++ .../Document/DocumentPermissionInstance.php | 148 ++++++ .../Document/DocumentPermissionList.php | 151 ++++++ .../Document/DocumentPermissionPage.php | 42 ++ .../Rest/Sync/V1/Service/DocumentContext.php | 167 ++++++ .../Rest/Sync/V1/Service/DocumentInstance.php | 159 ++++++ .../Rest/Sync/V1/Service/DocumentList.php | 176 +++++++ .../Rest/Sync/V1/Service/DocumentOptions.php | 75 +++ .../Rest/Sync/V1/Service/DocumentPage.php | 41 ++ .../Service/SyncList/SyncListItemContext.php | 114 +++++ .../Service/SyncList/SyncListItemInstance.php | 150 ++++++ .../V1/Service/SyncList/SyncListItemList.php | 184 +++++++ .../Service/SyncList/SyncListItemOptions.php | 89 ++++ .../V1/Service/SyncList/SyncListItemPage.php | 42 ++ .../SyncList/SyncListPermissionContext.php | 119 +++++ .../SyncList/SyncListPermissionInstance.php | 148 ++++++ .../SyncList/SyncListPermissionList.php | 151 ++++++ .../SyncList/SyncListPermissionPage.php | 42 ++ .../Rest/Sync/V1/Service/SyncListContext.php | 161 ++++++ .../Rest/Sync/V1/Service/SyncListInstance.php | 155 ++++++ .../Rest/Sync/V1/Service/SyncListList.php | 174 +++++++ .../Rest/Sync/V1/Service/SyncListOptions.php | 61 +++ .../Rest/Sync/V1/Service/SyncListPage.php | 41 ++ .../V1/Service/SyncMap/SyncMapItemContext.php | 114 +++++ .../Service/SyncMap/SyncMapItemInstance.php | 150 ++++++ .../V1/Service/SyncMap/SyncMapItemList.php | 186 +++++++ .../V1/Service/SyncMap/SyncMapItemOptions.php | 89 ++++ .../V1/Service/SyncMap/SyncMapItemPage.php | 42 ++ .../SyncMap/SyncMapPermissionContext.php | 119 +++++ .../SyncMap/SyncMapPermissionInstance.php | 148 ++++++ .../Service/SyncMap/SyncMapPermissionList.php | 150 ++++++ .../Service/SyncMap/SyncMapPermissionPage.php | 42 ++ .../Rest/Sync/V1/Service/SyncMapContext.php | 161 ++++++ .../Rest/Sync/V1/Service/SyncMapInstance.php | 155 ++++++ .../Rest/Sync/V1/Service/SyncMapList.php | 174 +++++++ .../Rest/Sync/V1/Service/SyncMapOptions.php | 61 +++ .../Rest/Sync/V1/Service/SyncMapPage.php | 41 ++ .../Twilio/Rest/Sync/V1/ServiceContext.php | 208 ++++++++ .../Twilio/Rest/Sync/V1/ServiceInstance.php | 174 +++++++ .../sdk/Twilio/Rest/Sync/V1/ServiceList.php | 173 +++++++ .../Twilio/Rest/Sync/V1/ServiceOptions.php | 188 +++++++ .../sdk/Twilio/Rest/Sync/V1/ServicePage.php | 40 ++ .../V1/Workspace/Task/ReservationContext.php | 30 ++ .../V1/Workspace/Task/ReservationOptions.php | 441 +++++++++++++++- .../Workspace/Worker/ReservationContext.php | 30 ++ .../Workspace/Worker/ReservationOptions.php | 441 +++++++++++++++- .../twilio/sdk/Twilio/Rest/Wireless.php | 137 +++++ .../twilio/sdk/Twilio/Rest/Wireless/V1.php | 114 +++++ .../Rest/Wireless/V1/CommandContext.php | 71 +++ .../Rest/Wireless/V1/CommandInstance.php | 122 +++++ .../Twilio/Rest/Wireless/V1/CommandList.php | 182 +++++++ .../Rest/Wireless/V1/CommandOptions.php | 188 +++++++ .../Twilio/Rest/Wireless/V1/CommandPage.php | 40 ++ .../Rest/Wireless/V1/RatePlanContext.php | 109 ++++ .../Rest/Wireless/V1/RatePlanInstance.php | 156 ++++++ .../Twilio/Rest/Wireless/V1/RatePlanList.php | 180 +++++++ .../Rest/Wireless/V1/RatePlanOptions.php | 261 ++++++++++ .../Twilio/Rest/Wireless/V1/RatePlanPage.php | 40 ++ .../Wireless/V1/Sim/UsageRecordInstance.php | 80 +++ .../Rest/Wireless/V1/Sim/UsageRecordList.php | 141 ++++++ .../Wireless/V1/Sim/UsageRecordOptions.php | 89 ++++ .../Rest/Wireless/V1/Sim/UsageRecordPage.php | 41 ++ .../Twilio/Rest/Wireless/V1/SimContext.php | 169 ++++++ .../Twilio/Rest/Wireless/V1/SimInstance.php | 169 ++++++ .../sdk/Twilio/Rest/Wireless/V1/SimList.php | 152 ++++++ .../Twilio/Rest/Wireless/V1/SimOptions.php | 370 ++++++++++++++ .../sdk/Twilio/Rest/Wireless/V1/SimPage.php | 40 ++ .../vendor/twilio/sdk/Twilio/VersionInfo.php | 4 +- app/src/vendor/twilio/sdk/VERSIONS.md | 84 +-- 296 files changed, 36352 insertions(+), 92 deletions(-) create mode 100644 app/src/vendor/twilio/sdk/CONTRIBUTING.md create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodePage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServicePage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServicePage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodePage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServicePage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServicePage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsagePage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServicePage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimContext.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimInstance.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimList.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimOptions.php create mode 100644 app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimPage.php diff --git a/app/src/vendor/twilio/sdk/.travis.yml b/app/src/vendor/twilio/sdk/.travis.yml index 7f7f7b69..0de4c5f7 100644 --- a/app/src/vendor/twilio/sdk/.travis.yml +++ b/app/src/vendor/twilio/sdk/.travis.yml @@ -1,13 +1,16 @@ language: php dist: trusty +sudo: false php: - - 5.5 - - 5.6 - - 7.0 + - '5.5' + - '5.6' + - '7.0' + - '7.1' + - hhvm # on Trusty only + - nightly script: "make test" before_install: "composer install --dev" matrix: - fast_finish: true - include: - - php: hhvm - dist: trusty + fast_finish: true + allow_failures: + - php: nightly diff --git a/app/src/vendor/twilio/sdk/CHANGES.md b/app/src/vendor/twilio/sdk/CHANGES.md index c4618f59..0f595f32 100644 --- a/app/src/vendor/twilio/sdk/CHANGES.md +++ b/app/src/vendor/twilio/sdk/CHANGES.md @@ -2,6 +2,32 @@ twilio-php Changelog ==================== +[2017-07-27] Version 5.13.0 +---------------------------- +This release adds Beta and Preview products to main artifact. + +Previously, Beta and Preview products were only included in the `alpha` +artifact. They are now being included in the main artifact to ease product +discoverability and the collective operational overhead of maintaining multiple +artifacts per library. + +**Api** +- Remove unused `encryption_type` property on Recordings *(breaking change)* +- Update `status` enum for Messages to include 'accepted' + +**Messaging** +- Fix incorrectly typed capabilities property for PhoneNumbers. + +**Notify** +- Add `ToBinding` optional parameter on Notifications resource creation. Accepted values are json strings. + +**Preview** +- Add `sms_application_sid` to HostedNumberOrders. + +**Taskrouter** +- Fully support conference functionality in reservations. + + [2017-07-13] Version 5.12.1 --------------------------- - This release drops official support for PHP 5.3 and PHP 5.4, which were EOL'd diff --git a/app/src/vendor/twilio/sdk/CONTRIBUTING.md b/app/src/vendor/twilio/sdk/CONTRIBUTING.md new file mode 100644 index 00000000..e2524027 --- /dev/null +++ b/app/src/vendor/twilio/sdk/CONTRIBUTING.md @@ -0,0 +1,159 @@ +# Contributing to `twilio-php` + +We'd love for you to contribute to our source code and to make `twilio-php` +even better than it is today! Here are the guidelines we'd like you to follow: + + - [Code of Conduct](#coc) + - [Question or Problem?](#question) + - [Issues and Bugs](#issue) + - [Feature Requests](#feature) + - [Documentation fixes](#docs) + - [Submission Guidelines](#submit) + - [Coding Rules](#rules) + +## Code of Conduct + +Help us keep `twilio-php` open and inclusive. Please be kind to and considerate +of other developers, as we all have the same goal: make `twilio-php` as good as +it can be. + +## Got an API/Product Question or Problem? + +If you have questions about how to use `twilio-php`, please see our +[docs][docs-link], and if you don't find the answer there, please contact +[help@twilio.com](mailto:help@twilio.com) with any issues you have. + +## Found an Issue? + +If you find a bug in the source code or a mistake in the documentation, you can +help us by submitting [an issue][issue-link]. If the file in which the error +exists has this header: +``` +""" +This code was generated by +\ / _ _ _| _ _ + | (_)\/(_)(_|\/| |(/_ v1.0.0 + / / +""" +``` +then it is a generated file and the change will need to be made by us, but +submitting an issue will help us track it and keep you up-to-date. If the file +isn't generated, you can help us out even more by submitting a Pull Request with +a fix. + +**Please see the [Submission Guidelines](#submit) below.** + +## Want a Feature? + +You can request a new feature by submitting an issue to our +[GitHub Repository][github]. If you would like to implement a new feature then +consider what kind of change it is: + +* **Major Changes** that you wish to contribute to the project should be + discussed first with `twilio-php` contributors in an issue or pull request so + that we can develop a proper solution and better coordinate our efforts, + prevent duplication of work, and help you to craft the change so that it is + successfully accepted into the project. +* **Small Changes** can be crafted and submitted to the + [GitHub Repository][github] as a Pull Request. + +## Want a Doc Fix? + +If you want to help improve the docs in the helper library, it's a good idea to +let others know what you're working on to minimize duplication of effort. Create +a new issue (or comment on a related existing one) to let others know what +you're working on. + +For large fixes, please build and test the documentation before submitting the +PR to be sure you haven't accidentally introduced layout or formatting issues. + +If you want to help improve the docs at +[https://www.twilio.com/docs/libraries/php][docs-link], please contact +[help@twilio.com](mailto:help@twilio.com). + +## Submission Guidelines + +### Submitting an Issue +Before you submit your issue search the archive, maybe your question was already +answered. + +If your issue appears to be a bug, and hasn't been reported, open a new issue. +Help us to maximize the effort we can spend fixing issues and adding new +features by not reporting duplicate issues. Providing the following information +will increase the chances of your issue being dealt with quickly: + +* **Overview of the Issue** - if an error is being thrown a non-minified stack + trace helps +* **Motivation for or Use Case** - explain why this is a bug for you +* **`twilio-php` Version(s)** - is it a regression? +* **Operating System (if relevant)** - is this a problem with all systems or + only specific ones? +* **Reproduce the Error** - provide an isolated code snippet or an unambiguous + set of steps. +* **Related Issues** - has a similar issue been reported before? +* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point + to what might be causing the problem (line of code or commit) + +**If you get help, help others. Good karma rules!** + +### Submitting a Pull Request +Before you submit your pull request consider the following guidelines: + +* Search [GitHub][github] for an open or closed Pull Request that relates to + your submission. You don't want to duplicate effort. +* Make your changes in a new git branch: + + ```shell + git checkout -b my-fix-branch master + ``` + +* Create your patch, **including appropriate test cases**. +* Follow our [Coding Rules](#rules). +* Run the full `twilio-php` test suite (aliased by `make test`), and ensure + that all tests pass. +* Commit your changes using a descriptive commit message. + + ```shell + git commit -a + ``` + Note: the optional commit `-a` command line option will automatically "add" + and "rm" edited files. + +* Build your changes locally to ensure all the tests pass: + + ```shell + make test + ``` + +* Push your branch to GitHub: + + ```shell + git push origin my-fix-branch + ``` + +In GitHub, send a pull request to `twilio-php:master`. +If we suggest changes, then: + +* Make the required updates. +* Re-run the `twilio-php` test suite to ensure tests are still passing. +* Commit your changes to your branch (e.g. `my-fix-branch`). +* Push the changes to your GitHub repository (this will update your Pull Request). + +That's it! Thank you for your contribution! + +#### After your pull request is merged + +After your pull request is merged, you can safely delete your branch and pull +the changes from the main (upstream) repository. + +## Coding Rules + +To ensure consistency throughout the source code, keep these rules in mind as +you are working: + +* All features or bug fixes **must be tested** by one or more tests. +* All classes and methods **must be documented**. + +[docs-link]: https://www.twilio.com/docs/libraries/php +[issue-link]: https://github.com/twilio/twilio-php/issues/new +[github]: https://github.com/twilio/twilio-php \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/ISSUE_TEMPLATE.md b/app/src/vendor/twilio/sdk/ISSUE_TEMPLATE.md index 9809956f..087ca146 100644 --- a/app/src/vendor/twilio/sdk/ISSUE_TEMPLATE.md +++ b/app/src/vendor/twilio/sdk/ISSUE_TEMPLATE.md @@ -1,17 +1,18 @@ -*Note: These issues are for bugs and feature requests for the helper libraries. If you need help or support, please email help@twilio.com and one of our experts will assist you!* +*Note: These issues are for bugs and feature requests for the helper libraries. +If you need help or support, please email help@twilio.com and one of our experts +will assist you!* **Version:** -**API Subdomain (api/taskrouter/ip_messaging):** ### Code Snippet ```php # paste code here ``` -### Exception / Log +### Exception/Log ``` - + ``` ### Steps to Reproduce @@ -21,4 +22,5 @@ ### Feature Request -_If this is a feature request, make sure you search Issues for an existing request before creating a new one!_ +_If this is a feature request, make sure you search Issues for an existing +request before creating a new one!_ \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/LICENSE.md b/app/src/vendor/twilio/sdk/LICENSE.md index 2e5baa46..e917ca14 100644 --- a/app/src/vendor/twilio/sdk/LICENSE.md +++ b/app/src/vendor/twilio/sdk/LICENSE.md @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Makefile b/app/src/vendor/twilio/sdk/Makefile index be6f0195..a17cdb82 100644 --- a/app/src/vendor/twilio/sdk/Makefile +++ b/app/src/vendor/twilio/sdk/Makefile @@ -19,7 +19,7 @@ install: vendor: install # if these fail, you may need to install the helper library -test: +test: install @PATH=vendor/bin:$(PATH) phpunit --report-useless-tests --strict-coverage --disallow-test-output --colors --configuration Twilio/Tests/phpunit.xml docs-install: diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.php index 602ca6ec..8d6533d8 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.php @@ -25,7 +25,6 @@ * @property string sid * @property string price * @property string uri - * @property string encryptionType * @property array encryptionDetails */ class RecordingInstance extends InstanceResource { @@ -53,7 +52,6 @@ public function __construct(Version $version, array $payload, $accountSid, $call 'sid' => Values::array_get($payload, 'sid'), 'price' => Values::array_get($payload, 'price'), 'uri' => Values::array_get($payload, 'uri'), - 'encryptionType' => Values::array_get($payload, 'encryption_type'), 'encryptionDetails' => Values::array_get($payload, 'encryption_details'), ); diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php new file mode 100644 index 00000000..8e4ddcfd --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php @@ -0,0 +1,80 @@ +solution = array( + 'accountSid' => $accountSid, + 'resourceSid' => $resourceSid, + 'assignedAddOnSid' => $assignedAddOnSid, + 'sid' => $sid, + ); + + $this->uri = '/Accounts/' . rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . rawurlencode($resourceSid) . '/AssignedAddOns/' . rawurlencode($assignedAddOnSid) . '/Extensions/' . rawurlencode($sid) . '.json'; + } + + /** + * Fetch a AssignedAddOnExtensionInstance + * + * @return AssignedAddOnExtensionInstance Fetched AssignedAddOnExtensionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new AssignedAddOnExtensionInstance( + $this->version, + $payload, + $this->solution['accountSid'], + $this->solution['resourceSid'], + $this->solution['assignedAddOnSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Api.V2010.AssignedAddOnExtensionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php new file mode 100644 index 00000000..5ab1dba7 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php @@ -0,0 +1,129 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'resourceSid' => Values::array_get($payload, 'resource_sid'), + 'assignedAddOnSid' => Values::array_get($payload, 'assigned_add_on_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'productName' => Values::array_get($payload, 'product_name'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'uri' => Values::array_get($payload, 'uri'), + 'enabled' => Values::array_get($payload, 'enabled'), + ); + + $this->solution = array( + 'accountSid' => $accountSid, + 'resourceSid' => $resourceSid, + 'assignedAddOnSid' => $assignedAddOnSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionContext Context for this + * AssignedAddOnExtensionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new AssignedAddOnExtensionContext( + $this->version, + $this->solution['accountSid'], + $this->solution['resourceSid'], + $this->solution['assignedAddOnSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a AssignedAddOnExtensionInstance + * + * @return AssignedAddOnExtensionInstance Fetched AssignedAddOnExtensionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Api.V2010.AssignedAddOnExtensionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php new file mode 100644 index 00000000..bb5a8756 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php @@ -0,0 +1,156 @@ +solution = array( + 'accountSid' => $accountSid, + 'resourceSid' => $resourceSid, + 'assignedAddOnSid' => $assignedAddOnSid, + ); + + $this->uri = '/Accounts/' . rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . rawurlencode($resourceSid) . '/AssignedAddOns/' . rawurlencode($assignedAddOnSid) . '/Extensions.json'; + } + + /** + * Streams AssignedAddOnExtensionInstance records from the API as a generator + * stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads AssignedAddOnExtensionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return AssignedAddOnExtensionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of AssignedAddOnExtensionInstance records from the + * API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of AssignedAddOnExtensionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new AssignedAddOnExtensionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of AssignedAddOnExtensionInstance records from the + * API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of AssignedAddOnExtensionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new AssignedAddOnExtensionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a AssignedAddOnExtensionContext + * + * @param string $sid The unique Extension Sid + * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionContext + */ + public function getContext($sid) { + return new AssignedAddOnExtensionContext( + $this->version, + $this->solution['accountSid'], + $this->solution['resourceSid'], + $this->solution['assignedAddOnSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Api.V2010.AssignedAddOnExtensionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php new file mode 100644 index 00000000..20f2f94e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php @@ -0,0 +1,43 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new AssignedAddOnExtensionInstance( + $this->version, + $payload, + $this->solution['accountSid'], + $this->solution['resourceSid'], + $this->solution['assignedAddOnSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Api.V2010.AssignedAddOnExtensionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php new file mode 100644 index 00000000..91407d01 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php @@ -0,0 +1,144 @@ +solution = array( + 'accountSid' => $accountSid, + 'resourceSid' => $resourceSid, + 'sid' => $sid, + ); + + $this->uri = '/Accounts/' . rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . rawurlencode($resourceSid) . '/AssignedAddOns/' . rawurlencode($sid) . '.json'; + } + + /** + * Fetch a AssignedAddOnInstance + * + * @return AssignedAddOnInstance Fetched AssignedAddOnInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new AssignedAddOnInstance( + $this->version, + $payload, + $this->solution['accountSid'], + $this->solution['resourceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the AssignedAddOnInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Access the extensions + * + * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList + */ + protected function getExtensions() { + if (!$this->_extensions) { + $this->_extensions = new AssignedAddOnExtensionList( + $this->version, + $this->solution['accountSid'], + $this->solution['resourceSid'], + $this->solution['sid'] + ); + } + + return $this->_extensions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Api.V2010.AssignedAddOnContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php new file mode 100644 index 00000000..ecf6140c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php @@ -0,0 +1,150 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'resourceSid' => Values::array_get($payload, 'resource_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'description' => Values::array_get($payload, 'description'), + 'configuration' => Values::array_get($payload, 'configuration'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'uri' => Values::array_get($payload, 'uri'), + 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), + ); + + $this->solution = array( + 'accountSid' => $accountSid, + 'resourceSid' => $resourceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnContext Context for this + * AssignedAddOnInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new AssignedAddOnContext( + $this->version, + $this->solution['accountSid'], + $this->solution['resourceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a AssignedAddOnInstance + * + * @return AssignedAddOnInstance Fetched AssignedAddOnInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the AssignedAddOnInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Access the extensions + * + * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList + */ + protected function getExtensions() { + return $this->proxy()->extensions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Api.V2010.AssignedAddOnInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php new file mode 100644 index 00000000..92b8f094 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php @@ -0,0 +1,176 @@ +solution = array( + 'accountSid' => $accountSid, + 'resourceSid' => $resourceSid, + ); + + $this->uri = '/Accounts/' . rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . rawurlencode($resourceSid) . '/AssignedAddOns.json'; + } + + /** + * Streams AssignedAddOnInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads AssignedAddOnInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return AssignedAddOnInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of AssignedAddOnInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of AssignedAddOnInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new AssignedAddOnPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of AssignedAddOnInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of AssignedAddOnInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new AssignedAddOnPage($this->version, $response, $this->solution); + } + + /** + * Create a new AssignedAddOnInstance + * + * @param string $installedAddOnSid A string that uniquely identifies the + * Add-on installation + * @return AssignedAddOnInstance Newly created AssignedAddOnInstance + */ + public function create($installedAddOnSid) { + $data = Values::of(array( + 'InstalledAddOnSid' => $installedAddOnSid, + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new AssignedAddOnInstance( + $this->version, + $payload, + $this->solution['accountSid'], + $this->solution['resourceSid'] + ); + } + + /** + * Constructs a AssignedAddOnContext + * + * @param string $sid The unique Installed Add-on Sid + * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnContext + */ + public function getContext($sid) { + return new AssignedAddOnContext( + $this->version, + $this->solution['accountSid'], + $this->solution['resourceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Api.V2010.AssignedAddOnList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php new file mode 100644 index 00000000..6eabe47a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new AssignedAddOnInstance( + $this->version, + $payload, + $this->solution['accountSid'], + $this->solution['resourceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Api.V2010.AssignedAddOnPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.php index 60cee610..044a92ae 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.php @@ -9,13 +9,21 @@ namespace Twilio\Rest\Api\V2010\Account; +use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; +use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; +/** + * @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList assignedAddOns + * @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnContext assignedAddOns(string $sid) + */ class IncomingPhoneNumberContext extends InstanceContext { + protected $_assignedAddOns = null; + /** * Initialize the IncomingPhoneNumberContext * @@ -113,6 +121,56 @@ public function delete() { return $this->version->delete('delete', $this->uri); } + /** + * Access the assignedAddOns + * + * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList + */ + protected function getAssignedAddOns() { + if (!$this->_assignedAddOns) { + $this->_assignedAddOns = new AssignedAddOnList( + $this->version, + $this->solution['accountSid'], + $this->solution['sid'] + ); + } + + return $this->_assignedAddOns; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + /** * Provide a friendly representation * diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.php index 44a48f3d..af286ce2 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.php @@ -47,6 +47,8 @@ * @property string emergencyAddressSid */ class IncomingPhoneNumberInstance extends InstanceResource { + protected $_assignedAddOns = null; + /** * Initialize the IncomingPhoneNumberInstance * @@ -147,6 +149,15 @@ public function delete() { return $this->proxy()->delete(); } + /** + * Access the assignedAddOns + * + * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList + */ + protected function getAssignedAddOns() { + return $this->proxy()->assignedAddOns; + } + /** * Magic getter to access properties * diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageList.php index 6f904283..1d89e91e 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageList.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageList.php @@ -55,6 +55,11 @@ public function create($to, $options = array()) { 'MaxPrice' => $options['maxPrice'], 'ProvideFeedback' => Serialize::booleanToString($options['provideFeedback']), 'ValidityPeriod' => $options['validityPeriod'], + 'MaxRate' => $options['maxRate'], + 'ForceDelivery' => Serialize::booleanToString($options['forceDelivery']), + 'ProviderSid' => $options['providerSid'], + 'ContentRetention' => $options['contentRetention'], + 'AddressRetention' => $options['addressRetention'], )); $payload = $this->version->create( diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageOptions.php index 281afb10..4beaeff2 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageOptions.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/MessageOptions.php @@ -23,10 +23,15 @@ abstract class MessageOptions { * @param string $maxPrice The max_price * @param boolean $provideFeedback The provide_feedback * @param integer $validityPeriod The validity_period + * @param string $maxRate The max_rate + * @param boolean $forceDelivery The force_delivery + * @param string $providerSid The provider_sid + * @param string $contentRetention The content_retention + * @param string $addressRetention The address_retention * @return CreateMessageOptions Options builder */ - public static function create($from = Values::NONE, $messagingServiceSid = Values::NONE, $body = Values::NONE, $mediaUrl = Values::NONE, $statusCallback = Values::NONE, $applicationSid = Values::NONE, $maxPrice = Values::NONE, $provideFeedback = Values::NONE, $validityPeriod = Values::NONE) { - return new CreateMessageOptions($from, $messagingServiceSid, $body, $mediaUrl, $statusCallback, $applicationSid, $maxPrice, $provideFeedback, $validityPeriod); + public static function create($from = Values::NONE, $messagingServiceSid = Values::NONE, $body = Values::NONE, $mediaUrl = Values::NONE, $statusCallback = Values::NONE, $applicationSid = Values::NONE, $maxPrice = Values::NONE, $provideFeedback = Values::NONE, $validityPeriod = Values::NONE, $maxRate = Values::NONE, $forceDelivery = Values::NONE, $providerSid = Values::NONE, $contentRetention = Values::NONE, $addressRetention = Values::NONE) { + return new CreateMessageOptions($from, $messagingServiceSid, $body, $mediaUrl, $statusCallback, $applicationSid, $maxPrice, $provideFeedback, $validityPeriod, $maxRate, $forceDelivery, $providerSid, $contentRetention, $addressRetention); } /** @@ -53,8 +58,13 @@ class CreateMessageOptions extends Options { * @param string $maxPrice The max_price * @param boolean $provideFeedback The provide_feedback * @param integer $validityPeriod The validity_period + * @param string $maxRate The max_rate + * @param boolean $forceDelivery The force_delivery + * @param string $providerSid The provider_sid + * @param string $contentRetention The content_retention + * @param string $addressRetention The address_retention */ - public function __construct($from = Values::NONE, $messagingServiceSid = Values::NONE, $body = Values::NONE, $mediaUrl = Values::NONE, $statusCallback = Values::NONE, $applicationSid = Values::NONE, $maxPrice = Values::NONE, $provideFeedback = Values::NONE, $validityPeriod = Values::NONE) { + public function __construct($from = Values::NONE, $messagingServiceSid = Values::NONE, $body = Values::NONE, $mediaUrl = Values::NONE, $statusCallback = Values::NONE, $applicationSid = Values::NONE, $maxPrice = Values::NONE, $provideFeedback = Values::NONE, $validityPeriod = Values::NONE, $maxRate = Values::NONE, $forceDelivery = Values::NONE, $providerSid = Values::NONE, $contentRetention = Values::NONE, $addressRetention = Values::NONE) { $this->options['from'] = $from; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['body'] = $body; @@ -64,6 +74,11 @@ public function __construct($from = Values::NONE, $messagingServiceSid = Values: $this->options['maxPrice'] = $maxPrice; $this->options['provideFeedback'] = $provideFeedback; $this->options['validityPeriod'] = $validityPeriod; + $this->options['maxRate'] = $maxRate; + $this->options['forceDelivery'] = $forceDelivery; + $this->options['providerSid'] = $providerSid; + $this->options['contentRetention'] = $contentRetention; + $this->options['addressRetention'] = $addressRetention; } /** @@ -165,6 +180,61 @@ public function setValidityPeriod($validityPeriod) { return $this; } + /** + * The max_rate + * + * @param string $maxRate The max_rate + * @return $this Fluent Builder + */ + public function setMaxRate($maxRate) { + $this->options['maxRate'] = $maxRate; + return $this; + } + + /** + * The force_delivery + * + * @param boolean $forceDelivery The force_delivery + * @return $this Fluent Builder + */ + public function setForceDelivery($forceDelivery) { + $this->options['forceDelivery'] = $forceDelivery; + return $this; + } + + /** + * The provider_sid + * + * @param string $providerSid The provider_sid + * @return $this Fluent Builder + */ + public function setProviderSid($providerSid) { + $this->options['providerSid'] = $providerSid; + return $this; + } + + /** + * The content_retention + * + * @param string $contentRetention The content_retention + * @return $this Fluent Builder + */ + public function setContentRetention($contentRetention) { + $this->options['contentRetention'] = $contentRetention; + return $this; + } + + /** + * The address_retention + * + * @param string $addressRetention The address_retention + * @return $this Fluent Builder + */ + public function setAddressRetention($addressRetention) { + $this->options['addressRetention'] = $addressRetention; + return $this; + } + /** * Provide a friendly representation * diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/RecordingInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/RecordingInstance.php index 655405de..e311fd26 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/RecordingInstance.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/RecordingInstance.php @@ -29,7 +29,6 @@ * @property integer channels * @property string source * @property string uri - * @property string encryptionType * @property array encryptionDetails */ class RecordingInstance extends InstanceResource { @@ -63,7 +62,6 @@ public function __construct(Version $version, array $payload, $accountSid, $sid 'channels' => Values::array_get($payload, 'channels'), 'source' => Values::array_get($payload, 'source'), 'uri' => Values::array_get($payload, 'uri'), - 'encryptionType' => Values::array_get($payload, 'encryption_type'), 'encryptionDetails' => Values::array_get($payload, 'encryption_details'), ); diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Client.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Client.php index 912545d0..623b450b 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Client.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Client.php @@ -21,13 +21,19 @@ * @property \Twilio\Rest\Accounts accounts * @property \Twilio\Rest\Api api * @property \Twilio\Rest\Chat chat + * @property \Twilio\Rest\Fax fax * @property \Twilio\Rest\IpMessaging ipMessaging * @property \Twilio\Rest\Lookups lookups * @property \Twilio\Rest\Monitor monitor + * @property \Twilio\Rest\Notify notify + * @property \Twilio\Rest\Preview preview * @property \Twilio\Rest\Pricing pricing * @property \Twilio\Rest\Taskrouter taskrouter * @property \Twilio\Rest\Trunking trunking * @property \Twilio\Rest\Video video + * @property \Twilio\Rest\Messaging messaging + * @property \Twilio\Rest\Wireless wireless + * @property \Twilio\Rest\Sync sync * @property \Twilio\Rest\Api\V2010\AccountInstance account * @property \Twilio\Rest\Api\V2010\Account\AddressList addresses * @property \Twilio\Rest\Api\V2010\Account\ApplicationList applications @@ -84,13 +90,19 @@ class Client { protected $_accounts = null; protected $_api = null; protected $_chat = null; + protected $_fax = null; protected $_ipMessaging = null; protected $_lookups = null; protected $_monitor = null; + protected $_notify = null; + protected $_preview = null; protected $_pricing = null; protected $_taskrouter = null; protected $_trunking = null; protected $_video = null; + protected $_messaging = null; + protected $_wireless = null; + protected $_sync = null; /** * Initializes the Twilio Client @@ -587,6 +599,18 @@ protected function getChat() { return $this->_chat; } + /** + * Access the Fax Twilio Domain + * + * @return \Twilio\Rest\Fax Fax Twilio Domain + */ + protected function getFax() { + if (!$this->_fax) { + $this->_fax = new Fax($this); + } + return $this->_fax; + } + /** * Access the IpMessaging Twilio Domain * @@ -623,6 +647,30 @@ protected function getMonitor() { return $this->_monitor; } + /** + * Access the Notify Twilio Domain + * + * @return \Twilio\Rest\Notify Notify Twilio Domain + */ + protected function getNotify() { + if (!$this->_notify) { + $this->_notify = new Notify($this); + } + return $this->_notify; + } + + /** + * Access the Preview Twilio Domain + * + * @return \Twilio\Rest\Preview Preview Twilio Domain + */ + protected function getPreview() { + if (!$this->_preview) { + $this->_preview = new Preview($this); + } + return $this->_preview; + } + /** * Access the Pricing Twilio Domain * @@ -671,6 +719,42 @@ protected function getVideo() { return $this->_video; } + /** + * Access the Messaging Twilio Domain + * + * @return \Twilio\Rest\Messaging Messaging Twilio Domain + */ + protected function getMessaging() { + if (!$this->_messaging) { + $this->_messaging = new Messaging($this); + } + return $this->_messaging; + } + + /** + * Access the Wireless Twilio Domain + * + * @return \Twilio\Rest\Wireless Wireless Twilio Domain + */ + protected function getWireless() { + if (!$this->_wireless) { + $this->_wireless = new Wireless($this); + } + return $this->_wireless; + } + + /** + * Access the Sync Twilio Domain + * + * @return \Twilio\Rest\Sync Sync Twilio Domain + */ + protected function getSync() { + if (!$this->_sync) { + $this->_sync = new Sync($this); + } + return $this->_sync; + } + /** * Magic getter to lazy load domains * diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax.php new file mode 100644 index 00000000..6e0dffa3 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax.php @@ -0,0 +1,103 @@ +baseUrl = 'https://fax.twilio.com'; + } + + /** + * @return \Twilio\Rest\Fax\V1 Version v1 of fax + */ + protected function getV1() { + if (!$this->_v1) { + $this->_v1 = new V1($this); + } + return $this->_v1; + } + + /** + * Magic getter to lazy load version + * + * @param string $name Version to return + * @return \Twilio\Version The requested version + * @throws \Twilio\Exceptions\TwilioException For unknown versions + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown version ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $method = 'context' . ucfirst($name); + if (method_exists($this, $method)) { + return call_user_func_array(array($this, $method), $arguments); + } + + throw new TwilioException('Unknown context ' . $name); + } + + /** + * @return \Twilio\Rest\Fax\V1\FaxList + */ + protected function getFaxes() { + return $this->v1->faxes; + } + + /** + * @param string $sid A string that uniquely identifies this fax. + * @return \Twilio\Rest\Fax\V1\FaxContext + */ + protected function contextFaxes($sid) { + return $this->v1->faxes($sid); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Fax]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1.php new file mode 100644 index 00000000..2e819ce7 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1.php @@ -0,0 +1,86 @@ +version = 'v1'; + } + + /** + * @return \Twilio\Rest\Fax\V1\FaxList + */ + protected function getFaxes() { + if (!$this->_faxes) { + $this->_faxes = new FaxList($this); + } + return $this->_faxes; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Fax.V1]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaContext.php new file mode 100644 index 00000000..665f2156 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaContext.php @@ -0,0 +1,83 @@ +solution = array( + 'faxSid' => $faxSid, + 'sid' => $sid, + ); + + $this->uri = '/Faxes/' . rawurlencode($faxSid) . '/Media/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a FaxMediaInstance + * + * @return FaxMediaInstance Fetched FaxMediaInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new FaxMediaInstance( + $this->version, + $payload, + $this->solution['faxSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the FaxMediaInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Fax.V1.FaxMediaContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaInstance.php new file mode 100644 index 00000000..e3ecb5f2 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaInstance.php @@ -0,0 +1,128 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'faxSid' => Values::array_get($payload, 'fax_sid'), + 'contentType' => Values::array_get($payload, 'content_type'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'faxSid' => $faxSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Fax\V1\Fax\FaxMediaContext Context for this + * FaxMediaInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new FaxMediaContext( + $this->version, + $this->solution['faxSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a FaxMediaInstance + * + * @return FaxMediaInstance Fetched FaxMediaInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the FaxMediaInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Fax.V1.FaxMediaInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaList.php new file mode 100644 index 00000000..467b0594 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaList.php @@ -0,0 +1,146 @@ +solution = array( + 'faxSid' => $faxSid, + ); + + $this->uri = '/Faxes/' . rawurlencode($faxSid) . '/Media'; + } + + /** + * Streams FaxMediaInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads FaxMediaInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return FaxMediaInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of FaxMediaInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of FaxMediaInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new FaxMediaPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of FaxMediaInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of FaxMediaInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new FaxMediaPage($this->version, $response, $this->solution); + } + + /** + * Constructs a FaxMediaContext + * + * @param string $sid A string that uniquely identifies this fax media + * @return \Twilio\Rest\Fax\V1\Fax\FaxMediaContext + */ + public function getContext($sid) { + return new FaxMediaContext( + $this->version, + $this->solution['faxSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Fax.V1.FaxMediaList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaPage.php new file mode 100644 index 00000000..b78cb48f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/Fax/FaxMediaPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new FaxMediaInstance( + $this->version, + $payload, + $this->solution['faxSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Fax.V1.FaxMediaPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxContext.php new file mode 100644 index 00000000..5b5c3e88 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxContext.php @@ -0,0 +1,164 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Faxes/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a FaxInstance + * + * @return FaxInstance Fetched FaxInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new FaxInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Update the FaxInstance + * + * @param array|Options $options Optional Arguments + * @return FaxInstance Updated FaxInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Status' => $options['status'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new FaxInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the FaxInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Access the media + * + * @return \Twilio\Rest\Fax\V1\Fax\FaxMediaList + */ + protected function getMedia() { + if (!$this->_media) { + $this->_media = new FaxMediaList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_media; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Fax.V1.FaxContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxInstance.php new file mode 100644 index 00000000..05f9dd9d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxInstance.php @@ -0,0 +1,170 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'from' => Values::array_get($payload, 'from'), + 'to' => Values::array_get($payload, 'to'), + 'quality' => Values::array_get($payload, 'quality'), + 'mediaSid' => Values::array_get($payload, 'media_sid'), + 'mediaUrl' => Values::array_get($payload, 'media_url'), + 'numPages' => Values::array_get($payload, 'num_pages'), + 'duration' => Values::array_get($payload, 'duration'), + 'status' => Values::array_get($payload, 'status'), + 'direction' => Values::array_get($payload, 'direction'), + 'apiVersion' => Values::array_get($payload, 'api_version'), + 'price' => Values::array_get($payload, 'price'), + 'priceUnit' => Values::array_get($payload, 'price_unit'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'links' => Values::array_get($payload, 'links'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Fax\V1\FaxContext Context for this FaxInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new FaxContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a FaxInstance + * + * @return FaxInstance Fetched FaxInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the FaxInstance + * + * @param array|Options $options Optional Arguments + * @return FaxInstance Updated FaxInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Deletes the FaxInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Access the media + * + * @return \Twilio\Rest\Fax\V1\Fax\FaxMediaList + */ + protected function getMedia() { + return $this->proxy()->media; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Fax.V1.FaxInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxList.php new file mode 100644 index 00000000..4914011b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxList.php @@ -0,0 +1,187 @@ +solution = array(); + + $this->uri = '/Faxes'; + } + + /** + * Streams FaxInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads FaxInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return FaxInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of FaxInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of FaxInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'From' => $options['from'], + 'To' => $options['to'], + 'DateCreatedOnOrBefore' => Serialize::iso8601DateTime($options['dateCreatedOnOrBefore']), + 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new FaxPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of FaxInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of FaxInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new FaxPage($this->version, $response, $this->solution); + } + + /** + * Create a new FaxInstance + * + * @param string $to The phone number or SIP address to send the fax to + * @param string $mediaUrl URL that points to the fax media + * @param array|Options $options Optional Arguments + * @return FaxInstance Newly created FaxInstance + */ + public function create($to, $mediaUrl, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'To' => $to, + 'MediaUrl' => $mediaUrl, + 'Quality' => $options['quality'], + 'StatusCallback' => $options['statusCallback'], + 'From' => $options['from'], + 'SipAuthUsername' => $options['sipAuthUsername'], + 'SipAuthPassword' => $options['sipAuthPassword'], + 'StoreMedia' => Serialize::booleanToString($options['storeMedia']), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new FaxInstance( + $this->version, + $payload + ); + } + + /** + * Constructs a FaxContext + * + * @param string $sid A string that uniquely identifies this fax. + * @return \Twilio\Rest\Fax\V1\FaxContext + */ + public function getContext($sid) { + return new FaxContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Fax.V1.FaxList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxOptions.php new file mode 100644 index 00000000..4fc33f98 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxOptions.php @@ -0,0 +1,262 @@ +options['from'] = $from; + $this->options['to'] = $to; + $this->options['dateCreatedOnOrBefore'] = $dateCreatedOnOrBefore; + $this->options['dateCreatedAfter'] = $dateCreatedAfter; + } + + /** + * Filters the returned list to only include faxes sent from the supplied number, given in E.164 format. + * + * @param string $from Include only faxes sent from + * @return $this Fluent Builder + */ + public function setFrom($from) { + $this->options['from'] = $from; + return $this; + } + + /** + * Filters the returned list to only include faxes sent to the supplied number, given in E.164 format. + * + * @param string $to Include only faxes sent to + * @return $this Fluent Builder + */ + public function setTo($to) { + $this->options['to'] = $to; + return $this; + } + + /** + * Filters the returned list to only include faxes created on or before the supplied date, given in ISO 8601 format. + * + * @param \DateTime $dateCreatedOnOrBefore Include only faxes created on or + * before + * @return $this Fluent Builder + */ + public function setDateCreatedOnOrBefore($dateCreatedOnOrBefore) { + $this->options['dateCreatedOnOrBefore'] = $dateCreatedOnOrBefore; + return $this; + } + + /** + * Filters the returned list to only include faxes created after the supplied date, given in ISO 8601 format. + * + * @param \DateTime $dateCreatedAfter Include only faxes created after + * @return $this Fluent Builder + */ + public function setDateCreatedAfter($dateCreatedAfter) { + $this->options['dateCreatedAfter'] = $dateCreatedAfter; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Fax.V1.ReadFaxOptions ' . implode(' ', $options) . ']'; + } +} + +class CreateFaxOptions extends Options { + /** + * @param string $quality The quality of this fax + * @param string $statusCallback URL for fax status callbacks + * @param string $from Twilio number from which to originate the fax + * @param string $sipAuthUsername Username for SIP authentication + * @param string $sipAuthPassword Password for SIP authentication + * @param boolean $storeMedia Whether or not to store media + */ + public function __construct($quality = Values::NONE, $statusCallback = Values::NONE, $from = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $storeMedia = Values::NONE) { + $this->options['quality'] = $quality; + $this->options['statusCallback'] = $statusCallback; + $this->options['from'] = $from; + $this->options['sipAuthUsername'] = $sipAuthUsername; + $this->options['sipAuthPassword'] = $sipAuthPassword; + $this->options['storeMedia'] = $storeMedia; + } + + /** + * The quality setting to use for this fax. One of `standard`, `fine` or `superfine`. + * + * @param string $quality The quality of this fax + * @return $this Fluent Builder + */ + public function setQuality($quality) { + $this->options['quality'] = $quality; + return $this; + } + + /** + * The URL that Twilio will request when the status of the fax changes. + * + * @param string $statusCallback URL for fax status callbacks + * @return $this Fluent Builder + */ + public function setStatusCallback($statusCallback) { + $this->options['statusCallback'] = $statusCallback; + return $this; + } + + /** + * The phone number to use as the caller id, E.164-formatted. If using a phone number, it must be a Twilio number or a verified outgoing caller id for your account. If sending to a SIP address, this can be any alphanumeric string (plus the characters `+`, `_`, `.`, and `-`) to use in the From header of the SIP request. + * + * @param string $from Twilio number from which to originate the fax + * @return $this Fluent Builder + */ + public function setFrom($from) { + $this->options['from'] = $from; + return $this; + } + + /** + * The username to use for authentication when sending to a SIP address. + * + * @param string $sipAuthUsername Username for SIP authentication + * @return $this Fluent Builder + */ + public function setSipAuthUsername($sipAuthUsername) { + $this->options['sipAuthUsername'] = $sipAuthUsername; + return $this; + } + + /** + * The password to use for authentication when sending to a SIP address. + * + * @param string $sipAuthPassword Password for SIP authentication + * @return $this Fluent Builder + */ + public function setSipAuthPassword($sipAuthPassword) { + $this->options['sipAuthPassword'] = $sipAuthPassword; + return $this; + } + + /** + * Whether or not to store a copy of the sent media on Twilio's servers for later retrieval (defaults to `true`) + * + * @param boolean $storeMedia Whether or not to store media + * @return $this Fluent Builder + */ + public function setStoreMedia($storeMedia) { + $this->options['storeMedia'] = $storeMedia; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Fax.V1.CreateFaxOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateFaxOptions extends Options { + /** + * @param string $status The updated status of this fax + */ + public function __construct($status = Values::NONE) { + $this->options['status'] = $status; + } + + /** + * The updated status of this fax. The only valid option is `canceled`. This may fail if the status has already started transmission. + * + * @param string $status The updated status of this fax + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Fax.V1.UpdateFaxOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxPage.php new file mode 100644 index 00000000..eabb44c8 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Fax/V1/FaxPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new FaxInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Fax.V1.FaxPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging.php new file mode 100644 index 00000000..a94adfe8 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging.php @@ -0,0 +1,103 @@ +baseUrl = 'https://messaging.twilio.com'; + } + + /** + * @return \Twilio\Rest\Messaging\V1 Version v1 of messaging + */ + protected function getV1() { + if (!$this->_v1) { + $this->_v1 = new V1($this); + } + return $this->_v1; + } + + /** + * Magic getter to lazy load version + * + * @param string $name Version to return + * @return \Twilio\Version The requested version + * @throws \Twilio\Exceptions\TwilioException For unknown versions + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown version ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $method = 'context' . ucfirst($name); + if (method_exists($this, $method)) { + return call_user_func_array(array($this, $method), $arguments); + } + + throw new TwilioException('Unknown context ' . $name); + } + + /** + * @return \Twilio\Rest\Messaging\V1\ServiceList + */ + protected function getServices() { + return $this->v1->services; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Messaging\V1\ServiceContext + */ + protected function contextServices($sid) { + return $this->v1->services($sid); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1.php new file mode 100644 index 00000000..4d8b6bc2 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1.php @@ -0,0 +1,86 @@ +version = 'v1'; + } + + /** + * @return \Twilio\Rest\Messaging\V1\ServiceList + */ + protected function getServices() { + if (!$this->_services) { + $this->_services = new ServiceList($this); + } + return $this->_services; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.php new file mode 100644 index 00000000..3aaeb631 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.php @@ -0,0 +1,83 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/AlphaSenders/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a AlphaSenderInstance + * + * @return AlphaSenderInstance Fetched AlphaSenderInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new AlphaSenderInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the AlphaSenderInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Messaging.V1.AlphaSenderContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.php new file mode 100644 index 00000000..5232f15c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.php @@ -0,0 +1,131 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'alphaSender' => Values::array_get($payload, 'alpha_sender'), + 'capabilities' => Values::array_get($payload, 'capabilities'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext Context for + * this + * AlphaSenderInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new AlphaSenderContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a AlphaSenderInstance + * + * @return AlphaSenderInstance Fetched AlphaSenderInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the AlphaSenderInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Messaging.V1.AlphaSenderInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderList.php new file mode 100644 index 00000000..44e8c41c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderList.php @@ -0,0 +1,171 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/AlphaSenders'; + } + + /** + * Create a new AlphaSenderInstance + * + * @param string $alphaSender The alpha_sender + * @return AlphaSenderInstance Newly created AlphaSenderInstance + */ + public function create($alphaSender) { + $data = Values::of(array( + 'AlphaSender' => $alphaSender, + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new AlphaSenderInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams AlphaSenderInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads AlphaSenderInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return AlphaSenderInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of AlphaSenderInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of AlphaSenderInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new AlphaSenderPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of AlphaSenderInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of AlphaSenderInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new AlphaSenderPage($this->version, $response, $this->solution); + } + + /** + * Constructs a AlphaSenderContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext + */ + public function getContext($sid) { + return new AlphaSenderContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1.AlphaSenderList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.php new file mode 100644 index 00000000..5eea3167 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new AlphaSenderInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1.AlphaSenderPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.php new file mode 100644 index 00000000..065ba668 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.php @@ -0,0 +1,83 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/PhoneNumbers/' . rawurlencode($sid) . ''; + } + + /** + * Deletes the PhoneNumberInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Fetch a PhoneNumberInstance + * + * @return PhoneNumberInstance Fetched PhoneNumberInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new PhoneNumberInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Messaging.V1.PhoneNumberContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.php new file mode 100644 index 00000000..21f4491d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.php @@ -0,0 +1,133 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'phoneNumber' => Values::array_get($payload, 'phone_number'), + 'countryCode' => Values::array_get($payload, 'country_code'), + 'capabilities' => Values::array_get($payload, 'capabilities'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext Context for + * this + * PhoneNumberInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new PhoneNumberContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Deletes the PhoneNumberInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Fetch a PhoneNumberInstance + * + * @return PhoneNumberInstance Fetched PhoneNumberInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Messaging.V1.PhoneNumberInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php new file mode 100644 index 00000000..b54a793e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php @@ -0,0 +1,171 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/PhoneNumbers'; + } + + /** + * Create a new PhoneNumberInstance + * + * @param string $phoneNumberSid The phone_number_sid + * @return PhoneNumberInstance Newly created PhoneNumberInstance + */ + public function create($phoneNumberSid) { + $data = Values::of(array( + 'PhoneNumberSid' => $phoneNumberSid, + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new PhoneNumberInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams PhoneNumberInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads PhoneNumberInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return PhoneNumberInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of PhoneNumberInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of PhoneNumberInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new PhoneNumberPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of PhoneNumberInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of PhoneNumberInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new PhoneNumberPage($this->version, $response, $this->solution); + } + + /** + * Constructs a PhoneNumberContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext + */ + public function getContext($sid) { + return new PhoneNumberContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1.PhoneNumberList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.php new file mode 100644 index 00000000..16eee4aa --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new PhoneNumberInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1.PhoneNumberPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeContext.php new file mode 100644 index 00000000..da0aa5fc --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeContext.php @@ -0,0 +1,83 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/ShortCodes/' . rawurlencode($sid) . ''; + } + + /** + * Deletes the ShortCodeInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Fetch a ShortCodeInstance + * + * @return ShortCodeInstance Fetched ShortCodeInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ShortCodeInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Messaging.V1.ShortCodeContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.php new file mode 100644 index 00000000..a30c2483 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.php @@ -0,0 +1,132 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'shortCode' => Values::array_get($payload, 'short_code'), + 'countryCode' => Values::array_get($payload, 'country_code'), + 'capabilities' => Values::array_get($payload, 'capabilities'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeContext Context for this + * ShortCodeInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ShortCodeContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Deletes the ShortCodeInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Fetch a ShortCodeInstance + * + * @return ShortCodeInstance Fetched ShortCodeInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Messaging.V1.ShortCodeInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php new file mode 100644 index 00000000..f73108e9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php @@ -0,0 +1,171 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/ShortCodes'; + } + + /** + * Create a new ShortCodeInstance + * + * @param string $shortCodeSid The short_code_sid + * @return ShortCodeInstance Newly created ShortCodeInstance + */ + public function create($shortCodeSid) { + $data = Values::of(array( + 'ShortCodeSid' => $shortCodeSid, + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new ShortCodeInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams ShortCodeInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads ShortCodeInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return ShortCodeInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of ShortCodeInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of ShortCodeInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new ShortCodePage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of ShortCodeInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of ShortCodeInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new ShortCodePage($this->version, $response, $this->solution); + } + + /** + * Constructs a ShortCodeContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeContext + */ + public function getContext($sid) { + return new ShortCodeContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1.ShortCodeList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodePage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodePage.php new file mode 100644 index 00000000..d8230ec6 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/Service/ShortCodePage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ShortCodeInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1.ShortCodePage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceContext.php new file mode 100644 index 00000000..deaddb2c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceContext.php @@ -0,0 +1,218 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($sid) . ''; + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'InboundRequestUrl' => $options['inboundRequestUrl'], + 'InboundMethod' => $options['inboundMethod'], + 'FallbackUrl' => $options['fallbackUrl'], + 'FallbackMethod' => $options['fallbackMethod'], + 'StatusCallback' => $options['statusCallback'], + 'StickySender' => Serialize::booleanToString($options['stickySender']), + 'MmsConverter' => Serialize::booleanToString($options['mmsConverter']), + 'SmartEncoding' => Serialize::booleanToString($options['smartEncoding']), + 'ScanMessageContent' => $options['scanMessageContent'], + 'FallbackToLongCode' => Serialize::booleanToString($options['fallbackToLongCode']), + 'AreaCodeGeomatch' => Serialize::booleanToString($options['areaCodeGeomatch']), + 'ValidityPeriod' => $options['validityPeriod'], + 'SynchronousValidation' => Serialize::booleanToString($options['synchronousValidation']), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Access the phoneNumbers + * + * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberList + */ + protected function getPhoneNumbers() { + if (!$this->_phoneNumbers) { + $this->_phoneNumbers = new PhoneNumberList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_phoneNumbers; + } + + /** + * Access the shortCodes + * + * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeList + */ + protected function getShortCodes() { + if (!$this->_shortCodes) { + $this->_shortCodes = new ShortCodeList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_shortCodes; + } + + /** + * Access the alphaSenders + * + * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderList + */ + protected function getAlphaSenders() { + if (!$this->_alphaSenders) { + $this->_alphaSenders = new AlphaSenderList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_alphaSenders; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Messaging.V1.ServiceContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceInstance.php new file mode 100644 index 00000000..8264ea86 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceInstance.php @@ -0,0 +1,195 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'inboundRequestUrl' => Values::array_get($payload, 'inbound_request_url'), + 'inboundMethod' => Values::array_get($payload, 'inbound_method'), + 'fallbackUrl' => Values::array_get($payload, 'fallback_url'), + 'fallbackMethod' => Values::array_get($payload, 'fallback_method'), + 'statusCallback' => Values::array_get($payload, 'status_callback'), + 'stickySender' => Values::array_get($payload, 'sticky_sender'), + 'mmsConverter' => Values::array_get($payload, 'mms_converter'), + 'smartEncoding' => Values::array_get($payload, 'smart_encoding'), + 'scanMessageContent' => Values::array_get($payload, 'scan_message_content'), + 'fallbackToLongCode' => Values::array_get($payload, 'fallback_to_long_code'), + 'areaCodeGeomatch' => Values::array_get($payload, 'area_code_geomatch'), + 'synchronousValidation' => Values::array_get($payload, 'synchronous_validation'), + 'validityPeriod' => Values::array_get($payload, 'validity_period'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Messaging\V1\ServiceContext Context for this + * ServiceInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ServiceContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Access the phoneNumbers + * + * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberList + */ + protected function getPhoneNumbers() { + return $this->proxy()->phoneNumbers; + } + + /** + * Access the shortCodes + * + * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeList + */ + protected function getShortCodes() { + return $this->proxy()->shortCodes; + } + + /** + * Access the alphaSenders + * + * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderList + */ + protected function getAlphaSenders() { + return $this->proxy()->alphaSenders; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Messaging.V1.ServiceInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceList.php new file mode 100644 index 00000000..1bf7f655 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceList.php @@ -0,0 +1,184 @@ +solution = array(); + + $this->uri = '/Services'; + } + + /** + * Create a new ServiceInstance + * + * @param string $friendlyName The friendly_name + * @param array|Options $options Optional Arguments + * @return ServiceInstance Newly created ServiceInstance + */ + public function create($friendlyName, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $friendlyName, + 'InboundRequestUrl' => $options['inboundRequestUrl'], + 'InboundMethod' => $options['inboundMethod'], + 'FallbackUrl' => $options['fallbackUrl'], + 'FallbackMethod' => $options['fallbackMethod'], + 'StatusCallback' => $options['statusCallback'], + 'StickySender' => Serialize::booleanToString($options['stickySender']), + 'MmsConverter' => Serialize::booleanToString($options['mmsConverter']), + 'SmartEncoding' => Serialize::booleanToString($options['smartEncoding']), + 'ScanMessageContent' => $options['scanMessageContent'], + 'FallbackToLongCode' => Serialize::booleanToString($options['fallbackToLongCode']), + 'AreaCodeGeomatch' => Serialize::booleanToString($options['areaCodeGeomatch']), + 'ValidityPeriod' => $options['validityPeriod'], + 'SynchronousValidation' => Serialize::booleanToString($options['synchronousValidation']), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Streams ServiceInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads ServiceInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return ServiceInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of ServiceInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of ServiceInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Constructs a ServiceContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Messaging\V1\ServiceContext + */ + public function getContext($sid) { + return new ServiceContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1.ServiceList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceOptions.php new file mode 100644 index 00000000..fa840dc6 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServiceOptions.php @@ -0,0 +1,454 @@ +options['inboundRequestUrl'] = $inboundRequestUrl; + $this->options['inboundMethod'] = $inboundMethod; + $this->options['fallbackUrl'] = $fallbackUrl; + $this->options['fallbackMethod'] = $fallbackMethod; + $this->options['statusCallback'] = $statusCallback; + $this->options['stickySender'] = $stickySender; + $this->options['mmsConverter'] = $mmsConverter; + $this->options['smartEncoding'] = $smartEncoding; + $this->options['scanMessageContent'] = $scanMessageContent; + $this->options['fallbackToLongCode'] = $fallbackToLongCode; + $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; + $this->options['validityPeriod'] = $validityPeriod; + $this->options['synchronousValidation'] = $synchronousValidation; + } + + /** + * The inbound_request_url + * + * @param string $inboundRequestUrl The inbound_request_url + * @return $this Fluent Builder + */ + public function setInboundRequestUrl($inboundRequestUrl) { + $this->options['inboundRequestUrl'] = $inboundRequestUrl; + return $this; + } + + /** + * The inbound_method + * + * @param string $inboundMethod The inbound_method + * @return $this Fluent Builder + */ + public function setInboundMethod($inboundMethod) { + $this->options['inboundMethod'] = $inboundMethod; + return $this; + } + + /** + * The fallback_url + * + * @param string $fallbackUrl The fallback_url + * @return $this Fluent Builder + */ + public function setFallbackUrl($fallbackUrl) { + $this->options['fallbackUrl'] = $fallbackUrl; + return $this; + } + + /** + * The fallback_method + * + * @param string $fallbackMethod The fallback_method + * @return $this Fluent Builder + */ + public function setFallbackMethod($fallbackMethod) { + $this->options['fallbackMethod'] = $fallbackMethod; + return $this; + } + + /** + * The status_callback + * + * @param string $statusCallback The status_callback + * @return $this Fluent Builder + */ + public function setStatusCallback($statusCallback) { + $this->options['statusCallback'] = $statusCallback; + return $this; + } + + /** + * The sticky_sender + * + * @param boolean $stickySender The sticky_sender + * @return $this Fluent Builder + */ + public function setStickySender($stickySender) { + $this->options['stickySender'] = $stickySender; + return $this; + } + + /** + * The mms_converter + * + * @param boolean $mmsConverter The mms_converter + * @return $this Fluent Builder + */ + public function setMmsConverter($mmsConverter) { + $this->options['mmsConverter'] = $mmsConverter; + return $this; + } + + /** + * The smart_encoding + * + * @param boolean $smartEncoding The smart_encoding + * @return $this Fluent Builder + */ + public function setSmartEncoding($smartEncoding) { + $this->options['smartEncoding'] = $smartEncoding; + return $this; + } + + /** + * The scan_message_content + * + * @param string $scanMessageContent The scan_message_content + * @return $this Fluent Builder + */ + public function setScanMessageContent($scanMessageContent) { + $this->options['scanMessageContent'] = $scanMessageContent; + return $this; + } + + /** + * The fallback_to_long_code + * + * @param boolean $fallbackToLongCode The fallback_to_long_code + * @return $this Fluent Builder + */ + public function setFallbackToLongCode($fallbackToLongCode) { + $this->options['fallbackToLongCode'] = $fallbackToLongCode; + return $this; + } + + /** + * The area_code_geomatch + * + * @param boolean $areaCodeGeomatch The area_code_geomatch + * @return $this Fluent Builder + */ + public function setAreaCodeGeomatch($areaCodeGeomatch) { + $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; + return $this; + } + + /** + * The validity_period + * + * @param integer $validityPeriod The validity_period + * @return $this Fluent Builder + */ + public function setValidityPeriod($validityPeriod) { + $this->options['validityPeriod'] = $validityPeriod; + return $this; + } + + /** + * The synchronous_validation + * + * @param boolean $synchronousValidation The synchronous_validation + * @return $this Fluent Builder + */ + public function setSynchronousValidation($synchronousValidation) { + $this->options['synchronousValidation'] = $synchronousValidation; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Messaging.V1.CreateServiceOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateServiceOptions extends Options { + /** + * @param string $friendlyName The friendly_name + * @param string $inboundRequestUrl The inbound_request_url + * @param string $inboundMethod The inbound_method + * @param string $fallbackUrl The fallback_url + * @param string $fallbackMethod The fallback_method + * @param string $statusCallback The status_callback + * @param boolean $stickySender The sticky_sender + * @param boolean $mmsConverter The mms_converter + * @param boolean $smartEncoding The smart_encoding + * @param string $scanMessageContent The scan_message_content + * @param boolean $fallbackToLongCode The fallback_to_long_code + * @param boolean $areaCodeGeomatch The area_code_geomatch + * @param integer $validityPeriod The validity_period + * @param boolean $synchronousValidation The synchronous_validation + */ + public function __construct($friendlyName = Values::NONE, $inboundRequestUrl = Values::NONE, $inboundMethod = Values::NONE, $fallbackUrl = Values::NONE, $fallbackMethod = Values::NONE, $statusCallback = Values::NONE, $stickySender = Values::NONE, $mmsConverter = Values::NONE, $smartEncoding = Values::NONE, $scanMessageContent = Values::NONE, $fallbackToLongCode = Values::NONE, $areaCodeGeomatch = Values::NONE, $validityPeriod = Values::NONE, $synchronousValidation = Values::NONE) { + $this->options['friendlyName'] = $friendlyName; + $this->options['inboundRequestUrl'] = $inboundRequestUrl; + $this->options['inboundMethod'] = $inboundMethod; + $this->options['fallbackUrl'] = $fallbackUrl; + $this->options['fallbackMethod'] = $fallbackMethod; + $this->options['statusCallback'] = $statusCallback; + $this->options['stickySender'] = $stickySender; + $this->options['mmsConverter'] = $mmsConverter; + $this->options['smartEncoding'] = $smartEncoding; + $this->options['scanMessageContent'] = $scanMessageContent; + $this->options['fallbackToLongCode'] = $fallbackToLongCode; + $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; + $this->options['validityPeriod'] = $validityPeriod; + $this->options['synchronousValidation'] = $synchronousValidation; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The inbound_request_url + * + * @param string $inboundRequestUrl The inbound_request_url + * @return $this Fluent Builder + */ + public function setInboundRequestUrl($inboundRequestUrl) { + $this->options['inboundRequestUrl'] = $inboundRequestUrl; + return $this; + } + + /** + * The inbound_method + * + * @param string $inboundMethod The inbound_method + * @return $this Fluent Builder + */ + public function setInboundMethod($inboundMethod) { + $this->options['inboundMethod'] = $inboundMethod; + return $this; + } + + /** + * The fallback_url + * + * @param string $fallbackUrl The fallback_url + * @return $this Fluent Builder + */ + public function setFallbackUrl($fallbackUrl) { + $this->options['fallbackUrl'] = $fallbackUrl; + return $this; + } + + /** + * The fallback_method + * + * @param string $fallbackMethod The fallback_method + * @return $this Fluent Builder + */ + public function setFallbackMethod($fallbackMethod) { + $this->options['fallbackMethod'] = $fallbackMethod; + return $this; + } + + /** + * The status_callback + * + * @param string $statusCallback The status_callback + * @return $this Fluent Builder + */ + public function setStatusCallback($statusCallback) { + $this->options['statusCallback'] = $statusCallback; + return $this; + } + + /** + * The sticky_sender + * + * @param boolean $stickySender The sticky_sender + * @return $this Fluent Builder + */ + public function setStickySender($stickySender) { + $this->options['stickySender'] = $stickySender; + return $this; + } + + /** + * The mms_converter + * + * @param boolean $mmsConverter The mms_converter + * @return $this Fluent Builder + */ + public function setMmsConverter($mmsConverter) { + $this->options['mmsConverter'] = $mmsConverter; + return $this; + } + + /** + * The smart_encoding + * + * @param boolean $smartEncoding The smart_encoding + * @return $this Fluent Builder + */ + public function setSmartEncoding($smartEncoding) { + $this->options['smartEncoding'] = $smartEncoding; + return $this; + } + + /** + * The scan_message_content + * + * @param string $scanMessageContent The scan_message_content + * @return $this Fluent Builder + */ + public function setScanMessageContent($scanMessageContent) { + $this->options['scanMessageContent'] = $scanMessageContent; + return $this; + } + + /** + * The fallback_to_long_code + * + * @param boolean $fallbackToLongCode The fallback_to_long_code + * @return $this Fluent Builder + */ + public function setFallbackToLongCode($fallbackToLongCode) { + $this->options['fallbackToLongCode'] = $fallbackToLongCode; + return $this; + } + + /** + * The area_code_geomatch + * + * @param boolean $areaCodeGeomatch The area_code_geomatch + * @return $this Fluent Builder + */ + public function setAreaCodeGeomatch($areaCodeGeomatch) { + $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; + return $this; + } + + /** + * The validity_period + * + * @param integer $validityPeriod The validity_period + * @return $this Fluent Builder + */ + public function setValidityPeriod($validityPeriod) { + $this->options['validityPeriod'] = $validityPeriod; + return $this; + } + + /** + * The synchronous_validation + * + * @param boolean $synchronousValidation The synchronous_validation + * @return $this Fluent Builder + */ + public function setSynchronousValidation($synchronousValidation) { + $this->options['synchronousValidation'] = $synchronousValidation; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Messaging.V1.UpdateServiceOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServicePage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServicePage.php new file mode 100644 index 00000000..1780e8ee --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Messaging/V1/ServicePage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Messaging.V1.ServicePage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify.php new file mode 100644 index 00000000..8b8d02e7 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify.php @@ -0,0 +1,120 @@ +baseUrl = 'https://notify.twilio.com'; + } + + /** + * @return \Twilio\Rest\Notify\V1 Version v1 of notify + */ + protected function getV1() { + if (!$this->_v1) { + $this->_v1 = new V1($this); + } + return $this->_v1; + } + + /** + * Magic getter to lazy load version + * + * @param string $name Version to return + * @return \Twilio\Version The requested version + * @throws \Twilio\Exceptions\TwilioException For unknown versions + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown version ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $method = 'context' . ucfirst($name); + if (method_exists($this, $method)) { + return call_user_func_array(array($this, $method), $arguments); + } + + throw new TwilioException('Unknown context ' . $name); + } + + /** + * @return \Twilio\Rest\Notify\V1\CredentialList + */ + protected function getCredentials() { + return $this->v1->credentials; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Notify\V1\CredentialContext + */ + protected function contextCredentials($sid) { + return $this->v1->credentials($sid); + } + + /** + * @return \Twilio\Rest\Notify\V1\ServiceList + */ + protected function getServices() { + return $this->v1->services; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Notify\V1\ServiceContext + */ + protected function contextServices($sid) { + return $this->v1->services($sid); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1.php new file mode 100644 index 00000000..46990c2f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1.php @@ -0,0 +1,100 @@ +version = 'v1'; + } + + /** + * @return \Twilio\Rest\Notify\V1\CredentialList + */ + protected function getCredentials() { + if (!$this->_credentials) { + $this->_credentials = new CredentialList($this); + } + return $this->_credentials; + } + + /** + * @return \Twilio\Rest\Notify\V1\ServiceList + */ + protected function getServices() { + if (!$this->_services) { + $this->_services = new ServiceList($this); + } + return $this->_services; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialContext.php new file mode 100644 index 00000000..1c0b709a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialContext.php @@ -0,0 +1,114 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Credentials/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a CredentialInstance + * + * @return CredentialInstance Fetched CredentialInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new CredentialInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Update the CredentialInstance + * + * @param array|Options $options Optional Arguments + * @return CredentialInstance Updated CredentialInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'Certificate' => $options['certificate'], + 'PrivateKey' => $options['privateKey'], + 'Sandbox' => Serialize::booleanToString($options['sandbox']), + 'ApiKey' => $options['apiKey'], + 'Secret' => $options['secret'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new CredentialInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the CredentialInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.CredentialContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialInstance.php new file mode 100644 index 00000000..7641c8e0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialInstance.php @@ -0,0 +1,140 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'type' => Values::array_get($payload, 'type'), + 'sandbox' => Values::array_get($payload, 'sandbox'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Notify\V1\CredentialContext Context for this + * CredentialInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new CredentialContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a CredentialInstance + * + * @return CredentialInstance Fetched CredentialInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the CredentialInstance + * + * @param array|Options $options Optional Arguments + * @return CredentialInstance Updated CredentialInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Deletes the CredentialInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.CredentialInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialList.php new file mode 100644 index 00000000..ef19347d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialList.php @@ -0,0 +1,177 @@ +solution = array(); + + $this->uri = '/Credentials'; + } + + /** + * Streams CredentialInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads CredentialInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return CredentialInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of CredentialInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of CredentialInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new CredentialPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of CredentialInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of CredentialInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new CredentialPage($this->version, $response, $this->solution); + } + + /** + * Create a new CredentialInstance + * + * @param string $type The type + * @param array|Options $options Optional Arguments + * @return CredentialInstance Newly created CredentialInstance + */ + public function create($type, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Type' => $type, + 'FriendlyName' => $options['friendlyName'], + 'Certificate' => $options['certificate'], + 'PrivateKey' => $options['privateKey'], + 'Sandbox' => Serialize::booleanToString($options['sandbox']), + 'ApiKey' => $options['apiKey'], + 'Secret' => $options['secret'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new CredentialInstance( + $this->version, + $payload + ); + } + + /** + * Constructs a CredentialContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Notify\V1\CredentialContext + */ + public function getContext($sid) { + return new CredentialContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.CredentialList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialOptions.php new file mode 100644 index 00000000..614e0ae0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialOptions.php @@ -0,0 +1,244 @@ +options['friendlyName'] = $friendlyName; + $this->options['certificate'] = $certificate; + $this->options['privateKey'] = $privateKey; + $this->options['sandbox'] = $sandbox; + $this->options['apiKey'] = $apiKey; + $this->options['secret'] = $secret; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The certificate + * + * @param string $certificate The certificate + * @return $this Fluent Builder + */ + public function setCertificate($certificate) { + $this->options['certificate'] = $certificate; + return $this; + } + + /** + * The private_key + * + * @param string $privateKey The private_key + * @return $this Fluent Builder + */ + public function setPrivateKey($privateKey) { + $this->options['privateKey'] = $privateKey; + return $this; + } + + /** + * The sandbox + * + * @param boolean $sandbox The sandbox + * @return $this Fluent Builder + */ + public function setSandbox($sandbox) { + $this->options['sandbox'] = $sandbox; + return $this; + } + + /** + * The api_key + * + * @param string $apiKey The api_key + * @return $this Fluent Builder + */ + public function setApiKey($apiKey) { + $this->options['apiKey'] = $apiKey; + return $this; + } + + /** + * The secret + * + * @param string $secret The secret + * @return $this Fluent Builder + */ + public function setSecret($secret) { + $this->options['secret'] = $secret; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.CreateCredentialOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateCredentialOptions extends Options { + /** + * @param string $friendlyName The friendly_name + * @param string $certificate The certificate + * @param string $privateKey The private_key + * @param boolean $sandbox The sandbox + * @param string $apiKey The api_key + * @param string $secret The secret + */ + public function __construct($friendlyName = Values::NONE, $certificate = Values::NONE, $privateKey = Values::NONE, $sandbox = Values::NONE, $apiKey = Values::NONE, $secret = Values::NONE) { + $this->options['friendlyName'] = $friendlyName; + $this->options['certificate'] = $certificate; + $this->options['privateKey'] = $privateKey; + $this->options['sandbox'] = $sandbox; + $this->options['apiKey'] = $apiKey; + $this->options['secret'] = $secret; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The certificate + * + * @param string $certificate The certificate + * @return $this Fluent Builder + */ + public function setCertificate($certificate) { + $this->options['certificate'] = $certificate; + return $this; + } + + /** + * The private_key + * + * @param string $privateKey The private_key + * @return $this Fluent Builder + */ + public function setPrivateKey($privateKey) { + $this->options['privateKey'] = $privateKey; + return $this; + } + + /** + * The sandbox + * + * @param boolean $sandbox The sandbox + * @return $this Fluent Builder + */ + public function setSandbox($sandbox) { + $this->options['sandbox'] = $sandbox; + return $this; + } + + /** + * The api_key + * + * @param string $apiKey The api_key + * @return $this Fluent Builder + */ + public function setApiKey($apiKey) { + $this->options['apiKey'] = $apiKey; + return $this; + } + + /** + * The secret + * + * @param string $secret The secret + * @return $this Fluent Builder + */ + public function setSecret($secret) { + $this->options['secret'] = $secret; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.UpdateCredentialOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialPage.php new file mode 100644 index 00000000..f940fced --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/CredentialPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new CredentialInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.CredentialPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingContext.php new file mode 100644 index 00000000..50d3067e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingContext.php @@ -0,0 +1,83 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Bindings/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a BindingInstance + * + * @return BindingInstance Fetched BindingInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new BindingInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the BindingInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.BindingContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingInstance.php new file mode 100644 index 00000000..e18efebc --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingInstance.php @@ -0,0 +1,142 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'credentialSid' => Values::array_get($payload, 'credential_sid'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'notificationProtocolVersion' => Values::array_get($payload, 'notification_protocol_version'), + 'endpoint' => Values::array_get($payload, 'endpoint'), + 'identity' => Values::array_get($payload, 'identity'), + 'bindingType' => Values::array_get($payload, 'binding_type'), + 'address' => Values::array_get($payload, 'address'), + 'tags' => Values::array_get($payload, 'tags'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Notify\V1\Service\BindingContext Context for this + * BindingInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new BindingContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a BindingInstance + * + * @return BindingInstance Fetched BindingInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the BindingInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.BindingInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingList.php new file mode 100644 index 00000000..73b07993 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingList.php @@ -0,0 +1,192 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Bindings'; + } + + /** + * Create a new BindingInstance + * + * @param string $identity The identity + * @param string $bindingType The binding_type + * @param string $address The address + * @param array|Options $options Optional Arguments + * @return BindingInstance Newly created BindingInstance + */ + public function create($identity, $bindingType, $address, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Identity' => $identity, + 'BindingType' => $bindingType, + 'Address' => $address, + 'Tag' => $options['tag'], + 'NotificationProtocolVersion' => $options['notificationProtocolVersion'], + 'CredentialSid' => $options['credentialSid'], + 'Endpoint' => $options['endpoint'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new BindingInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams BindingInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads BindingInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return BindingInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of BindingInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of BindingInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'StartDate' => Serialize::iso8601Date($options['startDate']), + 'EndDate' => Serialize::iso8601Date($options['endDate']), + 'Identity' => $options['identity'], + 'Tag' => $options['tag'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new BindingPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of BindingInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of BindingInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new BindingPage($this->version, $response, $this->solution); + } + + /** + * Constructs a BindingContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Notify\V1\Service\BindingContext + */ + public function getContext($sid) { + return new BindingContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.BindingList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingOptions.php new file mode 100644 index 00000000..c3c5a599 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingOptions.php @@ -0,0 +1,188 @@ +options['tag'] = $tag; + $this->options['notificationProtocolVersion'] = $notificationProtocolVersion; + $this->options['credentialSid'] = $credentialSid; + $this->options['endpoint'] = $endpoint; + } + + /** + * The tag + * + * @param string $tag The tag + * @return $this Fluent Builder + */ + public function setTag($tag) { + $this->options['tag'] = $tag; + return $this; + } + + /** + * The notification_protocol_version + * + * @param string $notificationProtocolVersion The notification_protocol_version + * @return $this Fluent Builder + */ + public function setNotificationProtocolVersion($notificationProtocolVersion) { + $this->options['notificationProtocolVersion'] = $notificationProtocolVersion; + return $this; + } + + /** + * The credential_sid + * + * @param string $credentialSid The credential_sid + * @return $this Fluent Builder + */ + public function setCredentialSid($credentialSid) { + $this->options['credentialSid'] = $credentialSid; + return $this; + } + + /** + * The endpoint + * + * @param string $endpoint The endpoint + * @return $this Fluent Builder + */ + public function setEndpoint($endpoint) { + $this->options['endpoint'] = $endpoint; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.CreateBindingOptions ' . implode(' ', $options) . ']'; + } +} + +class ReadBindingOptions extends Options { + /** + * @param \DateTime $startDate The start_date + * @param \DateTime $endDate The end_date + * @param string $identity The identity + * @param string $tag The tag + */ + public function __construct($startDate = Values::NONE, $endDate = Values::NONE, $identity = Values::NONE, $tag = Values::NONE) { + $this->options['startDate'] = $startDate; + $this->options['endDate'] = $endDate; + $this->options['identity'] = $identity; + $this->options['tag'] = $tag; + } + + /** + * The start_date + * + * @param \DateTime $startDate The start_date + * @return $this Fluent Builder + */ + public function setStartDate($startDate) { + $this->options['startDate'] = $startDate; + return $this; + } + + /** + * The end_date + * + * @param \DateTime $endDate The end_date + * @return $this Fluent Builder + */ + public function setEndDate($endDate) { + $this->options['endDate'] = $endDate; + return $this; + } + + /** + * The identity + * + * @param string $identity The identity + * @return $this Fluent Builder + */ + public function setIdentity($identity) { + $this->options['identity'] = $identity; + return $this; + } + + /** + * The tag + * + * @param string $tag The tag + * @return $this Fluent Builder + */ + public function setTag($tag) { + $this->options['tag'] = $tag; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.ReadBindingOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingPage.php new file mode 100644 index 00000000..eeae2ef9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/BindingPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new BindingInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.BindingPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationInstance.php new file mode 100644 index 00000000..86d15c47 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationInstance.php @@ -0,0 +1,111 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'identities' => Values::array_get($payload, 'identities'), + 'tags' => Values::array_get($payload, 'tags'), + 'segments' => Values::array_get($payload, 'segments'), + 'priority' => Values::array_get($payload, 'priority'), + 'ttl' => Values::array_get($payload, 'ttl'), + 'title' => Values::array_get($payload, 'title'), + 'body' => Values::array_get($payload, 'body'), + 'sound' => Values::array_get($payload, 'sound'), + 'action' => Values::array_get($payload, 'action'), + 'data' => Values::array_get($payload, 'data'), + 'apn' => Values::array_get($payload, 'apn'), + 'gcm' => Values::array_get($payload, 'gcm'), + 'fcm' => Values::array_get($payload, 'fcm'), + 'sms' => Values::array_get($payload, 'sms'), + 'facebookMessenger' => Values::array_get($payload, 'facebook_messenger'), + 'alexa' => Values::array_get($payload, 'alexa'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.NotificationInstance]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationList.php new file mode 100644 index 00000000..f061a46a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationList.php @@ -0,0 +1,91 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Notifications'; + } + + /** + * Create a new NotificationInstance + * + * @param array|Options $options Optional Arguments + * @return NotificationInstance Newly created NotificationInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Identity' => $options['identity'], + 'Tag' => $options['tag'], + 'Body' => $options['body'], + 'Priority' => $options['priority'], + 'Ttl' => $options['ttl'], + 'Title' => $options['title'], + 'Sound' => $options['sound'], + 'Action' => $options['action'], + 'Data' => $options['data'], + 'Apn' => $options['apn'], + 'Gcm' => $options['gcm'], + 'Sms' => $options['sms'], + 'FacebookMessenger' => Serialize::json_object($options['facebookMessenger']), + 'Fcm' => $options['fcm'], + 'Segment' => $options['segment'], + 'Alexa' => $options['alexa'], + 'ToBinding' => $options['toBinding'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new NotificationInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.NotificationList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationOptions.php new file mode 100644 index 00000000..fee47d3c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationOptions.php @@ -0,0 +1,285 @@ +options['identity'] = $identity; + $this->options['tag'] = $tag; + $this->options['body'] = $body; + $this->options['priority'] = $priority; + $this->options['ttl'] = $ttl; + $this->options['title'] = $title; + $this->options['sound'] = $sound; + $this->options['action'] = $action; + $this->options['data'] = $data; + $this->options['apn'] = $apn; + $this->options['gcm'] = $gcm; + $this->options['sms'] = $sms; + $this->options['facebookMessenger'] = $facebookMessenger; + $this->options['fcm'] = $fcm; + $this->options['segment'] = $segment; + $this->options['alexa'] = $alexa; + $this->options['toBinding'] = $toBinding; + } + + /** + * The identity + * + * @param string $identity The identity + * @return $this Fluent Builder + */ + public function setIdentity($identity) { + $this->options['identity'] = $identity; + return $this; + } + + /** + * The tag + * + * @param string $tag The tag + * @return $this Fluent Builder + */ + public function setTag($tag) { + $this->options['tag'] = $tag; + return $this; + } + + /** + * The body + * + * @param string $body The body + * @return $this Fluent Builder + */ + public function setBody($body) { + $this->options['body'] = $body; + return $this; + } + + /** + * The priority + * + * @param string $priority The priority + * @return $this Fluent Builder + */ + public function setPriority($priority) { + $this->options['priority'] = $priority; + return $this; + } + + /** + * The ttl + * + * @param integer $ttl The ttl + * @return $this Fluent Builder + */ + public function setTtl($ttl) { + $this->options['ttl'] = $ttl; + return $this; + } + + /** + * The title + * + * @param string $title The title + * @return $this Fluent Builder + */ + public function setTitle($title) { + $this->options['title'] = $title; + return $this; + } + + /** + * The sound + * + * @param string $sound The sound + * @return $this Fluent Builder + */ + public function setSound($sound) { + $this->options['sound'] = $sound; + return $this; + } + + /** + * The action + * + * @param string $action The action + * @return $this Fluent Builder + */ + public function setAction($action) { + $this->options['action'] = $action; + return $this; + } + + /** + * The data + * + * @param string $data The data + * @return $this Fluent Builder + */ + public function setData($data) { + $this->options['data'] = $data; + return $this; + } + + /** + * The apn + * + * @param string $apn The apn + * @return $this Fluent Builder + */ + public function setApn($apn) { + $this->options['apn'] = $apn; + return $this; + } + + /** + * The gcm + * + * @param string $gcm The gcm + * @return $this Fluent Builder + */ + public function setGcm($gcm) { + $this->options['gcm'] = $gcm; + return $this; + } + + /** + * The sms + * + * @param string $sms The sms + * @return $this Fluent Builder + */ + public function setSms($sms) { + $this->options['sms'] = $sms; + return $this; + } + + /** + * The facebook_messenger + * + * @param array $facebookMessenger The facebook_messenger + * @return $this Fluent Builder + */ + public function setFacebookMessenger($facebookMessenger) { + $this->options['facebookMessenger'] = $facebookMessenger; + return $this; + } + + /** + * The fcm + * + * @param string $fcm The fcm + * @return $this Fluent Builder + */ + public function setFcm($fcm) { + $this->options['fcm'] = $fcm; + return $this; + } + + /** + * The segment + * + * @param string $segment The segment + * @return $this Fluent Builder + */ + public function setSegment($segment) { + $this->options['segment'] = $segment; + return $this; + } + + /** + * The alexa + * + * @param string $alexa The alexa + * @return $this Fluent Builder + */ + public function setAlexa($alexa) { + $this->options['alexa'] = $alexa; + return $this; + } + + /** + * The to_binding + * + * @param string $toBinding The to_binding + * @return $this Fluent Builder + */ + public function setToBinding($toBinding) { + $this->options['toBinding'] = $toBinding; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.CreateNotificationOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationPage.php new file mode 100644 index 00000000..37097aca --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/NotificationPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new NotificationInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.NotificationPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentInstance.php new file mode 100644 index 00000000..0790608a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentInstance.php @@ -0,0 +1,83 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.SegmentInstance]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentList.php new file mode 100644 index 00000000..1143de41 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentList.php @@ -0,0 +1,132 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Segments'; + } + + /** + * Streams SegmentInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SegmentInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SegmentInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SegmentInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SegmentInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SegmentPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SegmentInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SegmentInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SegmentPage($this->version, $response, $this->solution); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.SegmentList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentPage.php new file mode 100644 index 00000000..5b774a7c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/SegmentPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SegmentInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.SegmentPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipContext.php new file mode 100644 index 00000000..d14e114f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipContext.php @@ -0,0 +1,86 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'identity' => $identity, + 'segment' => $segment, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Users/' . rawurlencode($identity) . '/SegmentMemberships/' . rawurlencode($segment) . ''; + } + + /** + * Deletes the SegmentMembershipInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Fetch a SegmentMembershipInstance + * + * @return SegmentMembershipInstance Fetched SegmentMembershipInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SegmentMembershipInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['identity'], + $this->solution['segment'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.SegmentMembershipContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipInstance.php new file mode 100644 index 00000000..361b1e2e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipInstance.php @@ -0,0 +1,128 @@ +properties = array( + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'identity' => Values::array_get($payload, 'identity'), + 'segment' => Values::array_get($payload, 'segment'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'identity' => $identity, + 'segment' => $segment ?: $this->properties['segment'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Notify\V1\Service\User\SegmentMembershipContext Context + * for + * this + * SegmentMembershipInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SegmentMembershipContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['identity'], + $this->solution['segment'] + ); + } + + return $this->context; + } + + /** + * Deletes the SegmentMembershipInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Fetch a SegmentMembershipInstance + * + * @return SegmentMembershipInstance Fetched SegmentMembershipInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.SegmentMembershipInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipList.php new file mode 100644 index 00000000..7d8aba8a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipList.php @@ -0,0 +1,89 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Users/' . rawurlencode($identity) . '/SegmentMemberships'; + } + + /** + * Create a new SegmentMembershipInstance + * + * @param string $segment The segment + * @return SegmentMembershipInstance Newly created SegmentMembershipInstance + */ + public function create($segment) { + $data = Values::of(array( + 'Segment' => $segment, + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SegmentMembershipInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['identity'] + ); + } + + /** + * Constructs a SegmentMembershipContext + * + * @param string $segment The segment + * @return \Twilio\Rest\Notify\V1\Service\User\SegmentMembershipContext + */ + public function getContext($segment) { + return new SegmentMembershipContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['identity'], + $segment + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.SegmentMembershipList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipPage.php new file mode 100644 index 00000000..bdc20182 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/SegmentMembershipPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SegmentMembershipInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['identity'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.SegmentMembershipPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingContext.php new file mode 100644 index 00000000..ea6ab776 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingContext.php @@ -0,0 +1,86 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'identity' => $identity, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Users/' . rawurlencode($identity) . '/Bindings/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a UserBindingInstance + * + * @return UserBindingInstance Fetched UserBindingInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new UserBindingInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['identity'], + $this->solution['sid'] + ); + } + + /** + * Deletes the UserBindingInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.UserBindingContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingInstance.php new file mode 100644 index 00000000..df404127 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingInstance.php @@ -0,0 +1,146 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'credentialSid' => Values::array_get($payload, 'credential_sid'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'notificationProtocolVersion' => Values::array_get($payload, 'notification_protocol_version'), + 'endpoint' => Values::array_get($payload, 'endpoint'), + 'identity' => Values::array_get($payload, 'identity'), + 'bindingType' => Values::array_get($payload, 'binding_type'), + 'address' => Values::array_get($payload, 'address'), + 'tags' => Values::array_get($payload, 'tags'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'identity' => $identity, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Notify\V1\Service\User\UserBindingContext Context for + * this + * UserBindingInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new UserBindingContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['identity'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a UserBindingInstance + * + * @return UserBindingInstance Fetched UserBindingInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the UserBindingInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.UserBindingInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingList.php new file mode 100644 index 00000000..3622e64a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingList.php @@ -0,0 +1,193 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Users/' . rawurlencode($identity) . '/Bindings'; + } + + /** + * Create a new UserBindingInstance + * + * @param string $bindingType The binding_type + * @param string $address The address + * @param array|Options $options Optional Arguments + * @return UserBindingInstance Newly created UserBindingInstance + */ + public function create($bindingType, $address, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'BindingType' => $bindingType, + 'Address' => $address, + 'Tag' => $options['tag'], + 'NotificationProtocolVersion' => $options['notificationProtocolVersion'], + 'CredentialSid' => $options['credentialSid'], + 'Endpoint' => $options['endpoint'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new UserBindingInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['identity'] + ); + } + + /** + * Streams UserBindingInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads UserBindingInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return UserBindingInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of UserBindingInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of UserBindingInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'StartDate' => Serialize::iso8601Date($options['startDate']), + 'EndDate' => Serialize::iso8601Date($options['endDate']), + 'Tag' => $options['tag'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new UserBindingPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of UserBindingInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of UserBindingInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new UserBindingPage($this->version, $response, $this->solution); + } + + /** + * Constructs a UserBindingContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Notify\V1\Service\User\UserBindingContext + */ + public function getContext($sid) { + return new UserBindingContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['identity'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.UserBindingList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingOptions.php new file mode 100644 index 00000000..9acbce03 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingOptions.php @@ -0,0 +1,174 @@ +options['tag'] = $tag; + $this->options['notificationProtocolVersion'] = $notificationProtocolVersion; + $this->options['credentialSid'] = $credentialSid; + $this->options['endpoint'] = $endpoint; + } + + /** + * The tag + * + * @param string $tag The tag + * @return $this Fluent Builder + */ + public function setTag($tag) { + $this->options['tag'] = $tag; + return $this; + } + + /** + * The notification_protocol_version + * + * @param string $notificationProtocolVersion The notification_protocol_version + * @return $this Fluent Builder + */ + public function setNotificationProtocolVersion($notificationProtocolVersion) { + $this->options['notificationProtocolVersion'] = $notificationProtocolVersion; + return $this; + } + + /** + * The credential_sid + * + * @param string $credentialSid The credential_sid + * @return $this Fluent Builder + */ + public function setCredentialSid($credentialSid) { + $this->options['credentialSid'] = $credentialSid; + return $this; + } + + /** + * The endpoint + * + * @param string $endpoint The endpoint + * @return $this Fluent Builder + */ + public function setEndpoint($endpoint) { + $this->options['endpoint'] = $endpoint; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.CreateUserBindingOptions ' . implode(' ', $options) . ']'; + } +} + +class ReadUserBindingOptions extends Options { + /** + * @param \DateTime $startDate The start_date + * @param \DateTime $endDate The end_date + * @param string $tag The tag + */ + public function __construct($startDate = Values::NONE, $endDate = Values::NONE, $tag = Values::NONE) { + $this->options['startDate'] = $startDate; + $this->options['endDate'] = $endDate; + $this->options['tag'] = $tag; + } + + /** + * The start_date + * + * @param \DateTime $startDate The start_date + * @return $this Fluent Builder + */ + public function setStartDate($startDate) { + $this->options['startDate'] = $startDate; + return $this; + } + + /** + * The end_date + * + * @param \DateTime $endDate The end_date + * @return $this Fluent Builder + */ + public function setEndDate($endDate) { + $this->options['endDate'] = $endDate; + return $this; + } + + /** + * The tag + * + * @param string $tag The tag + * @return $this Fluent Builder + */ + public function setTag($tag) { + $this->options['tag'] = $tag; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.ReadUserBindingOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingPage.php new file mode 100644 index 00000000..4b43b48f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/User/UserBindingPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new UserBindingInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['identity'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.UserBindingPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserContext.php new file mode 100644 index 00000000..a76ad374 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserContext.php @@ -0,0 +1,161 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Users/' . rawurlencode($identity) . ''; + } + + /** + * Deletes the UserInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Fetch a UserInstance + * + * @return UserInstance Fetched UserInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new UserInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['identity'] + ); + } + + /** + * Access the bindings + * + * @return \Twilio\Rest\Notify\V1\Service\User\UserBindingList + */ + protected function getBindings() { + if (!$this->_bindings) { + $this->_bindings = new UserBindingList( + $this->version, + $this->solution['serviceSid'], + $this->solution['identity'] + ); + } + + return $this->_bindings; + } + + /** + * Access the segmentMemberships + * + * @return \Twilio\Rest\Notify\V1\Service\User\SegmentMembershipList + */ + protected function getSegmentMemberships() { + if (!$this->_segmentMemberships) { + $this->_segmentMemberships = new SegmentMembershipList( + $this->version, + $this->solution['serviceSid'], + $this->solution['identity'] + ); + } + + return $this->_segmentMemberships; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.UserContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserInstance.php new file mode 100644 index 00000000..2fa2f5aa --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserInstance.php @@ -0,0 +1,153 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'identity' => Values::array_get($payload, 'identity'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'segments' => Values::array_get($payload, 'segments'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'identity' => $identity ?: $this->properties['identity'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Notify\V1\Service\UserContext Context for this + * UserInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new UserContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['identity'] + ); + } + + return $this->context; + } + + /** + * Deletes the UserInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Fetch a UserInstance + * + * @return UserInstance Fetched UserInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Access the bindings + * + * @return \Twilio\Rest\Notify\V1\Service\User\UserBindingList + */ + protected function getBindings() { + return $this->proxy()->bindings; + } + + /** + * Access the segmentMemberships + * + * @return \Twilio\Rest\Notify\V1\Service\User\SegmentMembershipList + */ + protected function getSegmentMemberships() { + return $this->proxy()->segmentMemberships; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.UserInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserList.php new file mode 100644 index 00000000..126f3ba8 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserList.php @@ -0,0 +1,182 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Users'; + } + + /** + * Create a new UserInstance + * + * @param string $identity The identity + * @param array|Options $options Optional Arguments + * @return UserInstance Newly created UserInstance + */ + public function create($identity, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Identity' => $identity, + 'Segment' => $options['segment'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new UserInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams UserInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads UserInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return UserInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of UserInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of UserInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Identity' => $options['identity'], + 'Segment' => $options['segment'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new UserPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of UserInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of UserInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new UserPage($this->version, $response, $this->solution); + } + + /** + * Constructs a UserContext + * + * @param string $identity The identity + * @return \Twilio\Rest\Notify\V1\Service\UserContext + */ + public function getContext($identity) { + return new UserContext( + $this->version, + $this->solution['serviceSid'], + $identity + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.UserList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserOptions.php new file mode 100644 index 00000000..4212f32d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserOptions.php @@ -0,0 +1,118 @@ +options['segment'] = $segment; + } + + /** + * The segment + * + * @param string $segment The segment + * @return $this Fluent Builder + */ + public function setSegment($segment) { + $this->options['segment'] = $segment; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.CreateUserOptions ' . implode(' ', $options) . ']'; + } +} + +class ReadUserOptions extends Options { + /** + * @param string $identity The identity + * @param string $segment The segment + */ + public function __construct($identity = Values::NONE, $segment = Values::NONE) { + $this->options['identity'] = $identity; + $this->options['segment'] = $segment; + } + + /** + * The identity + * + * @param string $identity The identity + * @return $this Fluent Builder + */ + public function setIdentity($identity) { + $this->options['identity'] = $identity; + return $this; + } + + /** + * The segment + * + * @param string $segment The segment + * @return $this Fluent Builder + */ + public function setSegment($segment) { + $this->options['segment'] = $segment; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.ReadUserOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserPage.php new file mode 100644 index 00000000..432f5f71 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/Service/UserPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new UserInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.UserPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceContext.php new file mode 100644 index 00000000..73736da9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceContext.php @@ -0,0 +1,234 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($sid) . ''; + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'ApnCredentialSid' => $options['apnCredentialSid'], + 'GcmCredentialSid' => $options['gcmCredentialSid'], + 'MessagingServiceSid' => $options['messagingServiceSid'], + 'FacebookMessengerPageId' => $options['facebookMessengerPageId'], + 'DefaultApnNotificationProtocolVersion' => $options['defaultApnNotificationProtocolVersion'], + 'DefaultGcmNotificationProtocolVersion' => $options['defaultGcmNotificationProtocolVersion'], + 'FcmCredentialSid' => $options['fcmCredentialSid'], + 'DefaultFcmNotificationProtocolVersion' => $options['defaultFcmNotificationProtocolVersion'], + 'LogEnabled' => Serialize::booleanToString($options['logEnabled']), + 'AlexaSkillId' => $options['alexaSkillId'], + 'DefaultAlexaNotificationProtocolVersion' => $options['defaultAlexaNotificationProtocolVersion'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Access the bindings + * + * @return \Twilio\Rest\Notify\V1\Service\BindingList + */ + protected function getBindings() { + if (!$this->_bindings) { + $this->_bindings = new BindingList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_bindings; + } + + /** + * Access the notifications + * + * @return \Twilio\Rest\Notify\V1\Service\NotificationList + */ + protected function getNotifications() { + if (!$this->_notifications) { + $this->_notifications = new NotificationList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_notifications; + } + + /** + * Access the users + * + * @return \Twilio\Rest\Notify\V1\Service\UserList + */ + protected function getUsers() { + if (!$this->_users) { + $this->_users = new UserList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_users; + } + + /** + * Access the segments + * + * @return \Twilio\Rest\Notify\V1\Service\SegmentList + */ + protected function getSegments() { + if (!$this->_segments) { + $this->_segments = new SegmentList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_segments; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.ServiceContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceInstance.php new file mode 100644 index 00000000..6563e9dd --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceInstance.php @@ -0,0 +1,201 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'apnCredentialSid' => Values::array_get($payload, 'apn_credential_sid'), + 'gcmCredentialSid' => Values::array_get($payload, 'gcm_credential_sid'), + 'fcmCredentialSid' => Values::array_get($payload, 'fcm_credential_sid'), + 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), + 'facebookMessengerPageId' => Values::array_get($payload, 'facebook_messenger_page_id'), + 'defaultApnNotificationProtocolVersion' => Values::array_get($payload, 'default_apn_notification_protocol_version'), + 'defaultGcmNotificationProtocolVersion' => Values::array_get($payload, 'default_gcm_notification_protocol_version'), + 'defaultFcmNotificationProtocolVersion' => Values::array_get($payload, 'default_fcm_notification_protocol_version'), + 'logEnabled' => Values::array_get($payload, 'log_enabled'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + 'alexaSkillId' => Values::array_get($payload, 'alexa_skill_id'), + 'defaultAlexaNotificationProtocolVersion' => Values::array_get($payload, 'default_alexa_notification_protocol_version'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Notify\V1\ServiceContext Context for this + * ServiceInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ServiceContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the bindings + * + * @return \Twilio\Rest\Notify\V1\Service\BindingList + */ + protected function getBindings() { + return $this->proxy()->bindings; + } + + /** + * Access the notifications + * + * @return \Twilio\Rest\Notify\V1\Service\NotificationList + */ + protected function getNotifications() { + return $this->proxy()->notifications; + } + + /** + * Access the users + * + * @return \Twilio\Rest\Notify\V1\Service\UserList + */ + protected function getUsers() { + return $this->proxy()->users; + } + + /** + * Access the segments + * + * @return \Twilio\Rest\Notify\V1\Service\SegmentList + */ + protected function getSegments() { + return $this->proxy()->segments; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Notify.V1.ServiceInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceList.php new file mode 100644 index 00000000..f02ba347 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceList.php @@ -0,0 +1,186 @@ +solution = array(); + + $this->uri = '/Services'; + } + + /** + * Create a new ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Newly created ServiceInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'ApnCredentialSid' => $options['apnCredentialSid'], + 'GcmCredentialSid' => $options['gcmCredentialSid'], + 'MessagingServiceSid' => $options['messagingServiceSid'], + 'FacebookMessengerPageId' => $options['facebookMessengerPageId'], + 'DefaultApnNotificationProtocolVersion' => $options['defaultApnNotificationProtocolVersion'], + 'DefaultGcmNotificationProtocolVersion' => $options['defaultGcmNotificationProtocolVersion'], + 'FcmCredentialSid' => $options['fcmCredentialSid'], + 'DefaultFcmNotificationProtocolVersion' => $options['defaultFcmNotificationProtocolVersion'], + 'LogEnabled' => Serialize::booleanToString($options['logEnabled']), + 'AlexaSkillId' => $options['alexaSkillId'], + 'DefaultAlexaNotificationProtocolVersion' => $options['defaultAlexaNotificationProtocolVersion'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Streams ServiceInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads ServiceInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return ServiceInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of ServiceInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of ServiceInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Constructs a ServiceContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Notify\V1\ServiceContext + */ + public function getContext($sid) { + return new ServiceContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.ServiceList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceOptions.php new file mode 100644 index 00000000..a38f06b2 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServiceOptions.php @@ -0,0 +1,479 @@ +options['friendlyName'] = $friendlyName; + $this->options['apnCredentialSid'] = $apnCredentialSid; + $this->options['gcmCredentialSid'] = $gcmCredentialSid; + $this->options['messagingServiceSid'] = $messagingServiceSid; + $this->options['facebookMessengerPageId'] = $facebookMessengerPageId; + $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion; + $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion; + $this->options['fcmCredentialSid'] = $fcmCredentialSid; + $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion; + $this->options['logEnabled'] = $logEnabled; + $this->options['alexaSkillId'] = $alexaSkillId; + $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The apn_credential_sid + * + * @param string $apnCredentialSid The apn_credential_sid + * @return $this Fluent Builder + */ + public function setApnCredentialSid($apnCredentialSid) { + $this->options['apnCredentialSid'] = $apnCredentialSid; + return $this; + } + + /** + * The gcm_credential_sid + * + * @param string $gcmCredentialSid The gcm_credential_sid + * @return $this Fluent Builder + */ + public function setGcmCredentialSid($gcmCredentialSid) { + $this->options['gcmCredentialSid'] = $gcmCredentialSid; + return $this; + } + + /** + * The messaging_service_sid + * + * @param string $messagingServiceSid The messaging_service_sid + * @return $this Fluent Builder + */ + public function setMessagingServiceSid($messagingServiceSid) { + $this->options['messagingServiceSid'] = $messagingServiceSid; + return $this; + } + + /** + * The facebook_messenger_page_id + * + * @param string $facebookMessengerPageId The facebook_messenger_page_id + * @return $this Fluent Builder + */ + public function setFacebookMessengerPageId($facebookMessengerPageId) { + $this->options['facebookMessengerPageId'] = $facebookMessengerPageId; + return $this; + } + + /** + * The default_apn_notification_protocol_version + * + * @param string $defaultApnNotificationProtocolVersion The + * default_apn_notification_protocol_version + * @return $this Fluent Builder + */ + public function setDefaultApnNotificationProtocolVersion($defaultApnNotificationProtocolVersion) { + $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion; + return $this; + } + + /** + * The default_gcm_notification_protocol_version + * + * @param string $defaultGcmNotificationProtocolVersion The + * default_gcm_notification_protocol_version + * @return $this Fluent Builder + */ + public function setDefaultGcmNotificationProtocolVersion($defaultGcmNotificationProtocolVersion) { + $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion; + return $this; + } + + /** + * The fcm_credential_sid + * + * @param string $fcmCredentialSid The fcm_credential_sid + * @return $this Fluent Builder + */ + public function setFcmCredentialSid($fcmCredentialSid) { + $this->options['fcmCredentialSid'] = $fcmCredentialSid; + return $this; + } + + /** + * The default_fcm_notification_protocol_version + * + * @param string $defaultFcmNotificationProtocolVersion The + * default_fcm_notification_protocol_version + * @return $this Fluent Builder + */ + public function setDefaultFcmNotificationProtocolVersion($defaultFcmNotificationProtocolVersion) { + $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion; + return $this; + } + + /** + * The log_enabled + * + * @param boolean $logEnabled The log_enabled + * @return $this Fluent Builder + */ + public function setLogEnabled($logEnabled) { + $this->options['logEnabled'] = $logEnabled; + return $this; + } + + /** + * The alexa_skill_id + * + * @param string $alexaSkillId The alexa_skill_id + * @return $this Fluent Builder + */ + public function setAlexaSkillId($alexaSkillId) { + $this->options['alexaSkillId'] = $alexaSkillId; + return $this; + } + + /** + * The default_alexa_notification_protocol_version + * + * @param string $defaultAlexaNotificationProtocolVersion The + * default_alexa_notification_protocol_version + * @return $this Fluent Builder + */ + public function setDefaultAlexaNotificationProtocolVersion($defaultAlexaNotificationProtocolVersion) { + $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.CreateServiceOptions ' . implode(' ', $options) . ']'; + } +} + +class ReadServiceOptions extends Options { + /** + * @param string $friendlyName The friendly_name + */ + public function __construct($friendlyName = Values::NONE) { + $this->options['friendlyName'] = $friendlyName; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.ReadServiceOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateServiceOptions extends Options { + /** + * @param string $friendlyName The friendly_name + * @param string $apnCredentialSid The apn_credential_sid + * @param string $gcmCredentialSid The gcm_credential_sid + * @param string $messagingServiceSid The messaging_service_sid + * @param string $facebookMessengerPageId The facebook_messenger_page_id + * @param string $defaultApnNotificationProtocolVersion The + * default_apn_notification_protocol_version + * @param string $defaultGcmNotificationProtocolVersion The + * default_gcm_notification_protocol_version + * @param string $fcmCredentialSid The fcm_credential_sid + * @param string $defaultFcmNotificationProtocolVersion The + * default_fcm_notification_protocol_version + * @param boolean $logEnabled The log_enabled + * @param string $alexaSkillId The alexa_skill_id + * @param string $defaultAlexaNotificationProtocolVersion The + * default_alexa_notification_protocol_version + */ + public function __construct($friendlyName = Values::NONE, $apnCredentialSid = Values::NONE, $gcmCredentialSid = Values::NONE, $messagingServiceSid = Values::NONE, $facebookMessengerPageId = Values::NONE, $defaultApnNotificationProtocolVersion = Values::NONE, $defaultGcmNotificationProtocolVersion = Values::NONE, $fcmCredentialSid = Values::NONE, $defaultFcmNotificationProtocolVersion = Values::NONE, $logEnabled = Values::NONE, $alexaSkillId = Values::NONE, $defaultAlexaNotificationProtocolVersion = Values::NONE) { + $this->options['friendlyName'] = $friendlyName; + $this->options['apnCredentialSid'] = $apnCredentialSid; + $this->options['gcmCredentialSid'] = $gcmCredentialSid; + $this->options['messagingServiceSid'] = $messagingServiceSid; + $this->options['facebookMessengerPageId'] = $facebookMessengerPageId; + $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion; + $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion; + $this->options['fcmCredentialSid'] = $fcmCredentialSid; + $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion; + $this->options['logEnabled'] = $logEnabled; + $this->options['alexaSkillId'] = $alexaSkillId; + $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The apn_credential_sid + * + * @param string $apnCredentialSid The apn_credential_sid + * @return $this Fluent Builder + */ + public function setApnCredentialSid($apnCredentialSid) { + $this->options['apnCredentialSid'] = $apnCredentialSid; + return $this; + } + + /** + * The gcm_credential_sid + * + * @param string $gcmCredentialSid The gcm_credential_sid + * @return $this Fluent Builder + */ + public function setGcmCredentialSid($gcmCredentialSid) { + $this->options['gcmCredentialSid'] = $gcmCredentialSid; + return $this; + } + + /** + * The messaging_service_sid + * + * @param string $messagingServiceSid The messaging_service_sid + * @return $this Fluent Builder + */ + public function setMessagingServiceSid($messagingServiceSid) { + $this->options['messagingServiceSid'] = $messagingServiceSid; + return $this; + } + + /** + * The facebook_messenger_page_id + * + * @param string $facebookMessengerPageId The facebook_messenger_page_id + * @return $this Fluent Builder + */ + public function setFacebookMessengerPageId($facebookMessengerPageId) { + $this->options['facebookMessengerPageId'] = $facebookMessengerPageId; + return $this; + } + + /** + * The default_apn_notification_protocol_version + * + * @param string $defaultApnNotificationProtocolVersion The + * default_apn_notification_protocol_version + * @return $this Fluent Builder + */ + public function setDefaultApnNotificationProtocolVersion($defaultApnNotificationProtocolVersion) { + $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion; + return $this; + } + + /** + * The default_gcm_notification_protocol_version + * + * @param string $defaultGcmNotificationProtocolVersion The + * default_gcm_notification_protocol_version + * @return $this Fluent Builder + */ + public function setDefaultGcmNotificationProtocolVersion($defaultGcmNotificationProtocolVersion) { + $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion; + return $this; + } + + /** + * The fcm_credential_sid + * + * @param string $fcmCredentialSid The fcm_credential_sid + * @return $this Fluent Builder + */ + public function setFcmCredentialSid($fcmCredentialSid) { + $this->options['fcmCredentialSid'] = $fcmCredentialSid; + return $this; + } + + /** + * The default_fcm_notification_protocol_version + * + * @param string $defaultFcmNotificationProtocolVersion The + * default_fcm_notification_protocol_version + * @return $this Fluent Builder + */ + public function setDefaultFcmNotificationProtocolVersion($defaultFcmNotificationProtocolVersion) { + $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion; + return $this; + } + + /** + * The log_enabled + * + * @param boolean $logEnabled The log_enabled + * @return $this Fluent Builder + */ + public function setLogEnabled($logEnabled) { + $this->options['logEnabled'] = $logEnabled; + return $this; + } + + /** + * The alexa_skill_id + * + * @param string $alexaSkillId The alexa_skill_id + * @return $this Fluent Builder + */ + public function setAlexaSkillId($alexaSkillId) { + $this->options['alexaSkillId'] = $alexaSkillId; + return $this; + } + + /** + * The default_alexa_notification_protocol_version + * + * @param string $defaultAlexaNotificationProtocolVersion The + * default_alexa_notification_protocol_version + * @return $this Fluent Builder + */ + public function setDefaultAlexaNotificationProtocolVersion($defaultAlexaNotificationProtocolVersion) { + $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Notify.V1.UpdateServiceOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServicePage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServicePage.php new file mode 100644 index 00000000..2639de77 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Notify/V1/ServicePage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Notify.V1.ServicePage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview.php new file mode 100644 index 00000000..b835aa8e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview.php @@ -0,0 +1,304 @@ +baseUrl = 'https://preview.twilio.com'; + } + + /** + * @return \Twilio\Rest\Preview\Sync Version sync of preview + */ + protected function getSync() { + if (!$this->_sync) { + $this->_sync = new Sync($this); + } + return $this->_sync; + } + + /** + * @return \Twilio\Rest\Preview\Wireless Version wireless of preview + */ + protected function getWireless() { + if (!$this->_wireless) { + $this->_wireless = new Wireless($this); + } + return $this->_wireless; + } + + /** + * @return \Twilio\Rest\Preview\Marketplace Version marketplace of preview + */ + protected function getMarketplace() { + if (!$this->_marketplace) { + $this->_marketplace = new Marketplace($this); + } + return $this->_marketplace; + } + + /** + * @return \Twilio\Rest\Preview\BulkExports Version bulkExports of preview + */ + protected function getBulkExports() { + if (!$this->_bulkExports) { + $this->_bulkExports = new BulkExports($this); + } + return $this->_bulkExports; + } + + /** + * @return \Twilio\Rest\Preview\Proxy Version proxy of preview + */ + protected function getProxy() { + if (!$this->_proxy) { + $this->_proxy = new Proxy($this); + } + return $this->_proxy; + } + + /** + * @return \Twilio\Rest\Preview\HostedNumbers Version hostedNumbers of preview + */ + protected function getHostedNumbers() { + if (!$this->_hostedNumbers) { + $this->_hostedNumbers = new HostedNumbers($this); + } + return $this->_hostedNumbers; + } + + /** + * Magic getter to lazy load version + * + * @param string $name Version to return + * @return \Twilio\Version The requested version + * @throws \Twilio\Exceptions\TwilioException For unknown versions + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown version ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $method = 'context' . ucfirst($name); + if (method_exists($this, $method)) { + return call_user_func_array(array($this, $method), $arguments); + } + + throw new TwilioException('Unknown context ' . $name); + } + + /** + * @return \Twilio\Rest\Preview\Proxy\ServiceList + */ + protected function getServices() { + return $this->proxy->services; + } + + /** + * @param string $sid A string that uniquely identifies this Service. + * @return \Twilio\Rest\Preview\Proxy\ServiceContext + */ + protected function contextServices($sid) { + return $this->proxy->services($sid); + } + + /** + * @return \Twilio\Rest\Preview\Wireless\CommandList + */ + protected function getCommands() { + return $this->wireless->commands; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Wireless\CommandContext + */ + protected function contextCommands($sid) { + return $this->wireless->commands($sid); + } + + /** + * @return \Twilio\Rest\Preview\Wireless\RatePlanList + */ + protected function getRatePlans() { + return $this->wireless->ratePlans; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Wireless\RatePlanContext + */ + protected function contextRatePlans($sid) { + return $this->wireless->ratePlans($sid); + } + + /** + * @return \Twilio\Rest\Preview\Wireless\SimList + */ + protected function getSims() { + return $this->wireless->sims; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Wireless\SimContext + */ + protected function contextSims($sid) { + return $this->wireless->sims($sid); + } + + /** + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnList + */ + protected function getAvailableAddOns() { + return $this->marketplace->availableAddOns; + } + + /** + * @param string $sid The unique Available Add-on Sid + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext + */ + protected function contextAvailableAddOns($sid) { + return $this->marketplace->availableAddOns($sid); + } + + /** + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnList + */ + protected function getInstalledAddOns() { + return $this->marketplace->installedAddOns; + } + + /** + * @param string $sid The unique Installed Add-on Sid + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext + */ + protected function contextInstalledAddOns($sid) { + return $this->marketplace->installedAddOns($sid); + } + + /** + * @return \Twilio\Rest\Preview\BulkExports\ExportList + */ + protected function getExports() { + return $this->bulkExports->exports; + } + + /** + * @param string $resourceType The resource_type + * @return \Twilio\Rest\Preview\BulkExports\ExportContext + */ + protected function contextExports($resourceType) { + return $this->bulkExports->exports($resourceType); + } + + /** + * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationList + */ + protected function getExportConfiguration() { + return $this->bulkExports->exportConfiguration; + } + + /** + * @param string $resourceType The resource_type + * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationContext + */ + protected function contextExportConfiguration($resourceType) { + return $this->bulkExports->exportConfiguration($resourceType); + } + + /** + * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderList + */ + protected function getHostedNumberOrders() { + return $this->hostedNumbers->hostedNumberOrders; + } + + /** + * @param string $sid HostedNumberOrder sid. + * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext + */ + protected function contextHostedNumberOrders($sid) { + return $this->hostedNumbers->hostedNumberOrders($sid); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports.php new file mode 100644 index 00000000..599627d5 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports.php @@ -0,0 +1,100 @@ +version = 'BulkExports'; + } + + /** + * @return \Twilio\Rest\Preview\BulkExports\ExportList + */ + protected function getExports() { + if (!$this->_exports) { + $this->_exports = new ExportList($this); + } + return $this->_exports; + } + + /** + * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationList + */ + protected function getExportConfiguration() { + if (!$this->_exportConfiguration) { + $this->_exportConfiguration = new ExportConfigurationList($this); + } + return $this->_exportConfiguration; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.BulkExports]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayInstance.php new file mode 100644 index 00000000..fc9736af --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayInstance.php @@ -0,0 +1,78 @@ +properties = array( + 'redirectTo' => Values::array_get($payload, 'redirect_to'), + 'day' => Values::array_get($payload, 'day'), + 'size' => Values::array_get($payload, 'size'), + 'resourceType' => Values::array_get($payload, 'resource_type'), + ); + + $this->solution = array( + 'resourceType' => $resourceType, + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.BulkExports.DayInstance]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayList.php new file mode 100644 index 00000000..9283ba0c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayList.php @@ -0,0 +1,132 @@ +solution = array( + 'resourceType' => $resourceType, + ); + + $this->uri = '/Exports/' . rawurlencode($resourceType) . '/Days'; + } + + /** + * Streams DayInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads DayInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return DayInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of DayInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of DayInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new DayPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of DayInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of DayInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new DayPage($this->version, $response, $this->solution); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.BulkExports.DayList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayPage.php new file mode 100644 index 00000000..3e30d7e8 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/Export/DayPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new DayInstance( + $this->version, + $payload, + $this->solution['resourceType'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.BulkExports.DayPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationContext.php new file mode 100644 index 00000000..e3715c0e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationContext.php @@ -0,0 +1,103 @@ +solution = array( + 'resourceType' => $resourceType, + ); + + $this->uri = '/Exports/' . rawurlencode($resourceType) . '/Configuration'; + } + + /** + * Fetch a ExportConfigurationInstance + * + * @return ExportConfigurationInstance Fetched ExportConfigurationInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ExportConfigurationInstance( + $this->version, + $payload, + $this->solution['resourceType'] + ); + } + + /** + * Update the ExportConfigurationInstance + * + * @param array|Options $options Optional Arguments + * @return ExportConfigurationInstance Updated ExportConfigurationInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Enabled' => Serialize::booleanToString($options['enabled']), + 'WebhookUrl' => $options['webhookUrl'], + 'WebhookMethod' => $options['webhookMethod'], + 'Email' => $options['email'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new ExportConfigurationInstance( + $this->version, + $payload, + $this->solution['resourceType'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.BulkExports.ExportConfigurationContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationInstance.php new file mode 100644 index 00000000..e3a20cbc --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationInstance.php @@ -0,0 +1,127 @@ +properties = array( + 'enabled' => Values::array_get($payload, 'enabled'), + 'webhookUrl' => Values::array_get($payload, 'webhook_url'), + 'webhookMethod' => Values::array_get($payload, 'webhook_method'), + 'email' => Values::array_get($payload, 'email'), + 'resourceType' => Values::array_get($payload, 'resource_type'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'resourceType' => $resourceType ?: $this->properties['resourceType'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationContext Context + * for this + * ExportConfigurationInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ExportConfigurationContext( + $this->version, + $this->solution['resourceType'] + ); + } + + return $this->context; + } + + /** + * Fetch a ExportConfigurationInstance + * + * @return ExportConfigurationInstance Fetched ExportConfigurationInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the ExportConfigurationInstance + * + * @param array|Options $options Optional Arguments + * @return ExportConfigurationInstance Updated ExportConfigurationInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.BulkExports.ExportConfigurationInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationList.php new file mode 100644 index 00000000..e100a8d0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationList.php @@ -0,0 +1,53 @@ +solution = array(); + } + + /** + * Constructs a ExportConfigurationContext + * + * @param string $resourceType The resource_type + * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationContext + */ + public function getContext($resourceType) { + return new ExportConfigurationContext( + $this->version, + $resourceType + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.BulkExports.ExportConfigurationList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationOptions.php new file mode 100644 index 00000000..71ae8a96 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationOptions.php @@ -0,0 +1,103 @@ +options['enabled'] = $enabled; + $this->options['webhookUrl'] = $webhookUrl; + $this->options['webhookMethod'] = $webhookMethod; + $this->options['email'] = $email; + } + + /** + * The enabled + * + * @param boolean $enabled The enabled + * @return $this Fluent Builder + */ + public function setEnabled($enabled) { + $this->options['enabled'] = $enabled; + return $this; + } + + /** + * The webhook_url + * + * @param string $webhookUrl The webhook_url + * @return $this Fluent Builder + */ + public function setWebhookUrl($webhookUrl) { + $this->options['webhookUrl'] = $webhookUrl; + return $this; + } + + /** + * The webhook_method + * + * @param string $webhookMethod The webhook_method + * @return $this Fluent Builder + */ + public function setWebhookMethod($webhookMethod) { + $this->options['webhookMethod'] = $webhookMethod; + return $this; + } + + /** + * The email + * + * @param string $email The email + * @return $this Fluent Builder + */ + public function setEmail($email) { + $this->options['email'] = $email; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.BulkExports.UpdateExportConfigurationOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationPage.php new file mode 100644 index 00000000..f218dfa0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportConfigurationPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ExportConfigurationInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.BulkExports.ExportConfigurationPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportContext.php new file mode 100644 index 00000000..ff21a59c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportContext.php @@ -0,0 +1,126 @@ +solution = array( + 'resourceType' => $resourceType, + ); + + $this->uri = '/Exports/' . rawurlencode($resourceType) . ''; + } + + /** + * Fetch a ExportInstance + * + * @return ExportInstance Fetched ExportInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ExportInstance( + $this->version, + $payload, + $this->solution['resourceType'] + ); + } + + /** + * Access the days + * + * @return \Twilio\Rest\Preview\BulkExports\Export\DayList + */ + protected function getDays() { + if (!$this->_days) { + $this->_days = new DayList( + $this->version, + $this->solution['resourceType'] + ); + } + + return $this->_days; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.BulkExports.ExportContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportInstance.php new file mode 100644 index 00000000..72dc8d9f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportInstance.php @@ -0,0 +1,118 @@ +properties = array( + 'resourceType' => Values::array_get($payload, 'resource_type'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'resourceType' => $resourceType ?: $this->properties['resourceType'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\BulkExports\ExportContext Context for this + * ExportInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ExportContext( + $this->version, + $this->solution['resourceType'] + ); + } + + return $this->context; + } + + /** + * Fetch a ExportInstance + * + * @return ExportInstance Fetched ExportInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Access the days + * + * @return \Twilio\Rest\Preview\BulkExports\Export\DayList + */ + protected function getDays() { + return $this->proxy()->days; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.BulkExports.ExportInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportList.php new file mode 100644 index 00000000..536f8058 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportList.php @@ -0,0 +1,53 @@ +solution = array(); + } + + /** + * Constructs a ExportContext + * + * @param string $resourceType The resource_type + * @return \Twilio\Rest\Preview\BulkExports\ExportContext + */ + public function getContext($resourceType) { + return new ExportContext( + $this->version, + $resourceType + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.BulkExports.ExportList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportPage.php new file mode 100644 index 00000000..dbb8971e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/BulkExports/ExportPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ExportInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.BulkExports.ExportPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers.php new file mode 100644 index 00000000..22e56f7d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers.php @@ -0,0 +1,86 @@ +version = 'HostedNumbers'; + } + + /** + * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderList + */ + protected function getHostedNumberOrders() { + if (!$this->_hostedNumberOrders) { + $this->_hostedNumberOrders = new HostedNumberOrderList($this); + } + return $this->_hostedNumberOrders; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.HostedNumbers]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.php new file mode 100644 index 00000000..caa9ccfe --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.php @@ -0,0 +1,113 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/HostedNumberOrders/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a HostedNumberOrderInstance + * + * @return HostedNumberOrderInstance Fetched HostedNumberOrderInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new HostedNumberOrderInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the HostedNumberOrderInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the HostedNumberOrderInstance + * + * @param array|Options $options Optional Arguments + * @return HostedNumberOrderInstance Updated HostedNumberOrderInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'UniqueName' => $options['uniqueName'], + 'Email' => $options['email'], + 'CcEmails' => $options['ccEmails'], + 'Status' => $options['status'], + 'VerificationCode' => $options['verificationCode'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new HostedNumberOrderInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.HostedNumbers.HostedNumberOrderContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.php new file mode 100644 index 00000000..b21104c0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.php @@ -0,0 +1,157 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'incomingPhoneNumberSid' => Values::array_get($payload, 'incoming_phone_number_sid'), + 'addressSid' => Values::array_get($payload, 'address_sid'), + 'signingDocumentSid' => Values::array_get($payload, 'signing_document_sid'), + 'phoneNumber' => Values::array_get($payload, 'phone_number'), + 'capabilities' => Values::array_get($payload, 'capabilities'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'status' => Values::array_get($payload, 'status'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'verificationAttempts' => Values::array_get($payload, 'verification_attempts'), + 'email' => Values::array_get($payload, 'email'), + 'ccEmails' => Values::array_get($payload, 'cc_emails'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext Context + * for this + * HostedNumberOrderInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new HostedNumberOrderContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a HostedNumberOrderInstance + * + * @return HostedNumberOrderInstance Fetched HostedNumberOrderInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the HostedNumberOrderInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the HostedNumberOrderInstance + * + * @param array|Options $options Optional Arguments + * @return HostedNumberOrderInstance Updated HostedNumberOrderInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.HostedNumbers.HostedNumberOrderInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php new file mode 100644 index 00000000..d0d55f8b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php @@ -0,0 +1,199 @@ +solution = array(); + + $this->uri = '/HostedNumberOrders'; + } + + /** + * Streams HostedNumberOrderInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads HostedNumberOrderInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return HostedNumberOrderInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of HostedNumberOrderInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of HostedNumberOrderInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Status' => $options['status'], + 'PhoneNumber' => $options['phoneNumber'], + 'IncomingPhoneNumberSid' => $options['incomingPhoneNumberSid'], + 'FriendlyName' => $options['friendlyName'], + 'UniqueName' => $options['uniqueName'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new HostedNumberOrderPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of HostedNumberOrderInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of HostedNumberOrderInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new HostedNumberOrderPage($this->version, $response, $this->solution); + } + + /** + * Create a new HostedNumberOrderInstance + * + * @param string $addressSid Address sid. + * @param string $phoneNumber An E164 formatted phone number. + * @param string $isoCountry ISO country code. + * @param boolean $smsCapability Specify SMS capability to host. + * @param string $email Email. + * @param array|Options $options Optional Arguments + * @return HostedNumberOrderInstance Newly created HostedNumberOrderInstance + */ + public function create($addressSid, $phoneNumber, $isoCountry, $smsCapability, $email, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'AddressSid' => $addressSid, + 'PhoneNumber' => $phoneNumber, + 'IsoCountry' => $isoCountry, + 'SmsCapability' => Serialize::booleanToString($smsCapability), + 'Email' => $email, + 'AccountSid' => $options['accountSid'], + 'FriendlyName' => $options['friendlyName'], + 'UniqueName' => $options['uniqueName'], + 'CcEmails' => $options['ccEmails'], + 'SmsUrl' => $options['smsUrl'], + 'SmsMethod' => $options['smsMethod'], + 'SmsFallbackUrl' => $options['smsFallbackUrl'], + 'SmsFallbackMethod' => $options['smsFallbackMethod'], + 'StatusCallbackUrl' => $options['statusCallbackUrl'], + 'StatusCallbackMethod' => $options['statusCallbackMethod'], + 'SmsApplicationSid' => $options['smsApplicationSid'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new HostedNumberOrderInstance( + $this->version, + $payload + ); + } + + /** + * Constructs a HostedNumberOrderContext + * + * @param string $sid HostedNumberOrder sid. + * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext + */ + public function getContext($sid) { + return new HostedNumberOrderContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.HostedNumbers.HostedNumberOrderList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.php new file mode 100644 index 00000000..f602e3eb --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.php @@ -0,0 +1,422 @@ +options['friendlyName'] = $friendlyName; + $this->options['uniqueName'] = $uniqueName; + $this->options['email'] = $email; + $this->options['ccEmails'] = $ccEmails; + $this->options['status'] = $status; + $this->options['verificationCode'] = $verificationCode; + } + + /** + * A human readable description of this resource, up to 64 characters. + * + * @param string $friendlyName A human readable description of this resource. + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + * + * @param string $uniqueName A unique, developer assigned name of this + * HostedNumberOrder. + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Email of the owner of this phone number that is being hosted. + * + * @param string $email Email. + * @return $this Fluent Builder + */ + public function setEmail($email) { + $this->options['email'] = $email; + return $this; + } + + /** + * Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. + * + * @param string $ccEmails A list of emails. + * @return $this Fluent Builder + */ + public function setCcEmails($ccEmails) { + $this->options['ccEmails'] = $ccEmails; + return $this; + } + + /** + * The Status of this HostedNumberOrder. User can only update this to `pending-loa` or `pending-verification`. + * + * @param string $status The Status of this HostedNumberOrder. + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * A verification code that is given to the user via a phone call to the phone number that is being hosted. + * + * @param string $verificationCode A verification code. + * @return $this Fluent Builder + */ + public function setVerificationCode($verificationCode) { + $this->options['verificationCode'] = $verificationCode; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.HostedNumbers.UpdateHostedNumberOrderOptions ' . implode(' ', $options) . ']'; + } +} + +class ReadHostedNumberOrderOptions extends Options { + /** + * @param string $status The Status of this HostedNumberOrder. + * @param string $phoneNumber An E164 formatted phone number. + * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid. + * @param string $friendlyName A human readable description of this resource. + * @param string $uniqueName A unique, developer assigned name of this + * HostedNumberOrder. + */ + public function __construct($status = Values::NONE, $phoneNumber = Values::NONE, $incomingPhoneNumberSid = Values::NONE, $friendlyName = Values::NONE, $uniqueName = Values::NONE) { + $this->options['status'] = $status; + $this->options['phoneNumber'] = $phoneNumber; + $this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid; + $this->options['friendlyName'] = $friendlyName; + $this->options['uniqueName'] = $uniqueName; + } + + /** + * The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`. + * + * @param string $status The Status of this HostedNumberOrder. + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * An E164 formatted phone number hosted by this HostedNumberOrder. + * + * @param string $phoneNumber An E164 formatted phone number. + * @return $this Fluent Builder + */ + public function setPhoneNumber($phoneNumber) { + $this->options['phoneNumber'] = $phoneNumber; + return $this; + } + + /** + * A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. + * + * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid. + * @return $this Fluent Builder + */ + public function setIncomingPhoneNumberSid($incomingPhoneNumberSid) { + $this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid; + return $this; + } + + /** + * A human readable description of this resource, up to 64 characters. + * + * @param string $friendlyName A human readable description of this resource. + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + * + * @param string $uniqueName A unique, developer assigned name of this + * HostedNumberOrder. + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.HostedNumbers.ReadHostedNumberOrderOptions ' . implode(' ', $options) . ']'; + } +} + +class CreateHostedNumberOrderOptions extends Options { + /** + * @param string $accountSid Account Sid. + * @param string $friendlyName A human readable description of this resource. + * @param string $uniqueName A unique, developer assigned name of this + * HostedNumberOrder. + * @param string $ccEmails A list of emails. + * @param string $smsUrl SMS URL. + * @param string $smsMethod SMS Method. + * @param string $smsFallbackUrl SMS Fallback URL. + * @param string $smsFallbackMethod SMS Fallback Method. + * @param string $statusCallbackUrl Status Callback URL. + * @param string $statusCallbackMethod Status Callback Method. + * @param string $smsApplicationSid SMS Application Sid. + */ + public function __construct($accountSid = Values::NONE, $friendlyName = Values::NONE, $uniqueName = Values::NONE, $ccEmails = Values::NONE, $smsUrl = Values::NONE, $smsMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsFallbackMethod = Values::NONE, $statusCallbackUrl = Values::NONE, $statusCallbackMethod = Values::NONE, $smsApplicationSid = Values::NONE) { + $this->options['accountSid'] = $accountSid; + $this->options['friendlyName'] = $friendlyName; + $this->options['uniqueName'] = $uniqueName; + $this->options['ccEmails'] = $ccEmails; + $this->options['smsUrl'] = $smsUrl; + $this->options['smsMethod'] = $smsMethod; + $this->options['smsFallbackUrl'] = $smsFallbackUrl; + $this->options['smsFallbackMethod'] = $smsFallbackMethod; + $this->options['statusCallbackUrl'] = $statusCallbackUrl; + $this->options['statusCallbackMethod'] = $statusCallbackMethod; + $this->options['smsApplicationSid'] = $smsApplicationSid; + } + + /** + * Optional. The unique SID identifier of the Account or Sub-Account to create this HostedNumberOrder on. + * + * @param string $accountSid Account Sid. + * @return $this Fluent Builder + */ + public function setAccountSid($accountSid) { + $this->options['accountSid'] = $accountSid; + return $this; + } + + /** + * Optional. A human readable description of this resource, up to 64 characters. + * + * @param string $friendlyName A human readable description of this resource. + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + * + * @param string $uniqueName A unique, developer assigned name of this + * HostedNumberOrder. + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. + * + * @param string $ccEmails A list of emails. + * @return $this Fluent Builder + */ + public function setCcEmails($ccEmails) { + $this->options['ccEmails'] = $ccEmails; + return $this; + } + + /** + * Optional. The SMS URL attached to the IncomingPhoneNumber resource. + * + * @param string $smsUrl SMS URL. + * @return $this Fluent Builder + */ + public function setSmsUrl($smsUrl) { + $this->options['smsUrl'] = $smsUrl; + return $this; + } + + /** + * Optional. The SMS Method attached to the IncomingPhoneNumber resource. + * + * @param string $smsMethod SMS Method. + * @return $this Fluent Builder + */ + public function setSmsMethod($smsMethod) { + $this->options['smsMethod'] = $smsMethod; + return $this; + } + + /** + * Optional. The SMS Fallback URL attached to the IncomingPhoneNumber resource. + * + * @param string $smsFallbackUrl SMS Fallback URL. + * @return $this Fluent Builder + */ + public function setSmsFallbackUrl($smsFallbackUrl) { + $this->options['smsFallbackUrl'] = $smsFallbackUrl; + return $this; + } + + /** + * Optional. The SMS Fallback Method attached to the IncomingPhoneNumber resource. + * + * @param string $smsFallbackMethod SMS Fallback Method. + * @return $this Fluent Builder + */ + public function setSmsFallbackMethod($smsFallbackMethod) { + $this->options['smsFallbackMethod'] = $smsFallbackMethod; + return $this; + } + + /** + * Optional. The Status Callback URL attached to the IncomingPhoneNumber resource. + * + * @param string $statusCallbackUrl Status Callback URL. + * @return $this Fluent Builder + */ + public function setStatusCallbackUrl($statusCallbackUrl) { + $this->options['statusCallbackUrl'] = $statusCallbackUrl; + return $this; + } + + /** + * Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. + * + * @param string $statusCallbackMethod Status Callback Method. + * @return $this Fluent Builder + */ + public function setStatusCallbackMethod($statusCallbackMethod) { + $this->options['statusCallbackMethod'] = $statusCallbackMethod; + return $this; + } + + /** + * Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application. + * + * @param string $smsApplicationSid SMS Application Sid. + * @return $this Fluent Builder + */ + public function setSmsApplicationSid($smsApplicationSid) { + $this->options['smsApplicationSid'] = $smsApplicationSid; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.HostedNumbers.CreateHostedNumberOrderOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.php new file mode 100644 index 00000000..2cae51cc --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new HostedNumberOrderInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.HostedNumbers.HostedNumberOrderPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace.php new file mode 100644 index 00000000..2cab3511 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace.php @@ -0,0 +1,100 @@ +version = 'marketplace'; + } + + /** + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnList + */ + protected function getAvailableAddOns() { + if (!$this->_availableAddOns) { + $this->_availableAddOns = new AvailableAddOnList($this); + } + return $this->_availableAddOns; + } + + /** + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnList + */ + protected function getInstalledAddOns() { + if (!$this->_installedAddOns) { + $this->_installedAddOns = new InstalledAddOnList($this); + } + return $this->_installedAddOns; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.php new file mode 100644 index 00000000..353efb40 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.php @@ -0,0 +1,75 @@ +solution = array( + 'availableAddOnSid' => $availableAddOnSid, + 'sid' => $sid, + ); + + $this->uri = '/AvailableAddOns/' . rawurlencode($availableAddOnSid) . '/Extensions/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a AvailableAddOnExtensionInstance + * + * @return AvailableAddOnExtensionInstance Fetched + * AvailableAddOnExtensionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new AvailableAddOnExtensionInstance( + $this->version, + $payload, + $this->solution['availableAddOnSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.php new file mode 100644 index 00000000..78de970e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.php @@ -0,0 +1,117 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'availableAddOnSid' => Values::array_get($payload, 'available_add_on_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'productName' => Values::array_get($payload, 'product_name'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'availableAddOnSid' => $availableAddOnSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionContext Context for this + * AvailableAddOnExtensionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new AvailableAddOnExtensionContext( + $this->version, + $this->solution['availableAddOnSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a AvailableAddOnExtensionInstance + * + * @return AvailableAddOnExtensionInstance Fetched + * AvailableAddOnExtensionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.php new file mode 100644 index 00000000..9312d7ad --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.php @@ -0,0 +1,149 @@ +solution = array( + 'availableAddOnSid' => $availableAddOnSid, + ); + + $this->uri = '/AvailableAddOns/' . rawurlencode($availableAddOnSid) . '/Extensions'; + } + + /** + * Streams AvailableAddOnExtensionInstance records from the API as a generator + * stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads AvailableAddOnExtensionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return AvailableAddOnExtensionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of AvailableAddOnExtensionInstance records from the + * API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of AvailableAddOnExtensionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new AvailableAddOnExtensionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of AvailableAddOnExtensionInstance records from the + * API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of AvailableAddOnExtensionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new AvailableAddOnExtensionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a AvailableAddOnExtensionContext + * + * @param string $sid The unique Extension Sid + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionContext + */ + public function getContext($sid) { + return new AvailableAddOnExtensionContext( + $this->version, + $this->solution['availableAddOnSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.php new file mode 100644 index 00000000..81d2f7e6 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new AvailableAddOnExtensionInstance( + $this->version, + $payload, + $this->solution['availableAddOnSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.php new file mode 100644 index 00000000..9fffd237 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.php @@ -0,0 +1,127 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/AvailableAddOns/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a AvailableAddOnInstance + * + * @return AvailableAddOnInstance Fetched AvailableAddOnInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new AvailableAddOnInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Access the extensions + * + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList + */ + protected function getExtensions() { + if (!$this->_extensions) { + $this->_extensions = new AvailableAddOnExtensionList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_extensions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Marketplace.AvailableAddOnContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.php new file mode 100644 index 00000000..245a010f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.php @@ -0,0 +1,127 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'description' => Values::array_get($payload, 'description'), + 'pricingType' => Values::array_get($payload, 'pricing_type'), + 'configurationSchema' => Values::array_get($payload, 'configuration_schema'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext Context for + * this + * AvailableAddOnInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new AvailableAddOnContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a AvailableAddOnInstance + * + * @return AvailableAddOnInstance Fetched AvailableAddOnInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Access the extensions + * + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList + */ + protected function getExtensions() { + return $this->proxy()->extensions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Marketplace.AvailableAddOnInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnList.php new file mode 100644 index 00000000..74d87f04 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnList.php @@ -0,0 +1,142 @@ +solution = array(); + + $this->uri = '/AvailableAddOns'; + } + + /** + * Streams AvailableAddOnInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads AvailableAddOnInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return AvailableAddOnInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of AvailableAddOnInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of AvailableAddOnInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new AvailableAddOnPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of AvailableAddOnInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of AvailableAddOnInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new AvailableAddOnPage($this->version, $response, $this->solution); + } + + /** + * Constructs a AvailableAddOnContext + * + * @param string $sid The unique Available Add-on Sid + * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext + */ + public function getContext($sid) { + return new AvailableAddOnContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace.AvailableAddOnList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.php new file mode 100644 index 00000000..164181e1 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new AvailableAddOnInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace.AvailableAddOnPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php new file mode 100644 index 00000000..b8a0c6cd --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php @@ -0,0 +1,103 @@ +solution = array( + 'installedAddOnSid' => $installedAddOnSid, + 'sid' => $sid, + ); + + $this->uri = '/InstalledAddOns/' . rawurlencode($installedAddOnSid) . '/Extensions/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a InstalledAddOnExtensionInstance + * + * @return InstalledAddOnExtensionInstance Fetched + * InstalledAddOnExtensionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new InstalledAddOnExtensionInstance( + $this->version, + $payload, + $this->solution['installedAddOnSid'], + $this->solution['sid'] + ); + } + + /** + * Update the InstalledAddOnExtensionInstance + * + * @param boolean $enabled A Boolean indicating if the Extension will be invoked + * @return InstalledAddOnExtensionInstance Updated + * InstalledAddOnExtensionInstance + */ + public function update($enabled) { + $data = Values::of(array( + 'Enabled' => Serialize::booleanToString($enabled), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new InstalledAddOnExtensionInstance( + $this->version, + $payload, + $this->solution['installedAddOnSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.php new file mode 100644 index 00000000..c3950634 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.php @@ -0,0 +1,132 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'installedAddOnSid' => Values::array_get($payload, 'installed_add_on_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'productName' => Values::array_get($payload, 'product_name'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'enabled' => Values::array_get($payload, 'enabled'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'installedAddOnSid' => $installedAddOnSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionContext Context for this + * InstalledAddOnExtensionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new InstalledAddOnExtensionContext( + $this->version, + $this->solution['installedAddOnSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a InstalledAddOnExtensionInstance + * + * @return InstalledAddOnExtensionInstance Fetched + * InstalledAddOnExtensionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the InstalledAddOnExtensionInstance + * + * @param boolean $enabled A Boolean indicating if the Extension will be invoked + * @return InstalledAddOnExtensionInstance Updated + * InstalledAddOnExtensionInstance + */ + public function update($enabled) { + return $this->proxy()->update( + $enabled + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.php new file mode 100644 index 00000000..0b6f40f5 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.php @@ -0,0 +1,149 @@ +solution = array( + 'installedAddOnSid' => $installedAddOnSid, + ); + + $this->uri = '/InstalledAddOns/' . rawurlencode($installedAddOnSid) . '/Extensions'; + } + + /** + * Streams InstalledAddOnExtensionInstance records from the API as a generator + * stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads InstalledAddOnExtensionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return InstalledAddOnExtensionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of InstalledAddOnExtensionInstance records from the + * API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of InstalledAddOnExtensionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new InstalledAddOnExtensionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of InstalledAddOnExtensionInstance records from the + * API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of InstalledAddOnExtensionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new InstalledAddOnExtensionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a InstalledAddOnExtensionContext + * + * @param string $sid The unique Extension Sid + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionContext + */ + public function getContext($sid) { + return new InstalledAddOnExtensionContext( + $this->version, + $this->solution['installedAddOnSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.php new file mode 100644 index 00000000..deb5e1e9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new InstalledAddOnExtensionInstance( + $this->version, + $payload, + $this->solution['installedAddOnSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.php new file mode 100644 index 00000000..a1b3666a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.php @@ -0,0 +1,166 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/InstalledAddOns/' . rawurlencode($sid) . ''; + } + + /** + * Deletes the InstalledAddOnInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Fetch a InstalledAddOnInstance + * + * @return InstalledAddOnInstance Fetched InstalledAddOnInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new InstalledAddOnInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Update the InstalledAddOnInstance + * + * @param array|Options $options Optional Arguments + * @return InstalledAddOnInstance Updated InstalledAddOnInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Configuration' => Serialize::json_object($options['configuration']), + 'UniqueName' => $options['uniqueName'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new InstalledAddOnInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Access the extensions + * + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList + */ + protected function getExtensions() { + if (!$this->_extensions) { + $this->_extensions = new InstalledAddOnExtensionList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_extensions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Marketplace.InstalledAddOnContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.php new file mode 100644 index 00000000..dc8ea3dd --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.php @@ -0,0 +1,156 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'description' => Values::array_get($payload, 'description'), + 'configuration' => Values::array_get($payload, 'configuration'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext Context for + * this + * InstalledAddOnInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new InstalledAddOnContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Deletes the InstalledAddOnInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Fetch a InstalledAddOnInstance + * + * @return InstalledAddOnInstance Fetched InstalledAddOnInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the InstalledAddOnInstance + * + * @param array|Options $options Optional Arguments + * @return InstalledAddOnInstance Updated InstalledAddOnInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the extensions + * + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList + */ + protected function getExtensions() { + return $this->proxy()->extensions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Marketplace.InstalledAddOnInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnList.php new file mode 100644 index 00000000..60f0a14e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnList.php @@ -0,0 +1,177 @@ +solution = array(); + + $this->uri = '/InstalledAddOns'; + } + + /** + * Create a new InstalledAddOnInstance + * + * @param string $availableAddOnSid A string that uniquely identifies the + * Add-on to install + * @param boolean $acceptTermsOfService A boolean reflecting your acceptance of + * the Terms of Service + * @param array|Options $options Optional Arguments + * @return InstalledAddOnInstance Newly created InstalledAddOnInstance + */ + public function create($availableAddOnSid, $acceptTermsOfService, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'AvailableAddOnSid' => $availableAddOnSid, + 'AcceptTermsOfService' => Serialize::booleanToString($acceptTermsOfService), + 'Configuration' => Serialize::json_object($options['configuration']), + 'UniqueName' => $options['uniqueName'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new InstalledAddOnInstance( + $this->version, + $payload + ); + } + + /** + * Streams InstalledAddOnInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads InstalledAddOnInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return InstalledAddOnInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of InstalledAddOnInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of InstalledAddOnInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new InstalledAddOnPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of InstalledAddOnInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of InstalledAddOnInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new InstalledAddOnPage($this->version, $response, $this->solution); + } + + /** + * Constructs a InstalledAddOnContext + * + * @param string $sid The unique Installed Add-on Sid + * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext + */ + public function getContext($sid) { + return new InstalledAddOnContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace.InstalledAddOnList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.php new file mode 100644 index 00000000..e2218a44 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.php @@ -0,0 +1,138 @@ +options['configuration'] = $configuration; + $this->options['uniqueName'] = $uniqueName; + } + + /** + * The JSON object representing the configuration of the new Add-on installation. + * + * @param array $configuration The JSON object representing the configuration + * @return $this Fluent Builder + */ + public function setConfiguration($configuration) { + $this->options['configuration'] = $configuration; + return $this; + } + + /** + * The human-readable string that uniquely identifies this Add-on installation for an Account. + * + * @param string $uniqueName The string that uniquely identifies this Add-on + * installation + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Marketplace.CreateInstalledAddOnOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateInstalledAddOnOptions extends Options { + /** + * @param array $configuration The JSON object representing the configuration + * @param string $uniqueName The string that uniquely identifies this Add-on + * installation + */ + public function __construct($configuration = Values::NONE, $uniqueName = Values::NONE) { + $this->options['configuration'] = $configuration; + $this->options['uniqueName'] = $uniqueName; + } + + /** + * The JSON object representing the configuration of the Add-on installation. + * + * @param array $configuration The JSON object representing the configuration + * @return $this Fluent Builder + */ + public function setConfiguration($configuration) { + $this->options['configuration'] = $configuration; + return $this; + } + + /** + * The human-readable string that uniquely identifies this Add-on installation for an Account. + * + * @param string $uniqueName The string that uniquely identifies this Add-on + * installation + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Marketplace.UpdateInstalledAddOnOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.php new file mode 100644 index 00000000..ae70c6a4 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new InstalledAddOnInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Marketplace.InstalledAddOnPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy.php new file mode 100644 index 00000000..0ddca939 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy.php @@ -0,0 +1,86 @@ +version = 'Proxy'; + } + + /** + * @return \Twilio\Rest\Preview\Proxy\ServiceList + */ + protected function getServices() { + if (!$this->_services) { + $this->_services = new ServiceList($this); + } + return $this->_services; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberContext.php new file mode 100644 index 00000000..542dee20 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberContext.php @@ -0,0 +1,83 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/PhoneNumbers/' . rawurlencode($sid) . ''; + } + + /** + * Deletes the PhoneNumberInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Fetch a PhoneNumberInstance + * + * @return PhoneNumberInstance Fetched PhoneNumberInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new PhoneNumberInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.PhoneNumberContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberInstance.php new file mode 100644 index 00000000..2b3fafd9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberInstance.php @@ -0,0 +1,133 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'phoneNumber' => Values::array_get($payload, 'phone_number'), + 'countryCode' => Values::array_get($payload, 'country_code'), + 'capabilities' => Values::array_get($payload, 'capabilities'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Proxy\Service\PhoneNumberContext Context for + * this + * PhoneNumberInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new PhoneNumberContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Deletes the PhoneNumberInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Fetch a PhoneNumberInstance + * + * @return PhoneNumberInstance Fetched PhoneNumberInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.PhoneNumberInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberList.php new file mode 100644 index 00000000..24bd6ee4 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberList.php @@ -0,0 +1,171 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/PhoneNumbers'; + } + + /** + * Create a new PhoneNumberInstance + * + * @param string $sid Delete by unique phone-number Sid + * @return PhoneNumberInstance Newly created PhoneNumberInstance + */ + public function create($sid) { + $data = Values::of(array( + 'Sid' => $sid, + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new PhoneNumberInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams PhoneNumberInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads PhoneNumberInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return PhoneNumberInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of PhoneNumberInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of PhoneNumberInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new PhoneNumberPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of PhoneNumberInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of PhoneNumberInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new PhoneNumberPage($this->version, $response, $this->solution); + } + + /** + * Constructs a PhoneNumberContext + * + * @param string $sid Fetch by unique phone-number Sid + * @return \Twilio\Rest\Preview\Proxy\Service\PhoneNumberContext + */ + public function getContext($sid) { + return new PhoneNumberContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.PhoneNumberList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberPage.php new file mode 100644 index 00000000..ea4d4d3e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/PhoneNumberPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new PhoneNumberInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.PhoneNumberPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionContext.php new file mode 100644 index 00000000..5d6b94b0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionContext.php @@ -0,0 +1,77 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Sessions/' . rawurlencode($sessionSid) . '/Interactions/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a InteractionInstance + * + * @return InteractionInstance Fetched InteractionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new InteractionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.InteractionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionInstance.php new file mode 100644 index 00000000..94a29efe --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionInstance.php @@ -0,0 +1,145 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'sessionSid' => Values::array_get($payload, 'session_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'data' => Values::array_get($payload, 'data'), + 'status' => Values::array_get($payload, 'status'), + 'inboundParticipantSid' => Values::array_get($payload, 'inbound_participant_sid'), + 'inboundResourceSid' => Values::array_get($payload, 'inbound_resource_sid'), + 'inboundResourceStatus' => Values::array_get($payload, 'inbound_resource_status'), + 'inboundResourceType' => Values::array_get($payload, 'inbound_resource_type'), + 'inboundResourceUrl' => Values::array_get($payload, 'inbound_resource_url'), + 'outboundParticipantSid' => Values::array_get($payload, 'outbound_participant_sid'), + 'outboundResourceSid' => Values::array_get($payload, 'outbound_resource_sid'), + 'outboundResourceStatus' => Values::array_get($payload, 'outbound_resource_status'), + 'outboundResourceType' => Values::array_get($payload, 'outbound_resource_type'), + 'outboundResourceUrl' => Values::array_get($payload, 'outbound_resource_url'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\InteractionContext Context for this InteractionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new InteractionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a InteractionInstance + * + * @return InteractionInstance Fetched InteractionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.InteractionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionList.php new file mode 100644 index 00000000..a865895c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionList.php @@ -0,0 +1,156 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Sessions/' . rawurlencode($sessionSid) . '/Interactions'; + } + + /** + * Streams InteractionInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads InteractionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return InteractionInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of InteractionInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of InteractionInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'InboundParticipantStatus' => $options['inboundParticipantStatus'], + 'OutboundParticipantStatus' => $options['outboundParticipantStatus'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new InteractionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of InteractionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of InteractionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new InteractionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a InteractionContext + * + * @param string $sid A string that uniquely identifies this Interaction. + * @return \Twilio\Rest\Preview\Proxy\Service\Session\InteractionContext + */ + public function getContext($sid) { + return new InteractionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.InteractionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionOptions.php new file mode 100644 index 00000000..9adc0f9a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionOptions.php @@ -0,0 +1,81 @@ +options['inboundParticipantStatus'] = $inboundParticipantStatus; + $this->options['outboundParticipantStatus'] = $outboundParticipantStatus; + } + + /** + * The Inbound Participant Status of this Interaction. One of `completed`, `in-progress` or `failed`. + * + * @param string $inboundParticipantStatus The Inbound Participant Status of + * this Interaction + * @return $this Fluent Builder + */ + public function setInboundParticipantStatus($inboundParticipantStatus) { + $this->options['inboundParticipantStatus'] = $inboundParticipantStatus; + return $this; + } + + /** + * The Outbound Participant Status of this Interaction. One of `completed`, `in-progress` or `failed`. + * + * @param string $outboundParticipantStatus The Outbound Participant Status of + * this Interaction + * @return $this Fluent Builder + */ + public function setOutboundParticipantStatus($outboundParticipantStatus) { + $this->options['outboundParticipantStatus'] = $outboundParticipantStatus; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.ReadInteractionOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionPage.php new file mode 100644 index 00000000..add6e959 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/InteractionPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new InteractionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.InteractionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionContext.php new file mode 100644 index 00000000..27505f89 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionContext.php @@ -0,0 +1,80 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + 'participantSid' => $participantSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Sessions/' . rawurlencode($sessionSid) . '/Participants/' . rawurlencode($participantSid) . '/MessageInteractions/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a MessageInteractionInstance + * + * @return MessageInteractionInstance Fetched MessageInteractionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new MessageInteractionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['participantSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.MessageInteractionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionInstance.php new file mode 100644 index 00000000..34f5a977 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionInstance.php @@ -0,0 +1,151 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'sessionSid' => Values::array_get($payload, 'session_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'data' => Values::array_get($payload, 'data'), + 'status' => Values::array_get($payload, 'status'), + 'participantSid' => Values::array_get($payload, 'participant_sid'), + 'inboundParticipantSid' => Values::array_get($payload, 'inbound_participant_sid'), + 'inboundResourceSid' => Values::array_get($payload, 'inbound_resource_sid'), + 'inboundResourceStatus' => Values::array_get($payload, 'inbound_resource_status'), + 'inboundResourceType' => Values::array_get($payload, 'inbound_resource_type'), + 'inboundResourceUrl' => Values::array_get($payload, 'inbound_resource_url'), + 'outboundParticipantSid' => Values::array_get($payload, 'outbound_participant_sid'), + 'outboundResourceSid' => Values::array_get($payload, 'outbound_resource_sid'), + 'outboundResourceStatus' => Values::array_get($payload, 'outbound_resource_status'), + 'outboundResourceType' => Values::array_get($payload, 'outbound_resource_type'), + 'outboundResourceUrl' => Values::array_get($payload, 'outbound_resource_url'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + 'participantSid' => $participantSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\Participant\MessageInteractionContext Context for this + * MessageInteractionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new MessageInteractionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['participantSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a MessageInteractionInstance + * + * @return MessageInteractionInstance Fetched MessageInteractionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.MessageInteractionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionList.php new file mode 100644 index 00000000..be60f8ef --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionList.php @@ -0,0 +1,184 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + 'participantSid' => $participantSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Sessions/' . rawurlencode($sessionSid) . '/Participants/' . rawurlencode($participantSid) . '/MessageInteractions'; + } + + /** + * Create a new MessageInteractionInstance + * + * @param array|Options $options Optional Arguments + * @return MessageInteractionInstance Newly created MessageInteractionInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Body' => $options['body'], + 'MediaUrl' => $options['mediaUrl'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new MessageInteractionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['participantSid'] + ); + } + + /** + * Streams MessageInteractionInstance records from the API as a generator + * stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads MessageInteractionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return MessageInteractionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of MessageInteractionInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of MessageInteractionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new MessageInteractionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of MessageInteractionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of MessageInteractionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new MessageInteractionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a MessageInteractionContext + * + * @param string $sid A string that uniquely identifies this Interaction. + * @return \Twilio\Rest\Preview\Proxy\Service\Session\Participant\MessageInteractionContext + */ + public function getContext($sid) { + return new MessageInteractionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['participantSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.MessageInteractionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionOptions.php new file mode 100644 index 00000000..dce44390 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionOptions.php @@ -0,0 +1,75 @@ +options['body'] = $body; + $this->options['mediaUrl'] = $mediaUrl; + } + + /** + * The text body of the message to send to the Participant. Up to 1600 characters long. + * + * @param string $body The body of the message. Up to 1600 characters long. + * @return $this Fluent Builder + */ + public function setBody($body) { + $this->options['body'] = $body; + return $this; + } + + /** + * The public url of an image or video to send to the Participant. + * + * @param string $mediaUrl The url of an image or video. + * @return $this Fluent Builder + */ + public function setMediaUrl($mediaUrl) { + $this->options['mediaUrl'] = $mediaUrl; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.CreateMessageInteractionOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionPage.php new file mode 100644 index 00000000..cc386ddc --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/Participant/MessageInteractionPage.php @@ -0,0 +1,43 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new MessageInteractionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['participantSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.MessageInteractionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantContext.php new file mode 100644 index 00000000..4eaf5d8a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantContext.php @@ -0,0 +1,176 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Sessions/' . rawurlencode($sessionSid) . '/Participants/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a ParticipantInstance + * + * @return ParticipantInstance Fetched ParticipantInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ParticipantInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the ParticipantInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the ParticipantInstance + * + * @param array|Options $options Optional Arguments + * @return ParticipantInstance Updated ParticipantInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'ParticipantType' => $options['participantType'], + 'Identifier' => $options['identifier'], + 'FriendlyName' => $options['friendlyName'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new ParticipantInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['sid'] + ); + } + + /** + * Access the messageInteractions + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\Participant\MessageInteractionList + */ + protected function getMessageInteractions() { + if (!$this->_messageInteractions) { + $this->_messageInteractions = new MessageInteractionList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['sid'] + ); + } + + return $this->_messageInteractions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.ParticipantContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantInstance.php new file mode 100644 index 00000000..1deec971 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantInstance.php @@ -0,0 +1,164 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'sessionSid' => Values::array_get($payload, 'session_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'participantType' => Values::array_get($payload, 'participant_type'), + 'identifier' => Values::array_get($payload, 'identifier'), + 'proxyIdentifier' => Values::array_get($payload, 'proxy_identifier'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\ParticipantContext Context for this ParticipantInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ParticipantContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a ParticipantInstance + * + * @return ParticipantInstance Fetched ParticipantInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the ParticipantInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the ParticipantInstance + * + * @param array|Options $options Optional Arguments + * @return ParticipantInstance Updated ParticipantInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the messageInteractions + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\Participant\MessageInteractionList + */ + protected function getMessageInteractions() { + return $this->proxy()->messageInteractions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.ParticipantInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantList.php new file mode 100644 index 00000000..b867e17d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantList.php @@ -0,0 +1,188 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sessionSid' => $sessionSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Sessions/' . rawurlencode($sessionSid) . '/Participants'; + } + + /** + * Streams ParticipantInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads ParticipantInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return ParticipantInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of ParticipantInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of ParticipantInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Identifier' => $options['identifier'], + 'ParticipantType' => $options['participantType'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new ParticipantPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of ParticipantInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of ParticipantInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new ParticipantPage($this->version, $response, $this->solution); + } + + /** + * Create a new ParticipantInstance + * + * @param string $identifier The Participant's contact identifier, normally a + * phone number. + * @param array|Options $options Optional Arguments + * @return ParticipantInstance Newly created ParticipantInstance + */ + public function create($identifier, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Identifier' => $identifier, + 'FriendlyName' => $options['friendlyName'], + 'ParticipantType' => $options['participantType'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new ParticipantInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'] + ); + } + + /** + * Constructs a ParticipantContext + * + * @param string $sid A string that uniquely identifies this Participant. + * @return \Twilio\Rest\Preview\Proxy\Service\Session\ParticipantContext + */ + public function getContext($sid) { + return new ParticipantContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sessionSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.ParticipantList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantOptions.php new file mode 100644 index 00000000..1391e341 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantOptions.php @@ -0,0 +1,209 @@ +options['identifier'] = $identifier; + $this->options['participantType'] = $participantType; + } + + /** + * The Participant's contact identifier, normally a phone number. + * + * @param string $identifier The Participant's contact identifier, normally a + * phone number. + * @return $this Fluent Builder + */ + public function setIdentifier($identifier) { + $this->options['identifier'] = $identifier; + return $this; + } + + /** + * The Type of this Participant. One of `sms`, `voice` or `phone`. + * + * @param string $participantType The Type of this Participant + * @return $this Fluent Builder + */ + public function setParticipantType($participantType) { + $this->options['participantType'] = $participantType; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.ReadParticipantOptions ' . implode(' ', $options) . ']'; + } +} + +class CreateParticipantOptions extends Options { + /** + * @param string $friendlyName A human readable description of this resource + * @param string $participantType The Type of this Participant + */ + public function __construct($friendlyName = Values::NONE, $participantType = Values::NONE) { + $this->options['friendlyName'] = $friendlyName; + $this->options['participantType'] = $participantType; + } + + /** + * A human readable description of this resource, up to 64 characters. + * + * @param string $friendlyName A human readable description of this resource + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The Type of this Participant. One of `sms`, `voice` or `phone`. + * + * @param string $participantType The Type of this Participant + * @return $this Fluent Builder + */ + public function setParticipantType($participantType) { + $this->options['participantType'] = $participantType; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.CreateParticipantOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateParticipantOptions extends Options { + /** + * @param string $participantType The Type of this Participant + * @param string $identifier The Participant's contact identifier, normally a + * phone number. + * @param string $friendlyName A human readable description of this resource + */ + public function __construct($participantType = Values::NONE, $identifier = Values::NONE, $friendlyName = Values::NONE) { + $this->options['participantType'] = $participantType; + $this->options['identifier'] = $identifier; + $this->options['friendlyName'] = $friendlyName; + } + + /** + * The Type of this Participant. One of `sms`, `voice` or `phone`. + * + * @param string $participantType The Type of this Participant + * @return $this Fluent Builder + */ + public function setParticipantType($participantType) { + $this->options['participantType'] = $participantType; + return $this; + } + + /** + * The Participant's contact identifier, normally a phone number. + * + * @param string $identifier The Participant's contact identifier, normally a + * phone number. + * @return $this Fluent Builder + */ + public function setIdentifier($identifier) { + $this->options['identifier'] = $identifier; + return $this; + } + + /** + * A human readable description of this resource, up to 64 characters. + * + * @param string $friendlyName A human readable description of this resource + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.UpdateParticipantOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantPage.php new file mode 100644 index 00000000..8e3dbe5c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/Session/ParticipantPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ParticipantInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sessionSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.ParticipantPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionContext.php new file mode 100644 index 00000000..66bfccd0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionContext.php @@ -0,0 +1,193 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Sessions/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a SessionInstance + * + * @return SessionInstance Fetched SessionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SessionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the SessionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SessionInstance + * + * @param array|Options $options Optional Arguments + * @return SessionInstance Updated SessionInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'Ttl' => $options['ttl'], + 'Status' => $options['status'], + 'Participants' => $options['participants'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SessionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Access the interactions + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\InteractionList + */ + protected function getInteractions() { + if (!$this->_interactions) { + $this->_interactions = new InteractionList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_interactions; + } + + /** + * Access the participants + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\ParticipantList + */ + protected function getParticipants() { + if (!$this->_participants) { + $this->_participants = new ParticipantList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_participants; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.SessionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionInstance.php new file mode 100644 index 00000000..9ad4b02a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionInstance.php @@ -0,0 +1,172 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'ttl' => Values::array_get($payload, 'ttl'), + 'status' => Values::array_get($payload, 'status'), + 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), + 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Proxy\Service\SessionContext Context for this + * SessionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SessionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a SessionInstance + * + * @return SessionInstance Fetched SessionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SessionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SessionInstance + * + * @param array|Options $options Optional Arguments + * @return SessionInstance Updated SessionInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the interactions + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\InteractionList + */ + protected function getInteractions() { + return $this->proxy()->interactions; + } + + /** + * Access the participants + * + * @return \Twilio\Rest\Preview\Proxy\Service\Session\ParticipantList + */ + protected function getParticipants() { + return $this->proxy()->participants; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.SessionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionList.php new file mode 100644 index 00000000..a933fbe7 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionList.php @@ -0,0 +1,183 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Sessions'; + } + + /** + * Streams SessionInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SessionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SessionInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of SessionInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SessionInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'Status' => $options['status'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SessionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SessionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SessionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SessionPage($this->version, $response, $this->solution); + } + + /** + * Create a new SessionInstance + * + * @param array|Options $options Optional Arguments + * @return SessionInstance Newly created SessionInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'Ttl' => $options['ttl'], + 'Status' => $options['status'], + 'Participants' => $options['participants'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SessionInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Constructs a SessionContext + * + * @param string $sid A string that uniquely identifies this Session. + * @return \Twilio\Rest\Preview\Proxy\Service\SessionContext + */ + public function getContext($sid) { + return new SessionContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.SessionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionOptions.php new file mode 100644 index 00000000..63e5c61e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionOptions.php @@ -0,0 +1,245 @@ +options['uniqueName'] = $uniqueName; + $this->options['status'] = $status; + } + + /** + * Provides a unique and addressable name to be assigned to this Session, assigned by the developer, to be optionally used in addition to SID. + * + * @param string $uniqueName A unique, developer assigned name of this Session. + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The Status of this Session. One of `in-progess` or `completed`. + * + * @param string $status The Status of this Session + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.ReadSessionOptions ' . implode(' ', $options) . ']'; + } +} + +class CreateSessionOptions extends Options { + /** + * @param string $uniqueName A unique, developer assigned name of this Session. + * @param integer $ttl How long will this session stay open, in seconds. + * @param string $status The Status of this Session + * @param string $participants The participants + */ + public function __construct($uniqueName = Values::NONE, $ttl = Values::NONE, $status = Values::NONE, $participants = Values::NONE) { + $this->options['uniqueName'] = $uniqueName; + $this->options['ttl'] = $ttl; + $this->options['status'] = $status; + $this->options['participants'] = $participants; + } + + /** + * Provides a unique and addressable name to be assigned to this Session, assigned by the developer, to be optionally used in addition to SID. + * + * @param string $uniqueName A unique, developer assigned name of this Session. + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * How long will this session stay open, in seconds. Each new interaction resets this timer. + * + * @param integer $ttl How long will this session stay open, in seconds. + * @return $this Fluent Builder + */ + public function setTtl($ttl) { + $this->options['ttl'] = $ttl; + return $this; + } + + /** + * The Status of this Session. One of `in-progess` or `completed`. + * + * @param string $status The Status of this Session + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * The participants + * + * @param string $participants The participants + * @return $this Fluent Builder + */ + public function setParticipants($participants) { + $this->options['participants'] = $participants; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.CreateSessionOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateSessionOptions extends Options { + /** + * @param string $uniqueName A unique, developer assigned name of this Session. + * @param integer $ttl How long will this session stay open, in seconds. + * @param string $status The Status of this Session + * @param string $participants The participants + */ + public function __construct($uniqueName = Values::NONE, $ttl = Values::NONE, $status = Values::NONE, $participants = Values::NONE) { + $this->options['uniqueName'] = $uniqueName; + $this->options['ttl'] = $ttl; + $this->options['status'] = $status; + $this->options['participants'] = $participants; + } + + /** + * Provides a unique and addressable name to be assigned to this Session, assigned by the developer, to be optionally used in addition to SID. + * + * @param string $uniqueName A unique, developer assigned name of this Session. + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * How long will this session stay open, in seconds. Each new interaction resets this timer. + * + * @param integer $ttl How long will this session stay open, in seconds. + * @return $this Fluent Builder + */ + public function setTtl($ttl) { + $this->options['ttl'] = $ttl; + return $this; + } + + /** + * The Status of this Session. One of `in-progess` or `completed`. + * + * @param string $status The Status of this Session + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * The participants + * + * @param string $participants The participants + * @return $this Fluent Builder + */ + public function setParticipants($participants) { + $this->options['participants'] = $participants; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.UpdateSessionOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionPage.php new file mode 100644 index 00000000..bb0df110 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/SessionPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SessionInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.SessionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeContext.php new file mode 100644 index 00000000..8a85274d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeContext.php @@ -0,0 +1,83 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/ShortCodes/' . rawurlencode($sid) . ''; + } + + /** + * Deletes the ShortCodeInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Fetch a ShortCodeInstance + * + * @return ShortCodeInstance Fetched ShortCodeInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ShortCodeInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.ShortCodeContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeInstance.php new file mode 100644 index 00000000..61be78db --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeInstance.php @@ -0,0 +1,132 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'shortCode' => Values::array_get($payload, 'short_code'), + 'countryCode' => Values::array_get($payload, 'country_code'), + 'capabilities' => Values::array_get($payload, 'capabilities'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Proxy\Service\ShortCodeContext Context for this + * ShortCodeInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ShortCodeContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Deletes the ShortCodeInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Fetch a ShortCodeInstance + * + * @return ShortCodeInstance Fetched ShortCodeInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.ShortCodeInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeList.php new file mode 100644 index 00000000..b06f6cc4 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodeList.php @@ -0,0 +1,171 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/ShortCodes'; + } + + /** + * Create a new ShortCodeInstance + * + * @param string $sid Delete by unique shortcode Sid + * @return ShortCodeInstance Newly created ShortCodeInstance + */ + public function create($sid) { + $data = Values::of(array( + 'Sid' => $sid, + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new ShortCodeInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams ShortCodeInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads ShortCodeInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return ShortCodeInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of ShortCodeInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of ShortCodeInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new ShortCodePage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of ShortCodeInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of ShortCodeInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new ShortCodePage($this->version, $response, $this->solution); + } + + /** + * Constructs a ShortCodeContext + * + * @param string $sid Fetch by unique shortcode Sid + * @return \Twilio\Rest\Preview\Proxy\Service\ShortCodeContext + */ + public function getContext($sid) { + return new ShortCodeContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.ShortCodeList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodePage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodePage.php new file mode 100644 index 00000000..27a22d66 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/Service/ShortCodePage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ShortCodeInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.ShortCodePage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceContext.php new file mode 100644 index 00000000..d7005b27 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceContext.php @@ -0,0 +1,207 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'AutoCreate' => Serialize::booleanToString($options['autoCreate']), + 'CallbackUrl' => $options['callbackUrl'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Access the sessions + * + * @return \Twilio\Rest\Preview\Proxy\Service\SessionList + */ + protected function getSessions() { + if (!$this->_sessions) { + $this->_sessions = new SessionList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_sessions; + } + + /** + * Access the phoneNumbers + * + * @return \Twilio\Rest\Preview\Proxy\Service\PhoneNumberList + */ + protected function getPhoneNumbers() { + if (!$this->_phoneNumbers) { + $this->_phoneNumbers = new PhoneNumberList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_phoneNumbers; + } + + /** + * Access the shortCodes + * + * @return \Twilio\Rest\Preview\Proxy\Service\ShortCodeList + */ + protected function getShortCodes() { + if (!$this->_shortCodes) { + $this->_shortCodes = new ShortCodeList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_shortCodes; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.ServiceContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceInstance.php new file mode 100644 index 00000000..d3eed13c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceInstance.php @@ -0,0 +1,173 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'autoCreate' => Values::array_get($payload, 'auto_create'), + 'callbackUrl' => Values::array_get($payload, 'callback_url'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Proxy\ServiceContext Context for this + * ServiceInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ServiceContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the sessions + * + * @return \Twilio\Rest\Preview\Proxy\Service\SessionList + */ + protected function getSessions() { + return $this->proxy()->sessions; + } + + /** + * Access the phoneNumbers + * + * @return \Twilio\Rest\Preview\Proxy\Service\PhoneNumberList + */ + protected function getPhoneNumbers() { + return $this->proxy()->phoneNumbers; + } + + /** + * Access the shortCodes + * + * @return \Twilio\Rest\Preview\Proxy\Service\ShortCodeList + */ + protected function getShortCodes() { + return $this->proxy()->shortCodes; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Proxy.ServiceInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceList.php new file mode 100644 index 00000000..5b36f303 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceList.php @@ -0,0 +1,172 @@ +solution = array(); + + $this->uri = '/Services'; + } + + /** + * Streams ServiceInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads ServiceInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return ServiceInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of ServiceInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of ServiceInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Create a new ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Newly created ServiceInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'AutoCreate' => Serialize::booleanToString($options['autoCreate']), + 'CallbackUrl' => $options['callbackUrl'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Constructs a ServiceContext + * + * @param string $sid A string that uniquely identifies this Service. + * @return \Twilio\Rest\Preview\Proxy\ServiceContext + */ + public function getContext($sid) { + return new ServiceContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.ServiceList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceOptions.php new file mode 100644 index 00000000..285e49af --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServiceOptions.php @@ -0,0 +1,166 @@ +options['friendlyName'] = $friendlyName; + $this->options['autoCreate'] = $autoCreate; + $this->options['callbackUrl'] = $callbackUrl; + } + + /** + * A human readable description of this resource, up to 64 characters. + * + * @param string $friendlyName A human readable description of this resource + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Boolean flag specifying whether to create threads when a user communticates out of band. + * + * @param boolean $autoCreate Boolean flag specifying whether to auto-create + * threads. + * @return $this Fluent Builder + */ + public function setAutoCreate($autoCreate) { + $this->options['autoCreate'] = $autoCreate; + return $this; + } + + /** + * The URL Twilio will request for callback notifications. + * + * @param string $callbackUrl URL Twilio will request for callbacks. + * @return $this Fluent Builder + */ + public function setCallbackUrl($callbackUrl) { + $this->options['callbackUrl'] = $callbackUrl; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.CreateServiceOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateServiceOptions extends Options { + /** + * @param string $friendlyName A human readable description of this resource + * @param boolean $autoCreate Boolean flag specifying whether to auto-create + * threads. + * @param string $callbackUrl URL Twilio will request for callbacks. + */ + public function __construct($friendlyName = Values::NONE, $autoCreate = Values::NONE, $callbackUrl = Values::NONE) { + $this->options['friendlyName'] = $friendlyName; + $this->options['autoCreate'] = $autoCreate; + $this->options['callbackUrl'] = $callbackUrl; + } + + /** + * A human readable description of this resource, up to 64 characters. + * + * @param string $friendlyName A human readable description of this resource + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Boolean flag specifying whether to create threads when a user communticates out of band. + * + * @param boolean $autoCreate Boolean flag specifying whether to auto-create + * threads. + * @return $this Fluent Builder + */ + public function setAutoCreate($autoCreate) { + $this->options['autoCreate'] = $autoCreate; + return $this; + } + + /** + * The URL Twilio will request for callback notifications. + * + * @param string $callbackUrl URL Twilio will request for callbacks. + * @return $this Fluent Builder + */ + public function setCallbackUrl($callbackUrl) { + $this->options['callbackUrl'] = $callbackUrl; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Proxy.UpdateServiceOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServicePage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServicePage.php new file mode 100644 index 00000000..b1573008 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Proxy/ServicePage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Proxy.ServicePage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync.php new file mode 100644 index 00000000..23ce91f2 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync.php @@ -0,0 +1,86 @@ +version = 'Sync'; + } + + /** + * @return \Twilio\Rest\Preview\Sync\ServiceList + */ + protected function getServices() { + if (!$this->_services) { + $this->_services = new ServiceList($this); + } + return $this->_services; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.php new file mode 100644 index 00000000..54f313d6 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.php @@ -0,0 +1,119 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'documentSid' => $documentSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Documents/' . rawurlencode($documentSid) . '/Permissions/' . rawurlencode($identity) . ''; + } + + /** + * Fetch a DocumentPermissionInstance + * + * @return DocumentPermissionInstance Fetched DocumentPermissionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new DocumentPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['documentSid'], + $this->solution['identity'] + ); + } + + /** + * Deletes the DocumentPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the DocumentPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return DocumentPermissionInstance Updated DocumentPermissionInstance + */ + public function update($read, $write, $manage) { + $data = Values::of(array( + 'Read' => Serialize::booleanToString($read), + 'Write' => Serialize::booleanToString($write), + 'Manage' => Serialize::booleanToString($manage), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new DocumentPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['documentSid'], + $this->solution['identity'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.DocumentPermissionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php new file mode 100644 index 00000000..021812b1 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php @@ -0,0 +1,148 @@ +properties = array( + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'documentSid' => Values::array_get($payload, 'document_sid'), + 'identity' => Values::array_get($payload, 'identity'), + 'read' => Values::array_get($payload, 'read'), + 'write' => Values::array_get($payload, 'write'), + 'manage' => Values::array_get($payload, 'manage'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'documentSid' => $documentSid, + 'identity' => $identity ?: $this->properties['identity'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionContext Context for this DocumentPermissionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new DocumentPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['documentSid'], + $this->solution['identity'] + ); + } + + return $this->context; + } + + /** + * Fetch a DocumentPermissionInstance + * + * @return DocumentPermissionInstance Fetched DocumentPermissionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the DocumentPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the DocumentPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return DocumentPermissionInstance Updated DocumentPermissionInstance + */ + public function update($read, $write, $manage) { + return $this->proxy()->update( + $read, + $write, + $manage + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.DocumentPermissionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php new file mode 100644 index 00000000..f8afa0b1 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php @@ -0,0 +1,151 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'documentSid' => $documentSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Documents/' . rawurlencode($documentSid) . '/Permissions'; + } + + /** + * Streams DocumentPermissionInstance records from the API as a generator + * stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads DocumentPermissionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return DocumentPermissionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of DocumentPermissionInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of DocumentPermissionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new DocumentPermissionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of DocumentPermissionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of DocumentPermissionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new DocumentPermissionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a DocumentPermissionContext + * + * @param string $identity Identity of the user to whom the Sync Document + * Permission applies. + * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionContext + */ + public function getContext($identity) { + return new DocumentPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['documentSid'], + $identity + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.DocumentPermissionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.php new file mode 100644 index 00000000..b9ce1b16 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new DocumentPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['documentSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.DocumentPermissionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentContext.php new file mode 100644 index 00000000..08ef0a94 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentContext.php @@ -0,0 +1,167 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Documents/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a DocumentInstance + * + * @return DocumentInstance Fetched DocumentInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new DocumentInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the DocumentInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the DocumentInstance + * + * @param array $data The data + * @return DocumentInstance Updated DocumentInstance + */ + public function update($data) { + $data = Values::of(array( + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new DocumentInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Access the documentPermissions + * + * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList + */ + protected function getDocumentPermissions() { + if (!$this->_documentPermissions) { + $this->_documentPermissions = new DocumentPermissionList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_documentPermissions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.DocumentContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentInstance.php new file mode 100644 index 00000000..13867a43 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentInstance.php @@ -0,0 +1,159 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + 'revision' => Values::array_get($payload, 'revision'), + 'data' => Values::array_get($payload, 'data'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\Service\DocumentContext Context for this + * DocumentInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new DocumentContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a DocumentInstance + * + * @return DocumentInstance Fetched DocumentInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the DocumentInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the DocumentInstance + * + * @param array $data The data + * @return DocumentInstance Updated DocumentInstance + */ + public function update($data) { + return $this->proxy()->update( + $data + ); + } + + /** + * Access the documentPermissions + * + * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList + */ + protected function getDocumentPermissions() { + return $this->proxy()->documentPermissions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.DocumentInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentList.php new file mode 100644 index 00000000..c5f73fc1 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentList.php @@ -0,0 +1,176 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Documents'; + } + + /** + * Create a new DocumentInstance + * + * @param array|Options $options Optional Arguments + * @return DocumentInstance Newly created DocumentInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'Data' => Serialize::json_object($options['data']), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new DocumentInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams DocumentInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads DocumentInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return DocumentInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of DocumentInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of DocumentInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new DocumentPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of DocumentInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of DocumentInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new DocumentPage($this->version, $response, $this->solution); + } + + /** + * Constructs a DocumentContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Sync\Service\DocumentContext + */ + public function getContext($sid) { + return new DocumentContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.DocumentList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentOptions.php new file mode 100644 index 00000000..d267ed28 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentOptions.php @@ -0,0 +1,75 @@ +options['uniqueName'] = $uniqueName; + $this->options['data'] = $data; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The data + * + * @param array $data The data + * @return $this Fluent Builder + */ + public function setData($data) { + $this->options['data'] = $data; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Sync.CreateDocumentOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentPage.php new file mode 100644 index 00000000..7a61ebcd --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/DocumentPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new DocumentInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.DocumentPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.php new file mode 100644 index 00000000..27f2953a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.php @@ -0,0 +1,114 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + 'index' => $index, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($listSid) . '/Items/' . rawurlencode($index) . ''; + } + + /** + * Fetch a SyncListItemInstance + * + * @return SyncListItemInstance Fetched SyncListItemInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncListItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['index'] + ); + } + + /** + * Deletes the SyncListItemInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SyncListItemInstance + * + * @param array $data The data + * @return SyncListItemInstance Updated SyncListItemInstance + */ + public function update($data) { + $data = Values::of(array( + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncListItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['index'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncListItemContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.php new file mode 100644 index 00000000..da46c06e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.php @@ -0,0 +1,148 @@ +properties = array( + 'index' => Values::array_get($payload, 'index'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'listSid' => Values::array_get($payload, 'list_sid'), + 'url' => Values::array_get($payload, 'url'), + 'revision' => Values::array_get($payload, 'revision'), + 'data' => Values::array_get($payload, 'data'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + 'index' => $index ?: $this->properties['index'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemContext Context for this SyncListItemInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncListItemContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['index'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncListItemInstance + * + * @return SyncListItemInstance Fetched SyncListItemInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncListItemInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SyncListItemInstance + * + * @param array $data The data + * @return SyncListItemInstance Updated SyncListItemInstance + */ + public function update($data) { + return $this->proxy()->update( + $data + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncListItemInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php new file mode 100644 index 00000000..c7be9266 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php @@ -0,0 +1,184 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($listSid) . '/Items'; + } + + /** + * Create a new SyncListItemInstance + * + * @param array $data The data + * @return SyncListItemInstance Newly created SyncListItemInstance + */ + public function create($data) { + $data = Values::of(array( + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncListItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'] + ); + } + + /** + * Streams SyncListItemInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncListItemInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncListItemInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncListItemInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncListItemInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Order' => $options['order'], + 'From' => $options['from'], + 'Bounds' => $options['bounds'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncListItemPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncListItemInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncListItemInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncListItemPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncListItemContext + * + * @param integer $index The index + * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemContext + */ + public function getContext($index) { + return new SyncListItemContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['listSid'], + $index + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncListItemList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.php new file mode 100644 index 00000000..39a90a1e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.php @@ -0,0 +1,89 @@ +options['order'] = $order; + $this->options['from'] = $from; + $this->options['bounds'] = $bounds; + } + + /** + * The order + * + * @param string $order The order + * @return $this Fluent Builder + */ + public function setOrder($order) { + $this->options['order'] = $order; + return $this; + } + + /** + * The from + * + * @param string $from The from + * @return $this Fluent Builder + */ + public function setFrom($from) { + $this->options['from'] = $from; + return $this; + } + + /** + * The bounds + * + * @param string $bounds The bounds + * @return $this Fluent Builder + */ + public function setBounds($bounds) { + $this->options['bounds'] = $bounds; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Sync.ReadSyncListItemOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.php new file mode 100644 index 00000000..4b24bc2e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncListItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncListItemPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php new file mode 100644 index 00000000..6613df5d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php @@ -0,0 +1,119 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($listSid) . '/Permissions/' . rawurlencode($identity) . ''; + } + + /** + * Fetch a SyncListPermissionInstance + * + * @return SyncListPermissionInstance Fetched SyncListPermissionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncListPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['identity'] + ); + } + + /** + * Deletes the SyncListPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SyncListPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return SyncListPermissionInstance Updated SyncListPermissionInstance + */ + public function update($read, $write, $manage) { + $data = Values::of(array( + 'Read' => Serialize::booleanToString($read), + 'Write' => Serialize::booleanToString($write), + 'Manage' => Serialize::booleanToString($manage), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncListPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['identity'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncListPermissionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.php new file mode 100644 index 00000000..abcf27a0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.php @@ -0,0 +1,148 @@ +properties = array( + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'listSid' => Values::array_get($payload, 'list_sid'), + 'identity' => Values::array_get($payload, 'identity'), + 'read' => Values::array_get($payload, 'read'), + 'write' => Values::array_get($payload, 'write'), + 'manage' => Values::array_get($payload, 'manage'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + 'identity' => $identity ?: $this->properties['identity'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionContext Context for this SyncListPermissionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncListPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['identity'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncListPermissionInstance + * + * @return SyncListPermissionInstance Fetched SyncListPermissionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncListPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SyncListPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return SyncListPermissionInstance Updated SyncListPermissionInstance + */ + public function update($read, $write, $manage) { + return $this->proxy()->update( + $read, + $write, + $manage + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncListPermissionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.php new file mode 100644 index 00000000..c9146014 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.php @@ -0,0 +1,151 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($listSid) . '/Permissions'; + } + + /** + * Streams SyncListPermissionInstance records from the API as a generator + * stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncListPermissionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncListPermissionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncListPermissionInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncListPermissionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncListPermissionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncListPermissionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncListPermissionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncListPermissionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncListPermissionContext + * + * @param string $identity Identity of the user to whom the Sync List + * Permission applies. + * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionContext + */ + public function getContext($identity) { + return new SyncListPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['listSid'], + $identity + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncListPermissionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.php new file mode 100644 index 00000000..fb1465ee --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncListPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncListPermissionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListContext.php new file mode 100644 index 00000000..a1a09d89 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListContext.php @@ -0,0 +1,161 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a SyncListInstance + * + * @return SyncListInstance Fetched SyncListInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncListInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the SyncListInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Access the syncListItems + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList + */ + protected function getSyncListItems() { + if (!$this->_syncListItems) { + $this->_syncListItems = new SyncListItemList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_syncListItems; + } + + /** + * Access the syncListPermissions + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList + */ + protected function getSyncListPermissions() { + if (!$this->_syncListPermissions) { + $this->_syncListPermissions = new SyncListPermissionList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_syncListPermissions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncListContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListInstance.php new file mode 100644 index 00000000..20ecc81f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListInstance.php @@ -0,0 +1,155 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + 'revision' => Values::array_get($payload, 'revision'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncListContext Context for this + * SyncListInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncListContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncListInstance + * + * @return SyncListInstance Fetched SyncListInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncListInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Access the syncListItems + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList + */ + protected function getSyncListItems() { + return $this->proxy()->syncListItems; + } + + /** + * Access the syncListPermissions + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList + */ + protected function getSyncListPermissions() { + return $this->proxy()->syncListPermissions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncListInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListList.php new file mode 100644 index 00000000..6d9ecaf2 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListList.php @@ -0,0 +1,174 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists'; + } + + /** + * Create a new SyncListInstance + * + * @param array|Options $options Optional Arguments + * @return SyncListInstance Newly created SyncListInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncListInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams SyncListInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncListInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncListInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncListInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncListInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncListPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncListInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncListInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncListPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncListContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Sync\Service\SyncListContext + */ + public function getContext($sid) { + return new SyncListContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncListList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListOptions.php new file mode 100644 index 00000000..fbac3937 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListOptions.php @@ -0,0 +1,61 @@ +options['uniqueName'] = $uniqueName; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Sync.CreateSyncListOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListPage.php new file mode 100644 index 00000000..ccbf7ae5 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncListPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncListInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncListPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.php new file mode 100644 index 00000000..3b7134a4 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.php @@ -0,0 +1,114 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + 'key' => $key, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($mapSid) . '/Items/' . rawurlencode($key) . ''; + } + + /** + * Fetch a SyncMapItemInstance + * + * @return SyncMapItemInstance Fetched SyncMapItemInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncMapItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['key'] + ); + } + + /** + * Deletes the SyncMapItemInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SyncMapItemInstance + * + * @param array $data The data + * @return SyncMapItemInstance Updated SyncMapItemInstance + */ + public function update($data) { + $data = Values::of(array( + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncMapItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['key'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncMapItemContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php new file mode 100644 index 00000000..a158a2d9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php @@ -0,0 +1,151 @@ +properties = array( + 'key' => Values::array_get($payload, 'key'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'mapSid' => Values::array_get($payload, 'map_sid'), + 'url' => Values::array_get($payload, 'url'), + 'revision' => Values::array_get($payload, 'revision'), + 'data' => Values::array_get($payload, 'data'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + 'key' => $key ?: $this->properties['key'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemContext Context + * for + * this + * SyncMapItemInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncMapItemContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['key'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncMapItemInstance + * + * @return SyncMapItemInstance Fetched SyncMapItemInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncMapItemInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SyncMapItemInstance + * + * @param array $data The data + * @return SyncMapItemInstance Updated SyncMapItemInstance + */ + public function update($data) { + return $this->proxy()->update( + $data + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncMapItemInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php new file mode 100644 index 00000000..5c92a735 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php @@ -0,0 +1,186 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($mapSid) . '/Items'; + } + + /** + * Create a new SyncMapItemInstance + * + * @param string $key The key + * @param array $data The data + * @return SyncMapItemInstance Newly created SyncMapItemInstance + */ + public function create($key, $data) { + $data = Values::of(array( + 'Key' => $key, + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncMapItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'] + ); + } + + /** + * Streams SyncMapItemInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncMapItemInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncMapItemInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncMapItemInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncMapItemInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Order' => $options['order'], + 'From' => $options['from'], + 'Bounds' => $options['bounds'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncMapItemPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncMapItemInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncMapItemInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncMapItemPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncMapItemContext + * + * @param string $key The key + * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemContext + */ + public function getContext($key) { + return new SyncMapItemContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $key + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncMapItemList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.php new file mode 100644 index 00000000..d47d6e59 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.php @@ -0,0 +1,89 @@ +options['order'] = $order; + $this->options['from'] = $from; + $this->options['bounds'] = $bounds; + } + + /** + * The order + * + * @param string $order The order + * @return $this Fluent Builder + */ + public function setOrder($order) { + $this->options['order'] = $order; + return $this; + } + + /** + * The from + * + * @param string $from The from + * @return $this Fluent Builder + */ + public function setFrom($from) { + $this->options['from'] = $from; + return $this; + } + + /** + * The bounds + * + * @param string $bounds The bounds + * @return $this Fluent Builder + */ + public function setBounds($bounds) { + $this->options['bounds'] = $bounds; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Sync.ReadSyncMapItemOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.php new file mode 100644 index 00000000..64416b25 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncMapItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncMapItemPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.php new file mode 100644 index 00000000..68a35c2e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.php @@ -0,0 +1,119 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($mapSid) . '/Permissions/' . rawurlencode($identity) . ''; + } + + /** + * Fetch a SyncMapPermissionInstance + * + * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncMapPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['identity'] + ); + } + + /** + * Deletes the SyncMapPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SyncMapPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return SyncMapPermissionInstance Updated SyncMapPermissionInstance + */ + public function update($read, $write, $manage) { + $data = Values::of(array( + 'Read' => Serialize::booleanToString($read), + 'Write' => Serialize::booleanToString($write), + 'Manage' => Serialize::booleanToString($manage), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncMapPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['identity'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncMapPermissionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php new file mode 100644 index 00000000..b6742795 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php @@ -0,0 +1,148 @@ +properties = array( + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'mapSid' => Values::array_get($payload, 'map_sid'), + 'identity' => Values::array_get($payload, 'identity'), + 'read' => Values::array_get($payload, 'read'), + 'write' => Values::array_get($payload, 'write'), + 'manage' => Values::array_get($payload, 'manage'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + 'identity' => $identity ?: $this->properties['identity'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionContext Context for this SyncMapPermissionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncMapPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['identity'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncMapPermissionInstance + * + * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncMapPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SyncMapPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return SyncMapPermissionInstance Updated SyncMapPermissionInstance + */ + public function update($read, $write, $manage) { + return $this->proxy()->update( + $read, + $write, + $manage + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncMapPermissionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php new file mode 100644 index 00000000..100f3e66 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php @@ -0,0 +1,150 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($mapSid) . '/Permissions'; + } + + /** + * Streams SyncMapPermissionInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncMapPermissionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncMapPermissionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncMapPermissionInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncMapPermissionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncMapPermissionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncMapPermissionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncMapPermissionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncMapPermissionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncMapPermissionContext + * + * @param string $identity Identity of the user to whom the Sync Map Permission + * applies. + * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionContext + */ + public function getContext($identity) { + return new SyncMapPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $identity + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncMapPermissionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.php new file mode 100644 index 00000000..4894dc35 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncMapPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncMapPermissionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapContext.php new file mode 100644 index 00000000..fc8ce504 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapContext.php @@ -0,0 +1,161 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a SyncMapInstance + * + * @return SyncMapInstance Fetched SyncMapInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncMapInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the SyncMapInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Access the syncMapItems + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemList + */ + protected function getSyncMapItems() { + if (!$this->_syncMapItems) { + $this->_syncMapItems = new SyncMapItemList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_syncMapItems; + } + + /** + * Access the syncMapPermissions + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionList + */ + protected function getSyncMapPermissions() { + if (!$this->_syncMapPermissions) { + $this->_syncMapPermissions = new SyncMapPermissionList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_syncMapPermissions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncMapContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapInstance.php new file mode 100644 index 00000000..e6d53e3c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapInstance.php @@ -0,0 +1,155 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + 'revision' => Values::array_get($payload, 'revision'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMapContext Context for this + * SyncMapInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncMapContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncMapInstance + * + * @return SyncMapInstance Fetched SyncMapInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncMapInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Access the syncMapItems + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemList + */ + protected function getSyncMapItems() { + return $this->proxy()->syncMapItems; + } + + /** + * Access the syncMapPermissions + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionList + */ + protected function getSyncMapPermissions() { + return $this->proxy()->syncMapPermissions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.SyncMapInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapList.php new file mode 100644 index 00000000..edafd57b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapList.php @@ -0,0 +1,174 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps'; + } + + /** + * Create a new SyncMapInstance + * + * @param array|Options $options Optional Arguments + * @return SyncMapInstance Newly created SyncMapInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncMapInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams SyncMapInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncMapInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncMapInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncMapInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncMapInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncMapPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncMapInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncMapInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncMapPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncMapContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Sync\Service\SyncMapContext + */ + public function getContext($sid) { + return new SyncMapContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncMapList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.php new file mode 100644 index 00000000..45df7fe4 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.php @@ -0,0 +1,61 @@ +options['uniqueName'] = $uniqueName; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Sync.CreateSyncMapOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapPage.php new file mode 100644 index 00000000..78169b6f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/Service/SyncMapPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncMapInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.SyncMapPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceContext.php new file mode 100644 index 00000000..0fdaf191 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceContext.php @@ -0,0 +1,208 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'WebhookUrl' => $options['webhookUrl'], + 'FriendlyName' => $options['friendlyName'], + 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']), + 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Access the documents + * + * @return \Twilio\Rest\Preview\Sync\Service\DocumentList + */ + protected function getDocuments() { + if (!$this->_documents) { + $this->_documents = new DocumentList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_documents; + } + + /** + * Access the syncLists + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncListList + */ + protected function getSyncLists() { + if (!$this->_syncLists) { + $this->_syncLists = new SyncListList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_syncLists; + } + + /** + * Access the syncMaps + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMapList + */ + protected function getSyncMaps() { + if (!$this->_syncMaps) { + $this->_syncMaps = new SyncMapList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_syncMaps; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.ServiceContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceInstance.php new file mode 100644 index 00000000..84a5b85e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceInstance.php @@ -0,0 +1,175 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + 'webhookUrl' => Values::array_get($payload, 'webhook_url'), + 'reachabilityWebhooksEnabled' => Values::array_get($payload, 'reachability_webhooks_enabled'), + 'aclEnabled' => Values::array_get($payload, 'acl_enabled'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Sync\ServiceContext Context for this + * ServiceInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ServiceContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the documents + * + * @return \Twilio\Rest\Preview\Sync\Service\DocumentList + */ + protected function getDocuments() { + return $this->proxy()->documents; + } + + /** + * Access the syncLists + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncListList + */ + protected function getSyncLists() { + return $this->proxy()->syncLists; + } + + /** + * Access the syncMaps + * + * @return \Twilio\Rest\Preview\Sync\Service\SyncMapList + */ + protected function getSyncMaps() { + return $this->proxy()->syncMaps; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Sync.ServiceInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceList.php new file mode 100644 index 00000000..e16edbd9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceList.php @@ -0,0 +1,173 @@ +solution = array(); + + $this->uri = '/Services'; + } + + /** + * Create a new ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Newly created ServiceInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'WebhookUrl' => $options['webhookUrl'], + 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']), + 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Streams ServiceInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads ServiceInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return ServiceInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of ServiceInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of ServiceInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Constructs a ServiceContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Sync\ServiceContext + */ + public function getContext($sid) { + return new ServiceContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.ServiceList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceOptions.php new file mode 100644 index 00000000..f34a9661 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServiceOptions.php @@ -0,0 +1,188 @@ +options['friendlyName'] = $friendlyName; + $this->options['webhookUrl'] = $webhookUrl; + $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; + $this->options['aclEnabled'] = $aclEnabled; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The webhook_url + * + * @param string $webhookUrl The webhook_url + * @return $this Fluent Builder + */ + public function setWebhookUrl($webhookUrl) { + $this->options['webhookUrl'] = $webhookUrl; + return $this; + } + + /** + * The reachability_webhooks_enabled + * + * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled + * @return $this Fluent Builder + */ + public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled) { + $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; + return $this; + } + + /** + * The acl_enabled + * + * @param boolean $aclEnabled The acl_enabled + * @return $this Fluent Builder + */ + public function setAclEnabled($aclEnabled) { + $this->options['aclEnabled'] = $aclEnabled; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Sync.CreateServiceOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateServiceOptions extends Options { + /** + * @param string $webhookUrl The webhook_url + * @param string $friendlyName The friendly_name + * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled + * @param boolean $aclEnabled The acl_enabled + */ + public function __construct($webhookUrl = Values::NONE, $friendlyName = Values::NONE, $reachabilityWebhooksEnabled = Values::NONE, $aclEnabled = Values::NONE) { + $this->options['webhookUrl'] = $webhookUrl; + $this->options['friendlyName'] = $friendlyName; + $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; + $this->options['aclEnabled'] = $aclEnabled; + } + + /** + * The webhook_url + * + * @param string $webhookUrl The webhook_url + * @return $this Fluent Builder + */ + public function setWebhookUrl($webhookUrl) { + $this->options['webhookUrl'] = $webhookUrl; + return $this; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The reachability_webhooks_enabled + * + * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled + * @return $this Fluent Builder + */ + public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled) { + $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; + return $this; + } + + /** + * The acl_enabled + * + * @param boolean $aclEnabled The acl_enabled + * @return $this Fluent Builder + */ + public function setAclEnabled($aclEnabled) { + $this->options['aclEnabled'] = $aclEnabled; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Sync.UpdateServiceOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServicePage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServicePage.php new file mode 100644 index 00000000..59b94e7b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Sync/ServicePage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Sync.ServicePage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless.php new file mode 100644 index 00000000..1b546726 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless.php @@ -0,0 +1,114 @@ +version = 'wireless'; + } + + /** + * @return \Twilio\Rest\Preview\Wireless\CommandList + */ + protected function getCommands() { + if (!$this->_commands) { + $this->_commands = new CommandList($this); + } + return $this->_commands; + } + + /** + * @return \Twilio\Rest\Preview\Wireless\RatePlanList + */ + protected function getRatePlans() { + if (!$this->_ratePlans) { + $this->_ratePlans = new RatePlanList($this); + } + return $this->_ratePlans; + } + + /** + * @return \Twilio\Rest\Preview\Wireless\SimList + */ + protected function getSims() { + if (!$this->_sims) { + $this->_sims = new SimList($this); + } + return $this->_sims; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandContext.php new file mode 100644 index 00000000..a2895842 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandContext.php @@ -0,0 +1,71 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Commands/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a CommandInstance + * + * @return CommandInstance Fetched CommandInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new CommandInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Wireless.CommandContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandInstance.php new file mode 100644 index 00000000..3e7eeb6f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandInstance.php @@ -0,0 +1,124 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'deviceSid' => Values::array_get($payload, 'device_sid'), + 'simSid' => Values::array_get($payload, 'sim_sid'), + 'command' => Values::array_get($payload, 'command'), + 'commandMode' => Values::array_get($payload, 'command_mode'), + 'status' => Values::array_get($payload, 'status'), + 'direction' => Values::array_get($payload, 'direction'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Wireless\CommandContext Context for this + * CommandInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new CommandContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a CommandInstance + * + * @return CommandInstance Fetched CommandInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Wireless.CommandInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandList.php new file mode 100644 index 00000000..452aeb4b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandList.php @@ -0,0 +1,184 @@ +solution = array(); + + $this->uri = '/Commands'; + } + + /** + * Streams CommandInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads CommandInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return CommandInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of CommandInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of CommandInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Device' => $options['device'], + 'Sim' => $options['sim'], + 'Status' => $options['status'], + 'Direction' => $options['direction'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new CommandPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of CommandInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of CommandInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new CommandPage($this->version, $response, $this->solution); + } + + /** + * Create a new CommandInstance + * + * @param string $command The command + * @param array|Options $options Optional Arguments + * @return CommandInstance Newly created CommandInstance + */ + public function create($command, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Command' => $command, + 'Device' => $options['device'], + 'Sim' => $options['sim'], + 'CallbackMethod' => $options['callbackMethod'], + 'CallbackUrl' => $options['callbackUrl'], + 'CommandMode' => $options['commandMode'], + 'IncludeSid' => $options['includeSid'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new CommandInstance( + $this->version, + $payload + ); + } + + /** + * Constructs a CommandContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Wireless\CommandContext + */ + public function getContext($sid) { + return new CommandContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless.CommandList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandOptions.php new file mode 100644 index 00000000..354ca12d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandOptions.php @@ -0,0 +1,216 @@ +options['device'] = $device; + $this->options['sim'] = $sim; + $this->options['status'] = $status; + $this->options['direction'] = $direction; + } + + /** + * The device + * + * @param string $device The device + * @return $this Fluent Builder + */ + public function setDevice($device) { + $this->options['device'] = $device; + return $this; + } + + /** + * The sim + * + * @param string $sim The sim + * @return $this Fluent Builder + */ + public function setSim($sim) { + $this->options['sim'] = $sim; + return $this; + } + + /** + * The status + * + * @param string $status The status + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * The direction + * + * @param string $direction The direction + * @return $this Fluent Builder + */ + public function setDirection($direction) { + $this->options['direction'] = $direction; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Wireless.ReadCommandOptions ' . implode(' ', $options) . ']'; + } +} + +class CreateCommandOptions extends Options { + /** + * @param string $device The device + * @param string $sim The sim + * @param string $callbackMethod The callback_method + * @param string $callbackUrl The callback_url + * @param string $commandMode The command_mode + * @param string $includeSid The include_sid + */ + public function __construct($device = Values::NONE, $sim = Values::NONE, $callbackMethod = Values::NONE, $callbackUrl = Values::NONE, $commandMode = Values::NONE, $includeSid = Values::NONE) { + $this->options['device'] = $device; + $this->options['sim'] = $sim; + $this->options['callbackMethod'] = $callbackMethod; + $this->options['callbackUrl'] = $callbackUrl; + $this->options['commandMode'] = $commandMode; + $this->options['includeSid'] = $includeSid; + } + + /** + * The device + * + * @param string $device The device + * @return $this Fluent Builder + */ + public function setDevice($device) { + $this->options['device'] = $device; + return $this; + } + + /** + * The sim + * + * @param string $sim The sim + * @return $this Fluent Builder + */ + public function setSim($sim) { + $this->options['sim'] = $sim; + return $this; + } + + /** + * The callback_method + * + * @param string $callbackMethod The callback_method + * @return $this Fluent Builder + */ + public function setCallbackMethod($callbackMethod) { + $this->options['callbackMethod'] = $callbackMethod; + return $this; + } + + /** + * The callback_url + * + * @param string $callbackUrl The callback_url + * @return $this Fluent Builder + */ + public function setCallbackUrl($callbackUrl) { + $this->options['callbackUrl'] = $callbackUrl; + return $this; + } + + /** + * The command_mode + * + * @param string $commandMode The command_mode + * @return $this Fluent Builder + */ + public function setCommandMode($commandMode) { + $this->options['commandMode'] = $commandMode; + return $this; + } + + /** + * The include_sid + * + * @param string $includeSid The include_sid + * @return $this Fluent Builder + */ + public function setIncludeSid($includeSid) { + $this->options['includeSid'] = $includeSid; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Wireless.CreateCommandOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandPage.php new file mode 100644 index 00000000..09a908e8 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/CommandPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new CommandInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless.CommandPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanContext.php new file mode 100644 index 00000000..bcfc000d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanContext.php @@ -0,0 +1,109 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/RatePlans/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a RatePlanInstance + * + * @return RatePlanInstance Fetched RatePlanInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new RatePlanInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Update the RatePlanInstance + * + * @param array|Options $options Optional Arguments + * @return RatePlanInstance Updated RatePlanInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'FriendlyName' => $options['friendlyName'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new RatePlanInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the RatePlanInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Wireless.RatePlanContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanInstance.php new file mode 100644 index 00000000..c79b47f2 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanInstance.php @@ -0,0 +1,152 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'dataEnabled' => Values::array_get($payload, 'data_enabled'), + 'dataMetering' => Values::array_get($payload, 'data_metering'), + 'dataLimit' => Values::array_get($payload, 'data_limit'), + 'messagingEnabled' => Values::array_get($payload, 'messaging_enabled'), + 'voiceEnabled' => Values::array_get($payload, 'voice_enabled'), + 'nationalRoamingEnabled' => Values::array_get($payload, 'national_roaming_enabled'), + 'internationalRoaming' => Values::array_get($payload, 'international_roaming'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Wireless\RatePlanContext Context for this + * RatePlanInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new RatePlanContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a RatePlanInstance + * + * @return RatePlanInstance Fetched RatePlanInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the RatePlanInstance + * + * @param array|Options $options Optional Arguments + * @return RatePlanInstance Updated RatePlanInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Deletes the RatePlanInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Wireless.RatePlanInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanList.php new file mode 100644 index 00000000..d87bfafe --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanList.php @@ -0,0 +1,179 @@ +solution = array(); + + $this->uri = '/RatePlans'; + } + + /** + * Streams RatePlanInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads RatePlanInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return RatePlanInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of RatePlanInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of RatePlanInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new RatePlanPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of RatePlanInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of RatePlanInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new RatePlanPage($this->version, $response, $this->solution); + } + + /** + * Create a new RatePlanInstance + * + * @param array|Options $options Optional Arguments + * @return RatePlanInstance Newly created RatePlanInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'FriendlyName' => $options['friendlyName'], + 'DataEnabled' => Serialize::booleanToString($options['dataEnabled']), + 'DataLimit' => $options['dataLimit'], + 'DataMetering' => $options['dataMetering'], + 'MessagingEnabled' => Serialize::booleanToString($options['messagingEnabled']), + 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), + 'CommandsEnabled' => Serialize::booleanToString($options['commandsEnabled']), + 'NationalRoamingEnabled' => Serialize::booleanToString($options['nationalRoamingEnabled']), + 'InternationalRoaming' => $options['internationalRoaming'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new RatePlanInstance( + $this->version, + $payload + ); + } + + /** + * Constructs a RatePlanContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Wireless\RatePlanContext + */ + public function getContext($sid) { + return new RatePlanContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless.RatePlanList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanOptions.php new file mode 100644 index 00000000..b5d440b5 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanOptions.php @@ -0,0 +1,244 @@ +options['uniqueName'] = $uniqueName; + $this->options['friendlyName'] = $friendlyName; + $this->options['dataEnabled'] = $dataEnabled; + $this->options['dataLimit'] = $dataLimit; + $this->options['dataMetering'] = $dataMetering; + $this->options['messagingEnabled'] = $messagingEnabled; + $this->options['voiceEnabled'] = $voiceEnabled; + $this->options['commandsEnabled'] = $commandsEnabled; + $this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled; + $this->options['internationalRoaming'] = $internationalRoaming; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The data_enabled + * + * @param boolean $dataEnabled The data_enabled + * @return $this Fluent Builder + */ + public function setDataEnabled($dataEnabled) { + $this->options['dataEnabled'] = $dataEnabled; + return $this; + } + + /** + * The data_limit + * + * @param integer $dataLimit The data_limit + * @return $this Fluent Builder + */ + public function setDataLimit($dataLimit) { + $this->options['dataLimit'] = $dataLimit; + return $this; + } + + /** + * The data_metering + * + * @param string $dataMetering The data_metering + * @return $this Fluent Builder + */ + public function setDataMetering($dataMetering) { + $this->options['dataMetering'] = $dataMetering; + return $this; + } + + /** + * The messaging_enabled + * + * @param boolean $messagingEnabled The messaging_enabled + * @return $this Fluent Builder + */ + public function setMessagingEnabled($messagingEnabled) { + $this->options['messagingEnabled'] = $messagingEnabled; + return $this; + } + + /** + * The voice_enabled + * + * @param boolean $voiceEnabled The voice_enabled + * @return $this Fluent Builder + */ + public function setVoiceEnabled($voiceEnabled) { + $this->options['voiceEnabled'] = $voiceEnabled; + return $this; + } + + /** + * The commands_enabled + * + * @param boolean $commandsEnabled The commands_enabled + * @return $this Fluent Builder + */ + public function setCommandsEnabled($commandsEnabled) { + $this->options['commandsEnabled'] = $commandsEnabled; + return $this; + } + + /** + * The national_roaming_enabled + * + * @param boolean $nationalRoamingEnabled The national_roaming_enabled + * @return $this Fluent Builder + */ + public function setNationalRoamingEnabled($nationalRoamingEnabled) { + $this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled; + return $this; + } + + /** + * The international_roaming + * + * @param string $internationalRoaming The international_roaming + * @return $this Fluent Builder + */ + public function setInternationalRoaming($internationalRoaming) { + $this->options['internationalRoaming'] = $internationalRoaming; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Wireless.CreateRatePlanOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateRatePlanOptions extends Options { + /** + * @param string $uniqueName The unique_name + * @param string $friendlyName The friendly_name + */ + public function __construct($uniqueName = Values::NONE, $friendlyName = Values::NONE) { + $this->options['uniqueName'] = $uniqueName; + $this->options['friendlyName'] = $friendlyName; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Wireless.UpdateRatePlanOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanPage.php new file mode 100644 index 00000000..d2785a27 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/RatePlanPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new RatePlanInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless.RatePlanPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageContext.php new file mode 100644 index 00000000..17f244bc --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageContext.php @@ -0,0 +1,78 @@ +solution = array( + 'simSid' => $simSid, + ); + + $this->uri = '/Sims/' . rawurlencode($simSid) . '/Usage'; + } + + /** + * Fetch a UsageInstance + * + * @param array|Options $options Optional Arguments + * @return UsageInstance Fetched UsageInstance + */ + public function fetch($options = array()) { + $options = new Values($options); + + $params = Values::of(array( + 'End' => $options['end'], + 'Start' => $options['start'], + )); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new UsageInstance( + $this->version, + $payload, + $this->solution['simSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Wireless.UsageContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageInstance.php new file mode 100644 index 00000000..1e714f03 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageInstance.php @@ -0,0 +1,123 @@ +properties = array( + 'simSid' => Values::array_get($payload, 'sim_sid'), + 'simUniqueName' => Values::array_get($payload, 'sim_unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'period' => Values::array_get($payload, 'period'), + 'commandsUsage' => Values::array_get($payload, 'commands_usage'), + 'commandsCosts' => Values::array_get($payload, 'commands_costs'), + 'dataUsage' => Values::array_get($payload, 'data_usage'), + 'dataCosts' => Values::array_get($payload, 'data_costs'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'simSid' => $simSid, + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Wireless\Sim\UsageContext Context for this + * UsageInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new UsageContext( + $this->version, + $this->solution['simSid'] + ); + } + + return $this->context; + } + + /** + * Fetch a UsageInstance + * + * @param array|Options $options Optional Arguments + * @return UsageInstance Fetched UsageInstance + */ + public function fetch($options = array()) { + return $this->proxy()->fetch( + $options + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Wireless.UsageInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageList.php new file mode 100644 index 00000000..1c39d04a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageList.php @@ -0,0 +1,55 @@ +solution = array( + 'simSid' => $simSid, + ); + } + + /** + * Constructs a UsageContext + * + * @return \Twilio\Rest\Preview\Wireless\Sim\UsageContext + */ + public function getContext() { + return new UsageContext( + $this->version, + $this->solution['simSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless.UsageList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.php new file mode 100644 index 00000000..e5943693 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.php @@ -0,0 +1,75 @@ +options['end'] = $end; + $this->options['start'] = $start; + } + + /** + * The end + * + * @param string $end The end + * @return $this Fluent Builder + */ + public function setEnd($end) { + $this->options['end'] = $end; + return $this; + } + + /** + * The start + * + * @param string $start The start + * @return $this Fluent Builder + */ + public function setStart($start) { + $this->options['start'] = $start; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Wireless.FetchUsageOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsagePage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsagePage.php new file mode 100644 index 00000000..6504142a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/Sim/UsagePage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new UsageInstance( + $this->version, + $payload, + $this->solution['simSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless.UsagePage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimContext.php new file mode 100644 index 00000000..e122653f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimContext.php @@ -0,0 +1,170 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Sims/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a SimInstance + * + * @return SimInstance Fetched SimInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SimInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Update the SimInstance + * + * @param array|Options $options Optional Arguments + * @return SimInstance Updated SimInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'CallbackMethod' => $options['callbackMethod'], + 'CallbackUrl' => $options['callbackUrl'], + 'FriendlyName' => $options['friendlyName'], + 'RatePlan' => $options['ratePlan'], + 'Status' => $options['status'], + 'CommandsCallbackMethod' => $options['commandsCallbackMethod'], + 'CommandsCallbackUrl' => $options['commandsCallbackUrl'], + 'SmsFallbackMethod' => $options['smsFallbackMethod'], + 'SmsFallbackUrl' => $options['smsFallbackUrl'], + 'SmsMethod' => $options['smsMethod'], + 'SmsUrl' => $options['smsUrl'], + 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], + 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], + 'VoiceMethod' => $options['voiceMethod'], + 'VoiceUrl' => $options['voiceUrl'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SimInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Access the usage + * + * @return \Twilio\Rest\Preview\Wireless\Sim\UsageList + */ + protected function getUsage() { + if (!$this->_usage) { + $this->_usage = new UsageList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_usage; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Wireless.SimContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimInstance.php new file mode 100644 index 00000000..6e50a801 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimInstance.php @@ -0,0 +1,169 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'ratePlanSid' => Values::array_get($payload, 'rate_plan_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'iccid' => Values::array_get($payload, 'iccid'), + 'eId' => Values::array_get($payload, 'e_id'), + 'status' => Values::array_get($payload, 'status'), + 'commandsCallbackUrl' => Values::array_get($payload, 'commands_callback_url'), + 'commandsCallbackMethod' => Values::array_get($payload, 'commands_callback_method'), + 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), + 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), + 'smsMethod' => Values::array_get($payload, 'sms_method'), + 'smsUrl' => Values::array_get($payload, 'sms_url'), + 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), + 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), + 'voiceMethod' => Values::array_get($payload, 'voice_method'), + 'voiceUrl' => Values::array_get($payload, 'voice_url'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Preview\Wireless\SimContext Context for this SimInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SimContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a SimInstance + * + * @return SimInstance Fetched SimInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the SimInstance + * + * @param array|Options $options Optional Arguments + * @return SimInstance Updated SimInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the usage + * + * @return \Twilio\Rest\Preview\Wireless\Sim\UsageList + */ + protected function getUsage() { + return $this->proxy()->usage; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Preview.Wireless.SimInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimList.php new file mode 100644 index 00000000..89ecee0c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimList.php @@ -0,0 +1,152 @@ +solution = array(); + + $this->uri = '/Sims'; + } + + /** + * Streams SimInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SimInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SimInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of SimInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SimInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Status' => $options['status'], + 'Iccid' => $options['iccid'], + 'RatePlan' => $options['ratePlan'], + 'EId' => $options['eId'], + 'SimRegistrationCode' => $options['simRegistrationCode'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SimPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SimInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SimInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SimPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SimContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Preview\Wireless\SimContext + */ + public function getContext($sid) { + return new SimContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless.SimList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimOptions.php new file mode 100644 index 00000000..d379669b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimOptions.php @@ -0,0 +1,370 @@ +options['status'] = $status; + $this->options['iccid'] = $iccid; + $this->options['ratePlan'] = $ratePlan; + $this->options['eId'] = $eId; + $this->options['simRegistrationCode'] = $simRegistrationCode; + } + + /** + * The status + * + * @param string $status The status + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * The iccid + * + * @param string $iccid The iccid + * @return $this Fluent Builder + */ + public function setIccid($iccid) { + $this->options['iccid'] = $iccid; + return $this; + } + + /** + * The rate_plan + * + * @param string $ratePlan The rate_plan + * @return $this Fluent Builder + */ + public function setRatePlan($ratePlan) { + $this->options['ratePlan'] = $ratePlan; + return $this; + } + + /** + * The e_id + * + * @param string $eId The e_id + * @return $this Fluent Builder + */ + public function setEId($eId) { + $this->options['eId'] = $eId; + return $this; + } + + /** + * The sim_registration_code + * + * @param string $simRegistrationCode The sim_registration_code + * @return $this Fluent Builder + */ + public function setSimRegistrationCode($simRegistrationCode) { + $this->options['simRegistrationCode'] = $simRegistrationCode; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Wireless.ReadSimOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateSimOptions extends Options { + /** + * @param string $uniqueName The unique_name + * @param string $callbackMethod The callback_method + * @param string $callbackUrl The callback_url + * @param string $friendlyName The friendly_name + * @param string $ratePlan The rate_plan + * @param string $status The status + * @param string $commandsCallbackMethod The commands_callback_method + * @param string $commandsCallbackUrl The commands_callback_url + * @param string $smsFallbackMethod The sms_fallback_method + * @param string $smsFallbackUrl The sms_fallback_url + * @param string $smsMethod The sms_method + * @param string $smsUrl The sms_url + * @param string $voiceFallbackMethod The voice_fallback_method + * @param string $voiceFallbackUrl The voice_fallback_url + * @param string $voiceMethod The voice_method + * @param string $voiceUrl The voice_url + */ + public function __construct($uniqueName = Values::NONE, $callbackMethod = Values::NONE, $callbackUrl = Values::NONE, $friendlyName = Values::NONE, $ratePlan = Values::NONE, $status = Values::NONE, $commandsCallbackMethod = Values::NONE, $commandsCallbackUrl = Values::NONE, $smsFallbackMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsMethod = Values::NONE, $smsUrl = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceUrl = Values::NONE) { + $this->options['uniqueName'] = $uniqueName; + $this->options['callbackMethod'] = $callbackMethod; + $this->options['callbackUrl'] = $callbackUrl; + $this->options['friendlyName'] = $friendlyName; + $this->options['ratePlan'] = $ratePlan; + $this->options['status'] = $status; + $this->options['commandsCallbackMethod'] = $commandsCallbackMethod; + $this->options['commandsCallbackUrl'] = $commandsCallbackUrl; + $this->options['smsFallbackMethod'] = $smsFallbackMethod; + $this->options['smsFallbackUrl'] = $smsFallbackUrl; + $this->options['smsMethod'] = $smsMethod; + $this->options['smsUrl'] = $smsUrl; + $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; + $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; + $this->options['voiceMethod'] = $voiceMethod; + $this->options['voiceUrl'] = $voiceUrl; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The callback_method + * + * @param string $callbackMethod The callback_method + * @return $this Fluent Builder + */ + public function setCallbackMethod($callbackMethod) { + $this->options['callbackMethod'] = $callbackMethod; + return $this; + } + + /** + * The callback_url + * + * @param string $callbackUrl The callback_url + * @return $this Fluent Builder + */ + public function setCallbackUrl($callbackUrl) { + $this->options['callbackUrl'] = $callbackUrl; + return $this; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The rate_plan + * + * @param string $ratePlan The rate_plan + * @return $this Fluent Builder + */ + public function setRatePlan($ratePlan) { + $this->options['ratePlan'] = $ratePlan; + return $this; + } + + /** + * The status + * + * @param string $status The status + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * The commands_callback_method + * + * @param string $commandsCallbackMethod The commands_callback_method + * @return $this Fluent Builder + */ + public function setCommandsCallbackMethod($commandsCallbackMethod) { + $this->options['commandsCallbackMethod'] = $commandsCallbackMethod; + return $this; + } + + /** + * The commands_callback_url + * + * @param string $commandsCallbackUrl The commands_callback_url + * @return $this Fluent Builder + */ + public function setCommandsCallbackUrl($commandsCallbackUrl) { + $this->options['commandsCallbackUrl'] = $commandsCallbackUrl; + return $this; + } + + /** + * The sms_fallback_method + * + * @param string $smsFallbackMethod The sms_fallback_method + * @return $this Fluent Builder + */ + public function setSmsFallbackMethod($smsFallbackMethod) { + $this->options['smsFallbackMethod'] = $smsFallbackMethod; + return $this; + } + + /** + * The sms_fallback_url + * + * @param string $smsFallbackUrl The sms_fallback_url + * @return $this Fluent Builder + */ + public function setSmsFallbackUrl($smsFallbackUrl) { + $this->options['smsFallbackUrl'] = $smsFallbackUrl; + return $this; + } + + /** + * The sms_method + * + * @param string $smsMethod The sms_method + * @return $this Fluent Builder + */ + public function setSmsMethod($smsMethod) { + $this->options['smsMethod'] = $smsMethod; + return $this; + } + + /** + * The sms_url + * + * @param string $smsUrl The sms_url + * @return $this Fluent Builder + */ + public function setSmsUrl($smsUrl) { + $this->options['smsUrl'] = $smsUrl; + return $this; + } + + /** + * The voice_fallback_method + * + * @param string $voiceFallbackMethod The voice_fallback_method + * @return $this Fluent Builder + */ + public function setVoiceFallbackMethod($voiceFallbackMethod) { + $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; + return $this; + } + + /** + * The voice_fallback_url + * + * @param string $voiceFallbackUrl The voice_fallback_url + * @return $this Fluent Builder + */ + public function setVoiceFallbackUrl($voiceFallbackUrl) { + $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; + return $this; + } + + /** + * The voice_method + * + * @param string $voiceMethod The voice_method + * @return $this Fluent Builder + */ + public function setVoiceMethod($voiceMethod) { + $this->options['voiceMethod'] = $voiceMethod; + return $this; + } + + /** + * The voice_url + * + * @param string $voiceUrl The voice_url + * @return $this Fluent Builder + */ + public function setVoiceUrl($voiceUrl) { + $this->options['voiceUrl'] = $voiceUrl; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Preview.Wireless.UpdateSimOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimPage.php new file mode 100644 index 00000000..e2170c77 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SimInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Preview.Wireless.SimPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync.php new file mode 100644 index 00000000..0dc1c1cf --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync.php @@ -0,0 +1,103 @@ +baseUrl = 'https://sync.twilio.com'; + } + + /** + * @return \Twilio\Rest\Sync\V1 Version v1 of sync + */ + protected function getV1() { + if (!$this->_v1) { + $this->_v1 = new V1($this); + } + return $this->_v1; + } + + /** + * Magic getter to lazy load version + * + * @param string $name Version to return + * @return \Twilio\Version The requested version + * @throws \Twilio\Exceptions\TwilioException For unknown versions + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown version ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $method = 'context' . ucfirst($name); + if (method_exists($this, $method)) { + return call_user_func_array(array($this, $method), $arguments); + } + + throw new TwilioException('Unknown context ' . $name); + } + + /** + * @return \Twilio\Rest\Sync\V1\ServiceList + */ + protected function getServices() { + return $this->v1->services; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Sync\V1\ServiceContext + */ + protected function contextServices($sid) { + return $this->v1->services($sid); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1.php new file mode 100644 index 00000000..a81bfb5a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1.php @@ -0,0 +1,86 @@ +version = 'v1'; + } + + /** + * @return \Twilio\Rest\Sync\V1\ServiceList + */ + protected function getServices() { + if (!$this->_services) { + $this->_services = new ServiceList($this); + } + return $this->_services; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.php new file mode 100644 index 00000000..2d5d899a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.php @@ -0,0 +1,119 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'documentSid' => $documentSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Documents/' . rawurlencode($documentSid) . '/Permissions/' . rawurlencode($identity) . ''; + } + + /** + * Fetch a DocumentPermissionInstance + * + * @return DocumentPermissionInstance Fetched DocumentPermissionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new DocumentPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['documentSid'], + $this->solution['identity'] + ); + } + + /** + * Deletes the DocumentPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the DocumentPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return DocumentPermissionInstance Updated DocumentPermissionInstance + */ + public function update($read, $write, $manage) { + $data = Values::of(array( + 'Read' => Serialize::booleanToString($read), + 'Write' => Serialize::booleanToString($write), + 'Manage' => Serialize::booleanToString($manage), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new DocumentPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['documentSid'], + $this->solution['identity'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.DocumentPermissionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.php new file mode 100644 index 00000000..1805cebc --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.php @@ -0,0 +1,148 @@ +properties = array( + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'documentSid' => Values::array_get($payload, 'document_sid'), + 'identity' => Values::array_get($payload, 'identity'), + 'read' => Values::array_get($payload, 'read'), + 'write' => Values::array_get($payload, 'write'), + 'manage' => Values::array_get($payload, 'manage'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'documentSid' => $documentSid, + 'identity' => $identity ?: $this->properties['identity'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionContext Context for this DocumentPermissionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new DocumentPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['documentSid'], + $this->solution['identity'] + ); + } + + return $this->context; + } + + /** + * Fetch a DocumentPermissionInstance + * + * @return DocumentPermissionInstance Fetched DocumentPermissionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the DocumentPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the DocumentPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return DocumentPermissionInstance Updated DocumentPermissionInstance + */ + public function update($read, $write, $manage) { + return $this->proxy()->update( + $read, + $write, + $manage + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.DocumentPermissionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php new file mode 100644 index 00000000..c008ddab --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php @@ -0,0 +1,151 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'documentSid' => $documentSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Documents/' . rawurlencode($documentSid) . '/Permissions'; + } + + /** + * Streams DocumentPermissionInstance records from the API as a generator + * stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads DocumentPermissionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return DocumentPermissionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of DocumentPermissionInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of DocumentPermissionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new DocumentPermissionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of DocumentPermissionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of DocumentPermissionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new DocumentPermissionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a DocumentPermissionContext + * + * @param string $identity Identity of the user to whom the Sync Document + * Permission applies. + * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionContext + */ + public function getContext($identity) { + return new DocumentPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['documentSid'], + $identity + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.DocumentPermissionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.php new file mode 100644 index 00000000..086cd098 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new DocumentPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['documentSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.DocumentPermissionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentContext.php new file mode 100644 index 00000000..b98716d8 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentContext.php @@ -0,0 +1,167 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Documents/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a DocumentInstance + * + * @return DocumentInstance Fetched DocumentInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new DocumentInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the DocumentInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the DocumentInstance + * + * @param array $data The data + * @return DocumentInstance Updated DocumentInstance + */ + public function update($data) { + $data = Values::of(array( + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new DocumentInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Access the documentPermissions + * + * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList + */ + protected function getDocumentPermissions() { + if (!$this->_documentPermissions) { + $this->_documentPermissions = new DocumentPermissionList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_documentPermissions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.DocumentContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentInstance.php new file mode 100644 index 00000000..0117726a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentInstance.php @@ -0,0 +1,159 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + 'revision' => Values::array_get($payload, 'revision'), + 'data' => Values::array_get($payload, 'data'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\Service\DocumentContext Context for this + * DocumentInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new DocumentContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a DocumentInstance + * + * @return DocumentInstance Fetched DocumentInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the DocumentInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the DocumentInstance + * + * @param array $data The data + * @return DocumentInstance Updated DocumentInstance + */ + public function update($data) { + return $this->proxy()->update( + $data + ); + } + + /** + * Access the documentPermissions + * + * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList + */ + protected function getDocumentPermissions() { + return $this->proxy()->documentPermissions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.DocumentInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentList.php new file mode 100644 index 00000000..c023a782 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentList.php @@ -0,0 +1,176 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Documents'; + } + + /** + * Create a new DocumentInstance + * + * @param array|Options $options Optional Arguments + * @return DocumentInstance Newly created DocumentInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'Data' => Serialize::json_object($options['data']), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new DocumentInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams DocumentInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads DocumentInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return DocumentInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of DocumentInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of DocumentInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new DocumentPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of DocumentInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of DocumentInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new DocumentPage($this->version, $response, $this->solution); + } + + /** + * Constructs a DocumentContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Sync\V1\Service\DocumentContext + */ + public function getContext($sid) { + return new DocumentContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.DocumentList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentOptions.php new file mode 100644 index 00000000..3ebcb893 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentOptions.php @@ -0,0 +1,75 @@ +options['uniqueName'] = $uniqueName; + $this->options['data'] = $data; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The data + * + * @param array $data The data + * @return $this Fluent Builder + */ + public function setData($data) { + $this->options['data'] = $data; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Sync.V1.CreateDocumentOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentPage.php new file mode 100644 index 00000000..0d752a94 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/DocumentPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new DocumentInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.DocumentPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.php new file mode 100644 index 00000000..1607c4e5 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.php @@ -0,0 +1,114 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + 'index' => $index, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($listSid) . '/Items/' . rawurlencode($index) . ''; + } + + /** + * Fetch a SyncListItemInstance + * + * @return SyncListItemInstance Fetched SyncListItemInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncListItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['index'] + ); + } + + /** + * Deletes the SyncListItemInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SyncListItemInstance + * + * @param array $data The data + * @return SyncListItemInstance Updated SyncListItemInstance + */ + public function update($data) { + $data = Values::of(array( + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncListItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['index'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncListItemContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.php new file mode 100644 index 00000000..d198f11e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.php @@ -0,0 +1,150 @@ +properties = array( + 'index' => Values::array_get($payload, 'index'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'listSid' => Values::array_get($payload, 'list_sid'), + 'url' => Values::array_get($payload, 'url'), + 'revision' => Values::array_get($payload, 'revision'), + 'data' => Values::array_get($payload, 'data'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + 'index' => $index ?: $this->properties['index'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemContext Context + * for this + * SyncListItemInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncListItemContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['index'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncListItemInstance + * + * @return SyncListItemInstance Fetched SyncListItemInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncListItemInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SyncListItemInstance + * + * @param array $data The data + * @return SyncListItemInstance Updated SyncListItemInstance + */ + public function update($data) { + return $this->proxy()->update( + $data + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncListItemInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.php new file mode 100644 index 00000000..f471b7ee --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.php @@ -0,0 +1,184 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($listSid) . '/Items'; + } + + /** + * Create a new SyncListItemInstance + * + * @param array $data The data + * @return SyncListItemInstance Newly created SyncListItemInstance + */ + public function create($data) { + $data = Values::of(array( + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncListItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'] + ); + } + + /** + * Streams SyncListItemInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncListItemInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncListItemInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncListItemInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncListItemInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Order' => $options['order'], + 'From' => $options['from'], + 'Bounds' => $options['bounds'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncListItemPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncListItemInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncListItemInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncListItemPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncListItemContext + * + * @param integer $index The index + * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemContext + */ + public function getContext($index) { + return new SyncListItemContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['listSid'], + $index + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncListItemList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.php new file mode 100644 index 00000000..93444a5e --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.php @@ -0,0 +1,89 @@ +options['order'] = $order; + $this->options['from'] = $from; + $this->options['bounds'] = $bounds; + } + + /** + * The order + * + * @param string $order The order + * @return $this Fluent Builder + */ + public function setOrder($order) { + $this->options['order'] = $order; + return $this; + } + + /** + * The from + * + * @param string $from The from + * @return $this Fluent Builder + */ + public function setFrom($from) { + $this->options['from'] = $from; + return $this; + } + + /** + * The bounds + * + * @param string $bounds The bounds + * @return $this Fluent Builder + */ + public function setBounds($bounds) { + $this->options['bounds'] = $bounds; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Sync.V1.ReadSyncListItemOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.php new file mode 100644 index 00000000..eb2867d3 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncListItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncListItemPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.php new file mode 100644 index 00000000..27097392 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.php @@ -0,0 +1,119 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($listSid) . '/Permissions/' . rawurlencode($identity) . ''; + } + + /** + * Fetch a SyncListPermissionInstance + * + * @return SyncListPermissionInstance Fetched SyncListPermissionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncListPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['identity'] + ); + } + + /** + * Deletes the SyncListPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SyncListPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return SyncListPermissionInstance Updated SyncListPermissionInstance + */ + public function update($read, $write, $manage) { + $data = Values::of(array( + 'Read' => Serialize::booleanToString($read), + 'Write' => Serialize::booleanToString($write), + 'Manage' => Serialize::booleanToString($manage), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncListPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['identity'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncListPermissionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.php new file mode 100644 index 00000000..ec644536 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.php @@ -0,0 +1,148 @@ +properties = array( + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'listSid' => Values::array_get($payload, 'list_sid'), + 'identity' => Values::array_get($payload, 'identity'), + 'read' => Values::array_get($payload, 'read'), + 'write' => Values::array_get($payload, 'write'), + 'manage' => Values::array_get($payload, 'manage'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + 'identity' => $identity ?: $this->properties['identity'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionContext Context for this SyncListPermissionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncListPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['listSid'], + $this->solution['identity'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncListPermissionInstance + * + * @return SyncListPermissionInstance Fetched SyncListPermissionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncListPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SyncListPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return SyncListPermissionInstance Updated SyncListPermissionInstance + */ + public function update($read, $write, $manage) { + return $this->proxy()->update( + $read, + $write, + $manage + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncListPermissionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.php new file mode 100644 index 00000000..70a0053b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.php @@ -0,0 +1,151 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'listSid' => $listSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($listSid) . '/Permissions'; + } + + /** + * Streams SyncListPermissionInstance records from the API as a generator + * stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncListPermissionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncListPermissionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncListPermissionInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncListPermissionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncListPermissionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncListPermissionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncListPermissionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncListPermissionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncListPermissionContext + * + * @param string $identity Identity of the user to whom the Sync List + * Permission applies. + * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionContext + */ + public function getContext($identity) { + return new SyncListPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['listSid'], + $identity + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncListPermissionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.php new file mode 100644 index 00000000..a051c170 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncListPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['listSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncListPermissionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListContext.php new file mode 100644 index 00000000..30fa3b83 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListContext.php @@ -0,0 +1,161 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a SyncListInstance + * + * @return SyncListInstance Fetched SyncListInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncListInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the SyncListInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Access the syncListItems + * + * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList + */ + protected function getSyncListItems() { + if (!$this->_syncListItems) { + $this->_syncListItems = new SyncListItemList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_syncListItems; + } + + /** + * Access the syncListPermissions + * + * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList + */ + protected function getSyncListPermissions() { + if (!$this->_syncListPermissions) { + $this->_syncListPermissions = new SyncListPermissionList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_syncListPermissions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncListContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListInstance.php new file mode 100644 index 00000000..2d09c0d0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListInstance.php @@ -0,0 +1,155 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + 'revision' => Values::array_get($payload, 'revision'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\Service\SyncListContext Context for this + * SyncListInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncListContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncListInstance + * + * @return SyncListInstance Fetched SyncListInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncListInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Access the syncListItems + * + * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList + */ + protected function getSyncListItems() { + return $this->proxy()->syncListItems; + } + + /** + * Access the syncListPermissions + * + * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList + */ + protected function getSyncListPermissions() { + return $this->proxy()->syncListPermissions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncListInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListList.php new file mode 100644 index 00000000..0d9df05b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListList.php @@ -0,0 +1,174 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Lists'; + } + + /** + * Create a new SyncListInstance + * + * @param array|Options $options Optional Arguments + * @return SyncListInstance Newly created SyncListInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncListInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams SyncListInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncListInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncListInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncListInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncListInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncListPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncListInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncListInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncListPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncListContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Sync\V1\Service\SyncListContext + */ + public function getContext($sid) { + return new SyncListContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncListList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListOptions.php new file mode 100644 index 00000000..6d9cb0a9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListOptions.php @@ -0,0 +1,61 @@ +options['uniqueName'] = $uniqueName; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Sync.V1.CreateSyncListOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListPage.php new file mode 100644 index 00000000..c28d0111 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncListPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncListInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncListPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.php new file mode 100644 index 00000000..4887966f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.php @@ -0,0 +1,114 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + 'key' => $key, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($mapSid) . '/Items/' . rawurlencode($key) . ''; + } + + /** + * Fetch a SyncMapItemInstance + * + * @return SyncMapItemInstance Fetched SyncMapItemInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncMapItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['key'] + ); + } + + /** + * Deletes the SyncMapItemInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SyncMapItemInstance + * + * @param array $data The data + * @return SyncMapItemInstance Updated SyncMapItemInstance + */ + public function update($data) { + $data = Values::of(array( + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncMapItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['key'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncMapItemContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.php new file mode 100644 index 00000000..56382cba --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.php @@ -0,0 +1,150 @@ +properties = array( + 'key' => Values::array_get($payload, 'key'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'mapSid' => Values::array_get($payload, 'map_sid'), + 'url' => Values::array_get($payload, 'url'), + 'revision' => Values::array_get($payload, 'revision'), + 'data' => Values::array_get($payload, 'data'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + 'key' => $key ?: $this->properties['key'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemContext Context for + * this + * SyncMapItemInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncMapItemContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['key'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncMapItemInstance + * + * @return SyncMapItemInstance Fetched SyncMapItemInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncMapItemInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SyncMapItemInstance + * + * @param array $data The data + * @return SyncMapItemInstance Updated SyncMapItemInstance + */ + public function update($data) { + return $this->proxy()->update( + $data + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncMapItemInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.php new file mode 100644 index 00000000..3563630d --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.php @@ -0,0 +1,186 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($mapSid) . '/Items'; + } + + /** + * Create a new SyncMapItemInstance + * + * @param string $key The key + * @param array $data The data + * @return SyncMapItemInstance Newly created SyncMapItemInstance + */ + public function create($key, $data) { + $data = Values::of(array( + 'Key' => $key, + 'Data' => Serialize::json_object($data), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncMapItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'] + ); + } + + /** + * Streams SyncMapItemInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncMapItemInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncMapItemInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncMapItemInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncMapItemInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Order' => $options['order'], + 'From' => $options['from'], + 'Bounds' => $options['bounds'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncMapItemPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncMapItemInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncMapItemInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncMapItemPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncMapItemContext + * + * @param string $key The key + * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemContext + */ + public function getContext($key) { + return new SyncMapItemContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $key + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncMapItemList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.php new file mode 100644 index 00000000..251df2f2 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.php @@ -0,0 +1,89 @@ +options['order'] = $order; + $this->options['from'] = $from; + $this->options['bounds'] = $bounds; + } + + /** + * The order + * + * @param string $order The order + * @return $this Fluent Builder + */ + public function setOrder($order) { + $this->options['order'] = $order; + return $this; + } + + /** + * The from + * + * @param string $from The from + * @return $this Fluent Builder + */ + public function setFrom($from) { + $this->options['from'] = $from; + return $this; + } + + /** + * The bounds + * + * @param string $bounds The bounds + * @return $this Fluent Builder + */ + public function setBounds($bounds) { + $this->options['bounds'] = $bounds; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Sync.V1.ReadSyncMapItemOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.php new file mode 100644 index 00000000..970beb51 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncMapItemInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncMapItemPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php new file mode 100644 index 00000000..02f5b2a5 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php @@ -0,0 +1,119 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + 'identity' => $identity, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($mapSid) . '/Permissions/' . rawurlencode($identity) . ''; + } + + /** + * Fetch a SyncMapPermissionInstance + * + * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncMapPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['identity'] + ); + } + + /** + * Deletes the SyncMapPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the SyncMapPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return SyncMapPermissionInstance Updated SyncMapPermissionInstance + */ + public function update($read, $write, $manage) { + $data = Values::of(array( + 'Read' => Serialize::booleanToString($read), + 'Write' => Serialize::booleanToString($write), + 'Manage' => Serialize::booleanToString($manage), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncMapPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['identity'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncMapPermissionContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.php new file mode 100644 index 00000000..f06b5e7a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.php @@ -0,0 +1,148 @@ +properties = array( + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'mapSid' => Values::array_get($payload, 'map_sid'), + 'identity' => Values::array_get($payload, 'identity'), + 'read' => Values::array_get($payload, 'read'), + 'write' => Values::array_get($payload, 'write'), + 'manage' => Values::array_get($payload, 'manage'), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + 'identity' => $identity ?: $this->properties['identity'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionContext Context for this SyncMapPermissionInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncMapPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $this->solution['identity'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncMapPermissionInstance + * + * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncMapPermissionInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the SyncMapPermissionInstance + * + * @param boolean $read Read access. + * @param boolean $write Write access. + * @param boolean $manage Manage access. + * @return SyncMapPermissionInstance Updated SyncMapPermissionInstance + */ + public function update($read, $write, $manage) { + return $this->proxy()->update( + $read, + $write, + $manage + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncMapPermissionInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.php new file mode 100644 index 00000000..075bb831 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.php @@ -0,0 +1,150 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'mapSid' => $mapSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($mapSid) . '/Permissions'; + } + + /** + * Streams SyncMapPermissionInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncMapPermissionInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncMapPermissionInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncMapPermissionInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncMapPermissionInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncMapPermissionPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncMapPermissionInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncMapPermissionInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncMapPermissionPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncMapPermissionContext + * + * @param string $identity Identity of the user to whom the Sync Map Permission + * applies. + * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionContext + */ + public function getContext($identity) { + return new SyncMapPermissionContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['mapSid'], + $identity + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncMapPermissionList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.php new file mode 100644 index 00000000..14ec5a9f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.php @@ -0,0 +1,42 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncMapPermissionInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['mapSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncMapPermissionPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapContext.php new file mode 100644 index 00000000..47ce1ac1 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapContext.php @@ -0,0 +1,161 @@ +solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a SyncMapInstance + * + * @return SyncMapInstance Fetched SyncMapInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SyncMapInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + /** + * Deletes the SyncMapInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Access the syncMapItems + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList + */ + protected function getSyncMapItems() { + if (!$this->_syncMapItems) { + $this->_syncMapItems = new SyncMapItemList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_syncMapItems; + } + + /** + * Access the syncMapPermissions + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList + */ + protected function getSyncMapPermissions() { + if (!$this->_syncMapPermissions) { + $this->_syncMapPermissions = new SyncMapPermissionList( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->_syncMapPermissions; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncMapContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapInstance.php new file mode 100644 index 00000000..d285a91a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapInstance.php @@ -0,0 +1,155 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'serviceSid' => Values::array_get($payload, 'service_sid'), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + 'revision' => Values::array_get($payload, 'revision'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'createdBy' => Values::array_get($payload, 'created_by'), + ); + + $this->solution = array( + 'serviceSid' => $serviceSid, + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMapContext Context for this + * SyncMapInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SyncMapContext( + $this->version, + $this->solution['serviceSid'], + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a SyncMapInstance + * + * @return SyncMapInstance Fetched SyncMapInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the SyncMapInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Access the syncMapItems + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList + */ + protected function getSyncMapItems() { + return $this->proxy()->syncMapItems; + } + + /** + * Access the syncMapPermissions + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList + */ + protected function getSyncMapPermissions() { + return $this->proxy()->syncMapPermissions; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.SyncMapInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapList.php new file mode 100644 index 00000000..abbf60e4 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapList.php @@ -0,0 +1,174 @@ +solution = array( + 'serviceSid' => $serviceSid, + ); + + $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Maps'; + } + + /** + * Create a new SyncMapInstance + * + * @param array|Options $options Optional Arguments + * @return SyncMapInstance Newly created SyncMapInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new SyncMapInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Streams SyncMapInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SyncMapInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SyncMapInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of SyncMapInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SyncMapInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SyncMapPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SyncMapInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SyncMapInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SyncMapPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SyncMapContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Sync\V1\Service\SyncMapContext + */ + public function getContext($sid) { + return new SyncMapContext( + $this->version, + $this->solution['serviceSid'], + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncMapList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapOptions.php new file mode 100644 index 00000000..5885fbdb --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapOptions.php @@ -0,0 +1,61 @@ +options['uniqueName'] = $uniqueName; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Sync.V1.CreateSyncMapOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapPage.php new file mode 100644 index 00000000..3479e1eb --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMapPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SyncMapInstance( + $this->version, + $payload, + $this->solution['serviceSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.SyncMapPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceContext.php new file mode 100644 index 00000000..13211b00 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceContext.php @@ -0,0 +1,208 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Services/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'WebhookUrl' => $options['webhookUrl'], + 'FriendlyName' => $options['friendlyName'], + 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']), + 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']), + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Access the documents + * + * @return \Twilio\Rest\Sync\V1\Service\DocumentList + */ + protected function getDocuments() { + if (!$this->_documents) { + $this->_documents = new DocumentList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_documents; + } + + /** + * Access the syncLists + * + * @return \Twilio\Rest\Sync\V1\Service\SyncListList + */ + protected function getSyncLists() { + if (!$this->_syncLists) { + $this->_syncLists = new SyncListList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_syncLists; + } + + /** + * Access the syncMaps + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMapList + */ + protected function getSyncMaps() { + if (!$this->_syncMaps) { + $this->_syncMaps = new SyncMapList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_syncMaps; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.ServiceContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceInstance.php new file mode 100644 index 00000000..cc98a65a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceInstance.php @@ -0,0 +1,174 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + 'webhookUrl' => Values::array_get($payload, 'webhook_url'), + 'reachabilityWebhooksEnabled' => Values::array_get($payload, 'reachability_webhooks_enabled'), + 'aclEnabled' => Values::array_get($payload, 'acl_enabled'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Sync\V1\ServiceContext Context for this ServiceInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new ServiceContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a ServiceInstance + * + * @return ServiceInstance Fetched ServiceInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Deletes the ServiceInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Updated ServiceInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the documents + * + * @return \Twilio\Rest\Sync\V1\Service\DocumentList + */ + protected function getDocuments() { + return $this->proxy()->documents; + } + + /** + * Access the syncLists + * + * @return \Twilio\Rest\Sync\V1\Service\SyncListList + */ + protected function getSyncLists() { + return $this->proxy()->syncLists; + } + + /** + * Access the syncMaps + * + * @return \Twilio\Rest\Sync\V1\Service\SyncMapList + */ + protected function getSyncMaps() { + return $this->proxy()->syncMaps; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Sync.V1.ServiceInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceList.php new file mode 100644 index 00000000..11ae60d0 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceList.php @@ -0,0 +1,173 @@ +solution = array(); + + $this->uri = '/Services'; + } + + /** + * Create a new ServiceInstance + * + * @param array|Options $options Optional Arguments + * @return ServiceInstance Newly created ServiceInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'FriendlyName' => $options['friendlyName'], + 'WebhookUrl' => $options['webhookUrl'], + 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']), + 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']), + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Streams ServiceInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads ServiceInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return ServiceInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of ServiceInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of ServiceInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of ServiceInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new ServicePage($this->version, $response, $this->solution); + } + + /** + * Constructs a ServiceContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Sync\V1\ServiceContext + */ + public function getContext($sid) { + return new ServiceContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.ServiceList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceOptions.php new file mode 100644 index 00000000..3d98e8b9 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServiceOptions.php @@ -0,0 +1,188 @@ +options['friendlyName'] = $friendlyName; + $this->options['webhookUrl'] = $webhookUrl; + $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; + $this->options['aclEnabled'] = $aclEnabled; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The webhook_url + * + * @param string $webhookUrl The webhook_url + * @return $this Fluent Builder + */ + public function setWebhookUrl($webhookUrl) { + $this->options['webhookUrl'] = $webhookUrl; + return $this; + } + + /** + * The reachability_webhooks_enabled + * + * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled + * @return $this Fluent Builder + */ + public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled) { + $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; + return $this; + } + + /** + * The acl_enabled + * + * @param boolean $aclEnabled The acl_enabled + * @return $this Fluent Builder + */ + public function setAclEnabled($aclEnabled) { + $this->options['aclEnabled'] = $aclEnabled; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Sync.V1.CreateServiceOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateServiceOptions extends Options { + /** + * @param string $webhookUrl The webhook_url + * @param string $friendlyName The friendly_name + * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled + * @param boolean $aclEnabled The acl_enabled + */ + public function __construct($webhookUrl = Values::NONE, $friendlyName = Values::NONE, $reachabilityWebhooksEnabled = Values::NONE, $aclEnabled = Values::NONE) { + $this->options['webhookUrl'] = $webhookUrl; + $this->options['friendlyName'] = $friendlyName; + $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; + $this->options['aclEnabled'] = $aclEnabled; + } + + /** + * The webhook_url + * + * @param string $webhookUrl The webhook_url + * @return $this Fluent Builder + */ + public function setWebhookUrl($webhookUrl) { + $this->options['webhookUrl'] = $webhookUrl; + return $this; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The reachability_webhooks_enabled + * + * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled + * @return $this Fluent Builder + */ + public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled) { + $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; + return $this; + } + + /** + * The acl_enabled + * + * @param boolean $aclEnabled The acl_enabled + * @return $this Fluent Builder + */ + public function setAclEnabled($aclEnabled) { + $this->options['aclEnabled'] = $aclEnabled; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Sync.V1.UpdateServiceOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServicePage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServicePage.php new file mode 100644 index 00000000..61b14565 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Sync/V1/ServicePage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new ServiceInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Sync.V1.ServicePage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php index 12bd3166..db4200a2 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php @@ -90,6 +90,36 @@ public function update($options = array()) { 'RedirectCallSid' => $options['redirectCallSid'], 'RedirectAccept' => Serialize::booleanToString($options['redirectAccept']), 'RedirectUrl' => $options['redirectUrl'], + 'To' => $options['to'], + 'From' => $options['from'], + 'StatusCallback' => $options['statusCallback'], + 'StatusCallbackMethod' => $options['statusCallbackMethod'], + 'StatusCallbackEvent' => $options['statusCallbackEvent'], + 'Timeout' => $options['timeout'], + 'Record' => Serialize::booleanToString($options['record']), + 'Muted' => Serialize::booleanToString($options['muted']), + 'Beep' => $options['beep'], + 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']), + 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']), + 'WaitUrl' => $options['waitUrl'], + 'WaitMethod' => $options['waitMethod'], + 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']), + 'MaxParticipants' => $options['maxParticipants'], + 'ConferenceStatusCallback' => $options['conferenceStatusCallback'], + 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'], + 'ConferenceStatusCallbackEvent' => $options['conferenceStatusCallbackEvent'], + 'ConferenceRecord' => $options['conferenceRecord'], + 'ConferenceTrim' => $options['conferenceTrim'], + 'RecordingChannels' => $options['recordingChannels'], + 'RecordingStatusCallback' => $options['recordingStatusCallback'], + 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], + 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'], + 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'], + 'Region' => $options['region'], + 'SipAuthUsername' => $options['sipAuthUsername'], + 'SipAuthPassword' => $options['sipAuthPassword'], + 'DequeueStatusCallbackEvent' => $options['dequeueStatusCallbackEvent'], + 'PostWorkActivitySid' => $options['postWorkActivitySid'], )); $payload = $this->version->update( diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.php index ca2a3848..8c8350f6 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.php @@ -41,10 +41,45 @@ public static function read($reservationStatus = Values::NONE) { * @param string $redirectCallSid The redirect_call_sid * @param boolean $redirectAccept The redirect_accept * @param string $redirectUrl The redirect_url + * @param string $to The to + * @param string $from The from + * @param string $statusCallback The status_callback + * @param string $statusCallbackMethod The status_callback_method + * @param string $statusCallbackEvent The status_callback_event + * @param integer $timeout The timeout + * @param boolean $record The record + * @param boolean $muted The muted + * @param string $beep The beep + * @param boolean $startConferenceOnEnter The start_conference_on_enter + * @param boolean $endConferenceOnExit The end_conference_on_exit + * @param string $waitUrl The wait_url + * @param string $waitMethod The wait_method + * @param boolean $earlyMedia The early_media + * @param integer $maxParticipants The max_participants + * @param string $conferenceStatusCallback The conference_status_callback + * @param string $conferenceStatusCallbackMethod The + * conference_status_callback_method + * @param string $conferenceStatusCallbackEvent The + * conference_status_callback_event + * @param string $conferenceRecord The conference_record + * @param string $conferenceTrim The conference_trim + * @param string $recordingChannels The recording_channels + * @param string $recordingStatusCallback The recording_status_callback + * @param string $recordingStatusCallbackMethod The + * recording_status_callback_method + * @param string $conferenceRecordingStatusCallback The + * conference_recording_status_callback + * @param string $conferenceRecordingStatusCallbackMethod The + * conference_recording_status_callback_method + * @param string $region The region + * @param string $sipAuthUsername The sip_auth_username + * @param string $sipAuthPassword The sip_auth_password + * @param string $dequeueStatusCallbackEvent The dequeue_status_callback_event + * @param string $postWorkActivitySid The post_work_activity_sid * @return UpdateReservationOptions Options builder */ - public static function update($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE) { - return new UpdateReservationOptions($reservationStatus, $workerActivitySid, $instruction, $dequeuePostWorkActivitySid, $dequeueFrom, $dequeueRecord, $dequeueTimeout, $dequeueTo, $dequeueStatusCallbackUrl, $callFrom, $callRecord, $callTimeout, $callTo, $callUrl, $callStatusCallbackUrl, $callAccept, $redirectCallSid, $redirectAccept, $redirectUrl); + public static function update($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE, $to = Values::NONE, $from = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $statusCallbackEvent = Values::NONE, $timeout = Values::NONE, $record = Values::NONE, $muted = Values::NONE, $beep = Values::NONE, $startConferenceOnEnter = Values::NONE, $endConferenceOnExit = Values::NONE, $waitUrl = Values::NONE, $waitMethod = Values::NONE, $earlyMedia = Values::NONE, $maxParticipants = Values::NONE, $conferenceStatusCallback = Values::NONE, $conferenceStatusCallbackMethod = Values::NONE, $conferenceStatusCallbackEvent = Values::NONE, $conferenceRecord = Values::NONE, $conferenceTrim = Values::NONE, $recordingChannels = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $conferenceRecordingStatusCallback = Values::NONE, $conferenceRecordingStatusCallbackMethod = Values::NONE, $region = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $dequeueStatusCallbackEvent = Values::NONE, $postWorkActivitySid = Values::NONE) { + return new UpdateReservationOptions($reservationStatus, $workerActivitySid, $instruction, $dequeuePostWorkActivitySid, $dequeueFrom, $dequeueRecord, $dequeueTimeout, $dequeueTo, $dequeueStatusCallbackUrl, $callFrom, $callRecord, $callTimeout, $callTo, $callUrl, $callStatusCallbackUrl, $callAccept, $redirectCallSid, $redirectAccept, $redirectUrl, $to, $from, $statusCallback, $statusCallbackMethod, $statusCallbackEvent, $timeout, $record, $muted, $beep, $startConferenceOnEnter, $endConferenceOnExit, $waitUrl, $waitMethod, $earlyMedia, $maxParticipants, $conferenceStatusCallback, $conferenceStatusCallbackMethod, $conferenceStatusCallbackEvent, $conferenceRecord, $conferenceTrim, $recordingChannels, $recordingStatusCallback, $recordingStatusCallbackMethod, $conferenceRecordingStatusCallback, $conferenceRecordingStatusCallbackMethod, $region, $sipAuthUsername, $sipAuthPassword, $dequeueStatusCallbackEvent, $postWorkActivitySid); } } @@ -104,8 +139,43 @@ class UpdateReservationOptions extends Options { * @param string $redirectCallSid The redirect_call_sid * @param boolean $redirectAccept The redirect_accept * @param string $redirectUrl The redirect_url + * @param string $to The to + * @param string $from The from + * @param string $statusCallback The status_callback + * @param string $statusCallbackMethod The status_callback_method + * @param string $statusCallbackEvent The status_callback_event + * @param integer $timeout The timeout + * @param boolean $record The record + * @param boolean $muted The muted + * @param string $beep The beep + * @param boolean $startConferenceOnEnter The start_conference_on_enter + * @param boolean $endConferenceOnExit The end_conference_on_exit + * @param string $waitUrl The wait_url + * @param string $waitMethod The wait_method + * @param boolean $earlyMedia The early_media + * @param integer $maxParticipants The max_participants + * @param string $conferenceStatusCallback The conference_status_callback + * @param string $conferenceStatusCallbackMethod The + * conference_status_callback_method + * @param string $conferenceStatusCallbackEvent The + * conference_status_callback_event + * @param string $conferenceRecord The conference_record + * @param string $conferenceTrim The conference_trim + * @param string $recordingChannels The recording_channels + * @param string $recordingStatusCallback The recording_status_callback + * @param string $recordingStatusCallbackMethod The + * recording_status_callback_method + * @param string $conferenceRecordingStatusCallback The + * conference_recording_status_callback + * @param string $conferenceRecordingStatusCallbackMethod The + * conference_recording_status_callback_method + * @param string $region The region + * @param string $sipAuthUsername The sip_auth_username + * @param string $sipAuthPassword The sip_auth_password + * @param string $dequeueStatusCallbackEvent The dequeue_status_callback_event + * @param string $postWorkActivitySid The post_work_activity_sid */ - public function __construct($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE) { + public function __construct($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE, $to = Values::NONE, $from = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $statusCallbackEvent = Values::NONE, $timeout = Values::NONE, $record = Values::NONE, $muted = Values::NONE, $beep = Values::NONE, $startConferenceOnEnter = Values::NONE, $endConferenceOnExit = Values::NONE, $waitUrl = Values::NONE, $waitMethod = Values::NONE, $earlyMedia = Values::NONE, $maxParticipants = Values::NONE, $conferenceStatusCallback = Values::NONE, $conferenceStatusCallbackMethod = Values::NONE, $conferenceStatusCallbackEvent = Values::NONE, $conferenceRecord = Values::NONE, $conferenceTrim = Values::NONE, $recordingChannels = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $conferenceRecordingStatusCallback = Values::NONE, $conferenceRecordingStatusCallbackMethod = Values::NONE, $region = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $dequeueStatusCallbackEvent = Values::NONE, $postWorkActivitySid = Values::NONE) { $this->options['reservationStatus'] = $reservationStatus; $this->options['workerActivitySid'] = $workerActivitySid; $this->options['instruction'] = $instruction; @@ -125,6 +195,36 @@ public function __construct($reservationStatus = Values::NONE, $workerActivitySi $this->options['redirectCallSid'] = $redirectCallSid; $this->options['redirectAccept'] = $redirectAccept; $this->options['redirectUrl'] = $redirectUrl; + $this->options['to'] = $to; + $this->options['from'] = $from; + $this->options['statusCallback'] = $statusCallback; + $this->options['statusCallbackMethod'] = $statusCallbackMethod; + $this->options['statusCallbackEvent'] = $statusCallbackEvent; + $this->options['timeout'] = $timeout; + $this->options['record'] = $record; + $this->options['muted'] = $muted; + $this->options['beep'] = $beep; + $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; + $this->options['endConferenceOnExit'] = $endConferenceOnExit; + $this->options['waitUrl'] = $waitUrl; + $this->options['waitMethod'] = $waitMethod; + $this->options['earlyMedia'] = $earlyMedia; + $this->options['maxParticipants'] = $maxParticipants; + $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; + $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; + $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; + $this->options['conferenceRecord'] = $conferenceRecord; + $this->options['conferenceTrim'] = $conferenceTrim; + $this->options['recordingChannels'] = $recordingChannels; + $this->options['recordingStatusCallback'] = $recordingStatusCallback; + $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; + $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; + $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; + $this->options['region'] = $region; + $this->options['sipAuthUsername'] = $sipAuthUsername; + $this->options['sipAuthPassword'] = $sipAuthPassword; + $this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent; + $this->options['postWorkActivitySid'] = $postWorkActivitySid; } /** @@ -336,6 +436,341 @@ public function setRedirectUrl($redirectUrl) { return $this; } + /** + * The to + * + * @param string $to The to + * @return $this Fluent Builder + */ + public function setTo($to) { + $this->options['to'] = $to; + return $this; + } + + /** + * The from + * + * @param string $from The from + * @return $this Fluent Builder + */ + public function setFrom($from) { + $this->options['from'] = $from; + return $this; + } + + /** + * The status_callback + * + * @param string $statusCallback The status_callback + * @return $this Fluent Builder + */ + public function setStatusCallback($statusCallback) { + $this->options['statusCallback'] = $statusCallback; + return $this; + } + + /** + * The status_callback_method + * + * @param string $statusCallbackMethod The status_callback_method + * @return $this Fluent Builder + */ + public function setStatusCallbackMethod($statusCallbackMethod) { + $this->options['statusCallbackMethod'] = $statusCallbackMethod; + return $this; + } + + /** + * The status_callback_event + * + * @param string $statusCallbackEvent The status_callback_event + * @return $this Fluent Builder + */ + public function setStatusCallbackEvent($statusCallbackEvent) { + $this->options['statusCallbackEvent'] = $statusCallbackEvent; + return $this; + } + + /** + * The timeout + * + * @param integer $timeout The timeout + * @return $this Fluent Builder + */ + public function setTimeout($timeout) { + $this->options['timeout'] = $timeout; + return $this; + } + + /** + * The record + * + * @param boolean $record The record + * @return $this Fluent Builder + */ + public function setRecord($record) { + $this->options['record'] = $record; + return $this; + } + + /** + * The muted + * + * @param boolean $muted The muted + * @return $this Fluent Builder + */ + public function setMuted($muted) { + $this->options['muted'] = $muted; + return $this; + } + + /** + * The beep + * + * @param string $beep The beep + * @return $this Fluent Builder + */ + public function setBeep($beep) { + $this->options['beep'] = $beep; + return $this; + } + + /** + * The start_conference_on_enter + * + * @param boolean $startConferenceOnEnter The start_conference_on_enter + * @return $this Fluent Builder + */ + public function setStartConferenceOnEnter($startConferenceOnEnter) { + $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; + return $this; + } + + /** + * The end_conference_on_exit + * + * @param boolean $endConferenceOnExit The end_conference_on_exit + * @return $this Fluent Builder + */ + public function setEndConferenceOnExit($endConferenceOnExit) { + $this->options['endConferenceOnExit'] = $endConferenceOnExit; + return $this; + } + + /** + * The wait_url + * + * @param string $waitUrl The wait_url + * @return $this Fluent Builder + */ + public function setWaitUrl($waitUrl) { + $this->options['waitUrl'] = $waitUrl; + return $this; + } + + /** + * The wait_method + * + * @param string $waitMethod The wait_method + * @return $this Fluent Builder + */ + public function setWaitMethod($waitMethod) { + $this->options['waitMethod'] = $waitMethod; + return $this; + } + + /** + * The early_media + * + * @param boolean $earlyMedia The early_media + * @return $this Fluent Builder + */ + public function setEarlyMedia($earlyMedia) { + $this->options['earlyMedia'] = $earlyMedia; + return $this; + } + + /** + * The max_participants + * + * @param integer $maxParticipants The max_participants + * @return $this Fluent Builder + */ + public function setMaxParticipants($maxParticipants) { + $this->options['maxParticipants'] = $maxParticipants; + return $this; + } + + /** + * The conference_status_callback + * + * @param string $conferenceStatusCallback The conference_status_callback + * @return $this Fluent Builder + */ + public function setConferenceStatusCallback($conferenceStatusCallback) { + $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; + return $this; + } + + /** + * The conference_status_callback_method + * + * @param string $conferenceStatusCallbackMethod The + * conference_status_callback_method + * @return $this Fluent Builder + */ + public function setConferenceStatusCallbackMethod($conferenceStatusCallbackMethod) { + $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; + return $this; + } + + /** + * The conference_status_callback_event + * + * @param string $conferenceStatusCallbackEvent The + * conference_status_callback_event + * @return $this Fluent Builder + */ + public function setConferenceStatusCallbackEvent($conferenceStatusCallbackEvent) { + $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; + return $this; + } + + /** + * The conference_record + * + * @param string $conferenceRecord The conference_record + * @return $this Fluent Builder + */ + public function setConferenceRecord($conferenceRecord) { + $this->options['conferenceRecord'] = $conferenceRecord; + return $this; + } + + /** + * The conference_trim + * + * @param string $conferenceTrim The conference_trim + * @return $this Fluent Builder + */ + public function setConferenceTrim($conferenceTrim) { + $this->options['conferenceTrim'] = $conferenceTrim; + return $this; + } + + /** + * The recording_channels + * + * @param string $recordingChannels The recording_channels + * @return $this Fluent Builder + */ + public function setRecordingChannels($recordingChannels) { + $this->options['recordingChannels'] = $recordingChannels; + return $this; + } + + /** + * The recording_status_callback + * + * @param string $recordingStatusCallback The recording_status_callback + * @return $this Fluent Builder + */ + public function setRecordingStatusCallback($recordingStatusCallback) { + $this->options['recordingStatusCallback'] = $recordingStatusCallback; + return $this; + } + + /** + * The recording_status_callback_method + * + * @param string $recordingStatusCallbackMethod The + * recording_status_callback_method + * @return $this Fluent Builder + */ + public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod) { + $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; + return $this; + } + + /** + * The conference_recording_status_callback + * + * @param string $conferenceRecordingStatusCallback The + * conference_recording_status_callback + * @return $this Fluent Builder + */ + public function setConferenceRecordingStatusCallback($conferenceRecordingStatusCallback) { + $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; + return $this; + } + + /** + * The conference_recording_status_callback_method + * + * @param string $conferenceRecordingStatusCallbackMethod The + * conference_recording_status_callback_method + * @return $this Fluent Builder + */ + public function setConferenceRecordingStatusCallbackMethod($conferenceRecordingStatusCallbackMethod) { + $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; + return $this; + } + + /** + * The region + * + * @param string $region The region + * @return $this Fluent Builder + */ + public function setRegion($region) { + $this->options['region'] = $region; + return $this; + } + + /** + * The sip_auth_username + * + * @param string $sipAuthUsername The sip_auth_username + * @return $this Fluent Builder + */ + public function setSipAuthUsername($sipAuthUsername) { + $this->options['sipAuthUsername'] = $sipAuthUsername; + return $this; + } + + /** + * The sip_auth_password + * + * @param string $sipAuthPassword The sip_auth_password + * @return $this Fluent Builder + */ + public function setSipAuthPassword($sipAuthPassword) { + $this->options['sipAuthPassword'] = $sipAuthPassword; + return $this; + } + + /** + * The dequeue_status_callback_event + * + * @param string $dequeueStatusCallbackEvent The dequeue_status_callback_event + * @return $this Fluent Builder + */ + public function setDequeueStatusCallbackEvent($dequeueStatusCallbackEvent) { + $this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent; + return $this; + } + + /** + * The post_work_activity_sid + * + * @param string $postWorkActivitySid The post_work_activity_sid + * @return $this Fluent Builder + */ + public function setPostWorkActivitySid($postWorkActivitySid) { + $this->options['postWorkActivitySid'] = $postWorkActivitySid; + return $this; + } + /** * Provide a friendly representation * diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.php index cca3a773..5e7891f6 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.php @@ -90,6 +90,36 @@ public function update($options = array()) { 'RedirectCallSid' => $options['redirectCallSid'], 'RedirectAccept' => Serialize::booleanToString($options['redirectAccept']), 'RedirectUrl' => $options['redirectUrl'], + 'To' => $options['to'], + 'From' => $options['from'], + 'StatusCallback' => $options['statusCallback'], + 'StatusCallbackMethod' => $options['statusCallbackMethod'], + 'StatusCallbackEvent' => $options['statusCallbackEvent'], + 'Timeout' => $options['timeout'], + 'Record' => Serialize::booleanToString($options['record']), + 'Muted' => Serialize::booleanToString($options['muted']), + 'Beep' => $options['beep'], + 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']), + 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']), + 'WaitUrl' => $options['waitUrl'], + 'WaitMethod' => $options['waitMethod'], + 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']), + 'MaxParticipants' => $options['maxParticipants'], + 'ConferenceStatusCallback' => $options['conferenceStatusCallback'], + 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'], + 'ConferenceStatusCallbackEvent' => $options['conferenceStatusCallbackEvent'], + 'ConferenceRecord' => $options['conferenceRecord'], + 'ConferenceTrim' => $options['conferenceTrim'], + 'RecordingChannels' => $options['recordingChannels'], + 'RecordingStatusCallback' => $options['recordingStatusCallback'], + 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], + 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'], + 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'], + 'Region' => $options['region'], + 'SipAuthUsername' => $options['sipAuthUsername'], + 'SipAuthPassword' => $options['sipAuthPassword'], + 'DequeueStatusCallbackEvent' => $options['dequeueStatusCallbackEvent'], + 'PostWorkActivitySid' => $options['postWorkActivitySid'], )); $payload = $this->version->update( diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.php index 184ce2eb..461547d4 100644 --- a/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.php +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.php @@ -41,10 +41,45 @@ public static function read($reservationStatus = Values::NONE) { * @param string $redirectCallSid The redirect_call_sid * @param boolean $redirectAccept The redirect_accept * @param string $redirectUrl The redirect_url + * @param string $to The to + * @param string $from The from + * @param string $statusCallback The status_callback + * @param string $statusCallbackMethod The status_callback_method + * @param string $statusCallbackEvent The status_callback_event + * @param integer $timeout The timeout + * @param boolean $record The record + * @param boolean $muted The muted + * @param string $beep The beep + * @param boolean $startConferenceOnEnter The start_conference_on_enter + * @param boolean $endConferenceOnExit The end_conference_on_exit + * @param string $waitUrl The wait_url + * @param string $waitMethod The wait_method + * @param boolean $earlyMedia The early_media + * @param integer $maxParticipants The max_participants + * @param string $conferenceStatusCallback The conference_status_callback + * @param string $conferenceStatusCallbackMethod The + * conference_status_callback_method + * @param string $conferenceStatusCallbackEvent The + * conference_status_callback_event + * @param string $conferenceRecord The conference_record + * @param string $conferenceTrim The conference_trim + * @param string $recordingChannels The recording_channels + * @param string $recordingStatusCallback The recording_status_callback + * @param string $recordingStatusCallbackMethod The + * recording_status_callback_method + * @param string $conferenceRecordingStatusCallback The + * conference_recording_status_callback + * @param string $conferenceRecordingStatusCallbackMethod The + * conference_recording_status_callback_method + * @param string $region The region + * @param string $sipAuthUsername The sip_auth_username + * @param string $sipAuthPassword The sip_auth_password + * @param string $dequeueStatusCallbackEvent The dequeue_status_callback_event + * @param string $postWorkActivitySid The post_work_activity_sid * @return UpdateReservationOptions Options builder */ - public static function update($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE) { - return new UpdateReservationOptions($reservationStatus, $workerActivitySid, $instruction, $dequeuePostWorkActivitySid, $dequeueFrom, $dequeueRecord, $dequeueTimeout, $dequeueTo, $dequeueStatusCallbackUrl, $callFrom, $callRecord, $callTimeout, $callTo, $callUrl, $callStatusCallbackUrl, $callAccept, $redirectCallSid, $redirectAccept, $redirectUrl); + public static function update($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE, $to = Values::NONE, $from = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $statusCallbackEvent = Values::NONE, $timeout = Values::NONE, $record = Values::NONE, $muted = Values::NONE, $beep = Values::NONE, $startConferenceOnEnter = Values::NONE, $endConferenceOnExit = Values::NONE, $waitUrl = Values::NONE, $waitMethod = Values::NONE, $earlyMedia = Values::NONE, $maxParticipants = Values::NONE, $conferenceStatusCallback = Values::NONE, $conferenceStatusCallbackMethod = Values::NONE, $conferenceStatusCallbackEvent = Values::NONE, $conferenceRecord = Values::NONE, $conferenceTrim = Values::NONE, $recordingChannels = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $conferenceRecordingStatusCallback = Values::NONE, $conferenceRecordingStatusCallbackMethod = Values::NONE, $region = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $dequeueStatusCallbackEvent = Values::NONE, $postWorkActivitySid = Values::NONE) { + return new UpdateReservationOptions($reservationStatus, $workerActivitySid, $instruction, $dequeuePostWorkActivitySid, $dequeueFrom, $dequeueRecord, $dequeueTimeout, $dequeueTo, $dequeueStatusCallbackUrl, $callFrom, $callRecord, $callTimeout, $callTo, $callUrl, $callStatusCallbackUrl, $callAccept, $redirectCallSid, $redirectAccept, $redirectUrl, $to, $from, $statusCallback, $statusCallbackMethod, $statusCallbackEvent, $timeout, $record, $muted, $beep, $startConferenceOnEnter, $endConferenceOnExit, $waitUrl, $waitMethod, $earlyMedia, $maxParticipants, $conferenceStatusCallback, $conferenceStatusCallbackMethod, $conferenceStatusCallbackEvent, $conferenceRecord, $conferenceTrim, $recordingChannels, $recordingStatusCallback, $recordingStatusCallbackMethod, $conferenceRecordingStatusCallback, $conferenceRecordingStatusCallbackMethod, $region, $sipAuthUsername, $sipAuthPassword, $dequeueStatusCallbackEvent, $postWorkActivitySid); } } @@ -104,8 +139,43 @@ class UpdateReservationOptions extends Options { * @param string $redirectCallSid The redirect_call_sid * @param boolean $redirectAccept The redirect_accept * @param string $redirectUrl The redirect_url + * @param string $to The to + * @param string $from The from + * @param string $statusCallback The status_callback + * @param string $statusCallbackMethod The status_callback_method + * @param string $statusCallbackEvent The status_callback_event + * @param integer $timeout The timeout + * @param boolean $record The record + * @param boolean $muted The muted + * @param string $beep The beep + * @param boolean $startConferenceOnEnter The start_conference_on_enter + * @param boolean $endConferenceOnExit The end_conference_on_exit + * @param string $waitUrl The wait_url + * @param string $waitMethod The wait_method + * @param boolean $earlyMedia The early_media + * @param integer $maxParticipants The max_participants + * @param string $conferenceStatusCallback The conference_status_callback + * @param string $conferenceStatusCallbackMethod The + * conference_status_callback_method + * @param string $conferenceStatusCallbackEvent The + * conference_status_callback_event + * @param string $conferenceRecord The conference_record + * @param string $conferenceTrim The conference_trim + * @param string $recordingChannels The recording_channels + * @param string $recordingStatusCallback The recording_status_callback + * @param string $recordingStatusCallbackMethod The + * recording_status_callback_method + * @param string $conferenceRecordingStatusCallback The + * conference_recording_status_callback + * @param string $conferenceRecordingStatusCallbackMethod The + * conference_recording_status_callback_method + * @param string $region The region + * @param string $sipAuthUsername The sip_auth_username + * @param string $sipAuthPassword The sip_auth_password + * @param string $dequeueStatusCallbackEvent The dequeue_status_callback_event + * @param string $postWorkActivitySid The post_work_activity_sid */ - public function __construct($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE) { + public function __construct($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE, $to = Values::NONE, $from = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $statusCallbackEvent = Values::NONE, $timeout = Values::NONE, $record = Values::NONE, $muted = Values::NONE, $beep = Values::NONE, $startConferenceOnEnter = Values::NONE, $endConferenceOnExit = Values::NONE, $waitUrl = Values::NONE, $waitMethod = Values::NONE, $earlyMedia = Values::NONE, $maxParticipants = Values::NONE, $conferenceStatusCallback = Values::NONE, $conferenceStatusCallbackMethod = Values::NONE, $conferenceStatusCallbackEvent = Values::NONE, $conferenceRecord = Values::NONE, $conferenceTrim = Values::NONE, $recordingChannels = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $conferenceRecordingStatusCallback = Values::NONE, $conferenceRecordingStatusCallbackMethod = Values::NONE, $region = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $dequeueStatusCallbackEvent = Values::NONE, $postWorkActivitySid = Values::NONE) { $this->options['reservationStatus'] = $reservationStatus; $this->options['workerActivitySid'] = $workerActivitySid; $this->options['instruction'] = $instruction; @@ -125,6 +195,36 @@ public function __construct($reservationStatus = Values::NONE, $workerActivitySi $this->options['redirectCallSid'] = $redirectCallSid; $this->options['redirectAccept'] = $redirectAccept; $this->options['redirectUrl'] = $redirectUrl; + $this->options['to'] = $to; + $this->options['from'] = $from; + $this->options['statusCallback'] = $statusCallback; + $this->options['statusCallbackMethod'] = $statusCallbackMethod; + $this->options['statusCallbackEvent'] = $statusCallbackEvent; + $this->options['timeout'] = $timeout; + $this->options['record'] = $record; + $this->options['muted'] = $muted; + $this->options['beep'] = $beep; + $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; + $this->options['endConferenceOnExit'] = $endConferenceOnExit; + $this->options['waitUrl'] = $waitUrl; + $this->options['waitMethod'] = $waitMethod; + $this->options['earlyMedia'] = $earlyMedia; + $this->options['maxParticipants'] = $maxParticipants; + $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; + $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; + $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; + $this->options['conferenceRecord'] = $conferenceRecord; + $this->options['conferenceTrim'] = $conferenceTrim; + $this->options['recordingChannels'] = $recordingChannels; + $this->options['recordingStatusCallback'] = $recordingStatusCallback; + $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; + $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; + $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; + $this->options['region'] = $region; + $this->options['sipAuthUsername'] = $sipAuthUsername; + $this->options['sipAuthPassword'] = $sipAuthPassword; + $this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent; + $this->options['postWorkActivitySid'] = $postWorkActivitySid; } /** @@ -336,6 +436,341 @@ public function setRedirectUrl($redirectUrl) { return $this; } + /** + * The to + * + * @param string $to The to + * @return $this Fluent Builder + */ + public function setTo($to) { + $this->options['to'] = $to; + return $this; + } + + /** + * The from + * + * @param string $from The from + * @return $this Fluent Builder + */ + public function setFrom($from) { + $this->options['from'] = $from; + return $this; + } + + /** + * The status_callback + * + * @param string $statusCallback The status_callback + * @return $this Fluent Builder + */ + public function setStatusCallback($statusCallback) { + $this->options['statusCallback'] = $statusCallback; + return $this; + } + + /** + * The status_callback_method + * + * @param string $statusCallbackMethod The status_callback_method + * @return $this Fluent Builder + */ + public function setStatusCallbackMethod($statusCallbackMethod) { + $this->options['statusCallbackMethod'] = $statusCallbackMethod; + return $this; + } + + /** + * The status_callback_event + * + * @param string $statusCallbackEvent The status_callback_event + * @return $this Fluent Builder + */ + public function setStatusCallbackEvent($statusCallbackEvent) { + $this->options['statusCallbackEvent'] = $statusCallbackEvent; + return $this; + } + + /** + * The timeout + * + * @param integer $timeout The timeout + * @return $this Fluent Builder + */ + public function setTimeout($timeout) { + $this->options['timeout'] = $timeout; + return $this; + } + + /** + * The record + * + * @param boolean $record The record + * @return $this Fluent Builder + */ + public function setRecord($record) { + $this->options['record'] = $record; + return $this; + } + + /** + * The muted + * + * @param boolean $muted The muted + * @return $this Fluent Builder + */ + public function setMuted($muted) { + $this->options['muted'] = $muted; + return $this; + } + + /** + * The beep + * + * @param string $beep The beep + * @return $this Fluent Builder + */ + public function setBeep($beep) { + $this->options['beep'] = $beep; + return $this; + } + + /** + * The start_conference_on_enter + * + * @param boolean $startConferenceOnEnter The start_conference_on_enter + * @return $this Fluent Builder + */ + public function setStartConferenceOnEnter($startConferenceOnEnter) { + $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; + return $this; + } + + /** + * The end_conference_on_exit + * + * @param boolean $endConferenceOnExit The end_conference_on_exit + * @return $this Fluent Builder + */ + public function setEndConferenceOnExit($endConferenceOnExit) { + $this->options['endConferenceOnExit'] = $endConferenceOnExit; + return $this; + } + + /** + * The wait_url + * + * @param string $waitUrl The wait_url + * @return $this Fluent Builder + */ + public function setWaitUrl($waitUrl) { + $this->options['waitUrl'] = $waitUrl; + return $this; + } + + /** + * The wait_method + * + * @param string $waitMethod The wait_method + * @return $this Fluent Builder + */ + public function setWaitMethod($waitMethod) { + $this->options['waitMethod'] = $waitMethod; + return $this; + } + + /** + * The early_media + * + * @param boolean $earlyMedia The early_media + * @return $this Fluent Builder + */ + public function setEarlyMedia($earlyMedia) { + $this->options['earlyMedia'] = $earlyMedia; + return $this; + } + + /** + * The max_participants + * + * @param integer $maxParticipants The max_participants + * @return $this Fluent Builder + */ + public function setMaxParticipants($maxParticipants) { + $this->options['maxParticipants'] = $maxParticipants; + return $this; + } + + /** + * The conference_status_callback + * + * @param string $conferenceStatusCallback The conference_status_callback + * @return $this Fluent Builder + */ + public function setConferenceStatusCallback($conferenceStatusCallback) { + $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; + return $this; + } + + /** + * The conference_status_callback_method + * + * @param string $conferenceStatusCallbackMethod The + * conference_status_callback_method + * @return $this Fluent Builder + */ + public function setConferenceStatusCallbackMethod($conferenceStatusCallbackMethod) { + $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; + return $this; + } + + /** + * The conference_status_callback_event + * + * @param string $conferenceStatusCallbackEvent The + * conference_status_callback_event + * @return $this Fluent Builder + */ + public function setConferenceStatusCallbackEvent($conferenceStatusCallbackEvent) { + $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; + return $this; + } + + /** + * The conference_record + * + * @param string $conferenceRecord The conference_record + * @return $this Fluent Builder + */ + public function setConferenceRecord($conferenceRecord) { + $this->options['conferenceRecord'] = $conferenceRecord; + return $this; + } + + /** + * The conference_trim + * + * @param string $conferenceTrim The conference_trim + * @return $this Fluent Builder + */ + public function setConferenceTrim($conferenceTrim) { + $this->options['conferenceTrim'] = $conferenceTrim; + return $this; + } + + /** + * The recording_channels + * + * @param string $recordingChannels The recording_channels + * @return $this Fluent Builder + */ + public function setRecordingChannels($recordingChannels) { + $this->options['recordingChannels'] = $recordingChannels; + return $this; + } + + /** + * The recording_status_callback + * + * @param string $recordingStatusCallback The recording_status_callback + * @return $this Fluent Builder + */ + public function setRecordingStatusCallback($recordingStatusCallback) { + $this->options['recordingStatusCallback'] = $recordingStatusCallback; + return $this; + } + + /** + * The recording_status_callback_method + * + * @param string $recordingStatusCallbackMethod The + * recording_status_callback_method + * @return $this Fluent Builder + */ + public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod) { + $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; + return $this; + } + + /** + * The conference_recording_status_callback + * + * @param string $conferenceRecordingStatusCallback The + * conference_recording_status_callback + * @return $this Fluent Builder + */ + public function setConferenceRecordingStatusCallback($conferenceRecordingStatusCallback) { + $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; + return $this; + } + + /** + * The conference_recording_status_callback_method + * + * @param string $conferenceRecordingStatusCallbackMethod The + * conference_recording_status_callback_method + * @return $this Fluent Builder + */ + public function setConferenceRecordingStatusCallbackMethod($conferenceRecordingStatusCallbackMethod) { + $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; + return $this; + } + + /** + * The region + * + * @param string $region The region + * @return $this Fluent Builder + */ + public function setRegion($region) { + $this->options['region'] = $region; + return $this; + } + + /** + * The sip_auth_username + * + * @param string $sipAuthUsername The sip_auth_username + * @return $this Fluent Builder + */ + public function setSipAuthUsername($sipAuthUsername) { + $this->options['sipAuthUsername'] = $sipAuthUsername; + return $this; + } + + /** + * The sip_auth_password + * + * @param string $sipAuthPassword The sip_auth_password + * @return $this Fluent Builder + */ + public function setSipAuthPassword($sipAuthPassword) { + $this->options['sipAuthPassword'] = $sipAuthPassword; + return $this; + } + + /** + * The dequeue_status_callback_event + * + * @param string $dequeueStatusCallbackEvent The dequeue_status_callback_event + * @return $this Fluent Builder + */ + public function setDequeueStatusCallbackEvent($dequeueStatusCallbackEvent) { + $this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent; + return $this; + } + + /** + * The post_work_activity_sid + * + * @param string $postWorkActivitySid The post_work_activity_sid + * @return $this Fluent Builder + */ + public function setPostWorkActivitySid($postWorkActivitySid) { + $this->options['postWorkActivitySid'] = $postWorkActivitySid; + return $this; + } + /** * Provide a friendly representation * diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless.php new file mode 100644 index 00000000..9bbcc21f --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless.php @@ -0,0 +1,137 @@ +baseUrl = 'https://wireless.twilio.com'; + } + + /** + * @return \Twilio\Rest\Wireless\V1 Version v1 of wireless + */ + protected function getV1() { + if (!$this->_v1) { + $this->_v1 = new V1($this); + } + return $this->_v1; + } + + /** + * Magic getter to lazy load version + * + * @param string $name Version to return + * @return \Twilio\Version The requested version + * @throws \Twilio\Exceptions\TwilioException For unknown versions + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown version ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $method = 'context' . ucfirst($name); + if (method_exists($this, $method)) { + return call_user_func_array(array($this, $method), $arguments); + } + + throw new TwilioException('Unknown context ' . $name); + } + + /** + * @return \Twilio\Rest\Wireless\V1\CommandList + */ + protected function getCommands() { + return $this->v1->commands; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Wireless\V1\CommandContext + */ + protected function contextCommands($sid) { + return $this->v1->commands($sid); + } + + /** + * @return \Twilio\Rest\Wireless\V1\RatePlanList + */ + protected function getRatePlans() { + return $this->v1->ratePlans; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Wireless\V1\RatePlanContext + */ + protected function contextRatePlans($sid) { + return $this->v1->ratePlans($sid); + } + + /** + * @return \Twilio\Rest\Wireless\V1\SimList + */ + protected function getSims() { + return $this->v1->sims; + } + + /** + * @param string $sid The sid + * @return \Twilio\Rest\Wireless\V1\SimContext + */ + protected function contextSims($sid) { + return $this->v1->sims($sid); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1.php new file mode 100644 index 00000000..2e6179d7 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1.php @@ -0,0 +1,114 @@ +version = 'v1'; + } + + /** + * @return \Twilio\Rest\Wireless\V1\CommandList + */ + protected function getCommands() { + if (!$this->_commands) { + $this->_commands = new CommandList($this); + } + return $this->_commands; + } + + /** + * @return \Twilio\Rest\Wireless\V1\RatePlanList + */ + protected function getRatePlans() { + if (!$this->_ratePlans) { + $this->_ratePlans = new RatePlanList($this); + } + return $this->_ratePlans; + } + + /** + * @return \Twilio\Rest\Wireless\V1\SimList + */ + protected function getSims() { + if (!$this->_sims) { + $this->_sims = new SimList($this); + } + return $this->_sims; + } + + /** + * Magic getter to lazy load root resources + * + * @param string $name Resource to return + * @return \Twilio\ListResource The requested resource + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __get($name) { + $method = 'get' . ucfirst($name); + if (method_exists($this, $method)) { + return $this->$method(); + } + + throw new TwilioException('Unknown resource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandContext.php new file mode 100644 index 00000000..3b18c252 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandContext.php @@ -0,0 +1,71 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Commands/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a CommandInstance + * + * @return CommandInstance Fetched CommandInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new CommandInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Wireless.V1.CommandContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandInstance.php new file mode 100644 index 00000000..a0d40278 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandInstance.php @@ -0,0 +1,122 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'simSid' => Values::array_get($payload, 'sim_sid'), + 'command' => Values::array_get($payload, 'command'), + 'commandMode' => Values::array_get($payload, 'command_mode'), + 'status' => Values::array_get($payload, 'status'), + 'direction' => Values::array_get($payload, 'direction'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Wireless\V1\CommandContext Context for this + * CommandInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new CommandContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a CommandInstance + * + * @return CommandInstance Fetched CommandInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Wireless.V1.CommandInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandList.php new file mode 100644 index 00000000..43683c10 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandList.php @@ -0,0 +1,182 @@ +solution = array(); + + $this->uri = '/Commands'; + } + + /** + * Streams CommandInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads CommandInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return CommandInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of CommandInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of CommandInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Sim' => $options['sim'], + 'Status' => $options['status'], + 'Direction' => $options['direction'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new CommandPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of CommandInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of CommandInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new CommandPage($this->version, $response, $this->solution); + } + + /** + * Create a new CommandInstance + * + * @param string $command The command + * @param array|Options $options Optional Arguments + * @return CommandInstance Newly created CommandInstance + */ + public function create($command, $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Command' => $command, + 'Sim' => $options['sim'], + 'CallbackMethod' => $options['callbackMethod'], + 'CallbackUrl' => $options['callbackUrl'], + 'CommandMode' => $options['commandMode'], + 'IncludeSid' => $options['includeSid'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new CommandInstance( + $this->version, + $payload + ); + } + + /** + * Constructs a CommandContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Wireless\V1\CommandContext + */ + public function getContext($sid) { + return new CommandContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.CommandList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandOptions.php new file mode 100644 index 00000000..0f19168b --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandOptions.php @@ -0,0 +1,188 @@ +options['sim'] = $sim; + $this->options['status'] = $status; + $this->options['direction'] = $direction; + } + + /** + * The sim + * + * @param string $sim The sim + * @return $this Fluent Builder + */ + public function setSim($sim) { + $this->options['sim'] = $sim; + return $this; + } + + /** + * The status + * + * @param string $status The status + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * The direction + * + * @param string $direction The direction + * @return $this Fluent Builder + */ + public function setDirection($direction) { + $this->options['direction'] = $direction; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Wireless.V1.ReadCommandOptions ' . implode(' ', $options) . ']'; + } +} + +class CreateCommandOptions extends Options { + /** + * @param string $sim The sim + * @param string $callbackMethod The callback_method + * @param string $callbackUrl The callback_url + * @param string $commandMode The command_mode + * @param string $includeSid The include_sid + */ + public function __construct($sim = Values::NONE, $callbackMethod = Values::NONE, $callbackUrl = Values::NONE, $commandMode = Values::NONE, $includeSid = Values::NONE) { + $this->options['sim'] = $sim; + $this->options['callbackMethod'] = $callbackMethod; + $this->options['callbackUrl'] = $callbackUrl; + $this->options['commandMode'] = $commandMode; + $this->options['includeSid'] = $includeSid; + } + + /** + * The sim + * + * @param string $sim The sim + * @return $this Fluent Builder + */ + public function setSim($sim) { + $this->options['sim'] = $sim; + return $this; + } + + /** + * The callback_method + * + * @param string $callbackMethod The callback_method + * @return $this Fluent Builder + */ + public function setCallbackMethod($callbackMethod) { + $this->options['callbackMethod'] = $callbackMethod; + return $this; + } + + /** + * The callback_url + * + * @param string $callbackUrl The callback_url + * @return $this Fluent Builder + */ + public function setCallbackUrl($callbackUrl) { + $this->options['callbackUrl'] = $callbackUrl; + return $this; + } + + /** + * The command_mode + * + * @param string $commandMode The command_mode + * @return $this Fluent Builder + */ + public function setCommandMode($commandMode) { + $this->options['commandMode'] = $commandMode; + return $this; + } + + /** + * The include_sid + * + * @param string $includeSid The include_sid + * @return $this Fluent Builder + */ + public function setIncludeSid($includeSid) { + $this->options['includeSid'] = $includeSid; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Wireless.V1.CreateCommandOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandPage.php new file mode 100644 index 00000000..c27aa4b8 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/CommandPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new CommandInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.CommandPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanContext.php new file mode 100644 index 00000000..82e00785 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanContext.php @@ -0,0 +1,109 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/RatePlans/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a RatePlanInstance + * + * @return RatePlanInstance Fetched RatePlanInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new RatePlanInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Update the RatePlanInstance + * + * @param array|Options $options Optional Arguments + * @return RatePlanInstance Updated RatePlanInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'FriendlyName' => $options['friendlyName'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new RatePlanInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Deletes the RatePlanInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Wireless.V1.RatePlanContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanInstance.php new file mode 100644 index 00000000..079bbe23 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanInstance.php @@ -0,0 +1,156 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'dataEnabled' => Values::array_get($payload, 'data_enabled'), + 'dataMetering' => Values::array_get($payload, 'data_metering'), + 'dataLimit' => Values::array_get($payload, 'data_limit'), + 'messagingEnabled' => Values::array_get($payload, 'messaging_enabled'), + 'voiceEnabled' => Values::array_get($payload, 'voice_enabled'), + 'nationalRoamingEnabled' => Values::array_get($payload, 'national_roaming_enabled'), + 'nationalRoamingDataLimit' => Values::array_get($payload, 'national_roaming_data_limit'), + 'internationalRoaming' => Values::array_get($payload, 'international_roaming'), + 'internationalRoamingDataLimit' => Values::array_get($payload, 'international_roaming_data_limit'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Wireless\V1\RatePlanContext Context for this + * RatePlanInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new RatePlanContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a RatePlanInstance + * + * @return RatePlanInstance Fetched RatePlanInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the RatePlanInstance + * + * @param array|Options $options Optional Arguments + * @return RatePlanInstance Updated RatePlanInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Deletes the RatePlanInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Wireless.V1.RatePlanInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanList.php new file mode 100644 index 00000000..792ce072 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanList.php @@ -0,0 +1,180 @@ +solution = array(); + + $this->uri = '/RatePlans'; + } + + /** + * Streams RatePlanInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads RatePlanInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return RatePlanInstance[] Array of results + */ + public function read($limit = null, $pageSize = null) { + return iterator_to_array($this->stream($limit, $pageSize), false); + } + + /** + * Retrieve a single page of RatePlanInstance records from the API. + * Request is executed immediately + * + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of RatePlanInstance + */ + public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $params = Values::of(array( + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new RatePlanPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of RatePlanInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of RatePlanInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new RatePlanPage($this->version, $response, $this->solution); + } + + /** + * Create a new RatePlanInstance + * + * @param array|Options $options Optional Arguments + * @return RatePlanInstance Newly created RatePlanInstance + */ + public function create($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'FriendlyName' => $options['friendlyName'], + 'DataEnabled' => Serialize::booleanToString($options['dataEnabled']), + 'DataLimit' => $options['dataLimit'], + 'DataMetering' => $options['dataMetering'], + 'MessagingEnabled' => Serialize::booleanToString($options['messagingEnabled']), + 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), + 'NationalRoamingEnabled' => Serialize::booleanToString($options['nationalRoamingEnabled']), + 'InternationalRoaming' => $options['internationalRoaming'], + 'NationalRoamingDataLimit' => $options['nationalRoamingDataLimit'], + 'InternationalRoamingDataLimit' => $options['internationalRoamingDataLimit'], + )); + + $payload = $this->version->create( + 'POST', + $this->uri, + array(), + $data + ); + + return new RatePlanInstance( + $this->version, + $payload + ); + } + + /** + * Constructs a RatePlanContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Wireless\V1\RatePlanContext + */ + public function getContext($sid) { + return new RatePlanContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.RatePlanList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanOptions.php new file mode 100644 index 00000000..12982a51 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanOptions.php @@ -0,0 +1,261 @@ +options['uniqueName'] = $uniqueName; + $this->options['friendlyName'] = $friendlyName; + $this->options['dataEnabled'] = $dataEnabled; + $this->options['dataLimit'] = $dataLimit; + $this->options['dataMetering'] = $dataMetering; + $this->options['messagingEnabled'] = $messagingEnabled; + $this->options['voiceEnabled'] = $voiceEnabled; + $this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled; + $this->options['internationalRoaming'] = $internationalRoaming; + $this->options['nationalRoamingDataLimit'] = $nationalRoamingDataLimit; + $this->options['internationalRoamingDataLimit'] = $internationalRoamingDataLimit; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The data_enabled + * + * @param boolean $dataEnabled The data_enabled + * @return $this Fluent Builder + */ + public function setDataEnabled($dataEnabled) { + $this->options['dataEnabled'] = $dataEnabled; + return $this; + } + + /** + * The data_limit + * + * @param integer $dataLimit The data_limit + * @return $this Fluent Builder + */ + public function setDataLimit($dataLimit) { + $this->options['dataLimit'] = $dataLimit; + return $this; + } + + /** + * The data_metering + * + * @param string $dataMetering The data_metering + * @return $this Fluent Builder + */ + public function setDataMetering($dataMetering) { + $this->options['dataMetering'] = $dataMetering; + return $this; + } + + /** + * The messaging_enabled + * + * @param boolean $messagingEnabled The messaging_enabled + * @return $this Fluent Builder + */ + public function setMessagingEnabled($messagingEnabled) { + $this->options['messagingEnabled'] = $messagingEnabled; + return $this; + } + + /** + * The voice_enabled + * + * @param boolean $voiceEnabled The voice_enabled + * @return $this Fluent Builder + */ + public function setVoiceEnabled($voiceEnabled) { + $this->options['voiceEnabled'] = $voiceEnabled; + return $this; + } + + /** + * The national_roaming_enabled + * + * @param boolean $nationalRoamingEnabled The national_roaming_enabled + * @return $this Fluent Builder + */ + public function setNationalRoamingEnabled($nationalRoamingEnabled) { + $this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled; + return $this; + } + + /** + * The international_roaming + * + * @param string $internationalRoaming The international_roaming + * @return $this Fluent Builder + */ + public function setInternationalRoaming($internationalRoaming) { + $this->options['internationalRoaming'] = $internationalRoaming; + return $this; + } + + /** + * The national_roaming_data_limit + * + * @param integer $nationalRoamingDataLimit The national_roaming_data_limit + * @return $this Fluent Builder + */ + public function setNationalRoamingDataLimit($nationalRoamingDataLimit) { + $this->options['nationalRoamingDataLimit'] = $nationalRoamingDataLimit; + return $this; + } + + /** + * The international_roaming_data_limit + * + * @param integer $internationalRoamingDataLimit The + * international_roaming_data_limit + * @return $this Fluent Builder + */ + public function setInternationalRoamingDataLimit($internationalRoamingDataLimit) { + $this->options['internationalRoamingDataLimit'] = $internationalRoamingDataLimit; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Wireless.V1.CreateRatePlanOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateRatePlanOptions extends Options { + /** + * @param string $uniqueName The unique_name + * @param string $friendlyName The friendly_name + */ + public function __construct($uniqueName = Values::NONE, $friendlyName = Values::NONE) { + $this->options['uniqueName'] = $uniqueName; + $this->options['friendlyName'] = $friendlyName; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Wireless.V1.UpdateRatePlanOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanPage.php new file mode 100644 index 00000000..c1a83638 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/RatePlanPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new RatePlanInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.RatePlanPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.php new file mode 100644 index 00000000..24bca916 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.php @@ -0,0 +1,80 @@ +properties = array( + 'simSid' => Values::array_get($payload, 'sim_sid'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'period' => Values::array_get($payload, 'period'), + 'commands' => Values::array_get($payload, 'commands'), + 'data' => Values::array_get($payload, 'data'), + ); + + $this->solution = array( + 'simSid' => $simSid, + ); + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.UsageRecordInstance]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.php new file mode 100644 index 00000000..3a16843a --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.php @@ -0,0 +1,141 @@ +solution = array( + 'simSid' => $simSid, + ); + + $this->uri = '/Sims/' . rawurlencode($simSid) . '/UsageRecords'; + } + + /** + * Streams UsageRecordInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads UsageRecordInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return UsageRecordInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of UsageRecordInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of UsageRecordInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'End' => Serialize::iso8601DateTime($options['end']), + 'Start' => Serialize::iso8601DateTime($options['start']), + 'Granularity' => $options['granularity'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new UsageRecordPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of UsageRecordInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of UsageRecordInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new UsageRecordPage($this->version, $response, $this->solution); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.UsageRecordList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.php new file mode 100644 index 00000000..be4fc49c --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.php @@ -0,0 +1,89 @@ +options['end'] = $end; + $this->options['start'] = $start; + $this->options['granularity'] = $granularity; + } + + /** + * The end + * + * @param \DateTime $end The end + * @return $this Fluent Builder + */ + public function setEnd($end) { + $this->options['end'] = $end; + return $this; + } + + /** + * The start + * + * @param \DateTime $start The start + * @return $this Fluent Builder + */ + public function setStart($start) { + $this->options['start'] = $start; + return $this; + } + + /** + * The granularity + * + * @param string $granularity The granularity + * @return $this Fluent Builder + */ + public function setGranularity($granularity) { + $this->options['granularity'] = $granularity; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Wireless.V1.ReadUsageRecordOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.php new file mode 100644 index 00000000..def96497 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.php @@ -0,0 +1,41 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new UsageRecordInstance( + $this->version, + $payload, + $this->solution['simSid'] + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.UsageRecordPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimContext.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimContext.php new file mode 100644 index 00000000..170373ba --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimContext.php @@ -0,0 +1,169 @@ +solution = array( + 'sid' => $sid, + ); + + $this->uri = '/Sims/' . rawurlencode($sid) . ''; + } + + /** + * Fetch a SimInstance + * + * @return SimInstance Fetched SimInstance + */ + public function fetch() { + $params = Values::of(array()); + + $payload = $this->version->fetch( + 'GET', + $this->uri, + $params + ); + + return new SimInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Update the SimInstance + * + * @param array|Options $options Optional Arguments + * @return SimInstance Updated SimInstance + */ + public function update($options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'UniqueName' => $options['uniqueName'], + 'CallbackMethod' => $options['callbackMethod'], + 'CallbackUrl' => $options['callbackUrl'], + 'FriendlyName' => $options['friendlyName'], + 'RatePlan' => $options['ratePlan'], + 'Status' => $options['status'], + 'CommandsCallbackMethod' => $options['commandsCallbackMethod'], + 'CommandsCallbackUrl' => $options['commandsCallbackUrl'], + 'SmsFallbackMethod' => $options['smsFallbackMethod'], + 'SmsFallbackUrl' => $options['smsFallbackUrl'], + 'SmsMethod' => $options['smsMethod'], + 'SmsUrl' => $options['smsUrl'], + 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], + 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], + 'VoiceMethod' => $options['voiceMethod'], + 'VoiceUrl' => $options['voiceUrl'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new SimInstance( + $this->version, + $payload, + $this->solution['sid'] + ); + } + + /** + * Access the usageRecords + * + * @return \Twilio\Rest\Wireless\V1\Sim\UsageRecordList + */ + protected function getUsageRecords() { + if (!$this->_usageRecords) { + $this->_usageRecords = new UsageRecordList( + $this->version, + $this->solution['sid'] + ); + } + + return $this->_usageRecords; + } + + /** + * Magic getter to lazy load subresources + * + * @param string $name Subresource to return + * @return \Twilio\ListResource The requested subresource + * @throws \Twilio\Exceptions\TwilioException For unknown subresources + */ + public function __get($name) { + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown subresource ' . $name); + } + + /** + * Magic caller to get resource contexts + * + * @param string $name Resource to return + * @param array $arguments Context parameters + * @return \Twilio\InstanceContext The requested resource context + * @throws \Twilio\Exceptions\TwilioException For unknown resource + */ + public function __call($name, $arguments) { + $property = $this->$name; + if (method_exists($property, 'getContext')) { + return call_user_func_array(array($property, 'getContext'), $arguments); + } + + throw new TwilioException('Resource does not have a context'); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Wireless.V1.SimContext ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimInstance.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimInstance.php new file mode 100644 index 00000000..6a8e87cf --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimInstance.php @@ -0,0 +1,169 @@ +properties = array( + 'sid' => Values::array_get($payload, 'sid'), + 'uniqueName' => Values::array_get($payload, 'unique_name'), + 'accountSid' => Values::array_get($payload, 'account_sid'), + 'ratePlanSid' => Values::array_get($payload, 'rate_plan_sid'), + 'friendlyName' => Values::array_get($payload, 'friendly_name'), + 'iccid' => Values::array_get($payload, 'iccid'), + 'eId' => Values::array_get($payload, 'e_id'), + 'status' => Values::array_get($payload, 'status'), + 'commandsCallbackUrl' => Values::array_get($payload, 'commands_callback_url'), + 'commandsCallbackMethod' => Values::array_get($payload, 'commands_callback_method'), + 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), + 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), + 'smsMethod' => Values::array_get($payload, 'sms_method'), + 'smsUrl' => Values::array_get($payload, 'sms_url'), + 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), + 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), + 'voiceMethod' => Values::array_get($payload, 'voice_method'), + 'voiceUrl' => Values::array_get($payload, 'voice_url'), + 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), + 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), + 'url' => Values::array_get($payload, 'url'), + 'links' => Values::array_get($payload, 'links'), + ); + + $this->solution = array( + 'sid' => $sid ?: $this->properties['sid'], + ); + } + + /** + * Generate an instance context for the instance, the context is capable of + * performing various actions. All instance actions are proxied to the context + * + * @return \Twilio\Rest\Wireless\V1\SimContext Context for this SimInstance + */ + protected function proxy() { + if (!$this->context) { + $this->context = new SimContext( + $this->version, + $this->solution['sid'] + ); + } + + return $this->context; + } + + /** + * Fetch a SimInstance + * + * @return SimInstance Fetched SimInstance + */ + public function fetch() { + return $this->proxy()->fetch(); + } + + /** + * Update the SimInstance + * + * @param array|Options $options Optional Arguments + * @return SimInstance Updated SimInstance + */ + public function update($options = array()) { + return $this->proxy()->update( + $options + ); + } + + /** + * Access the usageRecords + * + * @return \Twilio\Rest\Wireless\V1\Sim\UsageRecordList + */ + protected function getUsageRecords() { + return $this->proxy()->usageRecords; + } + + /** + * Magic getter to access properties + * + * @param string $name Property to access + * @return mixed The requested property + * @throws TwilioException For unknown properties + */ + public function __get($name) { + if (array_key_exists($name, $this->properties)) { + return $this->properties[$name]; + } + + if (property_exists($this, '_' . $name)) { + $method = 'get' . ucfirst($name); + return $this->$method(); + } + + throw new TwilioException('Unknown property: ' . $name); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $context = array(); + foreach ($this->solution as $key => $value) { + $context[] = "$key=$value"; + } + return '[Twilio.Wireless.V1.SimInstance ' . implode(' ', $context) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimList.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimList.php new file mode 100644 index 00000000..8103c733 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimList.php @@ -0,0 +1,152 @@ +solution = array(); + + $this->uri = '/Sims'; + } + + /** + * Streams SimInstance records from the API as a generator stream. + * This operation lazily loads records as efficiently as possible until the + * limit + * is reached. + * The results are returned as a generator, so this operation is memory + * efficient. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. stream() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, stream() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return \Twilio\Stream stream of results + */ + public function stream($options = array(), $limit = null, $pageSize = null) { + $limits = $this->version->readLimits($limit, $pageSize); + + $page = $this->page($options, $limits['pageSize']); + + return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); + } + + /** + * Reads SimInstance records from the API as a list. + * Unlike stream(), this operation is eager and will load `limit` records into + * memory before returning. + * + * @param array|Options $options Optional Arguments + * @param int $limit Upper limit for the number of records to return. read() + * guarantees to never return more than limit. Default is no + * limit + * @param mixed $pageSize Number of records to fetch per request, when not set + * will use the default value of 50 records. If no + * page_size is defined but a limit is defined, read() + * will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @return SimInstance[] Array of results + */ + public function read($options = array(), $limit = null, $pageSize = null) { + return iterator_to_array($this->stream($options, $limit, $pageSize), false); + } + + /** + * Retrieve a single page of SimInstance records from the API. + * Request is executed immediately + * + * @param array|Options $options Optional Arguments + * @param mixed $pageSize Number of records to return, defaults to 50 + * @param string $pageToken PageToken provided by the API + * @param mixed $pageNumber Page Number, this value is simply for client state + * @return \Twilio\Page Page of SimInstance + */ + public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) { + $options = new Values($options); + $params = Values::of(array( + 'Status' => $options['status'], + 'Iccid' => $options['iccid'], + 'RatePlan' => $options['ratePlan'], + 'EId' => $options['eId'], + 'SimRegistrationCode' => $options['simRegistrationCode'], + 'PageToken' => $pageToken, + 'Page' => $pageNumber, + 'PageSize' => $pageSize, + )); + + $response = $this->version->page( + 'GET', + $this->uri, + $params + ); + + return new SimPage($this->version, $response, $this->solution); + } + + /** + * Retrieve a specific page of SimInstance records from the API. + * Request is executed immediately + * + * @param string $targetUrl API-generated URL for the requested results page + * @return \Twilio\Page Page of SimInstance + */ + public function getPage($targetUrl) { + $response = $this->version->getDomain()->getClient()->request( + 'GET', + $targetUrl + ); + + return new SimPage($this->version, $response, $this->solution); + } + + /** + * Constructs a SimContext + * + * @param string $sid The sid + * @return \Twilio\Rest\Wireless\V1\SimContext + */ + public function getContext($sid) { + return new SimContext( + $this->version, + $sid + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.SimList]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimOptions.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimOptions.php new file mode 100644 index 00000000..3dd63cab --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimOptions.php @@ -0,0 +1,370 @@ +options['status'] = $status; + $this->options['iccid'] = $iccid; + $this->options['ratePlan'] = $ratePlan; + $this->options['eId'] = $eId; + $this->options['simRegistrationCode'] = $simRegistrationCode; + } + + /** + * The status + * + * @param string $status The status + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * The iccid + * + * @param string $iccid The iccid + * @return $this Fluent Builder + */ + public function setIccid($iccid) { + $this->options['iccid'] = $iccid; + return $this; + } + + /** + * The rate_plan + * + * @param string $ratePlan The rate_plan + * @return $this Fluent Builder + */ + public function setRatePlan($ratePlan) { + $this->options['ratePlan'] = $ratePlan; + return $this; + } + + /** + * The e_id + * + * @param string $eId The e_id + * @return $this Fluent Builder + */ + public function setEId($eId) { + $this->options['eId'] = $eId; + return $this; + } + + /** + * The sim_registration_code + * + * @param string $simRegistrationCode The sim_registration_code + * @return $this Fluent Builder + */ + public function setSimRegistrationCode($simRegistrationCode) { + $this->options['simRegistrationCode'] = $simRegistrationCode; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Wireless.V1.ReadSimOptions ' . implode(' ', $options) . ']'; + } +} + +class UpdateSimOptions extends Options { + /** + * @param string $uniqueName The unique_name + * @param string $callbackMethod The callback_method + * @param string $callbackUrl The callback_url + * @param string $friendlyName The friendly_name + * @param string $ratePlan The rate_plan + * @param string $status The status + * @param string $commandsCallbackMethod The commands_callback_method + * @param string $commandsCallbackUrl The commands_callback_url + * @param string $smsFallbackMethod The sms_fallback_method + * @param string $smsFallbackUrl The sms_fallback_url + * @param string $smsMethod The sms_method + * @param string $smsUrl The sms_url + * @param string $voiceFallbackMethod The voice_fallback_method + * @param string $voiceFallbackUrl The voice_fallback_url + * @param string $voiceMethod The voice_method + * @param string $voiceUrl The voice_url + */ + public function __construct($uniqueName = Values::NONE, $callbackMethod = Values::NONE, $callbackUrl = Values::NONE, $friendlyName = Values::NONE, $ratePlan = Values::NONE, $status = Values::NONE, $commandsCallbackMethod = Values::NONE, $commandsCallbackUrl = Values::NONE, $smsFallbackMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsMethod = Values::NONE, $smsUrl = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceUrl = Values::NONE) { + $this->options['uniqueName'] = $uniqueName; + $this->options['callbackMethod'] = $callbackMethod; + $this->options['callbackUrl'] = $callbackUrl; + $this->options['friendlyName'] = $friendlyName; + $this->options['ratePlan'] = $ratePlan; + $this->options['status'] = $status; + $this->options['commandsCallbackMethod'] = $commandsCallbackMethod; + $this->options['commandsCallbackUrl'] = $commandsCallbackUrl; + $this->options['smsFallbackMethod'] = $smsFallbackMethod; + $this->options['smsFallbackUrl'] = $smsFallbackUrl; + $this->options['smsMethod'] = $smsMethod; + $this->options['smsUrl'] = $smsUrl; + $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; + $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; + $this->options['voiceMethod'] = $voiceMethod; + $this->options['voiceUrl'] = $voiceUrl; + } + + /** + * The unique_name + * + * @param string $uniqueName The unique_name + * @return $this Fluent Builder + */ + public function setUniqueName($uniqueName) { + $this->options['uniqueName'] = $uniqueName; + return $this; + } + + /** + * The callback_method + * + * @param string $callbackMethod The callback_method + * @return $this Fluent Builder + */ + public function setCallbackMethod($callbackMethod) { + $this->options['callbackMethod'] = $callbackMethod; + return $this; + } + + /** + * The callback_url + * + * @param string $callbackUrl The callback_url + * @return $this Fluent Builder + */ + public function setCallbackUrl($callbackUrl) { + $this->options['callbackUrl'] = $callbackUrl; + return $this; + } + + /** + * The friendly_name + * + * @param string $friendlyName The friendly_name + * @return $this Fluent Builder + */ + public function setFriendlyName($friendlyName) { + $this->options['friendlyName'] = $friendlyName; + return $this; + } + + /** + * The rate_plan + * + * @param string $ratePlan The rate_plan + * @return $this Fluent Builder + */ + public function setRatePlan($ratePlan) { + $this->options['ratePlan'] = $ratePlan; + return $this; + } + + /** + * The status + * + * @param string $status The status + * @return $this Fluent Builder + */ + public function setStatus($status) { + $this->options['status'] = $status; + return $this; + } + + /** + * The commands_callback_method + * + * @param string $commandsCallbackMethod The commands_callback_method + * @return $this Fluent Builder + */ + public function setCommandsCallbackMethod($commandsCallbackMethod) { + $this->options['commandsCallbackMethod'] = $commandsCallbackMethod; + return $this; + } + + /** + * The commands_callback_url + * + * @param string $commandsCallbackUrl The commands_callback_url + * @return $this Fluent Builder + */ + public function setCommandsCallbackUrl($commandsCallbackUrl) { + $this->options['commandsCallbackUrl'] = $commandsCallbackUrl; + return $this; + } + + /** + * The sms_fallback_method + * + * @param string $smsFallbackMethod The sms_fallback_method + * @return $this Fluent Builder + */ + public function setSmsFallbackMethod($smsFallbackMethod) { + $this->options['smsFallbackMethod'] = $smsFallbackMethod; + return $this; + } + + /** + * The sms_fallback_url + * + * @param string $smsFallbackUrl The sms_fallback_url + * @return $this Fluent Builder + */ + public function setSmsFallbackUrl($smsFallbackUrl) { + $this->options['smsFallbackUrl'] = $smsFallbackUrl; + return $this; + } + + /** + * The sms_method + * + * @param string $smsMethod The sms_method + * @return $this Fluent Builder + */ + public function setSmsMethod($smsMethod) { + $this->options['smsMethod'] = $smsMethod; + return $this; + } + + /** + * The sms_url + * + * @param string $smsUrl The sms_url + * @return $this Fluent Builder + */ + public function setSmsUrl($smsUrl) { + $this->options['smsUrl'] = $smsUrl; + return $this; + } + + /** + * The voice_fallback_method + * + * @param string $voiceFallbackMethod The voice_fallback_method + * @return $this Fluent Builder + */ + public function setVoiceFallbackMethod($voiceFallbackMethod) { + $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; + return $this; + } + + /** + * The voice_fallback_url + * + * @param string $voiceFallbackUrl The voice_fallback_url + * @return $this Fluent Builder + */ + public function setVoiceFallbackUrl($voiceFallbackUrl) { + $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; + return $this; + } + + /** + * The voice_method + * + * @param string $voiceMethod The voice_method + * @return $this Fluent Builder + */ + public function setVoiceMethod($voiceMethod) { + $this->options['voiceMethod'] = $voiceMethod; + return $this; + } + + /** + * The voice_url + * + * @param string $voiceUrl The voice_url + * @return $this Fluent Builder + */ + public function setVoiceUrl($voiceUrl) { + $this->options['voiceUrl'] = $voiceUrl; + return $this; + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + $options = array(); + foreach ($this->options as $key => $value) { + if ($value != Values::NONE) { + $options[] = "$key=$value"; + } + } + return '[Twilio.Wireless.V1.UpdateSimOptions ' . implode(' ', $options) . ']'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimPage.php b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimPage.php new file mode 100644 index 00000000..ecb142a3 --- /dev/null +++ b/app/src/vendor/twilio/sdk/Twilio/Rest/Wireless/V1/SimPage.php @@ -0,0 +1,40 @@ +solution = $solution; + } + + public function buildInstance(array $payload) { + return new SimInstance( + $this->version, + $payload + ); + } + + /** + * Provide a friendly representation + * + * @return string Machine friendly representation + */ + public function __toString() { + return '[Twilio.Wireless.V1.SimPage]'; + } +} \ No newline at end of file diff --git a/app/src/vendor/twilio/sdk/Twilio/VersionInfo.php b/app/src/vendor/twilio/sdk/Twilio/VersionInfo.php index 094e0067..e7c99ccb 100644 --- a/app/src/vendor/twilio/sdk/Twilio/VersionInfo.php +++ b/app/src/vendor/twilio/sdk/Twilio/VersionInfo.php @@ -6,8 +6,8 @@ class VersionInfo { const MAJOR = 5; - const MINOR = 12; - const PATCH = 1; + const MINOR = 13; + const PATCH = 0; public static function string() { return implode('.', array(self::MAJOR, self::MINOR, self::PATCH)); diff --git a/app/src/vendor/twilio/sdk/VERSIONS.md b/app/src/vendor/twilio/sdk/VERSIONS.md index 02fc47c1..7527cac2 100644 --- a/app/src/vendor/twilio/sdk/VERSIONS.md +++ b/app/src/vendor/twilio/sdk/VERSIONS.md @@ -1,78 +1,36 @@ # Versioning Strategy -`twilio-php` uses a modified version of [Semantic Versioning][semver] for all -changes to the helper library. It is strongly encouraged that you pin at least -the major version and potentially the minor version to avoid pulling in breaking -changes. +`twilio-php` uses a modified version of [Semantic Versioning][semver] for +all changes to the helper library. It is strongly encouraged that you pin at +least the major version and potentially the minor version to avoid pulling in +breaking changes. Semantic Versions take the form of `MAJOR`.`MINOR`.`PATCH` -When bugs are fixed in the library in a backwards compatible way, the `PATCH` -level will be incremented by one. When new features are added to the library +When bugs are fixed in the library in a backwards compatible way, the `PATCH` +level will be incremented by one. When new features are added to the library in a backwards compatible way, the `PATCH` level will be incremented by one. `PATCH` changes should _not_ break your code and are generally safe for upgrade. -When a new large feature set comes online or a small breaking change is -introduced, the `MINOR` version will be incremented by one and the `PATCH` +When a new large feature set comes online or a small breaking change is +introduced, the `MINOR` version will be incremented by one and the `PATCH` version reset to zero. `MINOR` changes _may_ require some amount of manual code -change for upgrade, guidance will be provided in the [Upgrade Guide][upgrade]. -These backwards-incompatible changes will generally be limited to a small number -of function signature changes. +change for upgrade. These backwards-incompatible changes will generally be +limited to a small number of function signature changes. -The `MAJOR` version is used to indicate the family of technology represented by -the helper library. It increased from `4.x.x` to `5.x.x` when Twilio moved to -auto generation of helper libraries. Breaking changes that requires extensive -reworking of code (like the `4.x.x` to `5.x.x` upgrade) will case the `MAJOR` -version to be incremented by one, the `MINOR` and `PATCH` versions will be reset -to zero. Twilio understands that this can be very disruptive, we will only -introduce this type of breaking change when absolutely necessary. New `MAJOR` -versions will be communicated in advance with `Release Candidates` and a -schedule. - -## Change Logs - -Twilio maintains a comprehensive [Changelog][changelog] for every version that -is released. This will contain useful information every new version and what -bugs have been fixed, features added, and functionality enhanced. After 5.1.1 -Twilio will maintain an [Upgrade Guide][upgrade] for every change (`MINOR` or -`MAJOR`) that requires changes to your code. When upgrading between two -versions that have more than a `PATCH` level change, it's best practice to check -the [Upgrade Guide][upgrade] and to make sure that all your tests and static -checks pass after upgrade. +The `MAJOR` version is used to indicate the family of technology represented by +the helper library. Breaking changes that requires extensive reworking of code +will case the `MAJOR` version to be incremented by one, and the `MINOR` and +`PATCH` versions will be reset to zero. Twilio understands that this can be very +disruptive, so we will only introduce this type of breaking change when +absolutely necessary. New `MAJOR` versions will be communicated in advance with +`Release Candidates` and a schedule. ## Supported Versions -`twilio-php` follows an evergreen model of support. New features and -functionality will only be added to the current version. The current version - -1 will continue to be supported with bugfixes and security updates, but no new +`twilio-php` follows an evergreen model of support. New features and +functionality will only be added to the current version. The current version - +1 will continue to be supported with bug fixes and security updates, but no new features. -## Edge Features (Alpha Branch) - -Twilio frequently rolls out new features in public and private beta periods. -Twilio strives to ship early and often and bake customer feedback back into our -products. To support that mission, the `twilio-php` helper library has an -`Edge` version based of the `alpha` branch. This version is identified with an -`alpha` metadata tag on the version number. - -The way the `Edge` artifact is created is by playing the `Edge` features on top -of our stable artifact. The `Edge` artifact will always have the same version -number as the stable artifact it was created from, but with an `alpha` suffix. - -For example, `5.0.1-alpha1` is the `5.0.1` branch with `Edge` features included. -If there is a change to one of the `Edge` features we may regenerate the `Edge` -artifact and release a new `5.0.1-alpha2`, new `Edge` artifacts simply increment -the number after the `alpha` suffix. All `Edge` features are considered -unstable and a backwards incompatible change in an `Edge` feature will not cause -any version change so you should take care when upgrading from one `alpha` -version to another. - -Once an `Edge` feature has matured it will be considered `Mainline` and included -in the stable artifact, with a `MAJOR` or `MINOR` version bump. - -To use an `Edge` artifact in your PHP project you will have to make sure that -you pin the artifact with `alpha` stability in your composer.json. - -[semver]: http://semver.org/ -[changelog]: https://github.com/twilio/twilio-php/blob/master/CHANGES.md -[upgrade]: https://github.com/twilio/twilio-php/blob/master/UPGRADE.md +[semver]: http://semver.org/ \ No newline at end of file From 0cea3a012f2497e117e642ddae0b80c5f671b3dc Mon Sep 17 00:00:00 2001 From: Joshua Parker Date: Sat, 29 Jul 2017 00:26:55 -0400 Subject: [PATCH 02/21] phpmailer library updated. --- app/src/vendor/phpmailer/phpmailer/VERSION | 2 +- .../phpmailer/phpmailer/class.phpmailer.php | 23 +-- .../vendor/phpmailer/phpmailer/class.pop3.php | 2 +- .../vendor/phpmailer/phpmailer/class.smtp.php | 17 ++- .../phpmailer/examples/code_generator.phps | 141 +++++++++--------- .../phpmailer/examples/gmail_xoauth.phps | 4 +- .../phpmailer/phpmailer/extras/README.md | 8 +- .../phpmailer/language/phpmailer.lang-nb.php | 32 ++-- .../language/phpmailer.lang-pt_br.php | 3 +- ...iler.lang-sr.php => phpmailer.lang-rs.php} | 2 +- .../phpmailer/language/phpmailer.lang-tr.php | 3 +- .../language/phpmailer.lang-zh_cn.php | 7 +- 12 files changed, 131 insertions(+), 113 deletions(-) rename app/src/vendor/phpmailer/phpmailer/language/{phpmailer.lang-sr.php => phpmailer.lang-rs.php} (96%) diff --git a/app/src/vendor/phpmailer/phpmailer/VERSION b/app/src/vendor/phpmailer/phpmailer/VERSION index 3ace8b4b..6ca8e95f 100644 --- a/app/src/vendor/phpmailer/phpmailer/VERSION +++ b/app/src/vendor/phpmailer/phpmailer/VERSION @@ -1 +1 @@ -5.2.23 +5.2.24 diff --git a/app/src/vendor/phpmailer/phpmailer/class.phpmailer.php b/app/src/vendor/phpmailer/phpmailer/class.phpmailer.php index 1b31ec14..acc006d6 100644 --- a/app/src/vendor/phpmailer/phpmailer/class.phpmailer.php +++ b/app/src/vendor/phpmailer/phpmailer/class.phpmailer.php @@ -31,7 +31,7 @@ class PHPMailer * The PHPMailer Version number. * @var string */ - public $Version = '5.2.23'; + public $Version = '5.2.24'; /** * Email priority. @@ -440,9 +440,9 @@ class PHPMailer * * Parameters: * boolean $result result of the send action - * string $to email address of the recipient - * string $cc cc email addresses - * string $bcc bcc email addresses + * array $to email addresses of the recipients + * array $cc cc email addresses + * array $bcc bcc email addresses * string $subject the subject * string $body the email body * string $from email address of sender @@ -1622,8 +1622,13 @@ public function smtpConnect($options = null) foreach ($hosts as $hostentry) { $hostinfo = array(); - if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { + if (!preg_match( + '/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/', + trim($hostentry), + $hostinfo + )) { // Not a valid host entry + $this->edebug('Ignoring invalid host: ' . $hostentry); continue; } // $hostinfo[2]: optional ssl or tls prefix @@ -1742,6 +1747,7 @@ public function setLanguage($langcode = 'en', $lang_path = '') 'dk' => 'da', 'no' => 'nb', 'se' => 'sv', + 'sr' => 'rs' ); if (isset($renamed_langcodes[$langcode])) { @@ -2024,10 +2030,7 @@ public function createHeader() { $result = ''; - if ($this->MessageDate == '') { - $this->MessageDate = self::rfcDate(); - } - $result .= $this->headerLine('Date', $this->MessageDate); + $result .= $this->headerLine('Date', $this->MessageDate == '' ? self::rfcDate() : $this->MessageDate); // To be created automatically by mail() if ($this->SingleTo) { @@ -4033,7 +4036,7 @@ class phpmailerException extends Exception */ public function errorMessage() { - $errorMsg = '' . $this->getMessage() . "
\n"; + $errorMsg = '' . htmlspecialchars($this->getMessage()) . "
\n"; return $errorMsg; } } diff --git a/app/src/vendor/phpmailer/phpmailer/class.pop3.php b/app/src/vendor/phpmailer/phpmailer/class.pop3.php index c464f90c..330c73a1 100644 --- a/app/src/vendor/phpmailer/phpmailer/class.pop3.php +++ b/app/src/vendor/phpmailer/phpmailer/class.pop3.php @@ -34,7 +34,7 @@ class POP3 * @var string * @access public */ - public $Version = '5.2.23'; + public $Version = '5.2.24'; /** * Default POP3 port number. diff --git a/app/src/vendor/phpmailer/phpmailer/class.smtp.php b/app/src/vendor/phpmailer/phpmailer/class.smtp.php index 01cee820..79c762be 100644 --- a/app/src/vendor/phpmailer/phpmailer/class.smtp.php +++ b/app/src/vendor/phpmailer/phpmailer/class.smtp.php @@ -30,7 +30,7 @@ class SMTP * The PHPMailer SMTP version number. * @var string */ - const VERSION = '5.2.23'; + const VERSION = '5.2.24'; /** * SMTP line break constant. @@ -81,7 +81,7 @@ class SMTP * @deprecated Use the `VERSION` constant instead * @see SMTP::VERSION */ - public $Version = '5.2.23'; + public $Version = '5.2.24'; /** * SMTP server port number. @@ -227,7 +227,7 @@ protected function edebug($str, $level = 0) break; case 'html': //Cleans up output a bit for a better looking, HTML-safe output - echo htmlentities( + echo gmdate('Y-m-d H:i:s') . ' ' . htmlentities( preg_replace('/[\r\n]+/', '', $str), ENT_QUOTES, 'UTF-8' @@ -989,7 +989,10 @@ public function turn() public function client_send($data) { $this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT); - return fwrite($this->smtp_conn, $data); + set_error_handler(array($this, 'errorHandler')); + $result = fwrite($this->smtp_conn, $data); + restore_error_handler(); + return $result; } /** @@ -1089,8 +1092,10 @@ protected function get_lines() $this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL); $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL); $data .= $str; - // If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen - if ((isset($str[3]) and $str[3] == ' ')) { + // If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled), + // or 4th character is a space, we are done reading, break the loop, + // string array access is a micro-optimisation over strlen + if (!isset($str[3]) or (isset($str[3]) and $str[3] == ' ')) { break; } // Timed-out? Log and break diff --git a/app/src/vendor/phpmailer/phpmailer/examples/code_generator.phps b/app/src/vendor/phpmailer/phpmailer/examples/code_generator.phps index 23458561..2182663d 100644 --- a/app/src/vendor/phpmailer/phpmailer/examples/code_generator.phps +++ b/app/src/vendor/phpmailer/phpmailer/examples/code_generator.phps @@ -58,46 +58,53 @@ class phpmailerAppException extends phpmailerException $example_code .= "\n\nclass phpmailerAppException extends phpmailerException {}"; $example_code .= "\n\ntry {"; +// Convert a string to its JavaScript representation. +function JSString($s) { + static $from = array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'); + static $to = array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\\"'); + return is_null($s)? 'null': '"' . str_replace($from, $to, "$s") . '"'; +} + try { if (isset($_POST["submit"]) && $_POST['submit'] == "Submit") { - $to = $_POST['To_Email']; + $to = $to_email; if (!PHPMailer::validateAddress($to)) { throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!"); } - $example_code .= "\n\$to = '{$_POST['To_Email']}';"; + $example_code .= "\n\$to = '" . addslashes($to_email) . "';"; $example_code .= "\nif(!PHPMailer::validateAddress(\$to)) {"; $example_code .= "\n throw new phpmailerAppException(\"Email address \" . " . "\$to . \" is invalid -- aborting!\");"; $example_code .= "\n}"; - switch ($_POST['test_type']) { + switch ($test_type) { case 'smtp': $mail->isSMTP(); // telling the class to use SMTP - $mail->SMTPDebug = (integer)$_POST['smtp_debug']; - $mail->Host = $_POST['smtp_server']; // SMTP server - $mail->Port = (integer)$_POST['smtp_port']; // set the SMTP port - if ($_POST['smtp_secure']) { - $mail->SMTPSecure = strtolower($_POST['smtp_secure']); + $mail->SMTPDebug = (integer)$smtp_debug; + $mail->Host = $smtp_server; // SMTP server + $mail->Port = (integer)$smtp_port; // set the SMTP port + if ($smtp_secure) { + $mail->SMTPSecure = strtolower($smtp_secure); } $mail->SMTPAuth = array_key_exists('smtp_authenticate', $_POST); // enable SMTP authentication? if (array_key_exists('smtp_authenticate', $_POST)) { - $mail->Username = $_POST['authenticate_username']; // SMTP account username - $mail->Password = $_POST['authenticate_password']; // SMTP account password + $mail->Username = $authenticate_username; // SMTP account username + $mail->Password = $authenticate_password; // SMTP account password } $example_code .= "\n\$mail->isSMTP();"; - $example_code .= "\n\$mail->SMTPDebug = " . $_POST['smtp_debug'] . ";"; - $example_code .= "\n\$mail->Host = \"" . $_POST['smtp_server'] . "\";"; - $example_code .= "\n\$mail->Port = \"" . $_POST['smtp_port'] . "\";"; - $example_code .= "\n\$mail->SMTPSecure = \"" . strtolower($_POST['smtp_secure']) . "\";"; + $example_code .= "\n\$mail->SMTPDebug = " . (integer) $smtp_debug . ";"; + $example_code .= "\n\$mail->Host = \"" . addslashes($smtp_server) . "\";"; + $example_code .= "\n\$mail->Port = \"" . addslashes($smtp_port) . "\";"; + $example_code .= "\n\$mail->SMTPSecure = \"" . addslashes(strtolower($smtp_secure)) . "\";"; $example_code .= "\n\$mail->SMTPAuth = " . (array_key_exists( 'smtp_authenticate', $_POST ) ? 'true' : 'false') . ";"; if (array_key_exists('smtp_authenticate', $_POST)) { - $example_code .= "\n\$mail->Username = \"" . $_POST['authenticate_username'] . "\";"; - $example_code .= "\n\$mail->Password = \"" . $_POST['authenticate_password'] . "\";"; + $example_code .= "\n\$mail->Username = \"" . addslashes($authenticate_username) . "\";"; + $example_code .= "\n\$mail->Password = \"" . addslashes($authenticate_password) . "\";"; } break; case 'mail': @@ -118,59 +125,59 @@ try { try { if ($_POST['From_Name'] != '') { - $mail->addReplyTo($_POST['From_Email'], $_POST['From_Name']); - $mail->setFrom($_POST['From_Email'], $_POST['From_Name']); + $mail->addReplyTo($from_email, $from_name); + $mail->setFrom($from_email, $from_name); $example_code .= "\n\$mail->addReplyTo(\"" . - $_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");"; + addslashes($from_email) . "\", \"" . addslashes($from_name) . "\");"; $example_code .= "\n\$mail->setFrom(\"" . - $_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");"; + addslashes($from_email) . "\", \"" . addslashes($from_name) . "\");"; } else { - $mail->addReplyTo($_POST['From_Email']); - $mail->setFrom($_POST['From_Email'], $_POST['From_Email']); + $mail->addReplyTo($from_email); + $mail->setFrom($from_email, $from_email); - $example_code .= "\n\$mail->addReplyTo(\"" . $_POST['From_Email'] . "\");"; + $example_code .= "\n\$mail->addReplyTo(\"" . addslashes($from_email) . "\");"; $example_code .= "\n\$mail->setFrom(\"" . - $_POST['From_Email'] . "\", \"" . $_POST['From_Email'] . "\");"; + addslashes($from_email) . "\", \"" . addslashes($from_email) . "\");"; } if ($_POST['To_Name'] != '') { - $mail->addAddress($to, $_POST['To_Name']); - $example_code .= "\n\$mail->addAddress(\"$to\", \"" . $_POST['To_Name'] . "\");"; + $mail->addAddress($to, $to_name); + $example_code .= "\n\$mail->addAddress(\"$to\", \"" . addslashes($to_name) . "\");"; } else { $mail->addAddress($to); $example_code .= "\n\$mail->addAddress(\"$to\");"; } if ($_POST['bcc_Email'] != '') { - $indiBCC = explode(" ", $_POST['bcc_Email']); + $indiBCC = explode(" ", $bcc_email); foreach ($indiBCC as $key => $value) { $mail->addBCC($value); - $example_code .= "\n\$mail->addBCC(\"$value\");"; + $example_code .= "\n\$mail->addBCC(\"" . addslashes($value) . "\");"; } } if ($_POST['cc_Email'] != '') { - $indiCC = explode(" ", $_POST['cc_Email']); + $indiCC = explode(" ", $cc_Email); foreach ($indiCC as $key => $value) { $mail->addCC($value); - $example_code .= "\n\$mail->addCC(\"$value\");"; + $example_code .= "\n\$mail->addCC(\"" . addslashes($value) . "\");"; } } } catch (phpmailerException $e) { //Catch all kinds of bad addressing throw new phpmailerAppException($e->getMessage()); } - $mail->Subject = $_POST['Subject'] . ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')'; - $example_code .= "\n\$mail->Subject = \"" . $_POST['Subject'] . - ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')";'; + $mail->Subject = $subject . ' (PHPMailer test using ' . strtoupper($test_type) . ')'; + $example_code .= "\n\$mail->Subject = \"" . addslashes($subject) . + ' (PHPMailer test using ' . addslashes(strtoupper($test_type)) . ')";'; if ($_POST['Message'] == '') { $body = file_get_contents('contents.html'); } else { - $body = $_POST['Message']; + $body = $message; } - $example_code .= "\n\$body = <<<'EOT'\n" . htmlentities($body) . "\nEOT;"; + $example_code .= "\n\$body = <<<'EOT'\n$body\nEOT;"; $mail->WordWrap = 78; // set word wrap to the RFC2822 limit $mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images @@ -187,7 +194,7 @@ try { $example_code .= "\n\ntry {"; $example_code .= "\n \$mail->send();"; $example_code .= "\n \$results_messages[] = \"Message has been sent using " . - strtoupper($_POST['test_type']) . "\";"; + addslashes(strtoupper($test_type)) . "\";"; $example_code .= "\n}"; $example_code .= "\ncatch (phpmailerException \$e) {"; $example_code .= "\n throw new phpmailerAppException('Unable to send to: ' . \$to. ': '.\$e->getMessage());"; @@ -195,7 +202,7 @@ try { try { $mail->send(); - $results_messages[] = "Message has been sent using " . strtoupper($_POST["test_type"]); + $results_messages[] = "Message has been sent using " . strtoupper($test_type); } catch (phpmailerException $e) { throw new phpmailerAppException("Unable to send to: " . $to . ': ' . $e->getMessage()); } @@ -309,22 +316,22 @@ $example_code .= "\n}"; function startAgain() { var post_params = { - "From_Name": "", - "From_Email": "", - "To_Name": "", - "To_Email": "", - "cc_Email": "", - "bcc_Email": "", - "Subject": "", - "Message": "", - "test_type": "", - "smtp_debug": "", - "smtp_server": "", - "smtp_port": "", - "smtp_secure": "", - "smtp_authenticate": "", - "authenticate_username": "", - "authenticate_password": "" + "From_Name": , + "From_Email": , + "To_Name": , + "To_Email": , + "cc_Email": , + "bcc_Email": , + "Subject": , + "Message": , + "test_type": , + "smtp_debug": , + "smtp_server": , + "smtp_port": , + "smtp_secure": , + "smtp_authenticate": , + "authenticate_username": , + "authenticate_password": }; var resetForm = document.createElement("form"); @@ -374,7 +381,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { echo "
\n"; echo "
Script:\n"; echo "
\n";
-    echo $example_code;
+    echo htmlentities($example_code);
     echo "\n
\n"; echo "\n
\n"; } @@ -390,7 +397,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - @@ -399,7 +406,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - @@ -408,7 +415,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - @@ -417,7 +424,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - @@ -428,7 +435,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - @@ -439,7 +446,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - @@ -448,7 +455,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - @@ -460,7 +467,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { + placeholder="Body of your email"> @@ -531,7 +538,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { @@ -539,7 +546,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { + value="" placeholder="Port"> @@ -560,14 +567,14 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { - value=""> + value="true"> @@ -575,7 +582,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") { diff --git a/app/src/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps b/app/src/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps index d64483a4..2aec1814 100644 --- a/app/src/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps +++ b/app/src/vendor/phpmailer/phpmailer/examples/gmail_xoauth.phps @@ -43,8 +43,8 @@ $mail->SMTPAuth = true; //Set AuthType $mail->AuthType = 'XOAUTH2'; -//User Email to use for SMTP authentication - Use the same Email used in Google Developer Console -$mail->oauthUserEmail = "someone@gmail.com"; +//User Email to use for SMTP authentication - user who gave consent to our app +$mail->oauthUserEmail = "from@gmail.com"; //Obtained From Google Developer Console $mail->oauthClientId = "RANDOMCHARS-----duv1n2.apps.googleusercontent.com"; diff --git a/app/src/vendor/phpmailer/phpmailer/extras/README.md b/app/src/vendor/phpmailer/phpmailer/extras/README.md index dac79e05..df8ca092 100644 --- a/app/src/vendor/phpmailer/phpmailer/extras/README.md +++ b/app/src/vendor/phpmailer/phpmailer/extras/README.md @@ -1,17 +1,17 @@ -#PHPMailer Extras +# PHPMailer Extras These classes provide optional additional functions to PHPMailer. These are not loaded by the PHPMailer autoloader, so in some cases you may need to `require` them yourself before using them. -##EasyPeasyICS +## EasyPeasyICS This class was originally written by Manuel Reinhard and provides a simple means of generating ICS/vCal files that are used in sending calendar events. PHPMailer does not use it directly, but you can use it to generate content appropriate for placing in the `Ical` property of PHPMailer. The PHPMailer project is now its official home as Manuel has given permission for that and is no longer maintaining it himself. -##htmlfilter +## htmlfilter This class by Konstantin Riabitsev and Jim Jagielski implements HTML filtering to remove potentially malicious tags, such as `